CMS 3D CMS Logo

CaloLayer1Collections.h
Go to the documentation of this file.
1 #ifndef CaloLayer1Collections_h
2 #define CaloLayer1Collections_h
3 
8 #include "L1TObjectCollections.h"
9 
10 namespace l1t {
11  namespace stage2 {
13  public:
19  // Pre-allocate:
20  // 72 iPhi values
21  // 28 iEta values in Ecal, 28 + 12 iEta values in Hcal + HF
22  // 2 hemispheres
23  ecalDigis_->reserve(72 * 28 * 2);
24  hcalDigis_->reserve(72 * 40 * 2);
25  // 7 regions * 18 cards * 2 hemispheres
26  caloRegions_->reserve(7 * 18 * 2);
28  ecalDigisBx_.begin(), ecalDigisBx_.end(), [] { return std::make_unique<EcalTrigPrimDigiCollection>(); });
29  };
30 
31  ~CaloLayer1Collections() override;
32 
33  inline EcalTrigPrimDigiCollection* getEcalDigis() { return ecalDigis_.get(); };
34  inline HcalTrigPrimDigiCollection* getHcalDigis() { return hcalDigis_.get(); };
35  inline L1CaloRegionCollection* getRegions() { return caloRegions_.get(); };
36 
37  inline EcalTrigPrimDigiCollection* getEcalDigisBx(const unsigned int copy) override {
38  return ecalDigisBx_[copy].get();
39  };
40 
41  private:
42  std::unique_ptr<EcalTrigPrimDigiCollection> ecalDigis_;
43  std::unique_ptr<HcalTrigPrimDigiCollection> hcalDigis_;
44  std::unique_ptr<L1CaloRegionCollection> caloRegions_;
45 
46  std::array<std::unique_ptr<EcalTrigPrimDigiCollection>, 5> ecalDigisBx_;
47  };
48  } // namespace stage2
49 } // namespace l1t
50 
51 #endif
std::unique_ptr< L1CaloRegionCollection > caloRegions_
std::unique_ptr< HcalTrigPrimDigiCollection > hcalDigis_
delete x;
Definition: CaloConfig.h:22
void generate(uint32_t const nbins, float const *initValues, std::vector< float > &values)
std::array< std::unique_ptr< EcalTrigPrimDigiCollection >, 5 > ecalDigisBx_
HcalTrigPrimDigiCollection * getHcalDigis()
EcalTrigPrimDigiCollection * getEcalDigisBx(const unsigned int copy) override
EcalTrigPrimDigiCollection * getEcalDigis()
L1CaloRegionCollection * getRegions()
std::unique_ptr< EcalTrigPrimDigiCollection > ecalDigis_
std::vector< L1CaloRegion > L1CaloRegionCollection