CMS 3D CMS Logo

GMTCollections.h
Go to the documentation of this file.
1 #ifndef GMTCollections_h
2 #define GMTCollections_h
3 
6 
9 
10 #include "L1TObjectCollections.h"
11 
12 #include <array>
13 
14 namespace l1t {
15  namespace stage2 {
17  public:
18  // If the zero suppression deletes all the blocks used to
19  // fill a collection the BX range cannot be determined.
20  // Set default values here to then create an empty collection
21  // with a defined BX range.
23  edm::Event& e, const int iFirstBx = -2, const int iLastBx = 2, const int oFirstBx = -2, const int oLastBx = 2)
25  regionalMuonCandsBMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
26  regionalMuonCandsOMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
27  regionalMuonCandsEMTF_(std::make_unique<RegionalMuonCandBxCollection>(0, iFirstBx, iLastBx)),
28  muons_(),
29  imdMuonsBMTF_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
30  imdMuonsEMTFNeg_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
31  imdMuonsEMTFPos_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
32  imdMuonsOMTFNeg_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
33  imdMuonsOMTFPos_(std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx)),
34 
35  regionalMuonShowersEMTF_(std::make_unique<RegionalMuonShowerBxCollection>(0, iFirstBx, iLastBx)),
36  muonShowers_() {
37  std::generate(muons_.begin(), muons_.end(), [&oFirstBx, &oLastBx] {
38  return std::make_unique<MuonBxCollection>(0, oFirstBx, oLastBx);
39  });
40  std::generate(muonShowers_.begin(), muonShowers_.end(), [&oFirstBx, &oLastBx] {
41  return std::make_unique<MuonShowerBxCollection>(0, oFirstBx, oLastBx);
42  });
43  };
44 
45  ~GMTCollections() override;
46 
50  inline MuonBxCollection* getMuons(const unsigned int copy) override { return muons_[copy].get(); };
51  inline MuonBxCollection* getImdMuonsBMTF() { return imdMuonsBMTF_.get(); };
56 
58  inline MuonShowerBxCollection* getMuonShowers(const unsigned int copy) override {
59  return muonShowers_[copy].get();
60  };
61 
62  static constexpr size_t NUM_OUTPUT_COPIES{6};
63 
64  private:
65  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsBMTF_;
66  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsOMTF_;
67  std::unique_ptr<RegionalMuonCandBxCollection> regionalMuonCandsEMTF_;
68  std::array<std::unique_ptr<MuonBxCollection>, 6> muons_;
69  std::unique_ptr<MuonBxCollection> imdMuonsBMTF_;
70  std::unique_ptr<MuonBxCollection> imdMuonsEMTFNeg_;
71  std::unique_ptr<MuonBxCollection> imdMuonsEMTFPos_;
72  std::unique_ptr<MuonBxCollection> imdMuonsOMTFNeg_;
73  std::unique_ptr<MuonBxCollection> imdMuonsOMTFPos_;
74 
75  std::unique_ptr<RegionalMuonShowerBxCollection> regionalMuonShowersEMTF_;
76  std::array<std::unique_ptr<MuonShowerBxCollection>, 6> muonShowers_;
77  };
78  } // namespace stage2
79 } // namespace l1t
80 
81 #endif
MuonBxCollection * getImdMuonsEMTFNeg()
MuonBxCollection * getImdMuonsOMTFNeg()
std::unique_ptr< MuonBxCollection > imdMuonsOMTFNeg_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsOMTF_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsEMTF_
RegionalMuonCandBxCollection * getRegionalMuonCandsBMTF()
RegionalMuonCandBxCollection * getRegionalMuonCandsEMTF()
delete x;
Definition: CaloConfig.h:22
static constexpr size_t NUM_OUTPUT_COPIES
RegionalMuonShowerBxCollection * getRegionalMuonShowersEMTF()
void generate(uint32_t const nbins, float const *initValues, std::vector< float > &values)
std::unique_ptr< RegionalMuonShowerBxCollection > regionalMuonShowersEMTF_
std::unique_ptr< MuonBxCollection > imdMuonsEMTFNeg_
MuonBxCollection * getMuons(const unsigned int copy) override
std::array< std::unique_ptr< MuonBxCollection >, 6 > muons_
std::unique_ptr< RegionalMuonCandBxCollection > regionalMuonCandsBMTF_
GMTCollections(edm::Event &e, const int iFirstBx=-2, const int iLastBx=2, const int oFirstBx=-2, const int oLastBx=2)
std::array< std::unique_ptr< MuonShowerBxCollection >, 6 > muonShowers_
MuonShowerBxCollection * getMuonShowers(const unsigned int copy) override
RegionalMuonCandBxCollection * getRegionalMuonCandsOMTF()
MuonBxCollection * getImdMuonsOMTFPos()
std::unique_ptr< MuonBxCollection > imdMuonsOMTFPos_
MuonBxCollection * getImdMuonsBMTF()
MuonBxCollection * getImdMuonsEMTFPos()
std::unique_ptr< MuonBxCollection > imdMuonsBMTF_
std::unique_ptr< MuonBxCollection > imdMuonsEMTFPos_