Changeset 1300 for trunk/MagicSoft/Mars/mmontecarlo
- Timestamp:
- 04/25/02 11:21:46 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mmontecarlo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r1108 r1300 33 33 #include "MMcEvt.hxx" 34 34 #include "MMcTrig.hxx" 35 #include "MMcRunHeader.hxx" 35 36 36 37 #include "MHMcCollectionArea.h" … … 73 74 return kFALSE; 74 75 76 77 fTotalNumSimulatedShowers = 0; 78 fCorsikaVersion = 0; 79 fAllEvtsTriggered = kFALSE; 80 81 return kTRUE; 82 } 83 84 Bool_t MMcCollectionAreaCalc::ReInit(MParList *plist) 85 { 86 MMcRunHeader *runheader = (MMcRunHeader*)plist->FindObject("MMcRunHeader"); 87 if (!runheader) 88 { 89 *fLog << err << dbginf << "Error - MMcRunHeader not found... exit." << endl; 90 return kFALSE; 91 } 92 93 fTotalNumSimulatedShowers += runheader->GetNumSimulatedShowers(); 94 95 *fLog << inf << "Total Number of Simulated showers: " << fTotalNumSimulatedShowers << endl; 96 97 if (fTheta>=0 && fTheta!=runheader->GetTelesTheta()) 98 *fLog << warn << dbginf << "Warning - Read files have different TelesTheta... exit." << endl; 99 100 fTheta = runheader->GetTelesTheta(); 101 102 if (fCorsikaVersion!=0 && fCorsikaVersion!=runheader->GetCorsikaVersion()) 103 *fLog << warn << dbginf << "Warning - Read files have different Corsika versions... exit." << endl; 104 105 fCorsikaVersion = runheader->GetCorsikaVersion(); 106 107 fAllEvtsTriggered |= runheader->GetAllEvtsTriggered(); 108 109 *fLog << inf << "Only triggered events avail: " << (fAllEvtsTriggered?"yes":"no") << endl; 110 75 111 return kTRUE; 76 112 } … … 81 117 const Float_t impact = fMcEvt->GetImpact()/100.; 82 118 83 fCollArea->FillAll(energy, impact); 119 if (!fAllEvtsTriggered) 120 fCollArea->FillAll(energy, impact); 84 121 85 122 if (fMcTrig->GetFirstLevel() <= 0) … … 96 133 // do the calculation of the effectiv area 97 134 // 98 fCollArea->CalcEfficiency(); 135 *fLog << inf << "Calculation Collection Area..." << endl; 136 137 if (!fAllEvtsTriggered) 138 fCollArea->CalcEfficiency(); 139 else 140 { 141 *fLog << inf << "Total number of showers: " << fTotalNumSimulatedShowers << endl; 142 fCollArea->CalcEfficiency(fTotalNumSimulatedShowers, 143 fCorsikaVersion == 5200 ? fTheta : 0); 144 } 99 145 100 146 return kTRUE; 101 147 } 148 -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.h
r1016 r1300 21 21 TString fObjName; 22 22 23 UInt_t fTotalNumSimulatedShowers; 24 UInt_t fCorsikaVersion; 25 Float_t fTheta; 26 27 Bool_t fAllEvtsTriggered; 28 23 29 public: 24 30 MMcCollectionAreaCalc(const char *input=NULL, 25 31 const char *name=NULL, const char *title=NULL); 32 33 Bool_t ReInit(MParList *plist); 26 34 27 35 Bool_t PreProcess(MParList *pList);
Note:
See TracChangeset
for help on using the changeset viewer.