2 #include <boost/assign.hpp>
33 return !*x && !*y ?
true : (*x == *y && same(x+1, y+1));
37 return !entries->label ?
reco::PFTau::kRareDecayMode : same(entries->label, label) ? entries->mode : decayModeStringToId(label, entries+1);
41 return !entries->label ?
"unknown" : (entries->mode == mode ? entries->label : decayModeIdToString(mode, entries+1));
46 int modeAsInt =
static_cast<int>(
mode);
51 int modeAsInt =
static_cast<int>(
mode);
56 unsigned int nCharged,
unsigned int nPiZeros) {
62 unsigned int trackIndex = (nCharged-1)*(maxPiZeros+1);
66 nPiZeros = (nPiZeros <= maxPiZeros) ? nPiZeros : maxPiZeros;
71 const std::string&
name) {
72 return decayModeStringToId(name.c_str(), dmTranslatorMap);
76 return decayModeIdToString(decayMode, dmTranslatorMap);
std::string genTauDecayMode(const reco::CompositePtrCandidate &c)
PFTau::hadronicDecayMode translateGenDecayModeToReco(const std::string &genName)
Convert a genTau decay mode string ('oneProng0Pi0') to the RECO enum.
PFTau::hadronicDecayMode translateDecayMode(unsigned int nCharged, unsigned int nPiZero)
PFTau::hadronicDecayMode getDecayMode(const reco::GenJet *genJet)
std::string translateRecoDecayModeToGen(PFTau::hadronicDecayMode decayMode)
Convert a RECO enum decay mode to a string ('oneProng0Pi0')
std::pair< std::string, MonitorElement * > entry
Jets made from MC generator particles.
unsigned int nCharged(const GenJet &jet)
unsigned int piZerosInDecayMode(PFTau::hadronicDecayMode mode)
unsigned int chargedHadronsInDecayMode(PFTau::hadronicDecayMode mode)
Reverse mapping of decay modes into multiplicities.