Changes in modules/MomentumSmearing.cc [341014c:27197df] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/MomentumSmearing.cc
r341014c r27197df 78 78 fItInputArray = fInputArray->MakeIterator(); 79 79 80 // switch to compute momentum smearing based on momentum vector eta, phi 81 fUseMomentumVector = GetBool("UseMomentumVector", false); 82 80 83 // create output array 81 84 … … 95 98 { 96 99 Candidate *candidate, *mother; 97 Double_t pt, eta, phi, e, res;100 Double_t pt, eta, phi, e, m, res; 98 101 99 102 fItInputArray->Reset(); … … 104 107 eta = candidatePosition.Eta(); 105 108 phi = candidatePosition.Phi(); 109 110 if (fUseMomentumVector){ 111 eta = candidateMomentum.Eta(); 112 phi = candidateMomentum.Phi(); 113 } 114 106 115 pt = candidateMomentum.Pt(); 107 116 e = candidateMomentum.E(); 108 res = fFormula->Eval(pt, eta, phi, e); 117 m = candidateMomentum.M(); 118 res = fFormula->Eval(pt, eta, phi, e, candidate); 109 119 110 120 // apply smearing formula … … 121 131 eta = candidateMomentum.Eta(); 122 132 phi = candidateMomentum.Phi(); 123 candidate->Momentum.SetPtEtaPhi E(pt, eta, phi, pt * TMath::CosH(eta));133 candidate->Momentum.SetPtEtaPhiM(pt, eta, phi, m); 124 134 //candidate->TrackResolution = fFormula->Eval(pt, eta, phi, e); 125 135 candidate->TrackResolution = res;
Note:
See TracChangeset
for help on using the changeset viewer.