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 | TString GetParticleName() const
|
---|
52 | {
|
---|
53 | switch (fPartId)
|
---|
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", fPartId);
|
---|
70 | }
|
---|
71 |
|
---|
72 | TString GetParticleSymbol() const
|
---|
73 | {
|
---|
74 | switch (fPartId)
|
---|
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", fPartId);
|
---|
91 | }
|
---|
92 |
|
---|
93 | TString GetEnergyStr() const
|
---|
94 | {
|
---|
95 | if (fEnergy>1000)
|
---|
96 | return Form("%.1fTeV", fEnergy/1000);
|
---|
97 |
|
---|
98 | if (fEnergy>10)
|
---|
99 | return Form("%dGeV", (Int_t)(fEnergy+.5));
|
---|
100 |
|
---|
101 | if (fEnergy>1)
|
---|
102 | return Form("%.1fGeV", fEnergy);
|
---|
103 |
|
---|
104 | return Form("%dMeV", (Int_t)(fEnergy*1000+.5));
|
---|
105 | }
|
---|
106 |
|
---|
107 |
|
---|
108 | // Setter
|
---|
109 | void SetPartId(ParticleId_t id) { fPartId = id; }
|
---|
110 | void SetEnergy(Float_t Energy) { fEnergy=Energy; } //Set Energy
|
---|
111 | void SetImpact(Float_t Impact) { fImpact=Impact;} //Set impact parameter
|
---|
112 |
|
---|
113 | void SetTelescopeTheta(Float_t Theta) { fTelescopeTheta=Theta; }
|
---|
114 | void SetTelescopePhi (Float_t Phi) { fTelescopePhi=Phi; }
|
---|
115 |
|
---|
116 | void Fill(ParticleId_t, Float_t, Float_t, Float_t, Float_t);
|
---|
117 |
|
---|
118 | // TObject
|
---|
119 | void Clear(Option_t *opt=NULL);
|
---|
120 | void Print(Option_t *opt=NULL) const;
|
---|
121 |
|
---|
122 | ClassDef(MMcEvtBasic, 2) //Stores Basic Montecarlo Information of one event
|
---|
123 |
|
---|
124 | };
|
---|
125 |
|
---|
126 | #endif
|
---|