File indexing completed on 2024-04-06 12:05:07
0001 #ifndef RecoCandidate_CaloRecHitCandidate_h
0002 #define RecoCandidate_CaloRecHitCandidate_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
0012 #include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
0013 #include "DataFormats/Common/interface/Ptr.h"
0014
0015 namespace reco {
0016
0017 class CaloRecHitCandidate : public LeafCandidate {
0018 public:
0019 typedef edm::Ptr<CaloRecHit> CaloRecHitRef;
0020
0021 CaloRecHitCandidate() : LeafCandidate() {}
0022
0023 CaloRecHitCandidate(const LorentzVector& p4, Charge q = 0, const Point& vtx = Point(0, 0, 0))
0024 : LeafCandidate(q, p4, vtx) {}
0025
0026 CaloRecHitCandidate(const PolarLorentzVector& p4, Charge q = 0, const Point& vtx = Point(0, 0, 0))
0027 : LeafCandidate(q, p4, vtx) {}
0028
0029 ~CaloRecHitCandidate() override;
0030
0031 CaloRecHitCandidate* clone() const override;
0032
0033 void setCaloRecHit(const CaloRecHitRef& r) { caloRecHit_ = r; }
0034
0035 CaloRecHitRef caloRecHit() const { return caloRecHit_; }
0036
0037 private:
0038
0039 bool overlap(const Candidate&) const override;
0040
0041 CaloRecHitRef caloRecHit_;
0042 };
0043
0044 GET_DEFAULT_CANDIDATE_COMPONENT(CaloRecHitCandidate, edm::Ptr<CaloRecHit>, caloRecHit);
0045
0046 }
0047
0048 #endif