Fork me on GitHub

Changeset d612dec in git for modules/AngularSmearing.cc


Ignore:
Timestamp:
Dec 9, 2021, 7:52:15 AM (3 years ago)
Author:
christinaw97 <christina.wang@…>
Children:
29b722a
Parents:
a5af1df (diff), 0c0c9af (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:Christinaw97/delphes into HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/AngularSmearing.cc

    ra5af1df rd612dec  
    9898{
    9999  Candidate *candidate, *mother;
    100   Double_t pt, eta, phi, e;
     100  Double_t pt, eta, phi, e, m;
    101101
    102102  fItInputArray->Reset();
    103103  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    104104  {
    105     const TLorentzVector &candidatePosition = candidate->Position;
    106105    const TLorentzVector &candidateMomentum = candidate->Momentum;
    107     eta = candidatePosition.Eta();
    108     phi = candidatePosition.Phi();
     106    eta = candidateMomentum.Eta();
     107    phi = candidateMomentum.Phi();
    109108    pt = candidateMomentum.Pt();
    110109    e = candidateMomentum.E();
     110    m = candidateMomentum.M();
    111111
    112112    // apply smearing formula for eta,phi
    113 
    114     eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e));
    115     phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e));
     113    eta = gRandom->Gaus(eta, fFormulaEta->Eval(pt, eta, phi, e, candidate));
     114    phi = gRandom->Gaus(phi, fFormulaPhi->Eval(pt, eta, phi, e, candidate));
    116115
    117116    if(pt <= 0.0) continue;
     
    119118    mother = candidate;
    120119    candidate = static_cast<Candidate *>(candidate->Clone());
    121     eta = candidateMomentum.Eta();
    122     phi = candidateMomentum.Phi();
    123     candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt * TMath::CosH(eta));
     120    candidate->Momentum.SetPtEtaPhiM(pt, eta, phi, m);
    124121    candidate->AddCandidate(mother);
    125122
Note: See TracChangeset for help on using the changeset viewer.