Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/EnergySmearing.cc

    rfd4b326 r341014c  
    9595{
    9696  Candidate *candidate, *mother;
    97   Double_t pt, energy, eta, phi, m;
     97  Double_t pt, energy, eta, phi;
    9898
    9999  fItInputArray->Reset();
     
    107107    phi = candidatePosition.Phi();
    108108    energy = candidateMomentum.E();
    109     m = candidateMomentum.M();
    110109
    111110    // apply smearing formula
     
    118117    eta = candidateMomentum.Eta();
    119118    phi = candidateMomentum.Phi();
    120     pt = (energy > m) ? TMath::Sqrt(energy*energy - m*m)/TMath::CosH(eta) : 0;
    121     candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
     119    candidate->Momentum.SetPtEtaPhiE(energy / TMath::CosH(eta), eta, phi, energy);
    122120    candidate->TrackResolution = fFormula->Eval(pt, eta, phi, energy) / candidateMomentum.E();
    123121    candidate->AddCandidate(mother);
Note: See TracChangeset for help on using the changeset viewer.