1 #ifndef __HiJetAlgos_UECalibration_h__
2 #define __HiJetAlgos_UECalibration_h__
29 unsigned int Nnp_full =
np[0] *
np[1] *
np[2] *
np[3] *
np[4];
30 unsigned int Nnp = np[0] * np[1] * (1 + (np[2] - 1) * np[3]) * np[4];
31 unsigned int Nni0 =
ni0[0]*
ni0[1];
32 unsigned int Nni1 =
ni1[0]*
ni1[1];
33 unsigned int Nni2 =
ni2[0]*
ni2[1];
42 int bin0, bin1, bin2, bin3, bin4;
47 unsigned int u = (
index / np[4]) % (1 + (np[2] - 1) * np[3]);
54 bin2 = (u - 1) / np[3] + 1;
55 bin3 = (u - 1) % np[3];
58 bin1 = ((
index / np[4]) / (1 + (np[2] - 1) * np[3])) % np[1];
59 bin0 = ((
index / np[4]) / (1 + (np[2] - 1) * np[3])) / np[1];
63 else if (
index < Nnp + Nni0) {
64 bin1 = (
index - Nnp) % ni0[1];
65 bin0 = (
index - Nnp) / ni0[1];
68 else if (
index < Nnp + Nni0 + Nni1) {
69 bin1 = (
index - Nnp - Nni0) % ni1[1];
70 bin0 = (
index - Nnp - Nni0) / ni1[1];
74 bin1 = (
index - Nnp - Nni0 - Nni1) % ni2[1];
75 bin0 = (
index - Nnp - Nni0 - Nni1) / ni2[1];
99 unsigned int Nnp_full =
np[0] *
np[1] *
np[2] *
np[3] *
np[4];
100 unsigned int Nnp = np[0] * np[1] * (1 + (np[2] - 1) * np[3]) * np[4];
101 unsigned int Nni0 =
ni0[0]*
ni0[1];
102 unsigned int Nni1 =
ni1[0]*
ni1[1];
103 unsigned int Nni2 =
ni2[0]*
ni2[1];
112 std::ifstream
in( qpDataName.c_str() );
115 while( std::getline(
in, line)){
116 if(!line.size() || line[0]==
'#') {
119 std::istringstream linestream(line);
121 int bin0, bin1, bin2, bin3, bin4;
124 linestream>>bin0>>bin1>>bin2>>bin3>>bin4>>val;
126 }
else if(
index < Nnp + Nni0){
128 linestream>>bin0>>bin1>>val;
130 }
else if(
index < Nnp + Nni0 + Nni1){
132 linestream>>bin0>>bin1>>val;
134 }
else if(
index < Nnp + Nni0 + Nni1 + Nni2){
136 linestream>>bin0>>bin1>>val;
UECalibration(const std::vector< float > &v)
float ue_interpolation_pf0[15][344]
UECalibration(std::string calibrationFile)
float ue_predictor_pf[3][15][5][2][82]
float ue_interpolation_pf1[15][344]
float ue_interpolation_pf2[15][82]