source: trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.hxx@ 5138

Last change on this file since 5138 was 4513, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 7.8 KB
Line 
1#ifndef __MMcEvt__
2#define __MMcEvt__
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MMcEvt : public MParContainer
9{
10public:
11 //
12 // ParticleId for Monte Carlo simulation
13 //
14 enum ParticleId_t
15 {
16 kGAMMA = 1,
17 kPOSITRON = 2,
18 kELECTRON = 3,
19 kANTIMUON = 5,
20 kMUON = 6,
21 kPI0 = 7,
22 kNEUTRON = 13,
23 kPROTON = 14,
24 kHELIUM = 402,
25 kOXYGEN = 1608,
26 kIRON = 5626
27 };
28
29private:
30 UInt_t fEvtNumber;
31 UShort_t fPartId; // Type of particle
32 Float_t fEnergy; // [GeV] Energy
33 Float_t fThick0; // [g/cm2]
34 Float_t fFirstTarget; // []
35 Float_t fZFirstInteraction; // [cm]
36
37 Float_t fTheta; // [rad] Theta angle of event
38 Float_t fPhi; // [rad] Phi angle of event (see class description)
39
40 Float_t fCoreD; // [cm] Core d pos
41 Float_t fCoreX; // [cm] Core x pos
42 Float_t fCoreY; // [cm] Core y pos
43 Float_t fImpact; // [cm] impact parameter
44
45 // Up to here, the info from the CORSIKA event header.
46
47 // Telescope orientation:
48 Float_t fTelescopePhi; // [rad] (see class description)
49 Float_t fTelescopeTheta; // [rad]
50
51 // Time of first and last photon:
52 Float_t fTimeFirst; // [ns]
53 Float_t fTimeLast; // [ns]
54
55 // 6 parameters and chi2 of the NKG fit to the longitudinal
56 // particle distribution. See CORSIKA manual for explanation,
57 // section 4.42 "Longitudinal shower development":
58 //
59 Float_t fLongiNmax; // [particles]
60 Float_t fLongit0; // [g/cm2]
61 Float_t fLongitmax; // [g/cm2]
62 Float_t fLongia; // [g/cm2]
63 Float_t fLongib; // []
64 Float_t fLongic; // [cm2/g]
65 Float_t fLongichi2;
66
67 UInt_t fPhotIni; // [ph] Initial number of photons
68 UInt_t fPassPhotAtm; // [ph] Passed atmosphere
69 UInt_t fPassPhotRef; // [ph] Passed reflector(reflectivity + effective area)
70 UInt_t fPassPhotCone; // [ph] Within any valid pixel, before plexiglas
71 UInt_t fPhotElfromShower; // [phe] Passed qe, coming from the shower
72 UInt_t fPhotElinCamera; // [phe] usPhotElfromShower + mean of phe
73 // from NSB
74
75 // Now follow the fraction of photons reaching the camera produced by
76 // electrons, muons and other particles respectively:
77
78 Float_t fElecCphFraction;
79 Float_t fMuonCphFraction;
80 Float_t fOtherCphFraction;
81
82
83
84 public:
85 MMcEvt() ;
86
87 MMcEvt( UInt_t, UShort_t, Float_t, Float_t, Float_t,
88 Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
89 Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
90 Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
91 UInt_t, UInt_t, UInt_t, UInt_t, UInt_t, UInt_t,
92 Float_t, Float_t, Float_t) ;
93
94 ~MMcEvt();
95
96 void Clear(Option_t *opt=NULL);
97
98 void Fill( UInt_t, UShort_t, Float_t, Float_t, Float_t,
99 Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
100 Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
101 Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,
102 UInt_t, UInt_t, UInt_t, UInt_t, UInt_t, UInt_t,
103 Float_t, Float_t, Float_t) ;
104
105 //virtual void AsciiWrite(ofstream &fout) const;
106
107 void Print(Option_t *opt=NULL) const;
108
109 UInt_t GetEvtNumber() const { return fEvtNumber; } //Get Event Number
110 Short_t GetPartId() const { return fPartId; } //Get Type of particle
111 Float_t GetEnergy() const { return fEnergy; } //Get Energy
112
113 Float_t GetTheta() const { return fTheta; } //Get Theta angle
114 Float_t GetPhi() const { return fPhi ; } //Get Phi angle
115
116/* Float_t GetCoreD() { return fCoreD; } //Get Core d pos */
117 Float_t GetCoreX() { return fCoreX; } //Get Core x pos
118 Float_t GetCoreY() { return fCoreY; } //Get Core y pos
119 Float_t GetImpact() const { return fImpact;} //Get impact parameter
120
121 UInt_t GetPhotIni() { return fPhotIni; } //Get Initial photons
122 UInt_t GetPassPhotAtm() { return fPassPhotAtm;} //Get Passed atmosphere
123 UInt_t GetPassPhotRef() { return fPassPhotRef; } //Get Passed reflector
124 UInt_t GetPassPhotCone() { return fPassPhotCone; } //Get Passed glas
125 UInt_t GetPhotElfromShower() { return fPhotElfromShower; } //Get Passed qe from shower
126 UInt_t GetPhotElinCamera() { return fPhotElinCamera; } //Get Passed qe total
127 Float_t GetZFirstInteraction() const { return fZFirstInteraction; }
128
129 Float_t GetTelescopePhi() const { return fTelescopePhi; }
130 Float_t GetTelescopeTheta() const { return fTelescopeTheta; }
131 Float_t GetOtherCphFraction() const { return fOtherCphFraction; }
132
133 Float_t GetLongiNmax() const { return fLongiNmax; }
134 Float_t GetLongia() const { return fLongia; }
135 Float_t GetLongib() const { return fLongib; }
136 Float_t GetLongic() const { return fLongic; }
137 Float_t GetLongichi2() const { return fLongichi2; }
138 Float_t GetLongit0() const { return fLongit0; }
139 Float_t GetLongitmax() const { return fLongitmax; }
140
141 void SetPartId(Short_t PartId)
142 {fPartId=PartId;} //Set Type of particle
143
144 TString GetParticleName() const
145 {
146 switch (fPartId)
147 {
148 case kGAMMA: return "Gamma";
149 case kPOSITRON: return "Positron";
150 case kELECTRON: return "Electron";
151 case kANTIMUON: return "Anti-Muon";
152 case kMUON: return "Muon";
153 case kPI0: return "Pi-0";
154 case kNEUTRON: return "Neutron";
155 case kPROTON: return "Proton";
156 case kHELIUM: return "Helium";
157 case kOXYGEN: return "Oxygen";
158 case kIRON: return "Iron";
159 }
160
161 return Form("Id:%d", fPartId);
162 }
163 TString GetParticleSymbol() const
164 {
165 switch (fPartId)
166 {
167 case kGAMMA: return "\\gamma";
168 case kPOSITRON: return "e^{+}";
169 case kELECTRON: return "e^{-}";
170 case kANTIMUON: return "\\mu^{+}";
171 case kMUON: return "\\mu^{-}";
172 case kPI0: return "\\pi^{0}";
173 case kNEUTRON: return "n";
174 case kPROTON: return "p";
175 case kHELIUM: return "He";
176 case kOXYGEN: return "O";
177 case kIRON: return "Fe";
178 }
179
180 return Form("Id:%d", fPartId);
181 }
182 TString GetEnergyStr() const
183 {
184 if (fEnergy>1000)
185 return Form("%.1fTeV", fEnergy/1000);
186
187 if (fEnergy>10)
188 return Form("%dGeV", (Int_t)(fEnergy+.5));
189
190 if (fEnergy>1)
191 return Form("%.1fGeV", fEnergy);
192
193 return Form("%dMeV", (Int_t)(fEnergy*1000+.5));
194 }
195
196 void SetEnergy(Float_t Energy)
197 { fEnergy=Energy; } //Set Energy
198
199 void SetTheta(Float_t Theta)
200 { fTheta=Theta; } //Set Theta angle
201
202 void SetPhi(Float_t Phi)
203 { fPhi=Phi; } //Set Phi angle
204
205 void SetCoreD(Float_t CoreD)
206 { fCoreD=CoreD; } //Set Core d pos
207
208 void SetCoreX(Float_t CoreX)
209 { fCoreX=CoreX; } //Set Core x pos
210
211 void SetCoreY(Float_t CoreY )
212 { fCoreY=CoreY; } //Set Core y pos
213
214 void SetImpact(Float_t Impact)
215 { fImpact=Impact;} //Set impact parameter
216
217 // DO NOT USE THIS IS A WORKAROUND!
218 void SetTelescopeTheta(Float_t Theta) { fTelescopeTheta=Theta; }
219 void SetTelescopePhi(Float_t Phi) { fTelescopePhi=Phi; }
220
221
222/* void SetPhotIni(Short_t PhotIni) */
223/* { fPhotIni=PhotIni; } //Set Initial photons */
224/* void SetPassPhotAtm(Short_t PassPhotAtm) */
225/* { fPassPhotAtm=PassPhotAtm;} //Set Passed atmosphere */
226/* void SetPassPhotRef(Short_t PassPhotRef) */
227/* { fPassPhotRef=PassPhotRef ; } //Set Passed reflector */
228/* void SetPassPhotCone(Short_t PhotCon) */
229/* { fPassPhotCone=PhotCon; } //Set Passed glas */
230
231
232 ClassDef(MMcEvt, 3) //Stores Montecarlo Information of one event (eg. the energy)
233
234};
235
236#endif
237
238
239
240
241
Note: See TracBrowser for help on using the repository browser.