Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:41

0001 #ifndef GctUnpackCollections_h
0002 #define GctUnpackCollections_h
0003 
0004 /*!
0005 * \class GctUnpackCollections
0006 * \brief RAII and useful methods for the many dataformat collections required by the GCT unpacker.
0007 * 
0008 *  Deliberately made non-copyable with const members and private copy ctor, etc.
0009 *
0010 * \author Robert Frazier
0011 */
0012 
0013 // CMSSW headers
0014 #include "FWCore/Framework/interface/Event.h"
0015 
0016 // DataFormat headers
0017 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0018 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
0019 #include "DataFormats/L1Trigger/interface/L1TriggerError.h"
0020 
0021 class GctUnpackCollections {
0022 public:
0023   /// Construct with an event. The collections get put into the event when the object instance goes out of scope (i.e. in the destructor).
0024   GctUnpackCollections(edm::Event& event);
0025 
0026   /// deliberately not implemented!
0027   GctUnpackCollections(const GctUnpackCollections&) = delete;             ///< Copy ctor
0028   GctUnpackCollections& operator=(const GctUnpackCollections&) = delete;  ///< Assignment op
0029 
0030   /// Destructor - the last action of this object is to put the gct collections into the event provided on construction.
0031   ~GctUnpackCollections();
0032 
0033   // Collections for storing GCT input data.
0034   L1GctFibreCollection* const gctFibres() const { return m_gctFibres.get(); }  ///< Raw fibre input to the GCT.
0035   L1CaloEmCollection* const rctEm() const { return m_rctEm.get(); }  ///< Input electrons from the RCT to the GCT.
0036   L1CaloRegionCollection* const rctCalo() const {
0037     return m_rctCalo.get();
0038   }  ///< Input calo regions from the RCT to the GCT.
0039 
0040   // GCT intermediate data
0041   L1GctInternEmCandCollection* const gctInternEm() const {
0042     return m_gctInternEm.get();
0043   }  ///< Internal EM candidate collection
0044   L1GctInternJetDataCollection* const gctInternJets() const {
0045     return m_gctInternJets.get();
0046   }  ///< Internal Jet candidate collection
0047   L1GctInternEtSumCollection* const gctInternEtSums() const {
0048     return m_gctInternEtSums.get();
0049   }  ///< Internal Et Sum collection
0050   L1GctInternHFDataCollection* const gctInternHFData() const {
0051     return m_gctInternHFData.get();
0052   }  ///< Internal Hadronic-Forward bit-counts/ring-sums data collection
0053   L1GctInternHtMissCollection* const gctInternHtMiss() const {
0054     return m_gctInternHtMiss.get();
0055   }  ///< Internal missing Ht collection
0056 
0057   // GCT output data
0058   L1GctEmCandCollection* const gctIsoEm() const {
0059     return m_gctIsoEm.get();
0060   }  ///< GCT output: Isolated EM candidate collection
0061   L1GctEmCandCollection* const gctNonIsoEm() const {
0062     return m_gctNonIsoEm.get();
0063   }  ///< GCT output: Non-isolated EM candidate collection
0064   L1GctJetCandCollection* const gctCenJets() const {
0065     return m_gctCenJets.get();
0066   }  ///< GCT output: Central Jets collection
0067   L1GctJetCandCollection* const gctForJets() const {
0068     return m_gctForJets.get();
0069   }  ///< GCT output: Forward Jets collection
0070   L1GctJetCandCollection* const gctTauJets() const { return m_gctTauJets.get(); }  ///< GCT output: Tau Jets collection
0071   L1GctHFBitCountsCollection* const gctHfBitCounts() const {
0072     return m_gctHfBitCounts.get();
0073   }  ///< GCT output: Hadronic-Forward bit-counts collection
0074   L1GctHFRingEtSumsCollection* const gctHfRingEtSums() const {
0075     return m_gctHfRingEtSums.get();
0076   }  ///< GCT output: Hadronic-Forward ring-sums collection
0077   L1GctEtTotalCollection* const gctEtTot() const { return m_gctEtTot.get(); }  ///< GCT output: Total Et collection
0078   L1GctEtHadCollection* const gctEtHad() const {
0079     return m_gctEtHad.get();
0080   }  ///< GCT output: Hadronic transverse-energy (Ht) collection
0081   L1GctEtMissCollection* const gctEtMiss() const { return m_gctEtMiss.get(); }  ///< GCT output: Missing Et collection
0082   L1GctHtMissCollection* const gctHtMiss() const { return m_gctHtMiss.get(); }  ///< GCT output: Missing Ht collection
0083   L1GctJetCountsCollection* const gctJetCounts() const {
0084     return m_gctJetCounts.get();
0085   }  ///< DEPRECATED. ONLY GT NEEDS THIS.
0086 
0087   // Misc
0088   L1TriggerErrorCollection* const errors() const { return m_errors.get(); }  ///< Unpack error code collection.
0089 
0090 private:
0091   edm::Event&
0092       m_event;  ///< The event the collections will be put into on destruction of the GctUnpackCollections instance.
0093 
0094   // Collections for storing GCT input data.
0095   std::unique_ptr<L1GctFibreCollection> m_gctFibres;  ///< Raw fibre input to the GCT.
0096   std::unique_ptr<L1CaloEmCollection> m_rctEm;        ///< Input electrons.
0097   std::unique_ptr<L1CaloRegionCollection> m_rctCalo;  ///< Input calo regions.
0098 
0099   // GCT intermediate data
0100   std::unique_ptr<L1GctInternEmCandCollection> m_gctInternEm;
0101   std::unique_ptr<L1GctInternJetDataCollection> m_gctInternJets;
0102   std::unique_ptr<L1GctInternEtSumCollection> m_gctInternEtSums;
0103   std::unique_ptr<L1GctInternHFDataCollection> m_gctInternHFData;
0104   std::unique_ptr<L1GctInternHtMissCollection> m_gctInternHtMiss;
0105 
0106   // GCT output data
0107   std::unique_ptr<L1GctEmCandCollection> m_gctIsoEm;
0108   std::unique_ptr<L1GctEmCandCollection> m_gctNonIsoEm;
0109   std::unique_ptr<L1GctJetCandCollection> m_gctCenJets;
0110   std::unique_ptr<L1GctJetCandCollection> m_gctForJets;
0111   std::unique_ptr<L1GctJetCandCollection> m_gctTauJets;
0112   std::unique_ptr<L1GctHFBitCountsCollection> m_gctHfBitCounts;
0113   std::unique_ptr<L1GctHFRingEtSumsCollection> m_gctHfRingEtSums;
0114   std::unique_ptr<L1GctEtTotalCollection> m_gctEtTot;
0115   std::unique_ptr<L1GctEtHadCollection> m_gctEtHad;
0116   std::unique_ptr<L1GctEtMissCollection> m_gctEtMiss;
0117   std::unique_ptr<L1GctHtMissCollection> m_gctHtMiss;
0118   std::unique_ptr<L1GctJetCountsCollection> m_gctJetCounts;  // DEPRECATED. ONLY GT NEEDS THIS.
0119 
0120   // Misc
0121   std::unique_ptr<L1TriggerErrorCollection> m_errors;
0122 };
0123 
0124 // Pretty print for the GctUnpackCollections sub-class
0125 std::ostream& operator<<(std::ostream& os, const GctUnpackCollections& rhs);
0126 
0127 #endif /* GctUnpackCollections_h */