Changes in modules/ImpactParameterSmearing.cc [341014c:632da30] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ImpactParameterSmearing.cc
r341014c r632da30 25 25 */ 26 26 27 27 28 #include "modules/ImpactParameterSmearing.h" 28 29 … … 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; … … 99 100 100 101 fItInputArray->Reset(); 101 while((candidate = static_cast<Candidate 102 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 102 103 { 103 104 104 105 // take momentum before smearing (otherwise apply double smearing on d0) 105 particle = static_cast<Candidate 106 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 106 107 107 108 const TLorentzVector &candidateMomentum = particle->Momentum; … … 111 112 phi = candidateMomentum.Phi(); 112 113 e = candidateMomentum.E(); 113 114 114 115 px = candidateMomentum.Px(); 115 116 py = candidateMomentum.Py(); 116 117 117 118 // calculate coordinates of closest approach to track circle in transverse plane xd, yd, zd 118 xd = candidate->Xd;119 yd = candidate->Yd;120 zd = candidate->Zd;119 xd = candidate->Xd; 120 yd = candidate->Yd; 121 zd = candidate->Zd; 121 122 122 123 // calculate smeared values … … 130 131 131 132 // calculate impact parameter (after-smearing) 132 d0 = (xd * py - yd * px) /pt;133 d0 = (xd*py - yd*px)/pt; 133 134 134 135 dd0 = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); … … 137 138 mother = candidate; 138 139 139 candidate = static_cast<Candidate 140 candidate = static_cast<Candidate*>(candidate->Clone()); 140 141 candidate->Xd = xd; 141 142 candidate->Yd = yd;
Note:
See TracChangeset
for help on using the changeset viewer.