Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackSmearing.cc

    r84a097e r341014c  
    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, m;
     160  Double_t pt, eta, 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;
     
    328328
    329329    theta = TMath::ACos(ctgTheta / TMath::Sqrt(1.0 + ctgTheta * ctgTheta));
    330     m = candidate->Momentum.M();
    331    
    332330    candidate->Momentum.SetPx(p * TMath::Cos(phi) * TMath::Sin(theta));
    333331    candidate->Momentum.SetPy(p * TMath::Sin(phi) * TMath::Sin(theta));
    334332    candidate->Momentum.SetPz(p * TMath::Cos(theta));
    335     //candidate->Momentum.SetE(candidate->Momentum.Pt() * TMath::CosH(eta));
    336     candidate->Momentum.SetE( TMath::Sqrt(m*m + p*p) );
     333    candidate->Momentum.SetE(candidate->Momentum.Pt() * TMath::CosH(eta));
    337334    candidate->PT = candidate->Momentum.Pt();
    338335
     
    385382    candidate->Yd = yd * 1.0E3;
    386383    candidate->Zd = zd * 1.0E3;
    387     candidate->Td = -9999*c_light*1E-3;
    388    
     384
    389385    if(fApplyToPileUp || !candidate->IsPU)
    390386    {
Note: See TracChangeset for help on using the changeset viewer.