CMS 3D CMS Logo

HGCalConcentratorSuperTriggerCellImpl.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_L1THGCal_HGCalConcentratorSuperTriggerCellImpl_h__
2 #define __L1Trigger_L1THGCal_HGCalConcentratorSuperTriggerCellImpl_h__
3 
6 
10 
12 
13 #include <array>
14 #include <vector>
15 
17 public:
19 
20  void superTriggerCellSelectImpl(const std::vector<l1t::HGCalTriggerCell>& trigCellVecInput,
21  std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput);
23 
24 private:
25  int getSuperTriggerCellId(int detid) const;
26  static const std::map<int, int> kSplit_;
27  static constexpr int kWafer_offset_ = 6;
28  static constexpr int kSTCsizeCoarse_ = 16;
29  static constexpr int kSTCsizeFine_ = 4;
30  static constexpr int kSplit_v8_Coarse_ = 0x30;
31  static constexpr int kSplit_v8_Fine_ = 0x3a;
32  static constexpr int kNLayers_ = 3;
33  static constexpr int kSplit_v9_ = 0x36;
34 
35  static constexpr int kRocShift_ = 6;
36  static constexpr int kRotate4_ = 4;
37  static constexpr int kUShift_ = 3;
38 
41  std::vector<unsigned> stcSize_;
42 
44  private:
45  float sumPt_, sumMipPt_;
47  unsigned maxId_;
48 
49  public:
50  SuperTriggerCell() { sumPt_ = 0, sumMipPt_ = 0, sumHwPt_ = 0, maxHwPt_ = 0, maxId_ = 0; }
51  void add(const l1t::HGCalTriggerCell& c) {
52  sumPt_ += c.pt();
53  sumMipPt_ += c.mipPt();
54  sumHwPt_ += c.hwPt();
55  if (maxId_ == 0 || c.hwPt() > maxHwPt_) {
56  maxHwPt_ = c.hwPt();
57  maxId_ = c.detId();
58  }
59  }
61  c.setHwPt(sumHwPt_);
62  c.setMipPt(sumMipPt_);
63  c.setPt(sumPt_);
64  }
65  unsigned GetMaxId() const { return maxId_; }
66  };
67 };
68 
69 #endif
void eventSetup(const edm::EventSetup &)
void superTriggerCellSelectImpl(const std::vector< l1t::HGCalTriggerCell > &trigCellVecInput, std::vector< l1t::HGCalTriggerCell > &trigCellVecOutput)
double pt() const final
transverse momentum
double mipPt() const
HGCalConcentratorSuperTriggerCellImpl(const edm::ParameterSet &conf)
uint32_t detId() const
void setMipPt(double value)
int hwPt() const
Definition: L1Candidate.h:48
void setHwPt(int pt)
Definition: L1Candidate.h:41
#define constexpr