Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:54

0001 #ifndef GCTTESTHFETSUMS_H_
0002 #define GCTTESTHFETSUMS_H_
0003 
0004 /*!
0005  * \class gctTestHfEtSums
0006  * \brief Test of the Hf Et sums
0007  * 
0008  * Adding tests of HF inner ring Et summing
0009  * and counting of fineGrain bits to the test suite
0010  *
0011  * \author Greg Heath
0012  * \date January 2008
0013  *
0014  */
0015 
0016 #include <vector>
0017 
0018 class L1CaloRegion;
0019 class L1CaloEtScale;
0020 class L1GlobalCaloTrigger;
0021 
0022 class gctTestHfEtSums {
0023 public:
0024   // structs and typedefs
0025   typedef std::vector<L1CaloRegion> RegionsVector;
0026 
0027   // Constructor and destructor
0028   gctTestHfEtSums();
0029   ~gctTestHfEtSums();
0030 
0031   /// Configuration method
0032   void configure(const L1CaloEtScale* scale);
0033   bool setupOk() const;
0034 
0035   /// Reset stored sums
0036   void reset();
0037 
0038   /// Read the input jet data from the jetfinders (after GCT processing).
0039   void fillExpectedHfSums(const std::vector<RegionsVector>& inputRegions);
0040 
0041   /// Check the Ht summing algorithms
0042   bool checkHfEtSums(const L1GlobalCaloTrigger* gct, const int numOfBx) const;
0043 
0044 private:
0045   const L1CaloEtScale* m_etScale;
0046 
0047   std::vector<unsigned> m_expectedRing0EtSumPositiveEta;
0048   std::vector<unsigned> m_expectedRing0EtSumNegativeEta;
0049   std::vector<unsigned> m_expectedRing1EtSumPositiveEta;
0050   std::vector<unsigned> m_expectedRing1EtSumNegativeEta;
0051   std::vector<unsigned> m_expectedRing0BitCountPositiveEta;
0052   std::vector<unsigned> m_expectedRing0BitCountNegativeEta;
0053   std::vector<unsigned> m_expectedRing1BitCountPositiveEta;
0054   std::vector<unsigned> m_expectedRing1BitCountNegativeEta;
0055 
0056   unsigned etSumLut(const unsigned expectedValue) const;
0057   unsigned countLut(const unsigned expectedValue) const;
0058 };
0059 
0060 #endif /*GCTTEST_H_*/