Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/MomentumSmearing.cc

    r341014c r84a097e  
    9595{
    9696  Candidate *candidate, *mother;
    97   Double_t pt, eta, phi, e, res;
     97  Double_t pt, eta, phi, e, m, res;
    9898
    9999  fItInputArray->Reset();
     
    106106    pt = candidateMomentum.Pt();
    107107    e = candidateMomentum.E();
     108    m = candidateMomentum.M();
     109
    108110    res = fFormula->Eval(pt, eta, phi, e);
    109 
    110     // apply smearing formula
    111     //pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt);
    112 
    113111    res = (res > 1.0) ? 1.0 : res;
    114112
    115113    pt = LogNormal(pt, res * pt);
    116 
    117     //if(pt <= 0.0) continue;
    118114
    119115    mother = candidate;
     
    121117    eta = candidateMomentum.Eta();
    122118    phi = candidateMomentum.Phi();
    123     candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt * TMath::CosH(eta));
    124     //candidate->TrackResolution = fFormula->Eval(pt, eta, phi, e);
     119    candidate->Momentum.SetPtEtaPhiM(pt, eta, phi, m);
     120    candidate->ErrorPT = res*pt;
     121    candidate->PT = pt;
     122   
    125123    candidate->TrackResolution = res;
    126124    candidate->AddCandidate(mother);
Note: See TracChangeset for help on using the changeset viewer.