Changeset 9359 for trunk/MagicSoft/Mars/msim
- Timestamp:
- 02/20/09 00:39:31 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msim
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msim/MSimMMCS.cc
r9352 r9359 67 67 Int_t MSimMMCS::PreProcess(MParList *plist) 68 68 { 69 if (!plist->FindCreateObj("MMcRunHeader")) 69 fMcRunHeader = (MMcRunHeader*)plist->FindCreateObj("MMcRunHeader"); 70 if (!fMcRunHeader) 70 71 return kFALSE; 71 72 … … 105 106 } 106 107 107 108 108 return kTRUE; 109 109 } … … 126 126 // ---------------------------------------------------- 127 127 128 MMcRunHeader *mrh = (MMcRunHeader*)plist->FindObject("MMcRunHeader");129 if (!mrh)130 {131 *fLog << err << "MMcRunHeader not found... aborting." << endl;132 return kFALSE;133 }134 135 128 // fNumPheFromDNSB MMcPedestalNSBAdd // Number of phe/ns from diffuse NSB 136 129 137 130 // FIXME: Is there a way to write them as LAST entry in the file? 138 mrh->SetNumSimulatedShowers(fRunHeader->GetNumEvents()); 139 mrh->SetImpactMax(fRunHeader->GetImpactMax()); 140 mrh->SetCorsikaVersion(TMath::Nint(fRunHeader->GetProgramVersion()*100)); 131 fMcRunHeader->SetNumSimulatedShowers(fRunHeader->GetNumEvents()); 132 fMcRunHeader->SetCorsikaVersion(TMath::Nint(fRunHeader->GetProgramVersion()*100)); 133 134 if (fRunHeader->GetImpactMax()>0) 135 fMcRunHeader->SetImpactMax(fRunHeader->GetImpactMax()); 141 136 142 137 // ---------------------------------------------------- … … 185 180 fMcEvt->SetPhotElfromShower(0); 186 181 182 if (fRunHeader->GetImpactMax()<0 && 183 fEvtHeader->GetImpact()>fMcRunHeader->GetImpactMax()) 184 fMcRunHeader->SetImpactMax(fEvtHeader->GetImpact()); 185 187 186 return kTRUE; 188 187 } -
trunk/MagicSoft/Mars/msim/MSimMMCS.h
r9336 r9359 12 12 class MCorsikaEvtHeader; 13 13 class MCorsikaRunHeader; 14 class MMcRunHeader; 14 15 15 16 class MSimMMCS : public MTask … … 21 22 MCorsikaEvtHeader *fEvtHeader; 22 23 MCorsikaRunHeader *fRunHeader; 24 MMcRunHeader *fMcRunHeader; 23 25 24 26 // MTask
Note:
See TracChangeset
for help on using the changeset viewer.