Changeset 9347 for trunk/MagicSoft/Mars/mcorsika
- Timestamp:
- 02/18/09 12:07:41 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mcorsika
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc
r9336 r9347 37 37 // + Float_t fMagneticFieldZ 38 38 // + Float_t fMagneticFieldAz 39 // + Float_t fAtmosphericCoeffA[5] 40 // + Float_t fAtmosphericCoeffB[5] 41 // + Float_t fAtmosphericCoeffC[5] 42 // + UInt_t fCerenkovFlag 39 43 // 40 44 //////////////////////////////////////////////////////////////////////////// … … 53 57 54 58 using namespace std; 59 60 const Double_t MCorsikaRunHeader::fgEarthRadius = 637131500; // [cm] Earth radius as defined in CORSIKA 55 61 56 62 // -------------------------------------------------------------------------- … … 81 87 } 82 88 83 Float_t f[ 68];84 fin.read((char*)f, 68);89 Float_t f[272*4]; 90 fin.read((char*)f, 272*4); 85 91 86 92 fRunNumber = TMath::Nint(f[0]); … … 105 111 fEnergyMax = f[16]; 106 112 107 fin.seekg(1020, ios::cur); // skip the remaining data of this block 113 // 0/10 not supported? 114 115 memcpy(fAtmosphericCoeffA, f+253, 5*4); 116 memcpy(fAtmosphericCoeffB, f+258, 5*4); 117 memcpy(fAtmosphericCoeffC, f+263, 5*4); 108 118 109 119 // -------------------- Read first event header ------------------- … … 157 167 fMagneticFieldAz = g[91]; // Azimuth angle of magnetic north expressed in telescope coordinates 158 168 169 // WITH rounding: unbelievable! 170 fCerenkovFlag = TMath::Nint(g[75]); 171 159 172 fZdMin = g[79]; // lower edge of theta in ° 160 173 fZdMax = g[80]; // upper edge of theta in ° … … 173 186 fImpactMax = g[86]; 174 187 175 fWavelengthMin = g[9 5]; // Cherenkov bandwidth lower end in nm176 fWavelengthMax = g[9 6]; // Cherenkov bandwidth upper end in nm188 fWavelengthMin = g[94]; // Cherenkov bandwidth lower end in nm 189 fWavelengthMax = g[95]; // Cherenkov bandwidth upper end in nm 177 190 178 191 fViewConeInnerAngle = g[151]; // inner angle of view cone (°) … … 251 264 252 265 *fLog << "Spectrum: Slope=" << fSlopeSpectrum << " (" << fEnergyMin << "GeV-" << fEnergyMax << "GeV)" << endl; 266 *fLog << "Wavelength: " << fWavelengthMin << "nm - " << fWavelengthMax << "nm" << endl; 253 267 254 268 if (fViewConeOuterAngle>0) … … 269 283 *fLog << endl; 270 284 } 271 } 272 285 286 *fLog << "Atm.Coeff A: "; 287 for (int i=0; i<5; i++) 288 *fLog << " " << fAtmosphericCoeffA[i]; 289 *fLog << endl; 290 *fLog << "Atm.Coeff B: "; 291 for (int i=0; i<5; i++) 292 *fLog << " " << fAtmosphericCoeffB[i]; 293 *fLog << endl; 294 *fLog << "Atm.Coeff C: "; 295 for (int i=0; i<5; i++) 296 *fLog << " " << fAtmosphericCoeffC[i]; 297 *fLog << endl; 298 } 299 -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.h
r9336 r9347 14 14 { 15 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 }; 16 28 17 29 private: 30 static const Double_t fgEarthRadius; // Take same Earth radius as in CORSIKA (cm) 31 18 32 UInt_t fRunNumber; // Run number 19 33 UInt_t fParticleID; // Particle ID (see MMcEvtBasic or CORSIKA manual) … … 45 59 Float_t fViewConeInnerAngle; // [deg] 46 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; 47 67 48 68 public: … … 80 100 Bool_t HasViewCone() const { return fViewConeOuterAngle>0; } 81 101 102 Float_t GetObsLevel(UInt_t i=0) const { return i>9 ? -1 : fObsLevel[i]; } 103 104 Bool_t Has(CerenkovFlag_t opt) { 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 82 115 // I/O 83 116 Bool_t ReadEvt(istream& fin);
Note:
See TracChangeset
for help on using the changeset viewer.