42 const map<string,BPHDecayMomentum::Component>& daugMap ):
50 const map<string,BPHDecayMomentum::Component>& daugMap,
51 const map<string,BPHRecoConstCandPtr> compMap ):
67 while ( n-- )
delete dList[
n];
106 const reco::Candidate*>::const_iterator iter =
clonesMap.find( daug );
107 return ( iter !=
clonesMap.end() ? iter->second : 0 );
118 const string&
name )
const {
122 if ( pos != string::npos ) {
124 return ( comp == 0 ? 0 : comp->
getDaug( name.substr( pos + 1 ) ) );
128 return ( iter !=
dMap.end() ? iter->second : 0 );
136 if ( pos != string::npos ) {
138 return ( comp == 0 ? 0 : comp->
getComp( name.substr( pos + 1 ) ) );
142 return ( iter !=
cMap.end() ? iter->second : 0 );
146 const vector<BPHDecayMomentum::Component>&
158 <<
"BPHDecayMomentum::add: " 159 <<
"Decay product already inserted with name " <<
name 164 if ( mass > 0.0 ) dnew->
setMass( mass );
166 dList.push_back( dnew );
177 cList.push_back( comp );
179 clonesMap.insert( comp->clonesMap.begin(), comp->clonesMap.end() );
191 int n = daugMap.size();
202 map<string,Component>::const_iterator iter = daugMap.
begin();
203 map<string,Component>::const_iterator iend = daugMap.end();
204 while ( iter != iend ) {
205 const pair<string,Component>&
entry = *iter++;
213 const string&
name =
nList[i++] = entry.first;
218 if ( mass > 0 ) dnew->
setMass( mass );
231 map<string,BPHRecoConstCandPtr>::const_iterator iter =
cMap.begin();
232 map<string,BPHRecoConstCandPtr>::const_iterator iend =
cMap.end();
233 while ( iter != iend ) {
234 const pair<string,BPHRecoConstCandPtr>&
entry = *iter++;
238 clonesMap.insert( comp->clonesMap.begin(), comp->clonesMap.end() );
245 const vector<const reco::Candidate*> dl )
const {
256 ad.insert( ad.end(),
dList.begin(),
dList.end() );
258 while ( n-- )
cList[
n]->fillDaug( ad );
Analysis-level particle class.
const reco::Candidate * cand
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()
virtual const std::vector< const reco::Candidate * > & daughters() const
std::vector< const reco::Candidate * > dList
std::vector< BPHRecoConstCandPtr > cList
std::map< std::string, BPHRecoConstCandPtr > cMap
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< std::string, const reco::Candidate * > dMap
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
virtual void setMass(double m)=0
set particle mass