1 #ifndef __HiJetAlgos_UECalibration_h__ 2 #define __HiJetAlgos_UECalibration_h__ 31 unsigned int Nnp_full =
np[0] *
np[1] *
np[2] *
np[3] *
np[4];
32 unsigned int Nnp = np[0] * np[1] * (1 + (np[2] - 1) * np[3]) * np[4];
33 unsigned int Nni0 =
ni0[0]*
ni0[1];
34 unsigned int Nni1 =
ni1[0]*
ni1[1];
35 unsigned int Nni2 =
ni2[0]*
ni2[1];
44 int bin0, bin1, bin2, bin3, bin4;
49 unsigned int u = (
index / np[4]) % (1 + (np[2] - 1) * np[3]);
56 bin2 = (u - 1) / np[3] + 1;
57 bin3 = (u - 1) % np[3];
60 bin1 = ((
index / np[4]) / (1 + (np[2] - 1) * np[3])) % np[1];
61 bin0 = ((
index / np[4]) / (1 + (np[2] - 1) * np[3])) / np[1];
65 else if (
index < Nnp + Nni0) {
66 bin1 = (
index - Nnp) % ni0[1];
67 bin0 = (
index - Nnp) / ni0[1];
70 else if (
index < Nnp + Nni0 + Nni1) {
71 bin1 = (
index - Nnp - Nni0) % ni1[1];
72 bin0 = (
index - Nnp - Nni0) / ni1[1];
76 bin1 = (
index - Nnp - Nni0 - Nni1) % ni2[1];
77 bin0 = (
index - Nnp - Nni0 - Nni1) / ni2[1];
101 unsigned int Nnp_full =
np[0] *
np[1] *
np[2] *
np[3] *
np[4];
102 unsigned int Nnp = np[0] * np[1] * (1 + (np[2] - 1) * np[3]) * np[4];
103 unsigned int Nni0 =
ni0[0]*
ni0[1];
104 unsigned int Nni1 =
ni1[0]*
ni1[1];
105 unsigned int Nni2 =
ni2[0]*
ni2[1];
114 std::ifstream
in( qpDataName.c_str() );
117 while( std::getline(
in, line)){
118 if(!line.size() || line[0]==
'#') {
121 std::istringstream linestream(line);
123 int bin0, bin1, bin2, bin3, bin4;
126 linestream>>bin0>>bin1>>bin2>>bin3>>bin4>>
val;
128 }
else if(
index < Nnp + Nni0){
130 linestream>>bin0>>bin1>>
val;
132 }
else if(
index < Nnp + Nni0 + Nni1){
134 linestream>>bin0>>bin1>>
val;
136 }
else if(
index < Nnp + Nni0 + Nni1 + Nni2){
138 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]