88#include " DataFormats/L1Trigger/interface/MuonShower.h"
99
1010#include " L1TObjectCollections.h"
11+ #include " GMTPutTokens.h"
1112
1213#include < array>
1314
@@ -19,61 +20,67 @@ namespace l1t {
1920 // fill a collection the BX range cannot be determined.
2021 // Set default values here to then create an empty collection
2122 // with a defined BX range.
22- GMTCollections (
23- edm::Event& e, const int iFirstBx = -2 , const int iLastBx = 2 , const int oFirstBx = -2 , const int oLastBx = 2 )
23+ GMTCollections (edm::Event& e,
24+ GMTPutTokens const & iTokens,
25+ const int iFirstBx = -2 ,
26+ const int iLastBx = 2 ,
27+ const int oFirstBx = -2 ,
28+ const int oLastBx = 2 )
2429 : L1TObjectCollections(e),
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- };
30+ regionalMuonCandsBMTF_ (0 , iFirstBx, iLastBx),
31+ regionalMuonCandsOMTF_(0 , iFirstBx, iLastBx),
32+ regionalMuonCandsEMTF_(0 , iFirstBx, iLastBx),
33+ muons_{{{0 , oFirstBx, oLastBx},
34+ {0 , oFirstBx, oLastBx},
35+ {0 , oFirstBx, oLastBx},
36+ {0 , oFirstBx, oLastBx},
37+ {0 , oFirstBx, oLastBx},
38+ {0 , oFirstBx, oLastBx}}},
39+ imdMuonsBMTF_ (0 , oFirstBx, oLastBx),
40+ imdMuonsEMTFNeg_(0 , oFirstBx, oLastBx),
41+ imdMuonsEMTFPos_(0 , oFirstBx, oLastBx),
42+ imdMuonsOMTFNeg_(0 , oFirstBx, oLastBx),
43+ imdMuonsOMTFPos_(0 , oFirstBx, oLastBx),
44+ regionalMuonShowersEMTF_(0 , iFirstBx, iLastBx),
45+ muonShowers_{{{0 , oFirstBx, oLastBx},
46+ {0 , oFirstBx, oLastBx},
47+ {0 , oFirstBx, oLastBx},
48+ {0 , oFirstBx, oLastBx},
49+ {0 , oFirstBx, oLastBx},
50+ {0 , oFirstBx, oLastBx}}},
51+ tokens_ (iTokens) {};
4452
4553 ~GMTCollections () override ;
4654
47- inline RegionalMuonCandBxCollection* getRegionalMuonCandsBMTF () { return regionalMuonCandsBMTF_. get () ; };
48- inline RegionalMuonCandBxCollection* getRegionalMuonCandsOMTF () { return regionalMuonCandsOMTF_. get () ; };
49- inline RegionalMuonCandBxCollection* getRegionalMuonCandsEMTF () { return regionalMuonCandsEMTF_. get () ; };
50- inline MuonBxCollection* getMuons (const unsigned int copy) override { return muons_[copy]. get () ; };
51- inline MuonBxCollection* getImdMuonsBMTF () { return imdMuonsBMTF_. get () ; };
52- inline MuonBxCollection* getImdMuonsEMTFNeg () { return imdMuonsEMTFNeg_. get () ; };
53- inline MuonBxCollection* getImdMuonsEMTFPos () { return imdMuonsEMTFPos_. get () ; };
54- inline MuonBxCollection* getImdMuonsOMTFNeg () { return imdMuonsOMTFNeg_. get () ; };
55- inline MuonBxCollection* getImdMuonsOMTFPos () { return imdMuonsOMTFPos_. get () ; };
55+ inline RegionalMuonCandBxCollection* getRegionalMuonCandsBMTF () { return & regionalMuonCandsBMTF_; };
56+ inline RegionalMuonCandBxCollection* getRegionalMuonCandsOMTF () { return & regionalMuonCandsOMTF_; };
57+ inline RegionalMuonCandBxCollection* getRegionalMuonCandsEMTF () { return & regionalMuonCandsEMTF_; };
58+ inline MuonBxCollection* getMuons (const unsigned int copy) override { return & muons_[copy]; };
59+ inline MuonBxCollection* getImdMuonsBMTF () { return & imdMuonsBMTF_; };
60+ inline MuonBxCollection* getImdMuonsEMTFNeg () { return & imdMuonsEMTFNeg_; };
61+ inline MuonBxCollection* getImdMuonsEMTFPos () { return & imdMuonsEMTFPos_; };
62+ inline MuonBxCollection* getImdMuonsOMTFNeg () { return & imdMuonsOMTFNeg_; };
63+ inline MuonBxCollection* getImdMuonsOMTFPos () { return & imdMuonsOMTFPos_; };
5664
57- inline RegionalMuonShowerBxCollection* getRegionalMuonShowersEMTF () { return regionalMuonShowersEMTF_.get (); };
58- inline MuonShowerBxCollection* getMuonShowers (const unsigned int copy) override {
59- return muonShowers_[copy].get ();
60- };
65+ inline RegionalMuonShowerBxCollection* getRegionalMuonShowersEMTF () { return ®ionalMuonShowersEMTF_; };
66+ inline MuonShowerBxCollection* getMuonShowers (const unsigned int copy) override { return &muonShowers_[copy]; };
6167
6268 static constexpr size_t NUM_OUTPUT_COPIES{6 };
6369
6470 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_;
71+ RegionalMuonCandBxCollection regionalMuonCandsBMTF_;
72+ RegionalMuonCandBxCollection regionalMuonCandsOMTF_;
73+ RegionalMuonCandBxCollection regionalMuonCandsEMTF_;
74+ std::array<MuonBxCollection, 6 > muons_;
75+ MuonBxCollection imdMuonsBMTF_;
76+ MuonBxCollection imdMuonsEMTFNeg_;
77+ MuonBxCollection imdMuonsEMTFPos_;
78+ MuonBxCollection imdMuonsOMTFNeg_;
79+ MuonBxCollection imdMuonsOMTFPos_;
7480
75- std::unique_ptr<RegionalMuonShowerBxCollection> regionalMuonShowersEMTF_;
76- std::array<std::unique_ptr<MuonShowerBxCollection>, 6 > muonShowers_;
81+ RegionalMuonShowerBxCollection regionalMuonShowersEMTF_;
82+ std::array<MuonShowerBxCollection, 6 > muonShowers_;
83+ GMTPutTokens tokens_;
7784 };
7885 } // namespace stage2
7986} // namespace l1t
0 commit comments