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