#include <NamedCandCombiner.h>
Public Member Functions | |
NamedCandCombinerBase (const edm::ParameterSet &cfg) | |
Protected Attributes | |
std::vector< int > | dauCharge_ |
daughter charges | |
std::vector < cand::parser::ConjInfo > | labels_ |
label vector | |
std::string | name_ |
Name of this candidate. | |
int | pdgId_ |
which pdgId to set | |
std::vector< std::string > | roles_ |
bool | setLongLived_ |
set long lived flag | |
bool | setMassConstraint_ |
set mass constraint flag | |
bool | setPdgId_ |
set pdgId flag |
Definition at line 41 of file NamedCandCombiner.h.
reco::modules::NamedCandCombinerBase::NamedCandCombinerBase | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 42 of file NamedCandCombiner.h.
References edm::errors::Configuration, dauCharge_, cand::parser::decayParser(), Exception, spr::find(), newFWLiteAna::found, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), reco::ParticleMasses::kPlus, label, labels_, edm::errors::LogicError, name_, geometryXMLtoCSV::parser, pdgId_, roles_, setLongLived_, setMassConstraint_, and setPdgId_.
: setLongLived_(false), setMassConstraint_(false), setPdgId_(false) { using namespace cand::parser; using namespace std; string decay(cfg.getParameter<string>("decay")); if(decayParser(decay, labels_)) for(vector<ConjInfo>::iterator label = labels_.begin(); label != labels_.end(); ++label) if(label->mode_ == ConjInfo::kPlus) dauCharge_.push_back( 1 ); else if (label->mode_ == ConjInfo::kMinus) dauCharge_.push_back(-1); else dauCharge_.push_back(0); else throw edm::Exception(edm::errors::Configuration, "failed to parse \"" + decay + "\""); int lists = labels_.size(); if(lists != 2 && lists != 3) throw edm::Exception(edm::errors::LogicError, "invalid number of collections"); bool found; const string setLongLived("setLongLived"); vector<string> vBoolParams = cfg.getParameterNamesForType<bool>(); found = find(vBoolParams.begin(), vBoolParams.end(), setLongLived) != vBoolParams.end(); if(found) setLongLived_ = cfg.getParameter<bool>("setLongLived"); const string setMassConstraint("setMassConstraint"); found = find(vBoolParams.begin(), vBoolParams.end(), setMassConstraint) != vBoolParams.end(); if(found) setMassConstraint_ = cfg.getParameter<bool>("setMassConstraint"); const string setPdgId("setPdgId"); vector<string> vIntParams = cfg.getParameterNamesForType<int>(); found = find(vIntParams.begin(), vIntParams.end(), setPdgId) != vIntParams.end(); if(found) { setPdgId_ = true; pdgId_ = cfg.getParameter<int>("setPdgId"); } name_ = cfg.getParameter<std::string>( "name" ); roles_= cfg.getParameter<std::vector<std::string> > ( "roles" ); }
std::vector<int> reco::modules::NamedCandCombinerBase::dauCharge_ [protected] |
daughter charges
Definition at line 86 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase().
std::vector<cand::parser::ConjInfo> reco::modules::NamedCandCombinerBase::labels_ [protected] |
label vector
Definition at line 84 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().
std::string reco::modules::NamedCandCombinerBase::name_ [protected] |
Name of this candidate.
Definition at line 96 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().
int reco::modules::NamedCandCombinerBase::pdgId_ [protected] |
which pdgId to set
Definition at line 94 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().
std::vector<std::string> reco::modules::NamedCandCombinerBase::roles_ [protected] |
Definition at line 98 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().
bool reco::modules::NamedCandCombinerBase::setLongLived_ [protected] |
set long lived flag
Definition at line 88 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().
bool reco::modules::NamedCandCombinerBase::setMassConstraint_ [protected] |
set mass constraint flag
Definition at line 90 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().
bool reco::modules::NamedCandCombinerBase::setPdgId_ [protected] |
set pdgId flag
Definition at line 92 of file NamedCandCombiner.h.
Referenced by NamedCandCombinerBase(), and reco::modules::NamedCandCombiner< Selector, PairSelector, Cloner, Setup, Init >::produce().