CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCalTower_SA.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1THGCal_HGCalTower_SA_h
2 #define L1Trigger_L1THGCal_HGCalTower_SA_h
3 
4 #include <cstdint>
5 
6 namespace l1thgcfirmware {
7 
8  class HGCalTower {
9  public:
10  HGCalTower() = default;
11  HGCalTower(double etEm, double etHad, float eta, float phi, uint32_t rawId)
12  : etEm_(etEm), etHad_(etHad), eta_(eta), phi_(phi), id_(rawId) {}
13 
14  ~HGCalTower() = default;
15 
16  double etEm() const { return etEm_; }
17  double etHad() const { return etHad_; }
18 
19  float eta() const { return eta_; }
20  float phi() const { return phi_; }
21  uint32_t id() const { return id_; }
22 
23  void addEtEm(double et);
24  void addEtHad(double et);
25 
27 
28  private:
29  double etEm_;
30  double etHad_;
31 
32  float eta_;
33  float phi_;
34  uint32_t id_;
35  };
36 
37  struct HGCalTowerCoord {
38  HGCalTowerCoord(uint32_t rawId, float eta, float phi) : rawId(rawId), eta(eta), phi(phi) {}
39 
40  const uint32_t rawId;
41  const float eta;
42  const float phi;
43  };
44 } // namespace l1thgcfirmware
45 
46 #endif
HGCalTower(double etEm, double etHad, float eta, float phi, uint32_t rawId)
Definition: HGCalTower_SA.h:11
HGCalTower & operator+=(const HGCalTower &tower)
Definition: HGCalTower_SA.cc:5
uint32_t id() const
Definition: HGCalTower_SA.h:21
HGCalTowerCoord(uint32_t rawId, float eta, float phi)
Definition: HGCalTower_SA.h:38