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];
65 else if (
index < Nnp + Nni0) {
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)){
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;