Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackSmearing.cc

    r341014c rfd4b326  
    158158  TLorentzVector beamSpotPosition;
    159159  Candidate *candidate, *mother;
    160   Double_t pt, eta, d0, d0Error, trueD0, dz, dzError, trueDZ, p, pError, trueP, ctgTheta, ctgThetaError, trueCtgTheta, phi, phiError, truePhi;
     160  Double_t pt, eta, e, m, d0, d0Error, trueD0, dz, dzError, trueDZ, p, pError, trueP, ctgTheta, ctgThetaError, trueCtgTheta, phi, phiError, truePhi;
    161161  Double_t x, y, z, t, px, py, pz, theta;
    162162  Double_t q, r;
     
    223223    pt = momentum.Pt();
    224224    eta = momentum.Eta();
     225    e = momentum.E();
     226    m = momentum.M();
    225227
    226228    d0 = trueD0 = candidate->D0;
     
    232234
    233235    if(fUseD0Formula)
    234       d0Error = fD0Formula->Eval(pt, eta);
     236      d0Error = fD0Formula->Eval(pt, eta, phi, e, candidate);
    235237    else
    236238    {
     
    247249
    248250    if(fUseDZFormula)
    249       dzError = fDZFormula->Eval(pt, eta);
     251      dzError = fDZFormula->Eval(pt, eta, phi, e, candidate);
    250252    else
    251253    {
     
    262264
    263265    if(fUsePFormula)
    264       pError = fPFormula->Eval(pt, eta) * p;
     266      pError = fPFormula->Eval(pt, eta, phi, e, candidate) * p;
    265267    else
    266268    {
     
    277279
    278280    if(fUseCtgThetaFormula)
    279       ctgThetaError = fCtgThetaFormula->Eval(pt, eta);
     281      ctgThetaError = fCtgThetaFormula->Eval(pt, eta, phi, e, candidate);
    280282    else
    281283    {
     
    292294
    293295    if(fUsePhiFormula)
    294       phiError = fPhiFormula->Eval(pt, eta);
     296      phiError = fPhiFormula->Eval(pt, eta, phi, e, candidate);
    295297    else
    296298    {
     
    331333    candidate->Momentum.SetPy(p * TMath::Sin(phi) * TMath::Sin(theta));
    332334    candidate->Momentum.SetPz(p * TMath::Cos(theta));
    333     candidate->Momentum.SetE(candidate->Momentum.Pt() * TMath::CosH(eta));
     335    candidate->Momentum.SetE(TMath::Sqrt(p*p + m*m));
    334336    candidate->PT = candidate->Momentum.Pt();
    335337
Note: See TracChangeset for help on using the changeset viewer.