calculate a weight for this interaction given the central value parameters and the parameters for this universe. The weight is something like: f(cv)/f(MC) * f(univ)/f(cv) where cv in this case corresponds to the best value of the parameter, given the data. If univ_pars=cv_pars then we are calculating a central value weight
114 int bin = Thinbins->BinID_pC_k(aa.xF,aa.Pt,aa.Prod_pdg);
115 int mipp_bin = Thinbins->mipp_BinID_pC_k(aa.Pz,aa.Pt,aa.Prod_pdg);
116 if(bin<0 && mipp_bin<0)
return wgt;
123 else if(aa.Prod_pdg == 130 || aa.Prod_pdg == 310){
127 std::cout<<
"Something is wrong, pdg_prod: "<< aa.Prod_pdg <<
std::endl;
131 else if(mipp_bin>=0){
137 double inc_mom[3] = {aa.Inc_P4[0], aa.Inc_P4[1], aa.Inc_P4[2]};
138 double prod_mom[3] = {aa.Prod_P4[0],aa.Prod_P4[1],aa.Prod_P4[2]};
139 double vtx_int[3] = {aa.Vtx[0],aa.Vtx[1],aa.Vtx[2]};
140 double pip_data = -1.0;
141 double pim_data = -1.0;
143 InteractionData aux_aa(aa.gen, inc_mom,2212,prod_mom,211,aa.Vol,aa.Proc,vtx_int);
145 bin_pi = Thinbins->BinID_pC_pi(aux_aa.xF,aux_aa.Pt,aux_aa.Prod_pdg);
146 if(bin_pi<0)
return 1.0;
150 else if(aux_aa.xF>0.5){
151 bin_pi = Thinbins->barton_BinID_pC_pi(aux_aa.xF,aux_aa.Pt,aux_aa.Prod_pdg);
152 if(bin_pi<0)
return 1.0;
157 if(aa.Prod_pdg == 321){
160 else if(aa.Prod_pdg ==-321){
163 else if(aa.Prod_pdg == 130 || aa.Prod_pdg == 310){
170 else if(aa.gen>0)dataval /= 1.0;
172 std::cout<<
"Something is wrong with gen "<<
std::endl;
176 double data_scale = -1.0;
177 if(aa.Prod_pdg == 321 || aa.Prod_pdg == -321){
180 else if(aa.Prod_pdg == 130 || aa.Prod_pdg == 310){
184 dataval *= data_scale;
187 double mc_cv = mc->getMCval_pC_X(aa.Inc_P,aa.xF,aa.Pt,aa.Prod_pdg);
188 double mc_prod = mc->getMCxs_pC_piK(aa.gen,aa.Inc_P);
192 if(mc_cv<1.
e-12)
return wgt;
static MakeReweight * getInstance()
std::vector< float > vbin_data_kap
ThinTargetpCPionReweighter * tt_pCPionRew
std::vector< float > bart_vbin_data_pip
static ThinTargetBins * getInstance()
std::vector< float > vbin_data_pip
QTextStream & bin(QTextStream &s)
std::vector< float > vbin_data_pim
std::vector< float > bart_vbin_data_pim
std::vector< float > vbin_data_kam
double calculateDataScale(int inc_pdg, double inc_mom, int prod_pdg, double xf, double pt)
std::vector< float > mipp_vbin_data_kap_pip
QTextStream & endl(QTextStream &s)
std::vector< float > mipp_vbin_data_kam_pim
static ThinTargetMC * getInstance()