Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:58

0001 #ifndef DataFormats_L1Trigger_L1HFRings_h
0002 #define DataFormats_L1Trigger_L1HFRings_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     L1Trigger
0006 // Class  :     L1HFRings
0007 //
0008 /**\class L1HFRings L1HFRings.h DataFormats/L1Trigger/interface/L1HFRings.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Werner Sun
0018 //         Created:  Sat Mar 14 19:04:20 CET 2009
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
0025 #include "DataFormats/Common/interface/Ref.h"
0026 
0027 // forward declarations
0028 
0029 namespace l1extra {
0030 
0031   class L1HFRings {
0032   public:
0033     enum HFRingLabels { kRing1PosEta, kRing1NegEta, kRing2PosEta, kRing2NegEta, kNumRings };
0034 
0035     L1HFRings();
0036 
0037     // Default Refs are null.
0038     L1HFRings(const double* hfEtSums,  // array of etSums
0039               const int* hfBitCounts,  // array of bitCounts
0040               const edm::Ref<L1GctHFRingEtSumsCollection>& aHFEtSumsRef = edm::Ref<L1GctHFRingEtSumsCollection>(),
0041               const edm::Ref<L1GctHFBitCountsCollection>& aHFBitCountsRef = edm::Ref<L1GctHFBitCountsCollection>(),
0042               int bx = 0);
0043 
0044     virtual ~L1HFRings();
0045 
0046     // ---------- const member functions ---------------------
0047     double hfEtSum(HFRingLabels i) const  // in  GeV
0048     {
0049       return m_ringEtSums[i];
0050     }
0051     int hfBitCount(HFRingLabels i) const { return m_ringBitCounts[i]; }
0052 
0053     const edm::Ref<L1GctHFRingEtSumsCollection>& gctHFEtSumsRef() const { return m_etSumsRef; }
0054     const edm::Ref<L1GctHFBitCountsCollection>& gctHFBitCountsRef() const { return m_bitCountsRef; }
0055 
0056     const L1GctHFRingEtSums* gctHFEtSums() const { return m_etSumsRef.get(); }
0057     const L1GctHFBitCounts* gctHFBitCounts() const { return m_bitCountsRef.get(); }
0058 
0059     int bx() const { return m_bx; }
0060 
0061     // ---------- static member functions --------------------
0062 
0063     // ---------- member functions ---------------------------
0064 
0065   private:
0066     // L1HFRings(const L1HFRings&); // stop default
0067 
0068     // const L1HFRings& operator=(const L1HFRings&); // stop default
0069 
0070     // ---------- member data --------------------------------
0071     double m_ringEtSums[kNumRings];
0072     int m_ringBitCounts[kNumRings];
0073 
0074     edm::Ref<L1GctHFRingEtSumsCollection> m_etSumsRef;
0075     edm::Ref<L1GctHFBitCountsCollection> m_bitCountsRef;
0076 
0077     int m_bx;
0078   };
0079 }  // namespace l1extra
0080 
0081 #endif