Changes in modules/TimeSmearing.cc [341014c:043e5b3] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TimeSmearing.cc
r341014c r043e5b3 17 17 */ 18 18 19 19 20 /** \class TimeSmearing 20 21 * … … 31 32 #include "classes/DelphesFormula.h" 32 33 34 #include "ExRootAnalysis/ExRootResult.h" 35 #include "ExRootAnalysis/ExRootFilter.h" 33 36 #include "ExRootAnalysis/ExRootClassifier.h" 34 #include "ExRootAnalysis/ExRootFilter.h"35 #include "ExRootAnalysis/ExRootResult.h"36 37 38 #include "TMath.h" 39 #include "TString.h" 40 #include "TFormula.h" 41 #include "TRandom3.h" 42 #include "TObjArray.h" 37 43 #include "TDatabasePDG.h" 38 #include "TFormula.h"39 44 #include "TLorentzVector.h" 40 #include "TMath.h"41 #include "TObjArray.h"42 #include "TRandom3.h"43 #include "TString.h"44 45 45 46 #include <algorithm> 47 #include <stdexcept> 46 48 #include <iostream> 47 49 #include <sstream> 48 #include <stdexcept>49 50 50 51 using namespace std; … … 53 54 54 55 TimeSmearing::TimeSmearing() : 55 56 fItInputArray(0) 56 57 { 57 58 } … … 96 97 97 98 fItInputArray->Reset(); 98 while((candidate = static_cast<Candidate 99 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 99 100 { 100 101 const TLorentzVector &candidateInitialPosition = candidate->InitialPosition; 101 102 const TLorentzVector &candidateFinalPosition = candidate->Position; 102 103 103 ti = candidateInitialPosition.T() * 1.0E-3 /c_light;104 tf = candidateFinalPosition.T() * 1.0E-3 /c_light;104 ti = candidateInitialPosition.T()*1.0E-3/c_light; 105 tf = candidateFinalPosition.T()*1.0E-3/c_light; 105 106 106 107 // apply smearing formula … … 108 109 ti = ti + tf_smeared - tf; 109 110 tf = tf_smeared; 111 112 mother = candidate; 113 candidate = static_cast<Candidate*>(candidate->Clone()); 114 candidate->InitialPosition.SetT(ti*1.0E3*c_light); 115 candidate->Position.SetT(tf*1.0E3*c_light); 110 116 111 mother = candidate; 112 candidate = static_cast<Candidate *>(candidate->Clone()); 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; 117 candidate->ErrorT = fTimeResolution*1.0E3*c_light; 117 118 118 119 candidate->AddCandidate(mother);
Note:
See TracChangeset
for help on using the changeset viewer.