Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:12

0001 #ifndef GCTTESTHT_H_
0002 #define GCTTESTHT_H_
0003 
0004 /*!
0005  * \class gctTestHt
0006  * \brief Test of the Ht and jet counts
0007  * 
0008  * Ht and jet count sum test functionality migrated from standalone test programs
0009  * March 2009 - removed all references to jet counts, and renamed gctTestHt
0010  *
0011  * \author Greg Heath
0012  * \date March 2007
0013  *
0014  */
0015 
0016 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegion.h"
0017 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctJetCand.h"
0018 
0019 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctJet.h"
0020 
0021 #include <vector>
0022 
0023 class L1GlobalCaloTrigger;
0024 class L1CaloEtScale;
0025 class L1GctJetFinderParams;
0026 class L1GctJetLeafCard;
0027 class L1GctJetFinderBase;
0028 
0029 class gctTestHt {
0030 public:
0031   // structs and typedefs
0032   typedef std::vector<L1GctJetCand> JetsVector;
0033   typedef std::vector<L1GctJet> RawJetsVector;
0034 
0035   typedef L1GctJet::lutPtr lutPtr;
0036   typedef std::vector<lutPtr> lutPtrVector;
0037 
0038   struct rawJetData {
0039     RawJetsVector jets;
0040     unsigned httSum;
0041     int htxSum;
0042     int htySum;
0043     bool httOverFlow;
0044     bool htmOverFlow;
0045 
0046     rawJetData() : jets(), httSum(0), htxSum(0), htySum(0), httOverFlow(false), htmOverFlow(false) {}
0047     rawJetData(
0048         const RawJetsVector jv, const unsigned htt, const int htx, const int hty, const bool httof, const bool htmof)
0049         : jets(jv), httSum(htt), htxSum(htx), htySum(hty), httOverFlow(httof), htmOverFlow(htmof) {}
0050   };
0051 
0052   // Constructor and destructor
0053   gctTestHt();
0054   ~gctTestHt();
0055 
0056   /// Configuration method
0057   void configure(const L1CaloEtScale* jetScale, const L1CaloEtScale* mhtScale, const L1GctJetFinderParams* jfPars);
0058   bool setupOk() const;
0059 
0060   /// Set array sizes for the number of bunch crossings
0061   void setBxRange(const int bxStart, const int numOfBx);
0062 
0063   /// Read the input jet data from the jetfinders (after GCT processing).
0064   void fillRawJetData(const L1GlobalCaloTrigger* gct);
0065 
0066   /// Check the Ht summing algorithms
0067   bool checkHtSums(const L1GlobalCaloTrigger* gct) const;
0068 
0069 private:
0070   //
0071 
0072   rawJetData rawJetFinderOutput(const L1GctJetFinderBase* jf, const unsigned phiPos, const int bx) const;
0073 
0074   int m_bxStart;
0075   int m_numOfBx;
0076 
0077   std::vector<rawJetData> minusWheelJetDta;
0078   std::vector<rawJetData> plusWheelJetData;
0079 
0080   const L1CaloEtScale* m_jetEtScale;
0081   const L1CaloEtScale* m_htMissScale;
0082   const L1GctJetFinderParams* m_jfPars;
0083 
0084   int htComponent(const unsigned Emag0, const unsigned fact0, const unsigned Emag1, const unsigned fact1) const;
0085 
0086   double htComponentGeVForHtMiss(int inputComponent) const;
0087 };
0088 
0089 #endif /*GCTTEST_H_*/