Fork me on GitHub

Changes in / [28027d5:f3c4047] in git


Ignore:
Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/PdgCodeFilter.cc

    r28027d5 rf3c4047  
    7474  fPTMin = GetDouble("PTMin", 0.0);
    7575
     76  fInvertPdg = GetBool("InvertPdg", false);
     77
     78  fRequireStatus = GetBool("RequireStatus", false);
     79  fStatus = GetInt("Status", 1);
     80
    7681  // import input array
    7782  fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
     
    109114  Double_t pt;
    110115
     116  const Bool_t requireStatus = fRequireStatus;
     117  const Bool_t invertPdg = fInvertPdg;
     118  const int reqStatus = fStatus;
     119
    111120  fItInputArray->Reset();
    112121  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    116125    pt = candidateMomentum.Pt();
    117126
     127    if(pt < fPTMin) continue;
     128    if(requireStatus && (candidate->Status != reqStatus)) continue;
     129
    118130    pass = kTRUE;
    119 
    120     if(pt < fPTMin) pass = kFALSE;
    121131    if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;
    122132
     133    if (invertPdg) pass = !pass;
    123134    if(pass) fOutputArray->Add(candidate);
    124135  }
  • modules/PdgCodeFilter.h

    r28027d5 rf3c4047  
    5050
    5151  Double_t fPTMin; //!
     52  Bool_t fInvertPdg; //!
     53  Bool_t fRequireStatus; //!
     54  Int_t fStatus; //!
    5255
    5356  std::vector<Int_t> fPdgCodes;
Note: See TracChangeset for help on using the changeset viewer.