- Timestamp:
- 08/26/16 13:03:45 (8 years ago)
- Location:
- trunk/Mars/msim
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msim/MPhotonData.cc
r18545 r18549 177 177 void MPhotonData::SimWavelength(Float_t wmin, Float_t wmax) 178 178 { 179 if (fWavelength>0)180 return;181 182 179 const Double_t w = gRandom->Uniform(wmin, wmax); 183 180 … … 288 285 fTime = f[4]/10.; // a relative arival time [ns] 289 286 fProductionHeight = pow(10, f[5]/1000.); // altitude of emission a.s.l. [cm] 290 fWavelength = TMath::Abs(f[7]);// wavelength [nm]: 0 undetermined, <0 already in p.e.287 fWavelength = f[7]; // wavelength [nm]: 0 undetermined, <0 already in p.e. 291 288 292 289 // Now reset all data members which are not in the stream … … 370 367 // gLog << "Num Photons: " << fNumPhotons << " from " << MMcEvtBasic::GetParticleName(fPrimary) << endl; 371 368 gLog << "Origin: " << MMcEvtBasic::GetParticleName(fPrimary) << endl; 372 gLog << "Wavelength: " << dec <<fWavelength << "nm" << endl;369 gLog << "Wavelength: " << fWavelength << "nm" << endl; 373 370 gLog << "Pos X/Y Cos U/V: " << fPosX << "/" << fPosY << " " << fCosU << "/" << fCosV << endl; 374 371 gLog << "Time/Prod.Height: " << fTime << "ns/" << fProductionHeight/100 << "m" << endl; -
trunk/Mars/msim/MPhotonData.h
r18540 r18549 37 37 38 38 Float_t fTime; // [ns] Time since first interaction or entrance into atmosphere 39 UShort_t fWavelength;// [nm] Wavelength39 Short_t fWavelength; // [nm] Wavelength 40 40 // UInt_t fNumPhotons; // Number of cherenkov photons ins bunch 41 41 Float_t fProductionHeight; // [cm] Height of bunch production … … 78 78 79 79 // Getter Others 80 UShort_t GetWavelength() const { return fWavelength; }80 UShort_t GetWavelength() const { return TMath::Abs(fWavelength); } 81 81 Float_t GetProductionHeight() const { return fProductionHeight; } 82 82 MMcEvtBasic::ParticleId_t GetPrimary() const { return fPrimary; } 83 84 // Status of the simulation of photons 85 Bool_t IncludesEfficiencies() const { return fWavelength<0; } 83 86 84 87 //virtual Float_t GetWeight() const { return 1; } … … 97 100 98 101 void SetPrimary(MMcEvtBasic::ParticleId_t p) { fPrimary=p; } 99 void SetWavelength( UShort_t wl) { fWavelength=wl; }102 void SetWavelength(Short_t wl) { fWavelength=wl; } 100 103 101 104 void AddTime(Double_t dt) { fTime += dt; } -
trunk/Mars/msim/MPhotonEvent.cc
r18541 r18549 550 550 { 551 551 const UInt_t n = GetNumPhotons(); 552 if (n==0) 553 return; 554 555 // Corsika has already produced and written the wavelength 556 if (operator[](0).GetWavelength()>0) 557 return; 552 558 553 559 for (UInt_t i=0; i<n; i++)
Note:
See TracChangeset
for help on using the changeset viewer.