43 virtual void endJob() ;
131 std::ifstream textTable_(qpDataName.c_str());
133 std::vector<float> ue_vec;
137 ue_predictor_pf =
new UETable();
140 unsigned int Nnp =
np[0] *
np[1] * (1 + (
np[2] - 1) *
np[3]) *
np[4];
141 unsigned int Nni0 =
ni0[0]*
ni0[1];
142 unsigned int Nni1 =
ni1[0]*
ni1[1];
143 unsigned int Nni2 =
ni2[0]*
ni2[1];
146 ue_predictor_pf->
np.resize(5);
147 ue_predictor_pf->
ni0.resize(2);
148 ue_predictor_pf->
ni1.resize(2);
149 ue_predictor_pf->
ni2.resize(2);
151 std::copy(np, np + 5, ue_predictor_pf->
np.begin());
156 static const float edge_pseudorapidity[16] = {
157 -5.191, -2.650, -2.043, -1.740, -1.479, -1.131, -0.783, -0.522, 0.522, 0.783, 1.131, 1.479, 1.740, 2.043, 2.650, 5.191
160 ue_predictor_pf->
edgeEta.resize(16);
162 std::copy(edge_pseudorapidity, edge_pseudorapidity + 16, ue_predictor_pf->
edgeEta.begin());
168 while( std::getline( textTable_, line)){
169 if(!line.size() || line[0]==
'#') {
173 std::istringstream linestream(line);
175 int bin0, bin1, bin2, bin3, bin4;
177 linestream>>bin0>>bin1>>bin2>>bin3>>bin4>>val;
178 ue_vec.push_back(val);
179 }
else if(
index < Nnp + Nni0){
180 linestream>>bin0>>bin1>>val;
181 ue_vec.push_back(val);
182 }
else if(
index < Nnp + Nni0 + Nni1){
183 linestream>>bin0>>bin1>>val;
184 ue_vec.push_back(val);
185 }
else if(
index < Nnp + Nni0 + Nni1 + Nni2){
186 linestream>>bin0>>bin1>>val;
187 ue_vec.push_back(val);
200 std::vector<JetCorrectorParameters::Record>
record(1,
JetCorrectorParameters::Record(ue_vec.size(), std::vector<float>(ue_vec.size(), 0), std::vector<float>(ue_vec.size(), 0), ue_vec));
214 ue_predictor_pf->
values = ue_vec;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void push_back(key_type i, value_type const &j, label_type const &flav="")
std::vector< unsigned int > ni2
#define DEFINE_FWK_MODULE(type)
std::vector< unsigned int > np
UETableProducer(const edm::ParameterSet &)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
std::vector< unsigned int > ni1
cond::Time_t beginOfTime() const
virtual void beginRun(const edm::EventSetup &)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
std::vector< unsigned int > ni0
std::vector< float > values
std::vector< float > edgeEta
cond::Time_t endOfTime() const
cond::Time_t currentTime() const