Fork me on GitHub

Changeset d77b51d in git for modules/PdgCodeFilter.cc


Ignore:
Timestamp:
Sep 29, 2015, 2:08:10 PM (9 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
a98c7ef
Parents:
d870fc5 (diff), 06ec139 (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 remote-tracking branch 'upstream/master'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/PdgCodeFilter.cc

    rd870fc5 rd77b51d  
    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  }
Note: See TracChangeset for help on using the changeset viewer.