Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Efficiency.cc

    ra1c9c16 r04e2040  
    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.