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 
14 
15 namespace reco {
17  public:
24  LeafCandidate( * masterClone ),
25  masterClone_( masterClone->hasMasterClone() ?
26  masterClone->masterClone() :
27  masterClone ) {
28  }
31  Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
32  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
34  ShallowCloneCandidate( const CandidateBaseRef & masterClone,
35  Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
36  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
38  virtual ~ShallowCloneCandidate();
40  virtual ShallowCloneCandidate * clone() const;
42  virtual const_iterator begin() const;
44  virtual const_iterator end() const;
46  virtual iterator begin();
48  virtual iterator end();
50  virtual size_t numberOfDaughters() const;
52  virtual size_t numberOfMothers() const;
54  virtual const Candidate * daughter( size_type i ) const;
56  virtual const Candidate * mother( size_type i ) const;
58  virtual Candidate * daughter( size_type i );
59  using reco::LeafCandidate::daughter; // avoid hiding the base
61  virtual bool hasMasterClone() const;
63  virtual const CandidateBaseRef & masterClone() const;
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
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:32
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:43