Changeset 9229 for trunk/MagicSoft/Mars/mcorsika
- Timestamp:
- 01/18/09 14:45:10 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mcorsika
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc
r9212 r9229 18 18 ! Author(s): Thomas Bretz 11/2008 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: Software Development, 200 820 ! Copyright: Software Development, 2000-2009 21 21 ! 22 22 ! … … 109 109 fMomentumZ = -f[8]; 110 110 111 // FIXME: Correct for direction of magnetic field! 111 112 fZd = f[9]; 112 113 fAz = TMath::Pi()-f[10]; … … 124 125 fX = f[117]; 125 126 fY = -f[97]; 126 /*127 if (fEvtNumber==1)128 {129 header.fZdMin = f[79];130 header.fZdMax = f[80];131 header.fAzMin = 180-f[81];132 header.fAzMax = 180-f[82];133 127 134 header.fViewConeInnerAngle = f[151];135 header.fViewConeOuterAngle = f[152];136 137 header.Print();138 }139 */140 128 fin.seekg(1088-273*4, ios::cur); 141 129 -
trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h
r9186 r9229 43 43 void Print(Option_t * = NULL) const; 44 44 45 UInt_t GetEvtNumber() const { return fEvtNumber; } 46 UInt_t GetParticleID() const { return fParticleID; } 47 45 48 TVector3 GetMomentum() const { return TVector3(fMomentumX, fMomentumY, fMomentumZ); } 46 49 TVector2 GetImpactPos() const { return TVector2(fX, fY); } … … 55 58 Float_t GetY() const { return fY; } 56 59 60 Double_t GetImpact() const { return TMath::Hypot(fX, fY); } 61 57 62 Int_t ReadEvt(istream& fin); // read in event header block 58 63 Bool_t ReadEvtEnd(istream& fin); // read in event end block -
trunk/MagicSoft/Mars/mcorsika/MCorsikaRunHeader.cc
r9224 r9229 19 19 Qi Zhe, 06/2007 <mailto:qizhe@astro.uni-wuerzburg.de> 20 20 21 ! Copyright: MAGIC Software Development, 2000-200421 ! Copyright: Software Development, 2000-2009 22 22 ! 23 23 ! … … 29 29 // 30 30 // Root storage container for the RUN HEADER information 31 //32 //33 // RAW DATA FORMAT VERSION34 // =======================35 //36 // Format Version 8:37 // -----------------38 // + fNumBytesPerSample;39 // + fFreqSampling;40 // + fNumSignificantBits;41 // * changes in MRawCrateHeader42 //43 // Format Version 7:44 // -----------------45 // - unused46 //47 // Format Version 6:48 // -----------------49 // + added CameraVersion50 // + added TelescopeNumber51 // + added ObservationMode52 // + added dummies for TelescopeRa/Dec53 //54 // Format Version 5:55 // -----------------56 // - now the sub millisecond information of the time is valid and decoded57 // which enhances the precision from 51.2us to 200ns58 //59 // Format Version 4:60 // -----------------61 // - added support for pixels with negative IDs62 //63 // Format Version 3:64 // -----------------65 // - ???66 //67 // Format Version 2:68 // -----------------69 // - removed mjd from data70 // - added start time71 // - added stop time72 //73 //74 // MCorsikaRunHeader CLASS VERSION75 // ===========================76 //77 // Format Version 6:78 // -----------------79 // - added fNumBytesPerSample;80 // - added fFreqSampling;81 // - added fNumSignificantBits;82 //83 // Class Version 5:84 // -----------------85 // - for compatibility with newer camera versions86 //87 // Class Version 4:88 // -----------------89 // - added fCameraVersion90 // - added fTelescopeNumber91 // - changed length of fProjectName to 10192 // - changed length of fSourceName to 8193 //94 // Class Version 3:95 // ----------------96 // - enhanced SourceName and ProjectName by one character, because97 // without telling us the guranteed trailing \0-character has98 // skipped99 //100 // Class Version 2:101 // ----------------102 // - removed fMJD, fYear, fMonth, fDay103 // - added fRunStart104 // - added fRunStop105 //106 // Class Version 1:107 // ----------------108 // - first implementation109 31 // 110 32 //////////////////////////////////////////////////////////////////////////// … … 128 50 // 129 51 MCorsikaRunHeader::MCorsikaRunHeader(const char *name, const char *title) 130 : fNumObsLevel(0), 131 fZdMin(0), fZdMax(-1), fAzMin(0), fAzMax(0), 132 fViewConeInnerAngle(0), fViewConeOuterAngle(-1) 52 : fNumObsLevel(0), fZdMin(0), fZdMax(-1), fAzMin(0), fAzMax(0), 53 fViewConeInnerAngle(0), fViewConeOuterAngle(-1) 133 54 { 134 55 fName = name ? name : "MCorsikaRunHeader"; … … 171 92 172 93 // -------------------- Read first event header ------------------- 94 95 // FIXME: Add sanity checks! 173 96 174 97 // f[76] Cherenkov flag: … … 177 100 // bit(3) : CEFFIC option compiled in 178 101 // bit(4) : ATMEXT option compiled in 179 // bit(5) : ATMEXT option used with ref action enabled102 // bit(5) : ATMEXT option used with refraction enabled 180 103 // bit(6) : VOLUMEDET option compiled in 181 104 // bit(7) : CURVED option compiled in 182 105 // bit(9) : SLATN option compiled in 183 106 // 11-21 : table number for externam athmosphere (but<1024) 184 // f[78] Curved athmosphere? (0=flat, 1=curved) 185 186 // f[80] lower edge of theta in ° 187 // f[81] upper edge of theta in ° 188 // f[82] lower edge of phi in ° 189 // f[83] upper edge of phi in ° 190 // f[84] cherenkov bunch size 191 192 // f[93] flag for additinal muon information of particle output file 193 194 // f[95] Cherenkov bandwidth lower end in nm 195 // f[96] Cherenkov bandwidth upper end in nm 196 197 // f[97] Numbr i of uses of each cherenkov event 107 // 108 // f[78] Curved athmosphere? (0=flat, 1=curved) 109 // f[84] cherenkov bunch size 110 // f[93] flag for additinal muon information of particle output file 198 111 // f[145] Muon multiple scattering flag 199 // f[152] !! inner angle of view cone (°)200 // f[153] !! outer angle of view cone (°)201 112 // f[156] altitude of horizontal shower axis 202 113 … … 216 127 fin.seekg(-274*4, ios::cur); 217 128 218 const Int_t n = TMath::Nint(g[96]); 129 const Int_t n = TMath::Nint(g[96]); // Numbr i of uses of each cherenkov event 219 130 if (n!=1) 220 131 { … … 225 136 //fImpactMax = g[86]; 226 137 227 fZdMin = g[79]; 228 fZdMax = g[80]; 229 fAzMin = 180-g[81]; 230 fAzMax = 180-g[82]; 231 232 fWavelengthMin = g[95]; 233 fWavelengthMax = g[96]; 234 235 fViewConeInnerAngle = g[151]; 236 fViewConeOuterAngle = g[152]; 138 fZdMin = g[79]; // lower edge of theta in ° 139 fZdMax = g[80]; // upper edge of theta in ° 140 fAzMin = 180-g[81]; // lower edge of phi in ° 141 fAzMax = 180-g[82]; // upper edge of phi in ° 142 // FIXME: Correct for direction of magnetic field! 143 144 fWavelengthMin = g[95]; // Cherenkov bandwidth lower end in nm 145 fWavelengthMax = g[96]; // Cherenkov bandwidth upper end in nm 146 147 fViewConeInnerAngle = g[151]; // inner angle of view cone (°) 148 fViewConeOuterAngle = g[152]; // outer angle of view cone (°) 237 149 238 150 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.