File indexing completed on 2024-09-07 04:35:52
0001 #ifndef DataFormats_EgammaReco_PreshowerCluster_h
0002 #define DataFormats_EgammaReco_PreshowerCluster_h
0003
0004
0005
0006
0007
0008
0009 #include "DataFormats/Math/interface/Point3D.h"
0010 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
0011 #include "DataFormats/EgammaReco/interface/PreshowerClusterFwd.h"
0012
0013 #include <cmath>
0014
0015 namespace reco {
0016
0017 class PreshowerCluster : public CaloCluster {
0018 public:
0019 typedef math::XYZPoint Point;
0020
0021
0022 PreshowerCluster() : CaloCluster(0., Point(0., 0., 0.)) {}
0023
0024 ~PreshowerCluster() override;
0025
0026
0027 PreshowerCluster(const double E,
0028 const Point& pos,
0029 const std::vector<std::pair<DetId, float> >& usedHits,
0030 const int plane);
0031
0032
0033 PreshowerCluster(const PreshowerCluster&);
0034
0035
0036 int nhits() const { return hitsAndFractions_.size(); }
0037
0038
0039 int plane() const { return plane_; }
0040
0041 double et() const { return energy() / cosh(eta()); }
0042
0043
0044 bool operator==(const PreshowerCluster&) const;
0045 bool operator<(const PreshowerCluster&) const;
0046
0047
0048 CaloClusterPtr basicCluster() const { return bc_ref_; }
0049
0050
0051
0052
0053 void setBCRef(const CaloClusterPtr& r) { bc_ref_ = r; }
0054
0055 private:
0056 int plane_;
0057
0058
0059 CaloClusterPtr bc_ref_;
0060
0061
0062
0063 };
0064 }
0065 #endif