40 const map<string, BPHRecoConstCandPtr> compMap)
85 map<const reco::Candidate*, const reco::Candidate*>::const_iterator iter =
clonesMap.find(daug);
86 return (iter !=
clonesMap.end() ? iter->second :
nullptr);
98 if (pos != string::npos) {
100 return (comp ==
nullptr ?
nullptr : comp->
getDaug(name.substr(pos + 1)));
102 map<const string, const reco::Candidate*>::const_iterator iter =
dMap.find(name);
103 return (iter !=
dMap.end() ? iter->second :
nullptr);
110 if (pos != string::npos) {
112 return (comp ==
nullptr ?
nullptr : comp->
getComp(name.substr(pos + 1)));
114 map<const string, BPHRecoConstCandPtr>::const_iterator iter =
cMap.find(name);
115 return (iter !=
cMap.end() ? iter->second :
nullptr);
125 if (
dMap.find(name) !=
dMap.end()) {
126 edm::LogPrint(
"TooManyParticles") <<
"BPHDecayMomentum::add: "
127 <<
"Decay product already inserted with name " << name <<
" , skipped";
133 nList.push_back(name);
134 dList.push_back(dnew);
142 nComp.push_back(name);
143 cList.push_back(comp);
145 clonesMap.insert(comp->clonesMap.begin(), comp->clonesMap.end());
155 int n = daugMap.size();
166 map<string, Component>::const_iterator iter = daugMap.
begin();
167 map<string, Component>::const_iterator iend = daugMap.end();
168 while (iter != iend) {
169 const pair<string, Component>&
entry = *iter++;
177 const string& name =
nList[i++] = entry.first;
195 map<string, BPHRecoConstCandPtr>::const_iterator iter =
cMap.begin();
196 map<string, BPHRecoConstCandPtr>::const_iterator iend =
cMap.end();
197 while (iter != iend) {
198 const pair<string, BPHRecoConstCandPtr>&
entry = *iter++;
202 clonesMap.insert(comp->clonesMap.begin(), comp->clonesMap.end());
218 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
const std::vector< Component > & componentList() const
std::vector< Component > compList
std::vector< const reco::Candidate * > dFull
Log< level::Warning, true > LogPrint
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
virtual Candidate * clone() const =0
returns a clone of the Candidate object
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