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

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