Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/MomentumSmearing.cc

    r27197df r341014c  
    7878  fItInputArray = fInputArray->MakeIterator();
    7979
    80   // switch to compute momentum smearing based on momentum vector eta, phi
    81   fUseMomentumVector = GetBool("UseMomentumVector", false);
    82 
    8380  // create output array
    8481
     
    9895{
    9996  Candidate *candidate, *mother;
    100   Double_t pt, eta, phi, e, m, res;
     97  Double_t pt, eta, phi, e, res;
    10198
    10299  fItInputArray->Reset();
     
    107104    eta = candidatePosition.Eta();
    108105    phi = candidatePosition.Phi();
    109 
    110     if (fUseMomentumVector){
    111       eta = candidateMomentum.Eta();
    112       phi = candidateMomentum.Phi();
    113     }
    114 
    115106    pt = candidateMomentum.Pt();
    116107    e = candidateMomentum.E();
    117     m = candidateMomentum.M();
    118     res = fFormula->Eval(pt, eta, phi, e, candidate);
     108    res = fFormula->Eval(pt, eta, phi, e);
    119109
    120110    // apply smearing formula
     
    131121    eta = candidateMomentum.Eta();
    132122    phi = candidateMomentum.Phi();
    133     candidate->Momentum.SetPtEtaPhiM(pt, eta, phi, m);
     123    candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt * TMath::CosH(eta));
    134124    //candidate->TrackResolution = fFormula->Eval(pt, eta, phi, e);
    135125    candidate->TrackResolution = res;
Note: See TracChangeset for help on using the changeset viewer.