Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackSmearing.cc

    rf298e48 rfd4b326  
    158158  TLorentzVector beamSpotPosition;
    159159  Candidate *candidate, *mother;
    160   Double_t pt, eta, e, 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;
     
    224224    eta = momentum.Eta();
    225225    e = momentum.E();
    226    
     226    m = momentum.M();
     227
    227228    d0 = trueD0 = candidate->D0;
    228229    dz = trueDZ = candidate->DZ;
     
    332333    candidate->Momentum.SetPy(p * TMath::Sin(phi) * TMath::Sin(theta));
    333334    candidate->Momentum.SetPz(p * TMath::Cos(theta));
    334     candidate->Momentum.SetE(candidate->Momentum.Pt() * TMath::CosH(eta));
     335    candidate->Momentum.SetE(TMath::Sqrt(p*p + m*m));
    335336    candidate->PT = candidate->Momentum.Pt();
    336337
Note: See TracChangeset for help on using the changeset viewer.