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