HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TpcSimMCEvent.h
Go to the documentation of this file.
1 #ifndef TPCSIMMCEVENT_H
2 #define TPCSIMMCEVENT_H
3 
4 #include "TObject.h"
5 #include "TVector3.h"
6 #include "TLorentzVector.h"
7 //#include "TParticle.h"
8 #include "TClonesArray.h"
9 #include "HarpoDebug.h"
10 
11 #include "TpcSimIonisationTrack.h"
12 
13 class TpcSimMCTrack : public TObject {
14 
15  public:
16  TpcSimMCTrack();
17  TpcSimMCTrack(const TpcSimMCTrack &tr);
18  TpcSimMCTrack(Double_t x0, Double_t y0, Double_t z0, Double_t t0,
19  Double_t px, Double_t py, Double_t pz,
20  Int_t fPid);
22 
23  Double_t GetX0() {return fX0;} // X vertex
24  Double_t GetY0() {return fY0;} // Y vertex
25  Double_t GetZ0() {return fZ0;} // Z vertex
26  Double_t GetT0() {return fT0;} // T vertex
27  TVector3 GetOrigin() {return TVector3(fX0,fY0,fZ0);} // T vertex
28  TLorentzVector GetOrigin4() {return TLorentzVector(fX0,fY0,fZ0,fT0);} // T vertex
29 
30  Double_t GetPx() {return fPx;} //
31  Double_t GetPy() {return fPy;} //
32  Double_t GetPz() {return fPz;} //
33  Double_t GetE() {return fE;} //
34  TVector3 GetP() {return TVector3(fPx,fPy,fPz);} //
35  TLorentzVector Get4Vector() {return TLorentzVector(fPx,fPy,fPz,fE);} //
36 
37  Double_t GetPolax() {return fPolax;} //
38  Double_t GetPolay() {return fPolay;} //
39  Double_t GetPolaz() {return fPolaz;} //
40  TVector3 GetPola() {return TVector3(fPolax,fPolay,fPolaz);} //
41 
42  Double_t GetMass() {return fMass;}
43  Int_t GetPdgCode() {return fPdgCode;}
44 
45  void SetX0(Double_t value) {fX0 = value;} // X vertex
46  void SetY0(Double_t value) {fY0 = value;} // Y vertex
47  void SetZ0(Double_t value) {fZ0 = value;} // Z vertex
48  void SetT0(Double_t value) {fT0 = value;} // T vertex
49 
50  void SetPx(Double_t value) {fPx = value;} //
51  void SetPy(Double_t value) {fPy = value;} //
52  void SetPz(Double_t value) {fPz = value;} //
53  void SetE(Double_t value) {fE = value;} //
54  void SetPolax(Double_t value) {fPolax = value;} //
55  void SetPolay(Double_t value) {fPolay = value;} //
56  void SetPolaz(Double_t value) {fPolaz = value;} //
57 
58  void SetMass(Double_t value) {fMass = value;}
59  void SetPdgCode(Int_t value) {fPdgCode = value;}
60 
61  private:
62 
63  Double_t fX0; // X vertex
64  Double_t fY0; // Y vertex
65  Double_t fZ0; // Z vertex
66  Double_t fT0; // T vertex
67 
68  Double_t fPx; //
69  Double_t fPy; //
70  Double_t fPz; //
71  Double_t fE; //
72  Double_t fPolax; //
73  Double_t fPolay; //
74  Double_t fPolaz; //
75 
76  Double_t fMass;
77  Int_t fPdgCode; // PDG Code: e-: 11, mu-: 13, pi0: 111, pi+: 211,
78  // proton: 2212, gamma: 22
79 
81 };
82 
83 
84 class TpcSimMCEvent : public TObject {
85 
86  public:
87  TpcSimMCEvent(Int_t event = -1);
88  virtual ~TpcSimMCEvent();
89 
90  /* void GenerateEvent(Int_t seed = 0); */
91  TpcSimMCTrack* GetTrack(Int_t i) {
92  if(gHarpoDebug>1)
93  Info("GetTrack","%f",((TpcSimMCTrack*)fTracks->At(i))->GetT0());
94  if(i<0 || i>=fkMaxNtracks) return 0;
95  return (TpcSimMCTrack*)fTracks->At(i);
96  }
97  void AddTrack(TpcSimMCTrack* tr);
99 
100  Int_t GetNtracks() {return fNtracks;}
101 
102  private:
103 
104  Int_t fNtracks;
105  TClonesArray* fTracks;
106  Int_t fEvent;
107 
108  static const Int_t fkMaxNtracks = 100;
109 
111 };
112 
113 #endif
ClassDef(TpcSimMCTrack, 1)
TVector3 GetPola()
Definition: TpcSimMCEvent.h:40
void SetPdgCode(Int_t value)
Definition: TpcSimMCEvent.h:59
TVector3 GetOrigin()
Definition: TpcSimMCEvent.h:27
TClonesArray * fTracks
Double_t GetY0()
Definition: TpcSimMCEvent.h:24
Double_t fZ0
Definition: TpcSimMCEvent.h:65
Double_t GetPolaz()
Definition: TpcSimMCEvent.h:39
Double_t GetPz()
Definition: TpcSimMCEvent.h:32
TVector3 GetP()
Definition: TpcSimMCEvent.h:34
Double_t fMass
Definition: TpcSimMCEvent.h:76
void SetPolaz(Double_t value)
Definition: TpcSimMCEvent.h:56
Double_t GetZ0()
Definition: TpcSimMCEvent.h:25
Int_t GetPdgCode()
Definition: TpcSimMCEvent.h:43
void SetZ0(Double_t value)
Definition: TpcSimMCEvent.h:47
Double_t GetMass()
Definition: TpcSimMCEvent.h:42
Double_t fPolax
Definition: TpcSimMCEvent.h:72
Double_t GetT0()
Definition: TpcSimMCEvent.h:26
void SetPx(Double_t value)
Definition: TpcSimMCEvent.h:50
Double_t GetE()
Definition: TpcSimMCEvent.h:33
void SetPolay(Double_t value)
Definition: TpcSimMCEvent.h:55
Double_t GetPy()
Definition: TpcSimMCEvent.h:31
Double_t fPx
Definition: TpcSimMCEvent.h:68
ClassDef(TpcSimMCEvent, 1)
Double_t fPz
Definition: TpcSimMCEvent.h:70
void SetPy(Double_t value)
Definition: TpcSimMCEvent.h:51
void SetX0(Double_t value)
Definition: TpcSimMCEvent.h:45
Double_t fY0
Definition: TpcSimMCEvent.h:64
Double_t fPolaz
Definition: TpcSimMCEvent.h:74
Int_t GetNtracks()
void SetY0(Double_t value)
Definition: TpcSimMCEvent.h:46
Double_t GetPolax()
Definition: TpcSimMCEvent.h:37
TpcSimMCTrack * GetTrack(Int_t i)
Definition: TpcSimMCEvent.h:91
TLorentzVector Get4Vector()
Definition: TpcSimMCEvent.h:35
void SetE(Double_t value)
Definition: TpcSimMCEvent.h:53
Double_t GetX0()
Definition: TpcSimMCEvent.h:23
Long64_t gHarpoDebug
Definition: HarpoDebug.cxx:9
void SetPolax(Double_t value)
Definition: TpcSimMCEvent.h:54
Double_t GetPolay()
Definition: TpcSimMCEvent.h:38
static const Int_t fkMaxNtracks
Double_t fPolay
Definition: TpcSimMCEvent.h:73
TLorentzVector GetOrigin4()
Definition: TpcSimMCEvent.h:28
virtual ~TpcSimMCEvent()
void SetMass(Double_t value)
Definition: TpcSimMCEvent.h:58
void AddTrack(TpcSimMCTrack *tr)
Double_t fX0
Definition: TpcSimMCEvent.h:63
Double_t GetPx()
Definition: TpcSimMCEvent.h:30
Double_t fPy
Definition: TpcSimMCEvent.h:69
Double_t fT0
Definition: TpcSimMCEvent.h:66
void SetT0(Double_t value)
Definition: TpcSimMCEvent.h:48
TpcSimMCEvent(Int_t event=-1)
void SetPz(Double_t value)
Definition: TpcSimMCEvent.h:52