Changeset 2116fdf in git
- Timestamp:
- Mar 4, 2019, 11:21:25 AM (6 years ago)
- Branches:
- Timing, llp
- Children:
- 2d7ff18
- Parents:
- 3b5d79a
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
classes/DelphesFormula.cc
r3b5d79a r2116fdf 56 56 buffer.Append(*it); 57 57 } 58 buffer.ReplaceAll("pt", "x"); 59 buffer.ReplaceAll("eta", "y"); 60 buffer.ReplaceAll("phi", "z"); 61 buffer.ReplaceAll("energy", "t"); 62 buffer.ReplaceAll("d0", "[0]"); 63 buffer.ReplaceAll("dz", "[1]"); 64 buffer.ReplaceAll("ctgTheta", "[2]"); 58 buffer.ReplaceAll("pt", "[0]"); 59 buffer.ReplaceAll("eta", "[1]"); 60 buffer.ReplaceAll("phi", "[2]"); 61 buffer.ReplaceAll("energy", "[3]"); 62 buffer.ReplaceAll("r", "[4]"); 63 buffer.ReplaceAll("d0", "[5]"); 64 buffer.ReplaceAll("dz", "[6]"); 65 buffer.ReplaceAll("ctgTheta", "[7]"); 65 66 66 67 #if ROOT_VERSION_CODE < ROOT_VERSION(6, 3, 0) … … 78 79 79 80 Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi, 80 Double_t energy, Double_t d0, Double_t dz,81 Double_t ctgTheta)81 Double_t energy, Double_t r, Double_t z, 82 Double_t d0, Double_t dz, Double_t ctgTheta) 82 83 { 83 Double_t x[4] = { pt, eta, phi, energy};84 Double_t params[ 3] = {d0, dz, ctgTheta};84 Double_t x[4] = {0.0, 0.0, z, 0.0}; 85 Double_t params[8] = {pt, eta, phi, energy, r, d0, dz, ctgTheta}; 85 86 return EvalPar(x, params); 86 87 } -
classes/DelphesFormula.h
r3b5d79a r2116fdf 34 34 35 35 Double_t Eval(Double_t pt, Double_t eta = 0, Double_t phi = 0, 36 Double_t energy = 0, Double_t d0 = 0, Double_t dz = 0,37 Double_t ctgTheta = 0);36 Double_t energy = 0, Double_t r = 0, Double_t z = 0, 37 Double_t d0 = 0, Double_t dz = 0, Double_t ctgTheta = 0); 38 38 }; 39 39 -
modules/Efficiency.cc
r3b5d79a r2116fdf 95 95 { 96 96 Candidate *candidate; 97 Double_t pt, eta, phi, e, d0, dz, ctgTheta;97 Double_t pt, eta, phi, e, r, z, d0, dz, ctgTheta; 98 98 99 99 fItInputArray->Reset(); … … 102 102 const TLorentzVector &candidatePosition = candidate->Position; 103 103 const TLorentzVector &candidateMomentum = candidate->Momentum; 104 r = candidatePosition.Perp(); 105 z = candidatePosition.Z(); 104 106 eta = candidatePosition.Eta(); 105 107 phi = candidatePosition.Phi(); … … 111 113 112 114 // apply an efficency formula 113 if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e, d0, dz, ctgTheta)) continue;115 if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e, r, z, d0, dz, ctgTheta)) continue; 114 116 115 117 fOutputArray->Add(candidate);
Note:
See TracChangeset
for help on using the changeset viewer.