Changeset 70b9632 in git for modules/TimeSmearing.cc
- Timestamp:
- Aug 25, 2016, 2:04:58 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 629e819
- Parents:
- 7bb13cd (diff), 1408174 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TimeSmearing.cc
r7bb13cd r70b9632 93 93 { 94 94 Candidate *candidate, *mother; 95 Double_t t ;95 Double_t ti, tf_smeared, tf; 96 96 const Double_t c_light = 2.99792458E8; 97 97 … … 99 99 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 100 100 { 101 const TLorentzVector &candidatePosition = candidate->Position; 102 t = candidatePosition.T()*1.0E-3/c_light; 101 const TLorentzVector &candidateInitialPosition = candidate->InitialPosition; 102 const TLorentzVector &candidateFinalPosition = candidate->Position; 103 104 ti = candidateInitialPosition.T()*1.0E-3/c_light; 105 tf = candidateFinalPosition.T()*1.0E-3/c_light; 103 106 104 107 // apply smearing formula 105 t = gRandom->Gaus(t, fTimeResolution); 108 tf_smeared = gRandom->Gaus(tf, fTimeResolution); 109 ti = ti + tf_smeared - tf; 106 110 107 111 mother = candidate; 108 112 candidate = static_cast<Candidate*>(candidate->Clone()); 109 candidate->Position.SetT(t*1.0E3*c_light); 113 candidate->InitialPosition.SetT(ti*1.0E3*c_light); 114 candidate->Position.SetT(tf*1.0E3*c_light); 115 116 candidate->ErrorT = fTimeResolution*1.0E3*c_light; 110 117 111 118 candidate->AddCandidate(mother);
Note:
See TracChangeset
for help on using the changeset viewer.