42 const map<string, BPHRecoConstCandPtr> compMap)
87 map<const reco::Candidate*, const reco::Candidate*>::const_iterator iter =
clonesMap.find(daug);
88 return (iter !=
clonesMap.end() ? iter->second :
nullptr);
100 if (pos != string::npos) {
102 return (comp ==
nullptr ?
nullptr : comp->
getDaug(name.substr(pos + 1)));
104 map<const string, const reco::Candidate*>::const_iterator iter =
dMap.find(name);
105 return (iter !=
dMap.end() ? iter->second :
nullptr);
112 if (pos != string::npos) {
114 return (comp ==
nullptr ?
nullptr : comp->
getComp(name.substr(pos + 1)));
116 map<const string, BPHRecoConstCandPtr>::const_iterator iter =
cMap.find(name);
117 return (iter !=
cMap.end() ? iter->second :
nullptr);
128 edm::LogPrint(
"TooManyParticles") <<
"BPHDecayMomentum::add: " 129 <<
"Decay product already inserted with name " <<
name <<
" , skipped";
136 dList.push_back(dnew);
145 cList.push_back(comp);
147 clonesMap.insert(comp->clonesMap.begin(), comp->clonesMap.end());
157 int n = daugMap.size();
168 map<string, Component>::const_iterator iter = daugMap.
begin();
169 map<string, Component>::const_iterator iend = daugMap.end();
170 while (iter != iend) {
171 const pair<string, Component>&
entry = *iter++;
179 const string&
name =
nList[i++] = entry.first;
197 map<string, BPHRecoConstCandPtr>::const_iterator iter =
cMap.begin();
198 map<string, BPHRecoConstCandPtr>::const_iterator iend =
cMap.end();
199 while (iter != iend) {
200 const pair<string, BPHRecoConstCandPtr>&
entry = *iter++;
204 clonesMap.insert(comp->clonesMap.begin(), comp->clonesMap.end());
220 ad.insert(ad.end(),
dList.begin(),
dList.end());
Analysis-level particle class.
const reco::Candidate * cand
std::vector< BPHRecoConstCandPtr > cList
virtual void sumMomentum(const std::vector< const reco::Candidate * > dl) const
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
virtual void setNotUpdated() const
virtual void computeMomentum() const
virtual ~BPHDecayMomentum()
std::map< std::string, const reco::Candidate * > dMap
virtual const std::vector< const reco::Candidate * > & daughters() const
std::vector< const reco::Candidate * > dList
virtual Candidate * clone() const =0
returns a clone of the Candidate object
const std::vector< Component > & componentList() const
std::vector< Component > compList
std::vector< const reco::Candidate * > dFull
virtual void addP(const std::string &name, const reco::Candidate *daug, double mass=-1.0)
virtual void fillDaug(std::vector< const reco::Candidate * > &ad) const
virtual const reco::Candidate * originalReco(const reco::Candidate *daug) const
get the original particle from the clone
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
void clearDaughters()
clear daughters
virtual const pat::CompositeCandidate & composite() const
get a composite by the simple sum of simple particles
void clonesList(const std::map< std::string, Component > &daugMap)
std::map< const reco::Candidate *, const reco::Candidate * > clonesMap
pat::CompositeCandidate compCand
virtual BPHRecoConstCandPtr getComp(const std::string &name) const
virtual const std::vector< BPHRecoConstCandPtr > & daughComp() const
virtual const std::vector< const reco::Candidate * > & daughFull() const
const_iterator begin() const
first daughter const_iterator
virtual const std::vector< std::string > & compNames() const
std::vector< std::string > nList
void set(reco::Candidate &c) const
set up a candidate
virtual const std::vector< std::string > & daugNames() const
virtual const reco::Candidate * getDaug(const std::string &name) const
std::vector< std::string > nComp
std::map< std::string, BPHRecoConstCandPtr > cMap
virtual void setMass(double m)=0
set particle mass