source: tags/Mars-V0.8.7pre/mmc/MMcEvt.hxx

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