00001 #ifndef Candidate_LeafCandidate_h
00002 #define Candidate_LeafCandidate_h
00003
00012 #include "DataFormats/Candidate/interface/Candidate.h"
00013 #include "DataFormats/Candidate/interface/iterator_imp_specific.h"
00014
00015 namespace reco {
00016
00017 class LeafCandidate : public Candidate {
00018 public:
00020 typedef CandidateCollection daughters;
00022 LeafCandidate() : Candidate() { }
00024 explicit LeafCandidate( const Particle & p ) : Candidate( p ) { }
00026 LeafCandidate( Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ),
00027 int pdgId = 0, int status = 0, bool integerCharge = true ) :
00028 Candidate( q, p4, vtx, pdgId, status, integerCharge ) { }
00030 LeafCandidate( Charge q, const PolarLorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ),
00031 int pdgId = 0, int status = 0, bool integerCharge = true ) :
00032 Candidate( q, p4, vtx, pdgId, status, integerCharge ) { }
00034 virtual ~LeafCandidate();
00036 virtual LeafCandidate * clone() const;
00038 virtual const_iterator begin() const;
00040 virtual const_iterator end() const;
00042 virtual iterator begin();
00044 virtual iterator end();
00046 virtual size_t numberOfDaughters() const;
00048 virtual const Candidate * daughter( size_type ) const;
00050 virtual size_t numberOfMothers() const;
00052 virtual const Candidate * mother( size_type ) const;
00054 virtual Candidate * daughter( size_type );
00055
00056 private:
00057
00058 typedef candidate::const_iterator_imp_specific<daughters> const_iterator_imp_specific;
00059
00060 typedef candidate::iterator_imp_specific<daughters> iterator_imp_specific;
00062 virtual bool overlap( const Candidate & c ) const;
00063 };
00064
00065 }
00066
00067 #endif