17 invert_ ( cfg.getParameter<
bool>(
"invert" ) ),
28 allowedTauDecays.
existsAs<
bool>(
"muon" )||
29 allowedTauDecays.
existsAs<
bool>(
"oneProng" )||
30 allowedTauDecays.
existsAs<
bool>(
"threeProng") );
42 decayBranchA_.push_back(decayBranchA.getParameter<
bool>(
"electron"));
43 decayBranchA_.push_back(decayBranchA.getParameter<
bool>(
"muon" ));
44 decayBranchA_.push_back(decayBranchA.getParameter<
bool>(
"tau" ));
67 unsigned int iTop=0,iBeauty=0,iElec=0,iMuon=0,iTau=0;
68 for(reco::GenParticleCollection::const_iterator top=parts.begin(); top!=parts.end(); ++top){
105 log <<
"----------------------" <<
"\n" 106 <<
" iTop : " << iTop <<
"\n" 107 <<
" iBeauty : " << iBeauty <<
"\n" 108 <<
" iElec : " << iElec <<
"\n" 109 <<
" iMuon : " << iMuon <<
"\n" 110 <<
" iTau : " << iTau+iLep;
112 log <<
" (" << iTau <<
")\n";
117 log <<
"- - - - - - - - - - - " <<
"\n";
119 iLep+=iElec+iMuon+iTau;
123 if( (iTop==2) && (iBeauty==2) ){
141 if(iElec+iMuon+iTau!=channel){
145 if((iElec==2)||(iMuon==2)||(iTau==2)) {
176 return (
std::abs(part->pdgId())==pdgId) ?
true :
false;
196 return (part.
charge()!=0);
209 bool electronTau =
false;
210 bool muonTau =
false;
211 unsigned int nch = 0;
218 if(daughter->pdgId()==tau.
pdgId()){
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
Decay decayBranchA_
top decay branch 1
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
bool search(reco::GenParticleCollection::const_iterator &part, int pdgId, std::string &inputType) const
search for particle with pdgId in given listing (for top)
virtual int status() const =0
status word
static const unsigned int kDecayChannels
bool restrictTauDecays_
restrict tau decays
virtual int pdgId() const =0
PDG identifier.
const_iterator end() const
last daughter const_iterator
Abs< T >::type abs(const T &t)
TtDecayChannelSelector(const edm::ParameterSet &)
std contructor
unsigned int countProngs(const reco::Candidate &part) const
count the number of charged particles for tau decays
Decay decayBranchB_
top decay branch 2
bool allowElectron_
allow tau decays into electron
bool tauDecay(const reco::Candidate &) const
check tau decay to be leptonic, 1-prong or 3-prong
bool allow3Prong_
allow 2-prong tau decays
bool allowMuon_
allow tau decays into muon
unsigned int decayChannel() const
return decay channel to select for from configuration
allowedTopDecays
allow given lepton in corresponding decay branch for a given decay-channel selection; all leptons to ...
unsigned int checkSum(const Decay &vec) const
~TtDecayChannelSelector()
default destructor
bool operator()(const reco::GenParticleCollection &parts, std::string inputType) const
operator for decay channel selection
static const std::string kGenParticles
virtual int charge() const =0
electric charge
const_iterator begin() const
first daughter const_iterator
bool allow1Prong_
allow 1-prong tau decays
bool invert_
invert selection