Changeset 18545 for trunk/Mars


Ignore:
Timestamp:
08/26/16 11:57:41 (8 years ago)
Author:
tbretz
Message:
Simulate the wavelength whenever it is set to zero (unspecified), set it to zero if the data stream does not contain it, print wavelength as decimal number the production height in m.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msim/MPhotonData.cc

    r18540 r18545  
    177177void MPhotonData::SimWavelength(Float_t wmin, Float_t wmax)
    178178{
     179    if (fWavelength>0)
     180        return;
     181
    179182    const Double_t w = gRandom->Uniform(wmin, wmax);
    180183
     
    285288    fTime             =  f[4]/10.;              // a relative arival time [ns]
    286289    fProductionHeight =  pow(10, f[5]/1000.);   // altitude of emission a.s.l. [cm]
    287     fWavelength       =  f[7];                  // wavelength [nm]: 0 undetermined, <0 already in p.e.
     290    fWavelength       =  TMath::Abs(f[7]);      // wavelength [nm]: 0 undetermined, <0 already in p.e.
    288291
    289292    // Now reset all data members which are not in the stream
     
    317320    //fTime             =  f[4];              // a relative arival time [ns]
    318321    //fProductionHeight =  f[5];              // altitude of emission [cm]
    319     //fWavelength       =  TMath::Nint(f[7]); // so far always zeor = unspec. [nm]
     322    fWavelength       =  0;                // so far always zeor = unspec. [nm]
    320323
    321324    // Now reset all data members which are not in the stream
     
    367370//    gLog << "Num Photons:      " << fNumPhotons << " from " << MMcEvtBasic::GetParticleName(fPrimary) << endl;
    368371    gLog << "Origin:           " << MMcEvtBasic::GetParticleName(fPrimary) << endl;
    369     gLog << "Wavelength:       " << fWavelength << "nm" << endl;
     372    gLog << "Wavelength:       " << dec << fWavelength << "nm" << endl;
    370373    gLog << "Pos X/Y  Cos U/V: " << fPosX << "/" << fPosY << "   " << fCosU << "/" << fCosV << endl;
    371     gLog << "Time/Prod.Height: " << fTime << "ns/" << fProductionHeight << "cm" << endl;
     374    gLog << "Time/Prod.Height: " << fTime << "ns/" << fProductionHeight/100 << "m" << endl;
    372375    if (fTag>=0)
    373376        gLog << "Tag:              " << fTag << endl;
Note: See TracChangeset for help on using the changeset viewer.