CMS 3D CMS Logo

Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

reco::CompositeRefCandidateT< D > Class Template Reference

#include <CompositeRefCandidateT.h>

Inheritance diagram for reco::CompositeRefCandidateT< D >:
reco::LeafCandidate reco::Candidate

List of all members.

Public Types

typedef D daughters
 collection of references to daughters
typedef D mothers
 collection of references to daughters

Public Member Functions

void addDaughter (const typename daughters::value_type &)
 add a daughter via a reference
void addMother (const typename mothers::value_type &)
 add a daughter via a reference
virtual const_iterator begin () const
 first daughter const_iterator
virtual iterator begin ()
 first daughter iterator
void clearDaughters ()
 clear daughter references
void clearMothers ()
 clear mother references
virtual CompositeRefCandidateT
< D > * 
clone () const
 returns a clone of the candidate
 CompositeRefCandidateT (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
 CompositeRefCandidateT (const LeafCandidate &c)
 constructor from a particle
 CompositeRefCandidateT (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values
 CompositeRefCandidateT ()
 default constructor
virtual const Candidatedaughter (size_type) const
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
virtual Candidatedaughter (size_type)
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1
daughters::value_type daughterRef (size_type i) const
 reference to daughter at given position
const daughtersdaughterRefVector () const
 references to daughtes
virtual const_iterator end () const
 last daughter const_iterator
virtual iterator end ()
 last daughter iterator
virtual const Candidatemother (size_type=0) const
 return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode)
daughters::value_type motherRef (size_type i=0) const
 reference to mother at given position
const mothersmotherRefVector () const
 references to mothers
virtual size_t numberOfDaughters () const
 number of daughters
virtual size_t numberOfMothers () const
 number of mothers
void resetDaughters (const edm::ProductID &id)
 set daughters product ID
void resetMothers (const edm::ProductID &id)
 set mother product ID
virtual ~CompositeRefCandidateT ()
 destructor

Private Types

typedef
candidate::const_iterator_imp_specific
< daughters
const_iterator_imp_specific
 const iterator implementation
typedef
candidate::iterator_imp_specific_dummy
< daughters
iterator_imp_specific
 iterator implementation

Private Member Functions

virtual bool overlap (const Candidate &) const
 check overlap with another candidate

Private Attributes

daughters dau
 collection of references to daughters
daughters mom
 collection of references to mothers

Detailed Description

template<typename D>
class reco::CompositeRefCandidateT< D >

a reco::Candidate composed of daughters. The daughters has persistent references (edm::Ref <...>) to reco::Candidate stored in a separate collection.

Author:
Luca Lista, INFN
Version:
Id:
CompositeRefCandidateT.h,v 1.15 2012/04/07 05:54:55 davidlt Exp

Definition at line 20 of file CompositeRefCandidateT.h.


Member Typedef Documentation

const iterator implementation

Reimplemented from reco::LeafCandidate.

Definition at line 85 of file CompositeRefCandidateT.h.

template<typename D>
typedef D reco::CompositeRefCandidateT< D >::daughters

collection of references to daughters

Reimplemented from reco::LeafCandidate.

Definition at line 23 of file CompositeRefCandidateT.h.

iterator implementation

Reimplemented from reco::LeafCandidate.

Definition at line 87 of file CompositeRefCandidateT.h.

template<typename D>
typedef D reco::CompositeRefCandidateT< D >::mothers

collection of references to daughters

Definition at line 25 of file CompositeRefCandidateT.h.


Constructor & Destructor Documentation

template<typename D>
reco::CompositeRefCandidateT< D >::CompositeRefCandidateT ( ) [inline]

default constructor

Definition at line 27 of file CompositeRefCandidateT.h.

: LeafCandidate() { }
template<typename D>
reco::CompositeRefCandidateT< D >::CompositeRefCandidateT ( Charge  q,
const LorentzVector p4,
const Point vtx = Point( 0, 0, 0 ),
int  pdgId = 0,
int  status = 0,
bool  integerCharge = true 
) [inline]

constructor from values

Definition at line 29 of file CompositeRefCandidateT.h.

                                                                                       :
      LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
template<typename D>
reco::CompositeRefCandidateT< D >::CompositeRefCandidateT ( Charge  q,
const PolarLorentzVector p4,
const Point vtx = Point( 0, 0, 0 ),
int  pdgId = 0,
int  status = 0,
bool  integerCharge = true 
) [inline]

constructor from values

Definition at line 33 of file CompositeRefCandidateT.h.

                                                                                       :
      LeafCandidate( q, p4, vtx, pdgId, status, integerCharge ) { }
template<typename D>
reco::CompositeRefCandidateT< D >::CompositeRefCandidateT ( const LeafCandidate c) [inline, explicit]

constructor from a particle

Definition at line 37 of file CompositeRefCandidateT.h.

: LeafCandidate( c ) { }
template<typename D >
reco::CompositeRefCandidateT< D >::~CompositeRefCandidateT ( ) [virtual]

destructor

Definition at line 107 of file CompositeRefCandidateT.h.

                                                     { 
  }

Member Function Documentation

template<typename D >
void reco::CompositeRefCandidateT< D >::addDaughter ( const typename daughters::value_type &  cand) [inline]
template<typename D>
void reco::CompositeRefCandidateT< D >::addMother ( const typename mothers::value_type &  )
template<typename D >
Candidate::const_iterator reco::CompositeRefCandidateT< D >::begin ( void  ) const [virtual]
template<typename D >
Candidate::iterator reco::CompositeRefCandidateT< D >::begin ( void  ) [virtual]

first daughter iterator

Reimplemented from reco::LeafCandidate.

Definition at line 126 of file CompositeRefCandidateT.h.

                                                     { 
    return iterator( new iterator_imp_specific ); 
  }
template<typename D>
void reco::CompositeRefCandidateT< D >::clearDaughters ( ) [inline]

clear daughter references

Definition at line 66 of file CompositeRefCandidateT.h.

{ dau.clear(); }
template<typename D>
void reco::CompositeRefCandidateT< D >::clearMothers ( ) [inline]

clear mother references

Definition at line 68 of file CompositeRefCandidateT.h.

{ mom.clear(); }
template<typename D >
CompositeRefCandidateT< D > * reco::CompositeRefCandidateT< D >::clone ( void  ) const [virtual]

returns a clone of the candidate

Reimplemented from reco::LeafCandidate.

Reimplemented in reco::GenParticle.

Definition at line 111 of file CompositeRefCandidateT.h.

                                                                     { 
    return new CompositeRefCandidateT( * this ); 
  }
template<typename D >
const Candidate * reco::CompositeRefCandidateT< D >::daughter ( size_type  i) const [virtual]
template<typename D >
Candidate * reco::CompositeRefCandidateT< D >::daughter ( size_type  i) [virtual]

return daughter at a given position, i = 0, ... numberOfDaughters() - 1

Reimplemented from reco::LeafCandidate.

Definition at line 146 of file CompositeRefCandidateT.h.

                                                               { 
    return 0;
  }
template<typename D>
daughters::value_type reco::CompositeRefCandidateT< D >::daughterRef ( size_type  i) const [inline]

reference to daughter at given position

Definition at line 70 of file CompositeRefCandidateT.h.

Referenced by GenParticleDecaySelector::add(), ISRGammaWeightProducer::produce(), and FSRWeightProducer::produce().

{ return dau[ i ]; }
template<typename D>
const daughters& reco::CompositeRefCandidateT< D >::daughterRefVector ( ) const [inline]

references to daughtes

Definition at line 72 of file CompositeRefCandidateT.h.

Referenced by GenParticlePruner::flagDaughters(), GenParticlePruner::produce(), and pat::GenPlusSimParticleProducer::produce().

{ return dau; }
template<typename D >
Candidate::iterator reco::CompositeRefCandidateT< D >::end ( void  ) [virtual]

last daughter iterator

Reimplemented from reco::LeafCandidate.

Definition at line 131 of file CompositeRefCandidateT.h.

                                                   { 
    return iterator( new iterator_imp_specific ); 
  }    
template<typename D >
Candidate::const_iterator reco::CompositeRefCandidateT< D >::end ( void  ) const [virtual]
template<typename D >
const Candidate * reco::CompositeRefCandidateT< D >::mother ( size_type  i = 0) const [virtual]
template<typename D>
daughters::value_type reco::CompositeRefCandidateT< D >::motherRef ( size_type  i = 0) const [inline]
template<typename D>
const mothers& reco::CompositeRefCandidateT< D >::motherRefVector ( ) const [inline]
template<typename D >
size_t reco::CompositeRefCandidateT< D >::numberOfDaughters ( ) const [virtual]
template<typename D >
size_t reco::CompositeRefCandidateT< D >::numberOfMothers ( ) const [virtual]
template<typename D >
bool reco::CompositeRefCandidateT< D >::overlap ( const Candidate c2) const [private, virtual]

check overlap with another candidate

Reimplemented from reco::LeafCandidate.

Reimplemented in reco::GenParticle.

Definition at line 161 of file CompositeRefCandidateT.h.

References Exception.

                                                                      {
    throw cms::Exception( "Error" ) << "can't check overlap internally for CompositeRefCanddate";
  }
template<typename D>
void reco::CompositeRefCandidateT< D >::resetDaughters ( const edm::ProductID id) [inline]

set daughters product ID

Definition at line 78 of file CompositeRefCandidateT.h.

Referenced by GenParticleProducer::produce(), and pat::GenPlusSimParticleProducer::produce().

{ dau = daughters( id ); }
template<typename D>
void reco::CompositeRefCandidateT< D >::resetMothers ( const edm::ProductID id) [inline]

set mother product ID

Definition at line 80 of file CompositeRefCandidateT.h.

Referenced by pat::GenPlusSimParticleProducer::produce().

{ mom = mothers( id ); }

Member Data Documentation

template<typename D>
daughters reco::CompositeRefCandidateT< D >::dau [private]
template<typename D>
daughters reco::CompositeRefCandidateT< D >::mom [private]