Ignore:
Timestamp:
06/24/10 15:05:04 (14 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r9362 r9595  
    122122    mch->SetSpectrum(fRunHeader->GetSlopeSpectrum(),
    123123                     fRunHeader->GetEnergyMin(), fRunHeader->GetEnergyMax());
     124    mch->SetViewCone(fRunHeader->GetViewConeInnerAngle(),
     125                     fRunHeader->GetViewConeOuterAngle());
    124126    mch->SetReadyToSave();
    125127
     
    147149
    148150    // FIXME: Is there a way to write them as LAST entry in the file?
    149     rh->SetRunInfo(1, fRunHeader->GetRunNumber(), 0);
     151    rh->SetFileNumber(fRunHeader->GetRunNumber()%1000);
    150152    rh->SetSourceInfo(MMcEvtBasic::GetParticleName(id));
    151153    rh->SetReadyToSave();
     
    160162// --------------------------------------------------------------------------
    161163//
     164// We have two scenarios for the ponting:
     165//
     166//  1) Diffuse flux (view cone option)
     167//
     168//     Azimuth and Zenith angle are fixed values (min==max).
     169//     The diffuse flux is produced in a cone around this angle.
     170//
     171//     That means that the telescope orientation is aligned and fixed
     172//     along the cone axis.
     173//
     174//     To analyse a diffuse flux the source position should be fixed to
     175//     the camera center.
     176//     In some cases (e.g. training of RF) the source depending parameters
     177//     might be needed w.r.t. the real origin of the primary particle.
     178//     In this case the primary shower direction is needed.
     179//
     180//  2) Directed flux
     181//
     182//     Particles are produced between a min and max Azimuth and Zenith angle.
     183//     The telescope axis is either parallel (on source) or off axis
     184//     (wobble) to the primary particle direction.
     185//     This is used to "fake" the trajectory of the source.
     186//
     187//  3) Flux along a trajectory
     188//
     189//     [...]
     190//
    162191Int_t MSimMMCS::Process()
    163192{
     
    165194    fMcEvtBasic->SetImpact(fEvtHeader->GetImpact());
    166195
     196    // Pointing direction of the telescope (telescope axis)
    167197    fMcEvtBasic->SetTelescopeTheta(fPointingTel->GetZdRad());
    168198    fMcEvtBasic->SetTelescopePhi(fPointingTel->GetAzRad());
    169199
    170     fMcEvtBasic->SetReadyToSave();
    171 
    172     static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
    173 
     200    // Direction of primary particle
    174201    // Convert from corsika frame to telescope frame, taking
    175202    // the magnetic field into account: tel = corsika+offset
    176     if (fRunHeader->HasViewCone())
    177     {
    178         fMcEvt->SetTheta(fPointingTel->GetZdRad());
    179         fMcEvt->SetPhi(fPointingTel->GetAzRad());
    180     }
    181     else
    182     {
    183         fMcEvt->SetTheta(fEvtHeader->GetZd());
    184         fMcEvt->SetPhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
    185     }
     203    fMcEvtBasic->SetParticleTheta(fEvtHeader->GetZd());
     204    fMcEvtBasic->SetParticlePhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
     205
     206    fMcEvtBasic->SetReadyToSave();
     207
     208
     209    static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
     210
    186211
    187212    fMcEvt->SetEvtNumber(fEvtHeader->GetEvtNumber());
Note: See TracChangeset for help on using the changeset viewer.