Changeset 6cdc544 in git for modules/TimeSmearing.cc
- Timestamp:
- Dec 21, 2014, 12:07:11 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 38bf1ae
- Parents:
- 1d1f6a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TimeSmearing.cc
r1d1f6a4 r6cdc544 44 44 #include "TLorentzVector.h" 45 45 46 #include <algorithm> 46 #include <algorithm> 47 47 #include <stdexcept> 48 48 #include <iostream> … … 95 95 Double_t t; 96 96 const Double_t c_light = 2.99792458E8; 97 97 98 98 fItInputArray->Reset(); 99 99 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 101 101 const TLorentzVector &candidatePosition = candidate->Position; 102 102 t = candidatePosition.T()*1.0E-3/c_light; 103 103 104 104 // apply smearing formula 105 105 t = gRandom->Gaus(t, fTimeResolution); 106 106 107 107 mother = candidate; 108 108 candidate = static_cast<Candidate*>(candidate->Clone()); 109 109 candidate->Position.SetT(t*1.0E3*c_light); 110 110 111 111 candidate->AddCandidate(mother); 112 112 113 113 fOutputArray->Add(candidate); 114 114 }
Note:
See TracChangeset
for help on using the changeset viewer.