Fork me on GitHub

Changeset d612dec in git for modules/Efficiency.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/Efficiency.cc

    ra5af1df rd612dec  
    7878  fItInputArray = fInputArray->MakeIterator();
    7979
     80  // switch to compute efficiency based on momentum vector eta, phi
     81  fUseMomentumVector = GetBool("UseMomentumVector", false);
     82
    8083  // create output array
    8184
     
    9598{
    9699  Candidate *candidate;
    97   Double_t pt, eta, phi, e, d0, dz, ctgTheta;
     100  Double_t pt, eta, phi, e;
     101
    98102
    99103  fItInputArray->Reset();
     
    104108    eta = candidatePosition.Eta();
    105109    phi = candidatePosition.Phi();
     110
     111    if (fUseMomentumVector){
     112      eta = candidateMomentum.Eta();
     113      phi = candidateMomentum.Phi();
     114    }
     115
    106116    pt = candidateMomentum.Pt();
    107117    e = candidateMomentum.E();
    108     d0 = candidate->D0;
    109     dz = candidate->DZ;
    110     ctgTheta = candidate->CtgTheta;
    111118
    112119    // apply an efficency formula
    113     if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e, d0, dz, ctgTheta)) continue;
     120    if(gRandom->Uniform() > fFormula->Eval(pt, eta, phi, e, candidate)) continue;
    114121
    115122    fOutputArray->Add(candidate);
Note: See TracChangeset for help on using the changeset viewer.