15 boost::shared_ptr< L1GctJetFinderParams >
22 std::vector< std::string > columns;
23 columns.push_back(
"GCT_RGN_ET_LSB" );
24 columns.push_back(
"GCT_HT_LSB" );
25 columns.push_back(
"GCT_CJET_SEED_ET_THRESHOLD" );
26 columns.push_back(
"GCT_TJET_SEED_ET_THRESHOLD" );
27 columns.push_back(
"GCT_FJET_SEED_ET_THRESHOLD" );
28 columns.push_back(
"GCT_HT_JET_ET_THRESHOLD" );
29 columns.push_back(
"GCT_MHT_JET_ET_THRESHOLD" );
30 columns.push_back(
"GCT_TAU_ISO_ET_THRESHOLD" );
31 columns.push_back(
"GCT_CEN_JET_ETA_MAX" );
32 columns.push_back(
"GCT_JET_CORR_KEY" );
39 "GCT_PHYS_PARAMS.CONFIG_KEY",
44 edm::LogError(
"L1-O2O" ) <<
"Problem with L1GctJetFinderParams key." ;
45 return boost::shared_ptr< L1GctJetFinderParams >() ;
54 double tauIsoEtThresh=0.;
55 double htJetEtThresh=0.;
56 double mhtJetEtThresh=0.;
57 short int etaBoundary=7;
59 std::vector< std::vector<double> > jetCorrCoeffs;
60 std::vector< std::vector<double> > tauCorrCoeffs;
61 bool convertToEnergy=
false;
62 std::vector<double> energyConvCoeffs(11);
67 results.
fillVariable(
"GCT_CJET_SEED_ET_THRESHOLD", cJetSeed );
68 results.
fillVariable(
"GCT_TJET_SEED_ET_THRESHOLD", tJetSeed );
69 results.
fillVariable(
"GCT_FJET_SEED_ET_THRESHOLD", fJetSeed );
70 results.
fillVariable(
"GCT_TAU_ISO_ET_THRESHOLD", tauIsoEtThresh );
71 results.
fillVariable(
"GCT_HT_JET_ET_THRESHOLD", htJetEtThresh );
72 results.
fillVariable(
"GCT_MHT_JET_ET_THRESHOLD", mhtJetEtThresh );
73 results.
fillVariable(
"GCT_CEN_JET_ETA_MAX", etaBoundary );
76 edm::LogInfo(
"L1-O2O") <<
"L1 jet corrections key : " << jetCorrKey << std::endl;
79 std::vector< std::string > jetCorrColumns;
80 jetCorrColumns.push_back(
"GCT_JETCORR_TYPE" );
81 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_10" );
82 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_9" );
83 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_8" );
84 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_7" );
85 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_6" );
86 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_5" );
87 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_4" );
88 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_3" );
89 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_2" );
90 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_1" );
91 jetCorrColumns.push_back(
"GCT_JETCORR_NETA_0" );
92 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_0" );
93 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_1" );
94 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_2" );
95 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_3" );
96 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_4" );
97 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_5" );
98 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_6" );
99 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_7" );
100 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_8" );
101 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_9" );
102 jetCorrColumns.push_back(
"GCT_JETCORR_PETA_10" );
108 "GCT_JET_CORRECTIONS",
109 "GCT_JET_CORRECTIONS.CONFIG_KEY",
114 edm::LogError(
"L1-O2O" ) <<
"Problem getting L1 jet corrections" ;
115 return boost::shared_ptr< L1GctJetFinderParams >() ;
119 jetCorrResults.
fillVariable(
"GCT_JETCORR_TYPE", corrType );
121 edm::LogInfo(
"L1-O2O") <<
"L1 jet corrections type : " << corrType << std::endl;
127 std::stringstream etaCol;
128 etaCol <<
"GCT_JETCORR_NETA_" << std::dec <<
i;
132 std::vector< std::string > coeffColumns;
133 coeffColumns.push_back(
"GCT_JETCORR_C0" );
134 coeffColumns.push_back(
"GCT_JETCORR_C1" );
135 coeffColumns.push_back(
"GCT_JETCORR_C2" );
136 coeffColumns.push_back(
"GCT_JETCORR_C3" );
137 coeffColumns.push_back(
"GCT_JETCORR_C4" );
138 coeffColumns.push_back(
"GCT_JETCORR_C5" );
139 coeffColumns.push_back(
"GCT_JETCORR_C6" );
140 coeffColumns.push_back(
"GCT_JETCORR_C7" );
141 coeffColumns.push_back(
"GCT_JETCORR_C8" );
142 coeffColumns.push_back(
"GCT_JETCORR_C9" );
143 coeffColumns.push_back(
"GCT_JETCORR_C10" );
144 coeffColumns.push_back(
"GCT_JETCORR_C11" );
145 coeffColumns.push_back(
"GCT_JETCORR_C12" );
146 coeffColumns.push_back(
"GCT_JETCORR_C13" );
147 coeffColumns.push_back(
"GCT_JETCORR_C14" );
148 coeffColumns.push_back(
"GCT_JETCORR_C15" );
149 coeffColumns.push_back(
"GCT_JETCORR_C16" );
150 coeffColumns.push_back(
"GCT_JETCORR_C17" );
151 coeffColumns.push_back(
"GCT_JETCORR_C18" );
152 coeffColumns.push_back(
"GCT_JETCORR_C19" );
159 "GCT_JET_COEFFS.CONFIG_KEY",
164 edm::LogError(
"L1-O2O" ) <<
"Problem getting L1 jet correction coefficients" ;
165 return boost::shared_ptr< L1GctJetFinderParams >() ;
169 std::vector<double> coeffs;
171 unsigned nCoeffs = 0;
172 if (corrType == 0) nCoeffs = 0;
173 else if (corrType == 2) nCoeffs=8;
174 else if (corrType == 3) nCoeffs=4;
175 else if (corrType == 4) nCoeffs=15;
176 else if (corrType == 5) nCoeffs=6;
178 edm::LogError(
"L1-O2O" ) <<
"Unsupported jet correction type : " << corrType ;
179 return boost::shared_ptr< L1GctJetFinderParams >() ;
182 for (
unsigned j=0;
j< nCoeffs; ++
j) {
183 std::stringstream coeffCol;
184 coeffCol <<
"GCT_JETCORR_C" << std::dec <<
j;
189 coeffs.push_back(coeff);
192 jetCorrCoeffs.push_back(coeffs);
201 return boost::shared_ptr< L1GctJetFinderParams >(
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
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="") const
virtual boost::shared_ptr< L1GctJetFinderParams > newObject(const std::string &objectKey)
l1t::OMDSReader m_omdsReader
static const unsigned NUMBER_ETA_VALUES
Number of eta bins used in correction.
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
L1GctJetFinderParamsOnlineProd(const edm::ParameterSet &iConfig)
~L1GctJetFinderParamsOnlineProd()