Fork me on GitHub

Changeset 84a097e in git for modules/TrackSmearing.cc


Ignore:
Timestamp:
Dec 2, 2019, 6:55:22 PM (5 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
Timing
Children:
2ad823e, 6fc566b
Parents:
c614dd7
Message:

first iteration of adding timing in Delphes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/TrackSmearing.cc

    rc614dd7 r84a097e  
    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, d0, d0Error, trueD0, dz, dzError, trueDZ, p, pError, trueP, ctgTheta, ctgThetaError, trueCtgTheta, phi, phiError, truePhi, m;
    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   
    330332    candidate->Momentum.SetPx(p * TMath::Cos(phi) * TMath::Sin(theta));
    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(candidate->Momentum.Pt() * TMath::CosH(eta));
     336    candidate->Momentum.SetE( TMath::Sqrt(m*m + p*p) );
    334337    candidate->PT = candidate->Momentum.Pt();
    335338
     
    382385    candidate->Yd = yd * 1.0E3;
    383386    candidate->Zd = zd * 1.0E3;
    384 
     387    candidate->Td = -9999*c_light*1E-3;
     388   
    385389    if(fApplyToPileUp || !candidate->IsPU)
    386390    {
Note: See TracChangeset for help on using the changeset viewer.