33 nList.reserve(daugNum);
34 dList.reserve(daugNum);
35 nComp.reserve(compNum);
36 cList.reserve(compNum);
43 nComp.reserve(compNum);
44 cList.reserve(compNum);
48 const map<string, BPHRecoConstCandPtr> compMap)
93 map<const reco::Candidate*, const reco::Candidate*>::const_iterator iter =
clonesMap.find(daug);
94 return (iter !=
clonesMap.end() ? iter->second :
nullptr);
106 if (
pos != string::npos) {
108 return (
comp ==
nullptr ?
nullptr :
comp->getDaug(
name.substr(
pos + 1)));
110 map<const string, const reco::Candidate*>::const_iterator iter =
dMap.find(
name);
111 return (iter !=
dMap.end() ? iter->second :
nullptr);
118 if (
pos != string::npos) {
120 return (
comp ==
nullptr ?
nullptr :
comp->getComp(
name.substr(
pos + 1)));
122 map<const string, BPHRecoConstCandPtr>::const_iterator iter =
cMap.find(
name);
123 return (iter !=
cMap.end() ? iter->second :
nullptr);
134 edm::LogPrint(
"TooManyParticles") <<
"BPHDecayMomentum::add: " 135 <<
"Decay product already inserted with name " <<
name <<
" , skipped";
142 dList.push_back(dnew);
174 map<string, Component>::const_iterator iter =
daugMap.begin();
175 map<string, Component>::const_iterator iend =
daugMap.end();
176 while (iter != iend) {
203 map<string, BPHRecoConstCandPtr>::const_iterator c_iter =
cMap.begin();
204 map<string, BPHRecoConstCandPtr>::const_iterator c_iend =
cMap.end();
205 while (c_iter != c_iend) {
226 ad.insert(ad.end(),
dList.begin(),
dList.end());
227 vector<string>::const_iterator iter =
nList.begin();
228 vector<string>::const_iterator iend =
nList.end();
230 an.push_back(
name + *iter++);
241 vector<string> nFull;
virtual const reco::Candidate * originalReco(const reco::Candidate *daug) const
get the original particle from the clone
Analysis-level particle class.
std::vector< BPHRecoConstCandPtr > cList
void set(reco::Candidate &c) const
set up a candidate
virtual void computeMomentum() const
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
virtual ~BPHDecayMomentum()
const std::vector< Component > & componentList() const
std::map< std::string, const reco::Candidate * > dMap
virtual const std::vector< const reco::Candidate * > & daughFull() const
std::vector< const reco::Candidate * > dList
virtual const reco::Candidate * getDaug(const std::string &name) const
Container::value_type value_type
std::vector< Component > compList
std::vector< const reco::Candidate * > dFull
Log< level::Warning, true > LogPrint
BPHDecayMomentum(const BPHDecayMomentum &x)=delete
virtual void addP(const std::string &name, const reco::Candidate *daug, double mass=-1.0)
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
virtual void sumMomentum(const std::vector< const reco::Candidate *> &dl, const std::vector< std::string > &dn) const
virtual const std::vector< std::string > & compNames() const
virtual Candidate * clone() const =0
returns a clone of the Candidate object
void clearDaughters()
clear daughters
virtual BPHRecoConstCandPtr getComp(const std::string &name) const
virtual const std::vector< BPHRecoConstCandPtr > & daughComp() const
void clonesList(const std::map< std::string, Component > &daugMap)
virtual void fillDaug(std::vector< const reco::Candidate *> &ad, const std::string &name, std::vector< std::string > &an) const
std::map< const reco::Candidate *, const reco::Candidate * > clonesMap
virtual const std::vector< std::string > & daugNames() const
virtual void setNotUpdated() const
pat::CompositeCandidate compCand
const std::map< std::string, const reco::Candidate * > & daugMap() const
virtual const std::vector< const reco::Candidate * > & daughters() const
std::vector< std::string > nList
std::vector< std::string > nComp
std::map< std::string, BPHRecoConstCandPtr > cMap
virtual void setMass(double m)=0
set particle mass
virtual const pat::CompositeCandidate & composite() const
get a composite by the simple sum of simple particles