CMS 3D CMS Logo

ShallowClonePtrCandidate.h
Go to the documentation of this file.
1 #ifndef Candidate_ShallowClonePtrCandidate_h
2 #define Candidate_ShallowClonePtrCandidate_h
3 
13 
14 namespace reco {
16  public:
23  LeafCandidate( * masterClone ),
24  masterClone_( masterClone ) {
25  }
28  Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
29  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
31  ShallowClonePtrCandidate( const CandidatePtr & masterClone,
32  Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
33  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
35  virtual ~ShallowClonePtrCandidate();
37  virtual ShallowClonePtrCandidate * clone() const;
39  virtual size_t numberOfDaughters() const;
41  virtual size_t numberOfMothers() const;
43  virtual const Candidate * daughter( size_type i ) const;
45  virtual const Candidate * mother( size_type i ) const;
47  virtual Candidate * daughter( size_type i );
48  using reco::LeafCandidate::daughter; // avoid hiding the base
50  virtual bool hasMasterClonePtr() const;
52  virtual const CandidatePtr & masterClonePtr() const;
53 
54 
55  virtual bool isElectron() const;
56  virtual bool isMuon() const;
57  virtual bool isGlobalMuon() const;
58  virtual bool isStandAloneMuon() const;
59  virtual bool isTrackerMuon() const;
60  virtual bool isCaloMuon() const;
61  virtual bool isPhoton() const;
62  virtual bool isConvertedPhoton() const;
63  virtual bool isJet() const;
64  private:
66  virtual bool overlap( const Candidate & c ) const { return masterClone_->overlap( c ); }
69  };
70 
71 }
72 
73 #endif
int Charge
electric charge type
Definition: Candidate.h:35
size_t size_type
Definition: Candidate.h:30
virtual size_t numberOfDaughters() const
number of daughters
virtual const CandidatePtr & masterClonePtr() const
returns reference to master clone pointer
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
CandidateCollection daughters
collection of daughter candidates
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:37
virtual ~ShallowClonePtrCandidate()
destructor
virtual size_t numberOfMothers() const
number of mothers
fixed size matrix
virtual const CandidateBaseRef & masterClone() const
Definition: LeafCandidate.cc:7
virtual const Candidate * mother(size_type i) const
return mother at a given position (throws an exception)
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
virtual const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
virtual ShallowClonePtrCandidate * clone() const
returns a clone of the Candidate object
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:27
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:39