test
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 
13 
14 namespace reco {
16  public:
23  LeafCandidate( * masterClone ),
24  masterClone_( masterClone->hasMasterClone() ?
25  masterClone->masterClone() :
26  masterClone ) {
27  }
30  Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
31  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
33  ShallowCloneCandidate( const CandidateBaseRef & masterClone,
34  Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
35  LeafCandidate( q, p4, vtx ), masterClone_( masterClone ) { }
37  virtual ~ShallowCloneCandidate();
39  virtual ShallowCloneCandidate * clone() const;
41  virtual size_t numberOfDaughters() const;
43  virtual size_t numberOfMothers() const;
45  virtual const Candidate * daughter( size_type i ) const;
47  virtual const Candidate * mother( size_type i ) const;
49  virtual Candidate * daughter( size_type i );
50  using reco::LeafCandidate::daughter; // avoid hiding the base
52  virtual bool hasMasterClone() const;
54  virtual const CandidateBaseRef & masterClone() const;
55 
56  virtual bool isElectron() const;
57  virtual bool isMuon() const;
58  virtual bool isGlobalMuon() const;
59  virtual bool isStandAloneMuon() const;
60  virtual bool isTrackerMuon() const;
61  virtual bool isCaloMuon() const;
62  virtual bool isPhoton() const;
63  virtual bool isConvertedPhoton() const;
64  virtual bool isJet() const;
65  private:
67  virtual bool overlap( const Candidate & c ) const { return masterClone_->overlap( c ); }
70  };
71 
72 }
73 
74 #endif
CandidateBaseRef masterClone_
CandidateBaseReference to master clone.
int Charge
electric charge type
Definition: Candidate.h:35
int i
Definition: DBlmapReader.cc:9
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:30
virtual size_t numberOfMothers() const
number of daughters
virtual bool isTrackerMuon() const
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 bool isStandAloneMuon() const
ShallowCloneCandidate(const CandidateBaseRef &masterClone)
constructor from Particle
virtual bool isCaloMuon() const
virtual const CandidateBaseRef & masterClone() const
returns reference to master clone
ShallowCloneCandidate()
default constructor
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
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:41
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
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:27
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:39