source: trunk/Mars/mmc/MMcEvtBasic.h@ 19992

Last change on this file since 19992 was 19992, checked in by tbretz, 4 years ago
Moved CoreX and CoreY to MMcEvtBasic.
File size: 3.0 KB
Line 
1#ifndef MARS_MMcEvtBasic
2#define MARS_MMcEvtBasic
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MMcEvtBasic : public MParContainer
9{
10public:
11 enum ParticleId_t
12 {
13 kUNDEFINED = -1,
14 kGAMMA = 1,
15 kPOSITRON = 2,
16 kELECTRON = 3,
17 kANTIMUON = 5,
18 kMUON = 6,
19 kPI0 = 7,
20 kNEUTRON = 13,
21 kPROTON = 14,
22 kHELIUM = 402,
23 kOXYGEN = 1608,
24 kIRON = 5626,
25 kArtificial = 9998,
26 kNightSky = 9999
27 };
28
29protected:
30 ParticleId_t fPartId; // Type of particle
31 Float_t fEnergy; // [GeV] Energy
32 Float_t fImpact; // [cm] impact parameter
33
34 // Telescope orientation (see TDAS 02-11 regarding the
35 // precise meaning of these angles):
36 Float_t fTelescopePhi; // [rad]
37 Float_t fTelescopeTheta; // [rad]
38
39 Float_t fTheta; // [rad] Theta angle of event
40 Float_t fPhi; // [rad] Phi angle of event (see class description)
41
42 Float_t fCoreX; // [cm] Core x pos
43 Float_t fCoreY; // [cm] Core y pos
44
45public:
46 MMcEvtBasic();
47 MMcEvtBasic(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
48 void operator=(const MMcEvtBasic &evt);
49
50 // Getter
51 ParticleId_t GetPartId() const { return fPartId; }
52
53 Float_t GetEnergy() const { return fEnergy; }
54 Float_t GetImpact() const { return fImpact; }
55
56 Float_t GetTelescopePhi() const { return fTelescopePhi; }
57 Float_t GetTelescopeTheta() const { return fTelescopeTheta; }
58
59 Float_t GetParticlePhi() const { return fPhi; }
60 Float_t GetParticleTheta() const { return fTheta; }
61
62 //Float_t GetTheta() const { return fTheta; }
63 //Float_t GetPhi() const { return fPhi ; }
64
65 static TString GetParticleName(Int_t id);
66 static TString GetParticleSymbol(Int_t id);
67 static TString GetEnergyStr(Float_t e);
68
69 TString GetParticleSymbol() const
70 {
71 return GetParticleSymbol(fPartId);
72 }
73
74 TString GetParticleName() const
75 {
76 return GetParticleName(fPartId);
77 }
78
79 TString GetEnergyStr() const
80 {
81 return GetEnergyStr(fEnergy);
82 }
83
84 // Setter
85 void SetPartId(ParticleId_t id) { fPartId = id; }
86 void SetEnergy(Float_t Energy) { fEnergy=Energy; } //Set Energy
87 void SetImpact(Float_t Impact) { fImpact=Impact;} //Set impact parameter
88
89 void SetTelescopeTheta(Float_t Theta) { fTelescopeTheta=Theta; }
90 void SetTelescopePhi (Float_t Phi) { fTelescopePhi=Phi; }
91
92 void SetParticleTheta(Float_t Theta) { fTheta=Theta; }
93 void SetParticlePhi (Float_t Phi) { fPhi=Phi; }
94
95 //void SetTheta(Float_t Theta) { fTheta=Theta; } //Set Theta angle
96 //void SetPhi(Float_t Phi) { fPhi=Phi; } //Set Phi angle
97
98 void Fill(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
99
100 // TObject
101 void Clear(Option_t *opt=NULL);
102 void Print(Option_t *opt=NULL) const;
103
104 // MParContainer
105 Bool_t SetupFits(fits &fin);
106
107 ClassDef(MMcEvtBasic, 4) //Stores Basic Montecarlo Information of one event
108
109};
110
111#endif
Note: See TracBrowser for help on using the repository browser.