Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:20

0001 #ifndef DataFormats_EgammaReco_PreshowerCluster_h
0002 #define DataFormats_EgammaReco_PreshowerCluster_h
0003 /*
0004  * Preshower cluster class
0005  *
0006  * \authors Dmirty Bandurin (KSU), Ted Kolberg (ND)
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     /// default constructor
0022     PreshowerCluster() : CaloCluster(0., Point(0., 0., 0.)){};
0023 
0024     ~PreshowerCluster() override;
0025 
0026     /// Constructor from EcalRecHits
0027     PreshowerCluster(const double E,
0028                      const Point& pos,
0029                      const std::vector<std::pair<DetId, float> >& usedHits,
0030                      const int plane);
0031 
0032     /// Constructor from cluster
0033     PreshowerCluster(const PreshowerCluster&);
0034 
0035     /// Number of RecHits the cluster
0036     int nhits() const { return hitsAndFractions_.size(); }
0037 
0038     /// Preshower plane
0039     int plane() const { return plane_; }
0040 
0041     double et() const { return energy() / cosh(eta()); }
0042 
0043     /// Comparisons
0044     bool operator==(const PreshowerCluster&) const;
0045     bool operator<(const PreshowerCluster&) const;
0046 
0047     /// Associated basic cluster;
0048     CaloClusterPtr basicCluster() const { return bc_ref_; }
0049 
0050     /// DetIds of component RecHits -- now inherited from CaloCluster
0051     //std::vector<DetId> getHitsByDetId() const { return usedHits_; }
0052 
0053     void setBCRef(const CaloClusterPtr& r) { bc_ref_ = r; }
0054 
0055   private:
0056     int plane_;
0057 
0058     /// Associated basic cluster;
0059     CaloClusterPtr bc_ref_;
0060 
0061     /// used hits by detId -- now inherited from CaloCluster
0062     //std::vector<DetId> usedHits_;
0063   };
0064 }  // namespace reco
0065 #endif