Ignore:
Timestamp:
02/15/09 13:24:59 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r9319 r9336  
    8484        return kFALSE;
    8585
    86     fPointingPos = (MPointingPos*)plist->FindObject("MPointingPos");
    87     if (!fPointingPos)
     86    fPointingTel = (MPointingPos*)plist->FindObject("MPointingPos");
     87    if (!fPointingTel)
    8888    {
    8989        *fLog << err << "MPointingPos not found... aborting." << endl;
     
    134134
    135135    //    fNumPheFromDNSB        MMcPedestalNSBAdd   // Number of phe/ns from diffuse NSB
     136
     137    // FIXME: Is there a way to write them as LAST entry in the file?
    136138    mrh->SetNumSimulatedShowers(fRunHeader->GetNumEvents());
    137139    mrh->SetImpactMax(fRunHeader->GetImpactMax());
     140    mrh->SetCorsikaVersion(TMath::Nint(fRunHeader->GetProgramVersion()*100));
    138141
    139142    // ----------------------------------------------------
     
    148151    const UInt_t id = fRunHeader->GetParticleID();
    149152
     153    // FIXME: Is there a way to write them as LAST entry in the file?
    150154    rh->SetRunInfo(1, fRunHeader->GetRunNumber(), 0);
    151155    rh->SetSourceInfo(MMcEvtBasic::GetParticleName(id));
     
    166170    fMcEvtBasic->SetImpact(fEvtHeader->GetImpact());
    167171
    168     fMcEvtBasic->SetTelescopeTheta(fPointingPos->GetZdRad());
    169     fMcEvtBasic->SetTelescopePhi(fPointingPos->GetAzRad());
     172    fMcEvtBasic->SetTelescopeTheta(fPointingTel->GetZdRad());
     173    fMcEvtBasic->SetTelescopePhi(fPointingTel->GetAzRad());
    170174
    171175    fMcEvtBasic->SetReadyToSave();
     
    173177    static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
    174178
     179    // Convert from corsika franme to telescope frame, taking
     180    // the magnetic field into account: tel = corsika+offset
    175181    fMcEvt->SetTheta(fEvtHeader->GetZd());
    176     fMcEvt->SetPhi(fEvtHeader->GetAz());
     182    fMcEvt->SetPhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
    177183
    178184    fMcEvt->SetEvtNumber(fEvtHeader->GetEvtNumber());
Note: See TracChangeset for help on using the changeset viewer.