source: trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h@ 9492

Last change on this file since 9492 was 9378, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 5.1 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 MCorsikaRunHeader : public MParContainer
14{
15 friend class MCorsikaEvtHeader;
16public:
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
29private:
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 fAtmosphericLayers[5]; // [cm] ATMLAY (see Corsika Manual for details)
63 Float_t fAtmosphericCoeffA[5]; // [g/cm²] AATM (see Corsika Manual for details)
64 Float_t fAtmosphericCoeffB[5]; // [g/cm²] BATM (see Corsika Manual for details)
65 Float_t fAtmosphericCoeffC[5]; // [cm] CATM (see Corsika Manual for details)
66
67 UInt_t fCerenkovFlag;
68
69public:
70 MCorsikaRunHeader(const char *name=NULL, const char *title=NULL);
71
72 // Getter
73 UInt_t GetRunNumber() const { return fRunNumber; }
74 UInt_t GetParticleID() const { return fParticleID; }
75 UInt_t GetNumEvents() const { return fNumEvents; }
76
77 const MTime &GetRunStart() const { return fRunStart; }
78
79 Float_t GetProgramVersion() const { return fProgramVersion; }
80
81 Float_t GetZdMin() const { return fZdMin; }
82 Float_t GetZdMax() const { return fZdMax; }
83
84 Float_t GetAzMin() const { return fAzMin; }
85 Float_t GetAzMax() const { return fAzMax; }
86
87 Float_t GetWavelengthMin() const { return fWavelengthMin; }
88 Float_t GetWavelengthMax() const { return fWavelengthMax; }
89
90 Float_t GetSlopeSpectrum() const { return fSlopeSpectrum; }
91 Float_t GetEnergyMin() const { return fEnergyMin; }
92 Float_t GetEnergyMax() const { return fEnergyMax; }
93
94 Float_t GetImpactMax() const { return fImpactMax; }
95
96 Float_t GetMagneticFieldX() const { return fMagneticFieldX; }
97 Float_t GetMagneticFieldZ() const { return fMagneticFieldZ; }
98 Float_t GetMagneticFieldAz() const { return fMagneticFieldAz; }
99
100 Float_t GetViewConeOuterAngle() const { return fViewConeOuterAngle; }
101 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; }
102
103 Float_t GetObsLevel(UInt_t i=0) const { return i>9 ? -1 : fObsLevel[i]; }
104
105 Bool_t Has(CerenkovFlag_t opt) const { return fCerenkovFlag&opt ? 1 : 0; }
106
107 static Double_t EarthRadius() { return fgEarthRadius; }
108
109 // Preliminary!
110 Bool_t HasLayers() const { return fAtmosphericLayers[4]>0; }
111
112 const Float_t *GetAtmosphericLayers() const { return fAtmosphericLayers; }
113 const Float_t *GetAtmosphericCoeffA() const { return fAtmosphericCoeffA; }
114 const Float_t *GetAtmosphericCoeffB() const { return fAtmosphericCoeffB; }
115 const Float_t *GetAtmosphericCoeffC() const { return fAtmosphericCoeffC; }
116
117 UInt_t GetNumAtmosphericModel() const { return (fCerenkovFlag>>10)&0x3ff; }
118
119 // I/O
120 Bool_t ReadEvt(istream& fin);
121 Bool_t ReadEvtEnd(istream& fin);
122 Bool_t SeekEvtEnd(istream &fin);
123
124 // TObject
125 void Print(Option_t *t=NULL) const;
126
127 ClassDef(MCorsikaRunHeader, 2) // storage container for general info
128};
129#endif
Note: See TracBrowser for help on using the repository browser.