File indexing completed on 2024-04-06 12:19:54
0001 #ifndef GCTTESTHT_H_
0002 #define GCTTESTHT_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
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
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
0053 gctTestHt();
0054 ~gctTestHt();
0055
0056
0057 void configure(const L1CaloEtScale* jetScale, const L1CaloEtScale* mhtScale, const L1GctJetFinderParams* jfPars);
0058 bool setupOk() const;
0059
0060
0061 void setBxRange(const int bxStart, const int numOfBx);
0062
0063
0064 void fillRawJetData(const L1GlobalCaloTrigger* gct);
0065
0066
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