1 #ifndef __HiJetAlgos_UECalibration_h__
2 #define __HiJetAlgos_UECalibration_h__
30 unsigned int Nnp_full =
np[0] *
np[1] *
np[2] *
np[3] *
np[4];
31 unsigned int Nnp = np[0] * np[1] * (1 + (np[2] - 1) * np[3]) * np[4];
32 unsigned int Nni0 =
ni0[0]*
ni0[1];
33 unsigned int Nni1 =
ni1[0]*
ni1[1];
34 unsigned int Nni2 =
ni2[0]*
ni2[1];
41 std::string calibrationFile;
44 if(isRealData) calibrationFile =
"RecoHI/HiJetAlgos/data/ue_calibrations_calo_data.txt";
45 if(!isRealData) calibrationFile =
"RecoHI/HiJetAlgos/data/ue_calibrations_calo_mc.txt";
47 if(isRealData) calibrationFile =
"RecoHI/HiJetAlgos/data/ue_calibrations_pf_data.txt";
48 if(!isRealData) calibrationFile =
"RecoHI/HiJetAlgos/data/ue_calibrations_pf_mc.txt";
52 std::string qpDataName = ueData.
fullPath();
53 std::ifstream
in( qpDataName.c_str() );
56 while( std::getline(
in, line)){
57 if(!line.size() || line[0]==
'#') {
60 std::istringstream linestream(line);
62 int bin0, bin1, bin2, bin3, bin4;
65 linestream>>bin0>>bin1>>bin2>>bin3>>bin4>>val;
67 }
else if(
index < Nnp + Nni0){
69 linestream>>bin0>>bin1>>val;
71 }
else if(
index < Nnp + Nni0 + Nni1){
73 linestream>>bin0>>bin1>>val;
75 }
else if(
index < Nnp + Nni0 + Nni1 + Nni2){
77 linestream>>bin0>>bin1>>val;
UECalibration(bool isRealData=true, bool isCalo=false)
float ue_interpolation_pf0[15][344]
float ue_predictor_pf[3][15][5][2][82]
std::string fullPath() const
float ue_interpolation_pf1[15][344]
float ue_interpolation_pf2[15][82]