CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ShallowCloneCandidate.h
Go to the documentation of this file.
1 #ifndef Candidate_ShallowCloneCandidate_h
2 #define Candidate_ShallowCloneCandidate_h
3 
15 
16 namespace reco {
18  public:
25  LeafCandidate( * masterClone ),
26  masterClone_( masterClone->hasMasterClone() ?
27  masterClone->masterClone() :
28  masterClone ) {
29  }
32  Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
33  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
35  ShallowCloneCandidate( const CandidateBaseRef & masterClone,
36  Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
37  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
39  virtual ~ShallowCloneCandidate();
41  virtual ShallowCloneCandidate * clone() const;
43  virtual const_iterator begin() const;
45  virtual const_iterator end() const;
47  virtual iterator begin();
49  virtual iterator end();
51  virtual size_t numberOfDaughters() const;
53  virtual size_t numberOfMothers() const;
55  virtual const Candidate * daughter( size_type i ) const;
57  virtual const Candidate * mother( size_type i ) const;
59  virtual Candidate * daughter( size_type i );
60  using reco::LeafCandidate::daughter; // avoid hiding the base
62  virtual bool hasMasterClone() const;
64  virtual const CandidateBaseRef & masterClone() const;
65 
66  virtual bool isElectron() const;
67  virtual bool isMuon() const;
68  virtual bool isGlobalMuon() const;
69  virtual bool isStandAloneMuon() const;
70  virtual bool isTrackerMuon() const;
71  virtual bool isCaloMuon() const;
72  virtual bool isPhoton() const;
73  virtual bool isConvertedPhoton() const;
74  virtual bool isJet() const;
75  private:
76  // const iterator implementation
78  // iterator implementation
81  virtual bool overlap( const Candidate & c ) const { return masterClone_->overlap( c ); }
84  };
85 
86 }
87 
88 #endif
virtual const_iterator begin() const
first daughter const_iterator
CandidateBaseRef masterClone_
CandidateBaseReference to master clone.
int Charge
electric charge type
Definition: Candidate.h:39
int i
Definition: DBlmapReader.cc:9
candidate::iterator_imp_specific< daughters > iterator_imp_specific
virtual bool isConvertedPhoton() const
CandidateCollection daughters
collection of daughter candidates
virtual size_t numberOfDaughters() const
number of daughters
virtual bool isElectron() const
size_t size_type
Definition: Candidate.h:34
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
virtual size_t numberOfMothers() const
number of daughters
candidate::const_iterator const_iterator
Definition: Candidate.h:35
virtual bool isTrackerMuon() const
candidate::const_iterator_imp_specific< daughters > const_iterator_imp_specific
ShallowCloneCandidate(const CandidateBaseRef &masterClone, Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
virtual bool hasMasterClone() const
has master clone
virtual bool overlap(const Candidate &c) const
check overlap with another Candidate
ShallowCloneCandidate(const CandidateBaseRef &masterClone, Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from values
virtual ShallowCloneCandidate * clone() const
returns a clone of the Candidate object
virtual ~ShallowCloneCandidate()
destructor
virtual bool isGlobalMuon() const
virtual const Candidate * daughter(size_type) const
return daughter at a given position (throws an exception)
virtual const_iterator end() const
last daughter const_iterator
virtual bool isStandAloneMuon() const
ShallowCloneCandidate(const CandidateBaseRef &masterClone)
constructor from Particle
virtual bool isCaloMuon() const
virtual const CandidateBaseRef & masterClone() const
returns reference to master clone
candidate::iterator iterator
Definition: Candidate.h:36
ShallowCloneCandidate()
default constructor
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
virtual const Candidate * daughter(size_type i) const
return daughter at a given position (throws an exception)
math::XYZPoint Point
point in the space
Definition: Candidate.h:45
virtual const Candidate * mother(size_type i) const
return daughter at a given position (throws an exception)
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:30
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:43