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 |
|
---|
13 | class MCorsikaRunHeader : public MParContainer
|
---|
14 | {
|
---|
15 | friend class MCorsikaEvtHeader;
|
---|
16 | public:
|
---|
17 | enum CerenkovFlag_t
|
---|
18 | {
|
---|
19 | kCerenkov = BIT(0),
|
---|
20 | kIact = BIT(1),
|
---|
21 | kCeffic = BIT(2),
|
---|
22 | kAtmext = BIT(3),
|
---|
23 | kRefraction = BIT(4),
|
---|
24 | kVolumedet = BIT(5),
|
---|
25 | kCurved = BIT(6),
|
---|
26 | kSlant = BIT(8)
|
---|
27 | };
|
---|
28 |
|
---|
29 | private:
|
---|
30 | static const Double_t fgEarthRadius; // Take same Earth radius as in CORSIKA (cm)
|
---|
31 |
|
---|
32 | UInt_t fRunNumber; // Run number
|
---|
33 | UInt_t fParticleID; // Particle ID (see MMcEvtBasic or CORSIKA manual)
|
---|
34 | UInt_t fNumEvents; // Number of events
|
---|
35 | MTime fRunStart; // Date of begin (yymmdd)
|
---|
36 | Float_t fProgramVersion; // Version of program
|
---|
37 |
|
---|
38 | Byte_t fNumObsLevel; // Number of observation levels
|
---|
39 | Float_t fObsLevel[10]; // Observation levels [cm]
|
---|
40 |
|
---|
41 | Float_t fImpactMax; // [cm] Maximum simulated impact
|
---|
42 |
|
---|
43 | Float_t fSlopeSpectrum; // Slope of energy spectrum
|
---|
44 | Float_t fEnergyMin; // Lower limit of energy range
|
---|
45 | Float_t fEnergyMax; // Upper limit of energy range
|
---|
46 |
|
---|
47 | Float_t fZdMin; // [rad] Zenith distance
|
---|
48 | Float_t fZdMax; // [rad] Zenith distance
|
---|
49 | Float_t fAzMin; // [rad] Azimuth (north=0; east=90)
|
---|
50 | Float_t fAzMax; // [rad] Azimuth (north=0; east=90) (north denotes the magnet north which is defined to be in the geografic north!)
|
---|
51 |
|
---|
52 | Float_t fMagneticFieldX; // [muT] x-component of earth magnetic field (ceres coordinate system)
|
---|
53 | Float_t fMagneticFieldZ; // [muT] z-component of earth magnetic field (ceres coordinate system)
|
---|
54 | Float_t fMagneticFieldAz; // [rad] Azimuth angle of magnetic north expressed in telescope coordinates
|
---|
55 |
|
---|
56 | Float_t fWavelengthMin; // [nm] Wavelength bandwidth lo edge
|
---|
57 | Float_t fWavelengthMax; // [nm] Wavelength bandwidth up edge
|
---|
58 |
|
---|
59 | Float_t fViewConeInnerAngle; // [deg]
|
---|
60 | Float_t fViewConeOuterAngle; // [deg]
|
---|
61 |
|
---|
62 | Float_t fAtmosphericCoeffA[5]; // [g/cm²] AATM (see Corsika Manual for details)
|
---|
63 | Float_t fAtmosphericCoeffB[5]; // [g/cm²] BATM (see Corsika Manual for details)
|
---|
64 | Float_t fAtmosphericCoeffC[5]; // [cm] CATM (see Corsika Manual for details)
|
---|
65 |
|
---|
66 | UInt_t fCerenkovFlag;
|
---|
67 |
|
---|
68 | public:
|
---|
69 | MCorsikaRunHeader(const char *name=NULL, const char *title=NULL);
|
---|
70 |
|
---|
71 | // Getter
|
---|
72 | UInt_t GetRunNumber() const { return fRunNumber; }
|
---|
73 | UInt_t GetParticleID() const { return fParticleID; }
|
---|
74 | UInt_t GetNumEvents() const { return fNumEvents; }
|
---|
75 |
|
---|
76 | const MTime &GetRunStart() const { return fRunStart; }
|
---|
77 |
|
---|
78 | Float_t GetProgramVersion() const { return fProgramVersion; }
|
---|
79 |
|
---|
80 | Float_t GetZdMin() const { return fZdMin; }
|
---|
81 | Float_t GetZdMax() const { return fZdMax; }
|
---|
82 |
|
---|
83 | Float_t GetAzMin() const { return fAzMin; }
|
---|
84 | Float_t GetAzMax() const { return fAzMax; }
|
---|
85 |
|
---|
86 | Float_t GetWavelengthMin() const { return fWavelengthMin; }
|
---|
87 | Float_t GetWavelengthMax() const { return fWavelengthMax; }
|
---|
88 |
|
---|
89 | Float_t GetSlopeSpectrum() const { return fSlopeSpectrum; }
|
---|
90 | Float_t GetEnergyMin() const { return fEnergyMin; }
|
---|
91 | Float_t GetEnergyMax() const { return fEnergyMax; }
|
---|
92 |
|
---|
93 | Float_t GetImpactMax() const { return fImpactMax; }
|
---|
94 |
|
---|
95 | Float_t GetMagneticFieldX() const { return fMagneticFieldX; }
|
---|
96 | Float_t GetMagneticFieldZ() const { return fMagneticFieldZ; }
|
---|
97 | Float_t GetMagneticFieldAz() const { return fMagneticFieldAz; }
|
---|
98 |
|
---|
99 | Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; }
|
---|
100 | Bool_t HasViewCone() const { return fViewConeOuterAngle>0; }
|
---|
101 |
|
---|
102 | Float_t GetObsLevel(UInt_t i=0) const { return i>9 ? -1 : fObsLevel[i]; }
|
---|
103 |
|
---|
104 | Bool_t Has(CerenkovFlag_t opt) const { return fCerenkovFlag&opt ? 1 : 0; }
|
---|
105 |
|
---|
106 | static Double_t EarthRadius() { return fgEarthRadius; }
|
---|
107 |
|
---|
108 | // Preliminary!
|
---|
109 | const Float_t *GetAtmosphericCoeffA() const { return fAtmosphericCoeffA; }
|
---|
110 | const Float_t *GetAtmosphericCoeffB() const { return fAtmosphericCoeffB; }
|
---|
111 | const Float_t *GetAtmosphericCoeffC() const { return fAtmosphericCoeffC; }
|
---|
112 |
|
---|
113 | UInt_t GetNumAtmosphericModel() const { return (fCerenkovFlag>>10)&0x3ff; }
|
---|
114 |
|
---|
115 | // I/O
|
---|
116 | Bool_t ReadEvt(istream& fin);
|
---|
117 | Bool_t ReadEvtEnd(istream& fin);
|
---|
118 | Bool_t SeekEvtEnd(istream &fin);
|
---|
119 |
|
---|
120 | // TObject
|
---|
121 | void Print(Option_t *t=NULL) const;
|
---|
122 |
|
---|
123 | ClassDef(MCorsikaRunHeader, 2) // storage container for general info
|
---|
124 | };
|
---|
125 | #endif
|
---|