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