Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-18 08:23:36

0001 #ifndef L1Trigger_L1THGCal_HGCalTower_SA_h
0002 #define L1Trigger_L1THGCal_HGCalTower_SA_h
0003 
0004 #include <cstdint>
0005 
0006 namespace l1thgcfirmware {
0007 
0008   class HGCalTower {
0009   public:
0010     HGCalTower() = default;
0011     HGCalTower(double etEm, double etHad, float eta, float phi, uint32_t rawId)
0012         : etEm_(etEm), etHad_(etHad), eta_(eta), phi_(phi), id_(rawId) {}
0013 
0014     ~HGCalTower() = default;
0015 
0016     double etEm() const { return etEm_; }
0017     double etHad() const { return etHad_; }
0018 
0019     float eta() const { return eta_; }
0020     float phi() const { return phi_; }
0021     uint32_t id() const { return id_; }
0022 
0023     void addEtEm(double et);
0024     void addEtHad(double et);
0025 
0026     HGCalTower& operator+=(const HGCalTower& tower);
0027 
0028   private:
0029     double etEm_;
0030     double etHad_;
0031 
0032     float eta_;
0033     float phi_;
0034     uint32_t id_;
0035   };
0036 
0037   struct HGCalTowerCoord {
0038     HGCalTowerCoord(uint32_t rawId, float eta, float phi) : rawId(rawId), eta(eta), phi(phi) {}
0039 
0040     const uint32_t rawId;
0041     const float eta;
0042     const float phi;
0043   };
0044 }  // namespace l1thgcfirmware
0045 
0046 #endif