source: trunk/Mars/mcorsika/MCorsikaRunHeader.h

Last change on this file was 20044, checked in by tbretz, 4 years ago
Added telescope number, increased version accordingly.
File size: 6.4 KB
Line 
1#ifndef MARS_MCorsikaRunHeader
2#define MARS_MCorsikaRunHeader
3///////////////////////////////////////////////////////////////////////
4// //
5// MRunHeader //
6// //
7///////////////////////////////////////////////////////////////////////
8
9#ifndef MARS_MTime
10#include "MTime.h"
11#endif
12
13class MCorsikaFormat;
14
15class MCorsikaRunHeader : public MParContainer
16{
17 friend class MCorsikaEvtHeader;
18public:
19 enum CerenkovFlag_t
20 {
21 kCerenkov = BIT(0),
22 kIact = BIT(1),
23 kCeffic = BIT(2),
24 kAtmext = BIT(3),
25 kRefraction = BIT(4),
26 kVolumedet = BIT(5),
27 kCurved = BIT(6),
28 kSlant = BIT(8)
29 };
30
31 static const Double_t fgEarthRadius; // Take same Earth radius as in CORSIKA (cm)
32
33private:
34 UInt_t fTelescopeNumber; // Telescope number
35 UInt_t fRunNumber; // Run number
36 UInt_t fNumReuse; // Number of how many times the same shower is used
37 UInt_t fParticleID; // Particle ID (see MMcEvtBasic or CORSIKA manual)
38 UInt_t fNumEvents; // Number of events
39 MTime fRunStart; // Date of begin (yymmdd)
40 Float_t fProgramVersion; // Version of program
41
42 Byte_t fNumObsLevel; // Number of observation levels
43 Float_t fObsLevel[10]; // Observation levels [cm]
44
45 Float_t fImpactMax; // [cm] Maximum simulated impact
46
47 Float_t fSlopeSpectrum; // Slope of energy spectrum
48 Float_t fEnergyMin; // Lower limit of energy range
49 Float_t fEnergyMax; // Upper limit of energy range
50
51 Float_t fZdMin; // [rad] Zenith distance
52 Float_t fZdMax; // [rad] Zenith distance
53 Float_t fAzMin; // [rad] Azimuth (north=0; east=90)
54 Float_t fAzMax; // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!)
55
56 Float_t fMagneticFieldX; // [muT] x-component of earth magnetic field (ceres coordinate system)
57 Float_t fMagneticFieldZ; // [muT] z-component of earth magnetic field (ceres coordinate system)
58 Float_t fMagneticFieldAz; // [rad] Azimuth angle of magnetic north expressed in telescope coordinates
59
60 Float_t fWavelengthMin; // [nm] Wavelength bandwidth lo edge
61 Float_t fWavelengthMax; // [nm] Wavelength bandwidth up edge
62
63 Float_t fViewConeInnerAngle; // [deg]
64 Float_t fViewConeOuterAngle; // [deg]
65
66 Float_t fAtmosphericLayers[5]; // [cm] ATMLAY (see Corsika Manual for details)
67 Float_t fAtmosphericCoeffA[5]; // [g/cm^2] AATM (see Corsika Manual for details)
68 Float_t fAtmosphericCoeffB[5]; // [g/cm^2] BATM (see Corsika Manual for details)
69 Float_t fAtmosphericCoeffC[5]; // [cm] CATM (see Corsika Manual for details)
70
71 UInt_t fCerenkovFlag;
72 UInt_t fCerenkovFileOption; // MCERFI
73
74 UInt_t fHadronModelLowEnergy;
75 UInt_t fHadronModelHighEnergy;
76
77 Float_t fTransitionEnergy; // [GeV]
78
79 Bool_t fCurvedAtmosphere;
80
81 Float_t fEnergyCutoffHadrons; // [GeV]
82 Float_t fEnergyCutoffMuons; // [GeV]
83 Float_t fEnergyCutoffElectrons; // [GeV]
84 Float_t fEnergyCutoffPhotons; // [GeV]
85
86 Float_t fThinningEnergyFractionH; // Hadronic energy limit: EFRCTHN
87 Float_t fThinningEnergyFractionEM; // EM energy limit: EFRCTHN*THINRAT
88 Float_t fThinningWeightLimitH; // Hadronic weight limit: WMAX
89 Float_t fThinningWeightLimitEM; // EM weight limit: WMAX*WEITRAT
90 Float_t fThinningMaxRadius; // [cm] Max radial raius for thinning
91
92
93public:
94 MCorsikaRunHeader(const char *name=NULL, const char *title=NULL);
95
96 // Setter
97 void SetTelescopeNumber(const UInt_t &tel) { fTelescopeNumber = tel; }
98
99 // Getter
100 UInt_t GetRunNumber() const { return fRunNumber; }
101 UInt_t GetParticleID() const { return fParticleID; }
102 UInt_t GetNumEvents() const { return fNumEvents; }
103 UInt_t GetNumReuse() const { return fNumReuse; }
104
105 const MTime &GetRunStart() const { return fRunStart; }
106
107 Float_t GetProgramVersion() const { return fProgramVersion; }
108
109 Float_t GetZdMin() const { return fZdMin; }
110 Float_t GetZdMax() const { return fZdMax; }
111
112 Float_t GetAzMin() const { return fAzMin; }
113 Float_t GetAzMax() const { return fAzMax; }
114
115 Float_t GetWavelengthMin() const { return fWavelengthMin; }
116 Float_t GetWavelengthMax() const { return fWavelengthMax; }
117
118 Float_t GetSlopeSpectrum() const { return fSlopeSpectrum; }
119 Float_t GetEnergyMin() const { return fEnergyMin; }
120 Float_t GetEnergyMax() const { return fEnergyMax; }
121
122 Float_t GetImpactMax() const { return fImpactMax; }
123
124 Float_t GetMagneticFieldX() const { return fMagneticFieldX; }
125 Float_t GetMagneticFieldZ() const { return fMagneticFieldZ; }
126 Float_t GetMagneticFieldAz() const { return fMagneticFieldAz; }
127
128 Float_t GetViewConeInnerAngle() const { return fViewConeInnerAngle; }
129 Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; }
130 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; }
131
132 Float_t GetObsLevel(UInt_t i=0) const { return i>9 ? -1 : fObsLevel[i]; }
133
134 Bool_t Has(CerenkovFlag_t opt) const { return fCerenkovFlag&opt ? 1 : 0; }
135
136 UInt_t GetCerenkovFileOption() const { return fCerenkovFileOption; }
137
138 static Double_t EarthRadius() { return fgEarthRadius; }
139
140 // Preliminary!
141 Bool_t HasLayers() const { return fAtmosphericLayers[4]>0; }
142
143 const Float_t *GetAtmosphericLayers() const { return fAtmosphericLayers; }
144 const Float_t *GetAtmosphericCoeffA() const { return fAtmosphericCoeffA; }
145 const Float_t *GetAtmosphericCoeffB() const { return fAtmosphericCoeffB; }
146 const Float_t *GetAtmosphericCoeffC() const { return fAtmosphericCoeffC; }
147
148 UInt_t GetNumAtmosphericModel() const { return (fCerenkovFlag>>10)&0x3ff; }
149
150 // I/O
151 Bool_t ReadEvt(MCorsikaFormat * fInFormat, const uint32_t &blockLength);
152 Bool_t ReadEventHeader(Float_t * g);
153 Bool_t ReadEvtEnd(MCorsikaFormat * fInFormat, Bool_t runNumberVerify);
154
155 // TObject
156 void Print(Option_t *t=NULL) const;
157
158 ClassDef(MCorsikaRunHeader, 5) // storage container for general info
159};
160#endif
Note: See TracBrowser for help on using the repository browser.