|
|
Go to the documentation of this file.
16 : invert_(
cfg.getParameter<
bool>(
"invert")),
17 allowElectron_(
false),
28 allowedTauDecays.
existsAs<
bool>(
"oneProng") || allowedTauDecays.
existsAs<
bool>(
"threeProng"));
31 (allowedTauDecays.
existsAs<
bool>(
"electron") ? allowedTauDecays.
getParameter<
bool>(
"electron") :
false);
34 (allowedTauDecays.
existsAs<
bool>(
"oneProng") ? allowedTauDecays.
getParameter<
bool>(
"oneProng") :
false);
36 (allowedTauDecays.
existsAs<
bool>(
"threeProng") ? allowedTauDecays.
getParameter<
bool>(
"threeProng") :
false);
64 unsigned int iLep = 0;
65 unsigned int iTop = 0, iBeauty = 0, iElec = 0, iMuon = 0, iTau = 0;
66 for (reco::GenParticleCollection::const_iterator top =
parts.begin(); top !=
parts.end(); ++top) {
102 log <<
"----------------------"
104 <<
" iTop : " << iTop <<
"\n"
105 <<
" iBeauty : " << iBeauty <<
"\n"
106 <<
" iElec : " << iElec <<
"\n"
107 <<
" iMuon : " << iMuon <<
"\n"
108 <<
" iTau : " << iTau + iLep;
110 log <<
" (" << iTau <<
")\n";
114 log <<
"- - - - - - - - - - - "
117 iLep += iElec + iMuon + iTau;
121 if ((iTop == 2) && (iBeauty == 2)) {
122 if (channel == iLep) {
139 if (iElec + iMuon + iTau != channel) {
142 if ((iElec == 2) || (iMuon == 2) || (iTau == 2)) {
188 if (
part.status() == 1) {
189 return (
part.charge() != 0);
200 bool electronTau =
false;
201 bool muonTau =
false;
202 unsigned int nch = 0;
209 if (daughter->pdgId() ==
tau.pdgId()) {
220 (
allow1Prong_ && !electronTau && !muonTau && nch == 1) ||
221 (
allow3Prong_ && !electronTau && !muonTau && nch == 3));
bool allow3Prong_
allow 2-prong tau decays
bool allowMuon_
allow tau decays into muon
TtDecayChannelSelector(const edm::ParameterSet &)
std contructor
unsigned int decayChannel() const
return decay channel to select for from configuration
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Decay decayBranchB_
top decay branch 2
bool allowElectron_
allow tau decays into electron
~TtDecayChannelSelector()
default destructor
static const std::string kGenParticles
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
bool allow1Prong_
allow 1-prong tau decays
bool invert_
invert selection
static constexpr int verbose
bool search(reco::GenParticleCollection::const_iterator &part, int pdgId, std::string &inputType) const
search for particle with pdgId in given listing (for top)
static const unsigned int kDecayChannels
unsigned int checkSum(const Decay &vec) const
Decay decayBranchA_
top decay branch 1
T getParameter(std::string const &) const
allowedTopDecays
allow given lepton in corresponding decay branch for a given decay-channel selection; all leptons to ...
bool operator()(const reco::GenParticleCollection &parts, std::string inputType) const
operator for decay channel selection
Abs< T >::type abs(const T &t)
unsigned int countProngs(const reco::Candidate &part) const
count the number of charged particles for tau decays
bool restrictTauDecays_
restrict tau decays
bool tauDecay(const reco::Candidate &) const
check tau decay to be leptonic, 1-prong or 3-prong