#include <CandCombiner.h>
Public Member Functions | |
CandCombinerBase (const edm::ParameterSet &cfg) | |
Protected Attributes | |
std::vector< int > | dauCharge_ |
daughter charges | |
std::vector < cand::parser::ConjInfo > | labels_ |
label vector | |
int | pdgId_ |
which pdgId to set | |
bool | setLongLived_ |
set long lived flag | |
bool | setMassConstraint_ |
set mass constraint flag | |
bool | setPdgId_ |
set pdgId flag |
Definition at line 66 of file CandCombiner.h.
reco::modules::CandCombinerBase::CandCombinerBase | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 67 of file CandCombiner.h.
References edm::errors::Configuration, dauCharge_, cand::parser::decayParser(), Exception, spr::find(), newFWLiteAna::found, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), reco::ParticleMasses::kPlus, diffTwoXMLs::label, labels_, edm::errors::LogicError, geometryXMLtoCSV::parser, pdgId_, 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"); } }
std::vector<int> reco::modules::CandCombinerBase::dauCharge_ [protected] |
std::vector<cand::parser::ConjInfo> reco::modules::CandCombinerBase::labels_ [protected] |
label vector
Definition at line 106 of file CandCombiner.h.
Referenced by CandCombinerBase(), and reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce().
int reco::modules::CandCombinerBase::pdgId_ [protected] |
which pdgId to set
Definition at line 116 of file CandCombiner.h.
Referenced by CandCombinerBase(), and reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce().
bool reco::modules::CandCombinerBase::setLongLived_ [protected] |
set long lived flag
Definition at line 110 of file CandCombiner.h.
Referenced by CandCombinerBase(), and reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce().
bool reco::modules::CandCombinerBase::setMassConstraint_ [protected] |
set mass constraint flag
Definition at line 112 of file CandCombiner.h.
Referenced by CandCombinerBase(), and reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce().
bool reco::modules::CandCombinerBase::setPdgId_ [protected] |
set pdgId flag
Definition at line 114 of file CandCombiner.h.
Referenced by CandCombinerBase(), and reco::modules::CandCombiner< Selector, PairSelector, Cloner, OutputCollection, Setup, Init >::produce().