Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-28 02:36:16

0001 #ifndef GTCollections_h
0002 #define GTCollections_h
0003 
0004 #include "DataFormats/L1Trigger/interface/EGamma.h"
0005 #include "DataFormats/L1Trigger/interface/EtSum.h"
0006 #include "DataFormats/L1Trigger/interface/Jet.h"
0007 #include "DataFormats/L1Trigger/interface/Tau.h"
0008 #include "DataFormats/L1Trigger/interface/Muon.h"
0009 #include "DataFormats/L1CaloTrigger/interface/CICADA.h"
0010 
0011 #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"
0012 #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h"
0013 
0014 //#include "EventFilter/L1TRawToDigi/interface/UnpackerCollections.h"
0015 #include "L1TObjectCollections.h"
0016 
0017 namespace l1t {
0018   namespace stage2 {
0019     class GTCollections : public L1TObjectCollections {
0020     public:
0021       GTCollections(edm::Event& e)
0022           : L1TObjectCollections(e),
0023             cicadaScore_(std::make_unique<CICADABxCollection>()),
0024             algBlk_(new GlobalAlgBlkBxCollection()),
0025             extBlk_(new GlobalExtBlkBxCollection()) {
0026         std::generate(muons_.begin(), muons_.end(), [] { return std::make_unique<MuonBxCollection>(); });
0027         std::generate(
0028             muonShowers_.begin(), muonShowers_.end(), [] { return std::make_unique<MuonShowerBxCollection>(); });
0029         std::generate(egammas_.begin(), egammas_.end(), [] { return std::make_unique<EGammaBxCollection>(); });
0030         std::generate(etsums_.begin(), etsums_.end(), [] { return std::make_unique<EtSumBxCollection>(); });
0031         std::generate(zdcsums_.begin(), zdcsums_.end(), [] { return std::make_unique<EtSumBxCollection>(); });
0032         std::generate(jets_.begin(), jets_.end(), [] { return std::make_unique<JetBxCollection>(); });
0033         std::generate(taus_.begin(), taus_.end(), [] { return std::make_unique<TauBxCollection>(); });
0034       };
0035 
0036       ~GTCollections() override;
0037 
0038       inline MuonBxCollection* getMuons(const unsigned int copy) override { return muons_[copy].get(); };
0039       inline MuonShowerBxCollection* getMuonShowers(const unsigned int copy) override {
0040         return muonShowers_[copy].get();
0041       };
0042       inline EGammaBxCollection* getEGammas(const unsigned int copy) override { return egammas_[copy].get(); };
0043       inline EtSumBxCollection* getEtSums(const unsigned int copy) override { return etsums_[copy].get(); };
0044       inline EtSumBxCollection* getZDCSums(const unsigned int copy) override { return zdcsums_[copy].get(); };
0045       inline JetBxCollection* getJets(const unsigned int copy) override { return jets_[copy].get(); };
0046       inline TauBxCollection* getTaus(const unsigned int copy) override { return taus_[copy].get(); };
0047       inline CICADABxCollection* getCICADAScore() override { return cicadaScore_.get(); };
0048 
0049       inline GlobalAlgBlkBxCollection* getAlgs() { return algBlk_.get(); };
0050       inline GlobalExtBlkBxCollection* getExts() { return extBlk_.get(); };
0051 
0052     private:
0053       std::array<std::unique_ptr<MuonBxCollection>, 6> muons_;
0054       std::array<std::unique_ptr<MuonShowerBxCollection>, 6> muonShowers_;
0055       std::array<std::unique_ptr<EGammaBxCollection>, 6> egammas_;
0056       std::array<std::unique_ptr<EtSumBxCollection>, 6> etsums_;
0057       std::array<std::unique_ptr<EtSumBxCollection>, 6> zdcsums_;
0058       std::array<std::unique_ptr<JetBxCollection>, 6> jets_;
0059       std::array<std::unique_ptr<TauBxCollection>, 6> taus_;
0060       std::unique_ptr<CICADABxCollection> cicadaScore_;
0061 
0062       std::unique_ptr<GlobalAlgBlkBxCollection> algBlk_;
0063       std::unique_ptr<GlobalExtBlkBxCollection> extBlk_;
0064     };
0065   }  // namespace stage2
0066 }  // namespace l1t
0067 
0068 #endif