1 | #ifndef MARS_MMcEvtBasic
|
---|
2 | #define MARS_MMcEvtBasic
|
---|
3 |
|
---|
4 | #ifndef MARS_MParContainer
|
---|
5 | #include "MParContainer.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 |
|
---|
9 | class MMcEvtBasic : public MParContainer
|
---|
10 | {
|
---|
11 | public:
|
---|
12 | enum ParticleId_t
|
---|
13 | {
|
---|
14 | kUNDEFINED = -1,
|
---|
15 | kGAMMA = 1,
|
---|
16 | kPOSITRON = 2,
|
---|
17 | kELECTRON = 3,
|
---|
18 | kANTIMUON = 5,
|
---|
19 | kMUON = 6,
|
---|
20 | kPI0 = 7,
|
---|
21 | kNEUTRON = 13,
|
---|
22 | kPROTON = 14,
|
---|
23 | kHELIUM = 402,
|
---|
24 | kOXYGEN = 1608,
|
---|
25 | kIRON = 5626,
|
---|
26 | kNightSky = 9999
|
---|
27 | };
|
---|
28 |
|
---|
29 | protected:
|
---|
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 | public:
|
---|
40 | MMcEvtBasic();
|
---|
41 | MMcEvtBasic(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
|
---|
42 |
|
---|
43 | // Getter
|
---|
44 | ParticleId_t GetPartId() const { return fPartId; }
|
---|
45 |
|
---|
46 | Float_t GetEnergy() const { return fEnergy; }
|
---|
47 | Float_t GetImpact() const { return fImpact; }
|
---|
48 |
|
---|
49 | Float_t GetTelescopePhi() const { return fTelescopePhi; }
|
---|
50 | Float_t GetTelescopeTheta() const { return fTelescopeTheta; }
|
---|
51 |
|
---|
52 | static TString GetParticleName(Int_t id)
|
---|
53 | {
|
---|
54 | switch (id)
|
---|
55 | {
|
---|
56 | case kUNDEFINED:return "Undefined";
|
---|
57 | case kGAMMA: return "Gamma";
|
---|
58 | case kPOSITRON: return "Positron";
|
---|
59 | case kELECTRON: return "Electron";
|
---|
60 | case kANTIMUON: return "Anti-Muon";
|
---|
61 | case kMUON: return "Muon";
|
---|
62 | case kPI0: return "Pi-0";
|
---|
63 | case kNEUTRON: return "Neutron";
|
---|
64 | case kPROTON: return "Proton";
|
---|
65 | case kHELIUM: return "Helium";
|
---|
66 | case kOXYGEN: return "Oxygen";
|
---|
67 | case kIRON: return "Iron";
|
---|
68 | case kNightSky: return "NSB";
|
---|
69 | }
|
---|
70 |
|
---|
71 | return Form("Id:%d", id);
|
---|
72 | }
|
---|
73 |
|
---|
74 | static TString GetParticleSymbol(Int_t id)
|
---|
75 | {
|
---|
76 | switch (id)
|
---|
77 | {
|
---|
78 | case kUNDEFINED:return "N/A";
|
---|
79 | case kGAMMA: return "\\gamma";
|
---|
80 | case kPOSITRON: return "e^{+}";
|
---|
81 | case kELECTRON: return "e^{-}";
|
---|
82 | case kANTIMUON: return "\\mu^{+}";
|
---|
83 | case kMUON: return "\\mu^{-}";
|
---|
84 | case kPI0: return "\\pi^{0}";
|
---|
85 | case kNEUTRON: return "n";
|
---|
86 | case kPROTON: return "p";
|
---|
87 | case kHELIUM: return "He";
|
---|
88 | case kOXYGEN: return "O";
|
---|
89 | case kIRON: return "Fe";
|
---|
90 | case kNightSky: return "\\gamma_{NSB}";
|
---|
91 | }
|
---|
92 |
|
---|
93 | return Form("Id:%d", id);
|
---|
94 | }
|
---|
95 |
|
---|
96 | static TString GetEnergyStr(Float_t e)
|
---|
97 | {
|
---|
98 | if (e>=1000)
|
---|
99 | return Form("%.1fTeV", e/1000);
|
---|
100 |
|
---|
101 | if (e>=10)
|
---|
102 | return Form("%dGeV", (Int_t)(e+.5));
|
---|
103 |
|
---|
104 | if (e>=1)
|
---|
105 | return Form("%.1fGeV", e);
|
---|
106 |
|
---|
107 | return Form("%dMeV", (Int_t)(e*1000+.5));
|
---|
108 | }
|
---|
109 |
|
---|
110 | TString GetParticleSymbol() const
|
---|
111 | {
|
---|
112 | return GetParticleSymbol(fPartId);
|
---|
113 | }
|
---|
114 |
|
---|
115 | TString GetParticleName() const
|
---|
116 | {
|
---|
117 | return GetParticleName(fPartId);
|
---|
118 | }
|
---|
119 |
|
---|
120 | TString GetEnergyStr() const
|
---|
121 | {
|
---|
122 | return GetEnergyStr(fEnergy);
|
---|
123 | }
|
---|
124 |
|
---|
125 | // Setter
|
---|
126 | void SetPartId(ParticleId_t id) { fPartId = id; }
|
---|
127 | void SetEnergy(Float_t Energy) { fEnergy=Energy; } //Set Energy
|
---|
128 | void SetImpact(Float_t Impact) { fImpact=Impact;} //Set impact parameter
|
---|
129 |
|
---|
130 | void SetTelescopeTheta(Float_t Theta) { fTelescopeTheta=Theta; }
|
---|
131 | void SetTelescopePhi (Float_t Phi) { fTelescopePhi=Phi; }
|
---|
132 |
|
---|
133 | void Fill(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
|
---|
134 |
|
---|
135 | // TObject
|
---|
136 | void Clear(Option_t *opt=NULL);
|
---|
137 | void Print(Option_t *opt=NULL) const;
|
---|
138 |
|
---|
139 | ClassDef(MMcEvtBasic, 2) //Stores Basic Montecarlo Information of one event
|
---|
140 |
|
---|
141 | };
|
---|
142 |
|
---|
143 | #endif
|
---|