Fork me on GitHub

Changeset 0203656 in git for modules


Ignore:
Timestamp:
Mar 12, 2018, 5:13:00 PM (7 years ago)
Author:
GitHub <noreply@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
070a19b, 7429c6a
Parents:
e4cc3f7 (diff), 010117a (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.
git-author:
Michele Selvaggi <michele.selvaggi@…> (03/12/18 17:13:00)
git-committer:
GitHub <noreply@…> (03/12/18 17:13:00)
Message:

Merge pull request #50 from mflechl/master

Saving all gen-level tau decay products to allow visible momentum determination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/StatusPidFilter.cc

    re4cc3f7 r0203656  
    104104      return false;
    105105  }
     106
     107  bool isTauDaughter(int pdgCode, int M1, const TObjArray *fInputArray){
     108    //not needed, just to speed up the code - can be further refined but gives only negligible improvement:
     109    if ( pdgCode==15 || pdgCode<11 || (pdgCode > 22 && pdgCode < 100) || pdgCode>1000 )
     110      return false;
     111
     112    if ( M1 < 0 )
     113      return false;
     114
     115    Candidate *mother;
     116    mother = static_cast<Candidate*>(fInputArray->At( M1 ));
     117    if ( TMath::Abs(mother->PID) == 15 )
     118      return true;
     119
     120    return false;
     121  }
     122
    106123}
    107124
     
    177194    bool is_b_quark  = (pdgCode == 5);
    178195
     196    bool is_tau_daughter = isTauDaughter(pdgCode, candidate->M1, fInputArray);
     197
    179198    if (is_b_hadron)
    180199      pass = kTRUE;
    181200
     201    if (is_tau_daughter)
     202      pass = kTRUE;
     203
    182204    // fPTMin not applied to b_hadrons / b_quarks to allow for b-enriched sample stitching
    183     if(!pass || (candidate->Momentum.Pt() < fPTMin && !(is_b_hadron || is_b_quark)) ) continue;
     205    // fPTMin not applied to tau decay products to allow visible-tau four momentum determination
     206    if(!pass || (candidate->Momentum.Pt() < fPTMin && !(is_b_hadron || is_b_quark || is_tau_daughter)) ) continue;
    184207
    185208    fOutputArray->Add(candidate);
Note: See TracChangeset for help on using the changeset viewer.