File indexing completed on 2024-04-06 12:20:01
0001 #ifndef L1Trigger_GlobalTriggerAnalyzer_L1GetHistLimits_h
0002 #define L1Trigger_GlobalTriggerAnalyzer_L1GetHistLimits_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <iosfwd>
0020 #include <memory>
0021 #include <vector>
0022 #include <string>
0023
0024
0025
0026 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0027
0028 #include "FWCore/Framework/interface/Frameworkfwd.h"
0029 #include "FWCore/Framework/interface/EventSetup.h"
0030 #include "FWCore/Framework/interface/ConsumesCollector.h"
0031
0032
0033 #include "CondFormats/L1TObjects/interface/L1CaloGeometry.h"
0034 #include "CondFormats/DataRecord/interface/L1CaloGeometryRecord.h"
0035
0036 #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h"
0037 #include "CondFormats/DataRecord/interface/L1EmEtScaleRcd.h"
0038 #include "CondFormats/DataRecord/interface/L1JetEtScaleRcd.h"
0039 #include "CondFormats/DataRecord/interface/L1HtMissScaleRcd.h"
0040 #include "CondFormats/DataRecord/interface/L1HfRingEtScaleRcd.h"
0041 #include "CondFormats/L1TObjects/interface/L1GctJetFinderParams.h"
0042 #include "CondFormats/DataRecord/interface/L1GctJetFinderParamsRcd.h"
0043
0044 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
0045 #include "CondFormats/DataRecord/interface/L1MuTriggerScalesRcd.h"
0046 #include "CondFormats/L1TObjects/interface/L1MuTriggerPtScale.h"
0047 #include "CondFormats/DataRecord/interface/L1MuTriggerPtScaleRcd.h"
0048
0049
0050
0051
0052 class L1GetHistLimits {
0053 public:
0054 struct Tokens {
0055 Tokens(edm::ConsumesCollector, bool doEtaOrPhi);
0056
0057 const edm::ESGetToken<L1MuTriggerPtScale, L1MuTriggerPtScaleRcd> m_muPTScaleToken;
0058 edm::ESGetToken<L1MuTriggerScales, L1MuTriggerScalesRcd> m_muScalesToken;
0059 const edm::ESGetToken<L1CaloEtScale, L1EmEtScaleRcd> m_etScaleToken;
0060 edm::ESGetToken<L1CaloGeometry, L1CaloGeometryRecord> m_caloGeomESHToken;
0061 const edm::ESGetToken<L1CaloEtScale, L1JetEtScaleRcd> m_jetScaleToken;
0062 const edm::ESGetToken<L1GctJetFinderParams, L1GctJetFinderParamsRcd> m_jetFinderParamsToken;
0063 const edm::ESGetToken<L1CaloEtScale, L1HtMissScaleRcd> m_htMissScaleToken;
0064 const edm::ESGetToken<L1CaloEtScale, L1HfRingEtScaleRcd> m_hfRingEtScaleToken;
0065 };
0066
0067
0068 explicit L1GetHistLimits(const Tokens&, const edm::EventSetup& evSetup);
0069
0070
0071 virtual ~L1GetHistLimits();
0072
0073
0074
0075
0076
0077
0078 struct L1HistLimits {
0079 int nrBins;
0080 double lowerBinValue;
0081 double upperBinValue;
0082 std::vector<float> binThresholds;
0083 };
0084
0085 public:
0086
0087
0088 const L1HistLimits& l1HistLimits(const L1GtObject& l1GtObject, const std::string& quantity);
0089
0090
0091
0092 const L1HistLimits& l1HistLimits(const L1GtObject& l1GtObject,
0093 const std::string& quantity,
0094 const double histMinValue,
0095 const double histMaxValue);
0096
0097
0098
0099 const int l1HistNrBins(const L1GtObject& l1GtObject, const std::string& quantity);
0100
0101
0102
0103 const double l1HistLowerBinValue(const L1GtObject& l1GtObject, const std::string& quantity);
0104
0105
0106
0107 const double l1HistUpperBinValue(const L1GtObject& l1GtObject, const std::string& quantity);
0108
0109
0110
0111 const std::vector<float>& l1HistBinThresholds(const L1GtObject& l1GtObject, const std::string& quantity);
0112
0113 private:
0114
0115
0116
0117 void getHistLimits(const L1GtObject& l1GtObject, const std::string& quantity);
0118
0119 private:
0120 const Tokens& m_tokens;
0121 const edm::EventSetup& m_evSetup;
0122
0123
0124 L1HistLimits m_l1HistLimits;
0125 };
0126
0127 #endif