CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ShallowClonePtrCandidate.h
Go to the documentation of this file.
1 #ifndef Candidate_ShallowClonePtrCandidate_h
2 #define Candidate_ShallowClonePtrCandidate_h
3 
14 
15 namespace reco {
17  public:
24  LeafCandidate( * masterClone ),
25  masterClone_( masterClone ) {
26  }
29  Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
30  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
32  ShallowClonePtrCandidate( const CandidatePtr & masterClone,
33  Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
34  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
36  virtual ~ShallowClonePtrCandidate();
38  virtual ShallowClonePtrCandidate * clone() const;
40  virtual const_iterator begin() const;
42  virtual const_iterator end() const;
44  virtual iterator begin();
46  virtual iterator end();
48  virtual size_t numberOfDaughters() const;
50  virtual size_t numberOfMothers() const;
52  virtual const Candidate * daughter( size_type i ) const;
54  virtual const Candidate * mother( size_type i ) const;
56  virtual Candidate * daughter( size_type i );
57  using reco::LeafCandidate::daughter; // avoid hiding the base
59  virtual bool hasMasterClonePtr() const;
61  virtual const CandidatePtr & masterClonePtr() const;
62 
63 
64  virtual bool isElectron() const;
65  virtual bool isMuon() const;
66  virtual bool isGlobalMuon() const;
67  virtual bool isStandAloneMuon() const;
68  virtual bool isTrackerMuon() const;
69  virtual bool isCaloMuon() const;
70  virtual bool isPhoton() const;
71  virtual bool isConvertedPhoton() const;
72  virtual bool isJet() const;
73  private:
74  // const iterator implementation
76  // iterator implementation
79  virtual bool overlap( const Candidate & c ) const { return masterClone_->overlap( c ); }
82  };
83 
84 }
85 
86 #endif
virtual const_iterator begin() const
first daughter const_iterator
int Charge
electric charge type
Definition: Candidate.h:39
int i
Definition: DBlmapReader.cc:9
size_t size_type
Definition: Candidate.h:34
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
virtual size_t numberOfDaughters() const
number of daughters
virtual const CandidatePtr & masterClonePtr() const
returns reference to master clone pointer
candidate::const_iterator const_iterator
Definition: Candidate.h:35
candidate::iterator_imp_specific< daughters > iterator_imp_specific
virtual const Candidate * daughter(size_type i) const
return daughter at a given position (throws an exception)
CandidatePtr masterClone_
CandidatePtrerence to master clone.
ShallowClonePtrCandidate(const CandidatePtr &masterClone, Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
virtual bool overlap(const Candidate &c) const
check overlap with another Candidate
virtual bool hasMasterClonePtr() const
has master clone pointer
ShallowClonePtrCandidate(const CandidatePtr &masterClone)
constructor from Particle
virtual const Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
ShallowClonePtrCandidate()
default constructor
candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
CandidateCollection daughters
collection of daughter candidates
candidate::iterator iterator
Definition: Candidate.h:36
ShallowClonePtrCandidate(const CandidatePtr &masterClone, Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
virtual ~ShallowClonePtrCandidate()
destructor
virtual size_t numberOfMothers() const
number of mothers
virtual const CandidateBaseRef & masterClone() const
virtual const Candidate * mother(size_type i) const
return mother at a given position (throws an exception)
virtual const_iterator end() const
last daughter const_iterator
math::XYZPoint Point
point in the space
Definition: Candidate.h:45
virtual ShallowClonePtrCandidate * clone() const
returns a clone of the Candidate object
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:30
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:43