C++ Interface to Tauola
include
Tauola
include/Tauola/TauolaHEPEVTEvent.h
1
#ifndef _TauolaHEPEVTEvent_h_included_
2
#define _TauolaHEPEVTEvent_h_included_
3
4
/**
5
* @class TauolaHEPEVTParticle
6
*
7
* @brief Single particle of HEPEVT event record
8
*
9
* This class implements the virtual methods of
10
* TauolaEvent. In this way it provides an
11
* interface between the generic TauolaEvent class
12
* and information stored in HEPEVT event record.
13
*
14
* @author Tomasz Przedzinski
15
* @date 24 November 2011
16
*/
17
18
#include <iostream>
19
#include "TauolaEvent.h"
20
#include "TauolaParticle.h"
21
#include "TauolaHEPEVTParticle.h"
22
23
namespace
Tauolapp
24
{
25
26
// Uncomment this line to use interface to common block HEPEVT
27
// But first be sure about suitable for you value of NMXHEP
28
// and whether phep, vhep should be declared float or double
29
//#define USE_HEPEVT_INTERFACE
30
31
#ifdef USE_HEPEVT_INTERFACE
32
33
// Change this value to match HEPEVT size
34
const
int
NMXHEP = 10000;
35
36
extern
"C"
struct
{
37
int
nevhep;
// serial number
38
int
nhep;
// number of particles
39
int
isthep[NMXHEP];
// status code
40
int
idhep [NMXHEP];
// particle PDG ID
41
int
jmohep[NMXHEP][2];
// parent particles
42
int
jdahep[NMXHEP][2];
// childreen particles
43
double
phep [NMXHEP][5];
// four-momentum, mass [GeV]
44
double
vhep [NMXHEP][4];
// vertex [mm]
45
} hepevt_;
46
47
#endif
48
49
class
TauolaHEPEVTParticle
;
50
51
class
TauolaHEPEVTEvent
:
public
TauolaEvent
{
52
53
public
:
54
55
/** Default destructor */
56
~TauolaHEPEVTEvent
();
57
58
/** Default constructor */
59
TauolaHEPEVTEvent
();
60
61
/** Add particle at the end of event record */
62
void
addParticle
(
TauolaHEPEVTParticle
*p);
63
64
/** Get particle at index 'i' */
65
TauolaHEPEVTParticle
*
getParticle
(
int
i);
66
67
/** Get higher-most index of the particles in event (nhep) */
68
int
getParticleCount
();
69
70
/** Implementation of TauolaEvent virtual method.
71
This returns a list of particles in the event with
72
pdg id = "pdgID". */
73
std::vector<TauolaParticle*>
findParticles
(
int
pdgID);
74
75
/** Implementation of TauolaEven virtual method.
76
This returns a list of particles in the event with
77
pdg id = "pdgID" and stable status code. */
78
std::vector<TauolaParticle*>
findStableParticles
(
int
pdgID);
79
80
/** Print out list of particles in the event */
81
void
print
();
82
83
/** Remove all particles from the event */
84
void
clear
();
85
86
#ifdef USE_HEPEVT_INTERFACE
87
/** Fill TauolaHEPEVTEvent from HEPEVT common block */
88
static
void
read_event_from_HEPEVT(
TauolaHEPEVTEvent
*evt);
89
90
/** Write to HEPEVT common block content of TauolaHEPEVTEvent */
91
static
void
write_event_to_HEPEVT(
TauolaHEPEVTEvent
*evt);
92
#endif
93
94
private
:
95
96
/** List of all particles */
97
std::vector<TauolaHEPEVTParticle*>
particle_list
;
98
};
99
100
}
// namespace Tauolapp
101
#endif
102
TauolaHEPEVTParticle
Single particle of HEPEVT event record.
Tauolapp::TauolaEvent
Definition:
include/Tauola/TauolaEvent.h:29
Tauolapp::TauolaHEPEVTEvent
Definition:
include/Tauola/TauolaHEPEVTEvent.h:51
Tauolapp::TauolaHEPEVTEvent::getParticle
TauolaHEPEVTParticle * getParticle(int i)
Definition:
TauolaHEPEVTEvent.cxx:23
Tauolapp::TauolaHEPEVTEvent::findParticles
std::vector< TauolaParticle * > findParticles(int pdgID)
Definition:
TauolaHEPEVTEvent.cxx:35
Tauolapp::TauolaHEPEVTEvent::~TauolaHEPEVTEvent
~TauolaHEPEVTEvent()
Definition:
TauolaHEPEVTEvent.cxx:8
Tauolapp::TauolaHEPEVTEvent::print
void print()
Definition:
TauolaHEPEVTEvent.cxx:75
Tauolapp::TauolaHEPEVTEvent::particle_list
std::vector< TauolaHEPEVTParticle * > particle_list
Definition:
include/Tauola/TauolaHEPEVTEvent.h:97
Tauolapp::TauolaHEPEVTEvent::getParticleCount
int getParticleCount()
Definition:
TauolaHEPEVTEvent.cxx:29
Tauolapp::TauolaHEPEVTEvent::addParticle
void addParticle(TauolaHEPEVTParticle *p)
Definition:
TauolaHEPEVTEvent.cxx:15
Tauolapp::TauolaHEPEVTEvent::TauolaHEPEVTEvent
TauolaHEPEVTEvent()
Definition:
TauolaHEPEVTEvent.cxx:13
Tauolapp::TauolaHEPEVTEvent::findStableParticles
std::vector< TauolaParticle * > findStableParticles(int pdgID)
Definition:
TauolaHEPEVTEvent.cxx:51
Tauolapp::TauolaHEPEVTEvent::clear
void clear()
Definition:
TauolaHEPEVTEvent.cxx:81
Tauolapp::TauolaHEPEVTParticle
Definition:
include/Tauola/TauolaHEPEVTParticle.h:30
Tauolapp
Definition:
include/Tauola/DecayList.h:33
Generated by
1.9.1