Changeset 2036 for trunk/MagicSoft/Mars/mmontecarlo
- Timestamp:
- 04/29/03 09:18:03 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mmontecarlo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r1715 r2036 28 28 // MHMcCollectionAreaCalc 29 29 // 30 // Remark: The initialization is mai ly done in the ReInit function.30 // Remark: The initialization is mainly done in the ReInit function. 31 31 // Please make sure, that you don't use MReadTree when processing 32 32 // a file. Use a 'ReInit'-calling task like MReadMarsFile … … 44 44 #include "MMcTrig.hxx" 45 45 #include "MMcRunHeader.hxx" 46 #include "MMcCorsikaRunHeader.h" 46 47 47 48 #include "MHMcCollectionArea.h" … … 77 78 return kFALSE; 78 79 79 fTheta = -1; 80 fTheta = -1; 81 fEmin = -1; 82 fEmax = -1; 83 fSlope = 0; 80 84 fTotalNumSimulatedShowers = 0; 81 85 fCorsikaVersion = 0; … … 91 95 { 92 96 *fLog << err << dbginf << "Error - MMcRunHeader not found... exit." << endl; 97 return kFALSE; 98 } 99 100 MMcCorsikaRunHeader *corrunheader = (MMcCorsikaRunHeader*)plist->FindObject("MMcCorsikaRunHeader"); 101 if (!corrunheader) 102 { 103 *fLog << err << dbginf << "Error - MMcCorsikaRunHeader not found... exit." << endl; 93 104 return kFALSE; 94 105 } … … 110 121 111 122 fCorsikaVersion = runheader->GetCorsikaVersion(); 123 124 if ( fEmin > 0 && 125 (fEmin != corrunheader->GetELowLim() || 126 fEmax != corrunheader->GetEUppLim() || 127 fSlope != corrunheader->GetSlopeSpec()) ) 128 *fLog << warn << dbginf << "Warning - Read files have different energy distribution..." << endl; 129 130 fEmin = corrunheader->GetELowLim(); 131 fEmax = corrunheader->GetEUppLim(); 132 fSlope = corrunheader->GetSlopeSpec(); 112 133 113 134 fAllEvtsTriggered |= runheader->GetAllEvtsTriggered(); … … 167 188 { 168 189 *fLog << inf << "Total number of showers: " << fTotalNumSimulatedShowers << endl; 169 fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, 170 fCorsikaVersion == 5200 ? fTheta : 0); 190 fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, fEmin, fEmax, fSlope); 171 191 } 172 192 -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h
r1300 r2036 24 24 UInt_t fCorsikaVersion; 25 25 Float_t fTheta; 26 Float_t fEmin; 27 Float_t fEmax; 28 Float_t fSlope; 26 29 27 30 Bool_t fAllEvtsTriggered;
Note:
See TracChangeset
for help on using the changeset viewer.