Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-23 03:27:14

0001 #ifndef DataFormats_L1TCalorimeter_HGCalTower_h
0002 #define DataFormats_L1TCalorimeter_HGCalTower_h
0003 
0004 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0005 #include "DataFormats/L1Trigger/interface/BXVector.h"
0006 #include "DataFormats/L1THGCal/interface/HGCalTowerID.h"
0007 
0008 namespace l1t {
0009 
0010   class HGCalTower;
0011   typedef BXVector<HGCalTower> HGCalTowerBxCollection;
0012 
0013   class HGCalTower : public L1Candidate {
0014   public:
0015     HGCalTower() : etEm_(0.), etHad_(0.), id_(0), hwEtEm_(0), hwEtHad_(0), hwEtRatio_(0) {}
0016 
0017     HGCalTower(double etEm,
0018                double etHad,
0019                double eta,
0020                double phi,
0021                uint32_t id,
0022                int hwpt = 0,
0023                int hweta = 0,
0024                int hwphi = 0,
0025                int qual = 0,
0026                int hwEtEm = 0,
0027                int hwEtHad = 0,
0028                int hwEtRatio = 0);
0029 
0030     ~HGCalTower() override;
0031 
0032     void addEtEm(double et);
0033     void addEtHad(double et);
0034 
0035     double etEm() const { return etEm_; };
0036     double etHad() const { return etHad_; };
0037 
0038     const HGCalTower& operator+=(const HGCalTower& tower);
0039 
0040     HGCalTowerID id() const { return id_; }
0041     short zside() const { return id_.zside(); }
0042 
0043     void setHwEtEm(int et) { hwEtEm_ = et; }
0044     void setHwEtHad(int et) { hwEtHad_ = et; }
0045     void setHwEtRatio(int ratio) { hwEtRatio_ = ratio; }
0046 
0047     int hwEtEm() const { return hwEtEm_; }
0048     int hwEtHad() const { return hwEtHad_; }
0049     int hwEtRatio() const { return hwEtRatio_; }
0050 
0051   private:
0052     void addEt(double et);
0053 
0054     // additional hardware quantities
0055     double etEm_;
0056     double etHad_;
0057     HGCalTowerID id_;
0058 
0059     int hwEtEm_;
0060     int hwEtHad_;
0061     int hwEtRatio_;
0062   };
0063 
0064 }  // namespace l1t
0065 
0066 #endif