File indexing completed on 2024-04-06 12:19:54
0001 #ifndef GCTTEST_H_
0002 #define GCTTEST_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <vector>
0020 #include <stdint.h>
0021 #include <string>
0022
0023 #include "FWCore/Framework/interface/Event.h"
0024
0025 class L1CaloEmCand;
0026 class L1CaloRegion;
0027
0028 class gctTestElectrons;
0029 class gctTestSingleEvent;
0030 class gctTestEnergyAlgos;
0031 class gctTestFirmware;
0032 class gctTestUsingLhcData;
0033 class gctTestHt;
0034 class gctTestHfEtSums;
0035
0036 class L1GlobalCaloTrigger;
0037
0038 class L1GctJetFinderParams;
0039 class L1GctChannelMask;
0040 class L1CaloEtScale;
0041
0042 class gctTestFunctions {
0043 public:
0044
0045
0046
0047 gctTestFunctions();
0048 ~gctTestFunctions();
0049
0050
0051 void configure(const L1GctJetFinderParams& jfPars,
0052 const L1GctChannelMask& chanMask,
0053 const L1CaloEtScale& etScale,
0054 const L1CaloEtScale& htMissScale,
0055 const L1CaloEtScale& hfRingEtScale);
0056
0057
0058 void reset();
0059
0060
0061 void loadNextEvent(L1GlobalCaloTrigger*& gct, const bool simpleEvent, const int16_t bx);
0062 void loadNextEvent(L1GlobalCaloTrigger*& gct, const std::string fileName, bool& endOfFile, const int16_t bx);
0063 void loadNextEvent(L1GlobalCaloTrigger*& gct, const std::string fileName, const int16_t bx);
0064 void loadNextEvent(L1GlobalCaloTrigger*& gct, const edm::Event& iEvent, const int16_t bx);
0065 void loadSingleEvent(L1GlobalCaloTrigger*& gct, const std::string fileName, const int16_t bx);
0066
0067
0068 void fillElectronData(const L1GlobalCaloTrigger* gct);
0069
0070
0071 void fillJetsFromFirmware(const std::string& fileName);
0072
0073
0074 void fillRawJetData(const L1GlobalCaloTrigger* gct);
0075
0076
0077 bool checkElectrons(const L1GlobalCaloTrigger* gct) const;
0078
0079
0080 bool checkJetFinder(const L1GlobalCaloTrigger* gct) const;
0081
0082
0083 bool checkEnergySums(const L1GlobalCaloTrigger* gct) const;
0084
0085
0086 bool checkHtSums(const L1GlobalCaloTrigger* gct) const;
0087
0088
0089 bool checkHfEtSums(const L1GlobalCaloTrigger* gct) const;
0090
0091
0092 bool checkEnergySumsFromFirmware(const L1GlobalCaloTrigger* gct, const std::string& fileName) const;
0093
0094
0095 void checkHwResults(const L1GlobalCaloTrigger* gct, const edm::Event& iEvent) const;
0096 void checkEmResults(const L1GlobalCaloTrigger* gct, const edm::Event& iEvent) const;
0097
0098 private:
0099 gctTestElectrons* theElectronsTester;
0100 gctTestSingleEvent* theSingleEventTester;
0101 gctTestEnergyAlgos* theEnergyAlgosTester;
0102 gctTestFirmware* theFirmwareTester;
0103 gctTestUsingLhcData* theRealDataTester;
0104 gctTestHt* theHtTester;
0105 gctTestHfEtSums* theHfEtSumsTester;
0106
0107 std::vector<std::vector<L1CaloEmCand> > m_inputEmCands;
0108 std::vector<std::vector<L1CaloRegion> > m_inputRegions;
0109
0110 int m_bxStart;
0111 int m_numOfBx;
0112
0113 void bxRangeUpdate(const int16_t bx);
0114 };
0115
0116 #endif