00001 #ifndef EgammaReco_BasicCluster_h 00002 #define EgammaReco_BasicCluster_h 00003 00013 #include "DataFormats/Math/interface/Point3D.h" 00014 #include "Rtypes.h" 00015 #include "DataFormats/DetId/interface/DetId.h" 00016 #include "DataFormats/CaloRecHit/interface/CaloCluster.h" 00017 00018 #include <vector> 00019 00020 namespace reco { 00021 00022 enum AlgoId { island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3, multi5x5 = 4 }; 00023 00024 class BasicCluster : public CaloCluster { 00025 public: 00026 00027 typedef math::XYZPoint Point; 00028 00030 BasicCluster() : CaloCluster(0., Point(0.,0.,0.)), chi2_(-1.) { } 00031 00032 BasicCluster( const double energy, const Point& position, const double chi2, const std::vector<DetId> usedHits, AlgoId algoID = hybrid); 00033 00035 std::vector<DetId> getHitsByDetId() const { return usedHits_; } 00036 00038 size_t size() const { return usedHits_.size(); } 00039 00041 double chi2() const { return chi2_; } 00042 00044 AlgoId algo() const { return algoId_; } 00045 00047 bool operator<(const reco::BasicCluster &otherCluster) const; 00048 bool operator==(const BasicCluster& rhs) const; 00049 00050 private: 00051 00053 Double32_t chi2_; 00054 00056 AlgoId algoId_; 00057 00059 std::vector<DetId> usedHits_; 00060 00061 }; 00062 00063 00064 } 00065 00066 #endif