Changes in modules/Efficiency.cc [95aa610:a1c9c16] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Efficiency.cc
r95aa610 ra1c9c16 17 17 */ 18 18 19 20 19 /** \class Efficiency 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; … … 94 93 95 94 void Efficiency::Process() 96 { 95 { 97 96 Candidate *candidate; 98 Double_t pt, eta, phi, e ;97 Double_t pt, eta, phi, e, d0, dz, ctgTheta; 99 98 100 99 fItInputArray->Reset(); 101 while((candidate = static_cast<Candidate *>(fItInputArray->Next())))100 while((candidate = static_cast<Candidate *>(fItInputArray->Next()))) 102 101 { 103 102 const TLorentzVector &candidatePosition = candidate->Position; … … 107 106 pt = candidateMomentum.Pt(); 108 107 e = candidateMomentum.E(); 108 d0 = candidate->D0; 109 dz = candidate->DZ; 110 ctgTheta = candidate->CtgTheta; 109 111 110 112 // apply an efficency formula 111 if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e )) continue;112 113 if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e, d0, dz, ctgTheta)) continue; 114 113 115 fOutputArray->Add(candidate); 114 116 }
Note:
See TracChangeset
for help on using the changeset viewer.