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 | };
|
---|
27 |
|
---|
28 | protected:
|
---|
29 | ParticleId_t fPartId; // Type of particle
|
---|
30 | Float_t fEnergy; // [GeV] Energy
|
---|
31 | Float_t fImpact; // [cm] impact parameter
|
---|
32 |
|
---|
33 | // Telescope orientation (see TDAS 02-11 regarding the
|
---|
34 | // precise meaning of these angles):
|
---|
35 | Float_t fTelescopePhi; // [rad]
|
---|
36 | Float_t fTelescopeTheta; // [rad]
|
---|
37 |
|
---|
38 | public:
|
---|
39 | MMcEvtBasic();
|
---|
40 | MMcEvtBasic(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
|
---|
41 |
|
---|
42 | // Getter
|
---|
43 | ParticleId_t GetPartId() const { return fPartId; }
|
---|
44 |
|
---|
45 | Float_t GetEnergy() const { return fEnergy; }
|
---|
46 | Float_t GetImpact() const { return fImpact; }
|
---|
47 |
|
---|
48 | Float_t GetTelescopePhi() const { return fTelescopePhi; }
|
---|
49 | Float_t GetTelescopeTheta() const { return fTelescopeTheta; }
|
---|
50 |
|
---|
51 | static TString GetParticleName(Int_t id)
|
---|
52 | {
|
---|
53 | switch (id)
|
---|
54 | {
|
---|
55 | case kUNDEFINED:return "Undefined";
|
---|
56 | case kGAMMA: return "Gamma";
|
---|
57 | case kPOSITRON: return "Positron";
|
---|
58 | case kELECTRON: return "Electron";
|
---|
59 | case kANTIMUON: return "Anti-Muon";
|
---|
60 | case kMUON: return "Muon";
|
---|
61 | case kPI0: return "Pi-0";
|
---|
62 | case kNEUTRON: return "Neutron";
|
---|
63 | case kPROTON: return "Proton";
|
---|
64 | case kHELIUM: return "Helium";
|
---|
65 | case kOXYGEN: return "Oxygen";
|
---|
66 | case kIRON: return "Iron";
|
---|
67 | }
|
---|
68 |
|
---|
69 | return Form("Id:%d", id);
|
---|
70 | }
|
---|
71 |
|
---|
72 | static TString GetParticleSymbol(Int_t id)
|
---|
73 | {
|
---|
74 | switch (id)
|
---|
75 | {
|
---|
76 | case kUNDEFINED:return "N/A";
|
---|
77 | case kGAMMA: return "\\gamma";
|
---|
78 | case kPOSITRON: return "e^{+}";
|
---|
79 | case kELECTRON: return "e^{-}";
|
---|
80 | case kANTIMUON: return "\\mu^{+}";
|
---|
81 | case kMUON: return "\\mu^{-}";
|
---|
82 | case kPI0: return "\\pi^{0}";
|
---|
83 | case kNEUTRON: return "n";
|
---|
84 | case kPROTON: return "p";
|
---|
85 | case kHELIUM: return "He";
|
---|
86 | case kOXYGEN: return "O";
|
---|
87 | case kIRON: return "Fe";
|
---|
88 | }
|
---|
89 |
|
---|
90 | return Form("Id:%d", id);
|
---|
91 | }
|
---|
92 |
|
---|
93 | static TString GetEnergyStr(Float_t e)
|
---|
94 | {
|
---|
95 | if (e>=1000)
|
---|
96 | return Form("%.1fTeV", e/1000);
|
---|
97 |
|
---|
98 | if (e>=10)
|
---|
99 | return Form("%dGeV", (Int_t)(e+.5));
|
---|
100 |
|
---|
101 | if (e>=1)
|
---|
102 | return Form("%.1fGeV", e);
|
---|
103 |
|
---|
104 | return Form("%dMeV", (Int_t)(e*1000+.5));
|
---|
105 | }
|
---|
106 |
|
---|
107 | TString GetParticleSymbol() const
|
---|
108 | {
|
---|
109 | return GetParticleSymbol(fPartId);
|
---|
110 | }
|
---|
111 |
|
---|
112 | TString GetParticleName() const
|
---|
113 | {
|
---|
114 | return GetParticleName(fPartId);
|
---|
115 | }
|
---|
116 |
|
---|
117 | TString GetEnergyStr() const
|
---|
118 | {
|
---|
119 | return GetEnergyStr(fEnergy);
|
---|
120 | }
|
---|
121 |
|
---|
122 | // Setter
|
---|
123 | void SetPartId(ParticleId_t id) { fPartId = id; }
|
---|
124 | void SetEnergy(Float_t Energy) { fEnergy=Energy; } //Set Energy
|
---|
125 | void SetImpact(Float_t Impact) { fImpact=Impact;} //Set impact parameter
|
---|
126 |
|
---|
127 | void SetTelescopeTheta(Float_t Theta) { fTelescopeTheta=Theta; }
|
---|
128 | void SetTelescopePhi (Float_t Phi) { fTelescopePhi=Phi; }
|
---|
129 |
|
---|
130 | void Fill(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
|
---|
131 |
|
---|
132 | // TObject
|
---|
133 | void Clear(Option_t *opt=NULL);
|
---|
134 | void Print(Option_t *opt=NULL) const;
|
---|
135 |
|
---|
136 | ClassDef(MMcEvtBasic, 2) //Stores Basic Montecarlo Information of one event
|
---|
137 |
|
---|
138 | };
|
---|
139 |
|
---|
140 | #endif
|
---|