Changes in modules/AngularSmearing.cc [341014c:95aa610] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/AngularSmearing.cc
r341014c r95aa610 17 17 */ 18 18 19 19 20 /** \class AngularSmearing 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 #include <algorithm> 46 #include <algorithm> 47 #include <stdexcept> 46 48 #include <iostream> 47 49 #include <sstream> 48 #include <stdexcept>49 50 50 51 using namespace std; … … 76 77 fFormulaPhi->Compile(GetString("PhiResolutionFormula", "0.0")); 77 78 79 78 80 // import input array 79 81 … … 101 103 102 104 fItInputArray->Reset(); 103 while((candidate = static_cast<Candidate 105 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 104 106 { 105 107 const TLorentzVector &candidatePosition = candidate->Position; … … 114 116 eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e)); 115 117 phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e)); 116 118 117 119 if(pt <= 0.0) continue; 118 120 119 121 mother = candidate; 120 candidate = static_cast<Candidate 122 candidate = static_cast<Candidate*>(candidate->Clone()); 121 123 eta = candidateMomentum.Eta(); 122 124 phi = candidateMomentum.Phi(); 123 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt *TMath::CosH(eta));125 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 124 126 candidate->AddCandidate(mother); 125 127 126 128 fOutputArray->Add(candidate); 127 129 }
Note:
See TracChangeset
for help on using the changeset viewer.