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 
15 
16 namespace reco {
18  public:
25  LeafCandidate( * masterClone ),
26  masterClone_( masterClone ) {
27  }
30  Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
31  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
33  ShallowClonePtrCandidate( const CandidatePtr & masterClone,
34  Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
35  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
37  virtual ~ShallowClonePtrCandidate();
39  virtual ShallowClonePtrCandidate * clone() const;
41  virtual const_iterator begin() const;
43  virtual const_iterator end() const;
45  virtual iterator begin();
47  virtual iterator end();
49  virtual size_t numberOfDaughters() const;
51  virtual size_t numberOfMothers() const;
53  virtual const Candidate * daughter( size_type i ) const;
55  virtual const Candidate * mother( size_type i ) const;
57  virtual Candidate * daughter( size_type i );
58  using reco::LeafCandidate::daughter; // avoid hiding the base
60  virtual bool hasMasterClonePtr() const;
62  virtual const CandidatePtr & masterClonePtr() const;
63 
64 
65  virtual bool isElectron() const;
66  virtual bool isMuon() const;
67  virtual bool isGlobalMuon() const;
68  virtual bool isStandAloneMuon() const;
69  virtual bool isTrackerMuon() const;
70  virtual bool isCaloMuon() const;
71  virtual bool isPhoton() const;
72  virtual bool isConvertedPhoton() const;
73  virtual bool isJet() const;
74  private:
75  // const iterator implementation
77  // iterator implementation
80  virtual bool overlap( const Candidate & c ) const { return masterClone_->overlap( c ); }
83  };
84 
85 }
86 
87 #endif
virtual const_iterator begin() const
first daughter const_iterator
int Charge
electric charge type
Definition: Candidate.h:37
int i
Definition: DBlmapReader.cc:9
size_t size_type
Definition: Candidate.h:32
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:33
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:34
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:39
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:43
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
virtual ShallowClonePtrCandidate * clone() const
returns a clone of the Candidate object
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:29
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:41