121 double scaling_violation = 1.0;
125 const int moms[Nscl] = {12,20,31,40,50,60,70,80,100,120,158};
128 if(prod_pdg == 2212)idx_part = 4;
129 else if(prod_pdg == 2112)idx_part = 5;
131 std::cout<<
"Error in the prod particle"<<
std::endl;
137 for(
int i=0;i<Nscl-1;i++){
138 if(inc_mom>=
double(moms[i]) && inc_mom<
double(moms[i+1])){
143 if(idx_lowp<0 || idx_hip<0){
144 std::cout<<
"Error calculating the scaling"<<
std::endl;
148 double scl_ref158 = -1.0;
152 int binid = dtH->hTTScl[idx_part][Nscl-1]->FindBin(xf,pt);
153 scl_ref158 = dtH->hTTScl[idx_part][Nscl-1]->GetBinContent(binid);
156 binid = dtH->hTTScl[idx_part][Nscl-1]->FindBin(0.89,pt);
157 scl_ref158 = dtH->hTTScl[idx_part][Nscl-1]->GetBinContent(binid);
159 double scl_low = dtH->hTTScl[idx_part][idx_lowp]->GetBinContent(binid);
160 double scl_hi = dtH->hTTScl[idx_part][idx_hip]->GetBinContent(binid);
161 scl_m = scl_low + (inc_mom-double(moms[idx_lowp]))*(scl_hi-scl_low)/(double(moms[idx_hip])-double(moms[idx_lowp]));
163 else if(idx_part==5){
164 int binid = dtH->hTTScl_n[Nscl-1]->FindBin(xf);
165 scl_ref158 = (double)dtH->hTTScl_n[Nscl-1]->GetBinContent(binid);
166 double scl_low = dtH->hTTScl_n[idx_lowp]->GetBinContent(binid);
167 double scl_hi = dtH->hTTScl_n[idx_hip]->GetBinContent(binid);
168 scl_m = scl_low + (inc_mom-double(moms[idx_lowp]))*(scl_hi-scl_low)/(double(moms[idx_hip])-double(moms[idx_lowp]));
171 std::cout<<
"still error, not expected here!!"<<
std::endl;
175 if(scl_ref158 < 1.
e-10 || scl_m<1.
e-10){
176 std::cout<<
"scale problems: "<<scl_ref158<<
" "<<scl_m<<
" "<<inc_pdg<<
" "<<inc_mom<<
" "<<prod_pdg<<
" "<<xf<<
" "<<pt<<
std::endl;
179 scaling_violation = scl_m/scl_ref158;
180 return scaling_violation;
QTextStream & endl(QTextStream &s)
static ThinTargetMC * getInstance()