21 std::vector<std::string>
columns;
22 columns.push_back(
"GCT_RGN_ET_LSB");
23 columns.push_back(
"GCT_HT_LSB");
24 columns.push_back(
"GCT_CJET_SEED_ET_THRESHOLD");
25 columns.push_back(
"GCT_TJET_SEED_ET_THRESHOLD");
26 columns.push_back(
"GCT_FJET_SEED_ET_THRESHOLD");
27 columns.push_back(
"GCT_HT_JET_ET_THRESHOLD");
28 columns.push_back(
"GCT_MHT_JET_ET_THRESHOLD");
29 columns.push_back(
"GCT_TAU_ISO_ET_THRESHOLD");
30 columns.push_back(
"GCT_CEN_JET_ETA_MAX");
31 columns.push_back(
"GCT_JET_CORR_KEY");
38 edm::LogError(
"L1-O2O") <<
"Problem with L1GctJetFinderParams key.";
39 return std::unique_ptr<L1GctJetFinderParams>();
48 double tauIsoEtThresh = 0.;
49 double htJetEtThresh = 0.;
50 double mhtJetEtThresh = 0.;
51 short int etaBoundary = 7;
53 std::vector<std::vector<double> > jetCorrCoeffs;
54 std::vector<std::vector<double> > tauCorrCoeffs;
55 bool convertToEnergy =
false;
56 std::vector<double> energyConvCoeffs(11);
61 results.
fillVariable(
"GCT_CJET_SEED_ET_THRESHOLD", cJetSeed);
62 results.
fillVariable(
"GCT_TJET_SEED_ET_THRESHOLD", tJetSeed);
63 results.
fillVariable(
"GCT_FJET_SEED_ET_THRESHOLD", fJetSeed);
64 results.
fillVariable(
"GCT_TAU_ISO_ET_THRESHOLD", tauIsoEtThresh);
65 results.
fillVariable(
"GCT_HT_JET_ET_THRESHOLD", htJetEtThresh);
66 results.
fillVariable(
"GCT_MHT_JET_ET_THRESHOLD", mhtJetEtThresh);
67 results.
fillVariable(
"GCT_CEN_JET_ETA_MAX", etaBoundary);
70 edm::LogInfo(
"L1-O2O") <<
"L1 jet corrections key : " << jetCorrKey << std::endl;
73 std::vector<std::string> jetCorrColumns;
74 jetCorrColumns.push_back(
"GCT_JETCORR_TYPE");
75 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_10");
76 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_9");
77 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_8");
78 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_7");
79 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_6");
80 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_5");
81 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_4");
82 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_3");
83 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_2");
84 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_1");
85 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_0");
86 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_0");
87 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_1");
88 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_2");
89 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_3");
90 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_4");
91 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_5");
92 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_6");
93 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_7");
94 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_8");
95 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_9");
96 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_10");
100 "GCT_JET_CORRECTIONS",
101 "GCT_JET_CORRECTIONS.CONFIG_KEY",
106 edm::LogError(
"L1-O2O") <<
"Problem getting L1 jet corrections";
107 return std::unique_ptr<L1GctJetFinderParams>();
111 jetCorrResults.
fillVariable(
"GCT_JETCORR_TYPE", corrType);
113 edm::LogInfo(
"L1-O2O") <<
"L1 jet corrections type : " << corrType << std::endl;
118 std::stringstream etaCol;
119 etaCol <<
"GCT_JETCORR_NETA_" <<
std::dec <<
i;
123 std::vector<std::string> coeffColumns;
124 coeffColumns.push_back(
"GCT_JETCORR_C0");
125 coeffColumns.push_back(
"GCT_JETCORR_C1");
126 coeffColumns.push_back(
"GCT_JETCORR_C2");
127 coeffColumns.push_back(
"GCT_JETCORR_C3");
128 coeffColumns.push_back(
"GCT_JETCORR_C4");
129 coeffColumns.push_back(
"GCT_JETCORR_C5");
130 coeffColumns.push_back(
"GCT_JETCORR_C6");
131 coeffColumns.push_back(
"GCT_JETCORR_C7");
132 coeffColumns.push_back(
"GCT_JETCORR_C8");
133 coeffColumns.push_back(
"GCT_JETCORR_C9");
134 coeffColumns.push_back(
"GCT_JETCORR_C10");
135 coeffColumns.push_back(
"GCT_JETCORR_C11");
136 coeffColumns.push_back(
"GCT_JETCORR_C12");
137 coeffColumns.push_back(
"GCT_JETCORR_C13");
138 coeffColumns.push_back(
"GCT_JETCORR_C14");
139 coeffColumns.push_back(
"GCT_JETCORR_C15");
140 coeffColumns.push_back(
"GCT_JETCORR_C16");
141 coeffColumns.push_back(
"GCT_JETCORR_C17");
142 coeffColumns.push_back(
"GCT_JETCORR_C18");
143 coeffColumns.push_back(
"GCT_JETCORR_C19");
150 edm::LogError(
"L1-O2O") <<
"Problem getting L1 jet correction coefficients";
151 return std::unique_ptr<L1GctJetFinderParams>();
155 std::vector<double> coeffs;
157 unsigned nCoeffs = 0;
160 else if (corrType == 2)
162 else if (corrType == 3)
164 else if (corrType == 4)
166 else if (corrType == 5)
169 edm::LogError(
"L1-O2O") <<
"Unsupported jet correction type : " << corrType;
170 return std::unique_ptr<L1GctJetFinderParams>();
173 for (
unsigned j = 0;
j < nCoeffs; ++
j) {
174 std::stringstream coeffCol;
175 coeffCol <<
"GCT_JETCORR_C" <<
std::dec <<
j;
180 coeffs.push_back(coeff);
183 jetCorrCoeffs.push_back(coeffs);
187 tauCorrCoeffs.push_back(coeffs);
190 return std::make_unique<L1GctJetFinderParams>(rgnEtLsb,
static const unsigned N_CENTRAL_ETA_VALUES
Number of eta bins used in correction.
bool fillVariable(const std::string &columnName, T &outputVariable) const
const QueryResults singleAttribute(const T &data) const
Log< level::Error, false > LogError
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
l1t::OMDSReader m_omdsReader
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
Log< level::Info, false > LogInfo