Ignore:
Timestamp:
02/20/09 00:39:31 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msim/MSimMMCS.cc

    r9352 r9359  
    6767Int_t MSimMMCS::PreProcess(MParList *plist)
    6868{
    69     if (!plist->FindCreateObj("MMcRunHeader"))
     69    fMcRunHeader = (MMcRunHeader*)plist->FindCreateObj("MMcRunHeader");
     70    if (!fMcRunHeader)
    7071        return kFALSE;
    7172
     
    105106    }
    106107
    107 
    108108    return kTRUE;
    109109}
     
    126126    // ----------------------------------------------------
    127127
    128     MMcRunHeader *mrh = (MMcRunHeader*)plist->FindObject("MMcRunHeader");
    129     if (!mrh)
    130     {
    131         *fLog << err << "MMcRunHeader not found... aborting." << endl;
    132         return kFALSE;
    133     }
    134 
    135128    //    fNumPheFromDNSB        MMcPedestalNSBAdd   // Number of phe/ns from diffuse NSB
    136129
    137130    // 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());
    141136
    142137    // ----------------------------------------------------
     
    185180    fMcEvt->SetPhotElfromShower(0);
    186181
     182    if (fRunHeader->GetImpactMax()<0 &&
     183        fEvtHeader->GetImpact()>fMcRunHeader->GetImpactMax())
     184        fMcRunHeader->SetImpactMax(fEvtHeader->GetImpact());
     185
    187186    return kTRUE;
    188187}
  • trunk/MagicSoft/Mars/msim/MSimMMCS.h

    r9336 r9359  
    1212class MCorsikaEvtHeader;
    1313class MCorsikaRunHeader;
     14class MMcRunHeader;
    1415
    1516class MSimMMCS : public MTask
     
    2122    MCorsikaEvtHeader *fEvtHeader;
    2223    MCorsikaRunHeader *fRunHeader;
     24    MMcRunHeader      *fMcRunHeader;
    2325
    2426    // MTask
Note: See TracChangeset for help on using the changeset viewer.