]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/Tauola/TauolaHEPEVTEvent.h
Handle expressions with negations (Diego)
[u/mrichter/AliRoot.git] / TEvtGen / Tauola / TauolaHEPEVTEvent.h
CommitLineData
0ca57c2f 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
23namespace 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
34const int NMXHEP = 10000;
35
36extern "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
49class TauolaHEPEVTParticle;
50
51class 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