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