Changeset efc1546 in git
- Timestamp:
- Jun 16, 2016, 10:05:54 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- c0756c4
- Parents:
- 2628d2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TimeSmearing.cc
r2628d2b refc1546 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->InitialPosition; 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); 106 108 tf_smeared = gRandom->Gaus(tf, fTimeResolution); 109 ti = ti + tf_smeared - tf; 110 107 111 mother = candidate; 108 112 candidate = static_cast<Candidate*>(candidate->Clone()); 109 candidate->InitialPosition.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 110 116 candidate->ErrorT = fTimeResolution*1.0E3*c_light; 111 117
Note:
See TracChangeset
for help on using the changeset viewer.