Changeset 84a097e in git for modules/MomentumSmearing.cc
- Timestamp:
- Dec 2, 2019, 6:55:22 PM (5 years ago)
- Branches:
- Timing
- Children:
- 2ad823e, 6fc566b
- Parents:
- c614dd7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/MomentumSmearing.cc
rc614dd7 r84a097e 95 95 { 96 96 Candidate *candidate, *mother; 97 Double_t pt, eta, phi, e, res;97 Double_t pt, eta, phi, e, m, res; 98 98 99 99 fItInputArray->Reset(); … … 106 106 pt = candidateMomentum.Pt(); 107 107 e = candidateMomentum.E(); 108 m = candidateMomentum.M(); 109 108 110 res = fFormula->Eval(pt, eta, phi, e); 109 110 // apply smearing formula111 //pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt);112 113 111 res = (res > 1.0) ? 1.0 : res; 114 112 115 113 pt = LogNormal(pt, res * pt); 116 117 //if(pt <= 0.0) continue;118 114 119 115 mother = candidate; … … 121 117 eta = candidateMomentum.Eta(); 122 118 phi = candidateMomentum.Phi(); 123 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt * TMath::CosH(eta)); 124 //candidate->TrackResolution = fFormula->Eval(pt, eta, phi, e); 119 candidate->Momentum.SetPtEtaPhiM(pt, eta, phi, m); 120 candidate->ErrorPT = res*pt; 121 candidate->PT = pt; 122 125 123 candidate->TrackResolution = res; 126 124 candidate->AddCandidate(mother);
Note:
See TracChangeset
for help on using the changeset viewer.