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
135 if(aa.Inc_pdg != 2212 && aa.Inc_pdg != 2112)
return wgt;
142 int bin = Thinbins->material_scaling_BinID(aa.xF,aa.Pt,aa.Prod_pdg);
143 bool is_data_based = (aa.Inc_P >= 12.0) && (aa.Vol !=
"TGT1" && aa.Vol !=
"BudalMonitor" && aa.Vol !=
"Budal_HFVS" && aa.Vol !=
"Budal_VFHS") &&
144 (aa.Prod_pdg == 211 || aa.Prod_pdg == -211 || aa.Prod_pdg ==321 || aa.Prod_pdg == -321 || aa.Prod_pdg ==310 || aa.Prod_pdg == 130) &&
147 if((mode==
"REF")||(mode==
"OPT")){
148 is_data_based = (aa.Inc_P >= 12.0) && (aa.Vol !=
"TargetNoSplitSegment" && aa.Vol !=
"TargetFinHorizontal") && aa.Vol!=
"tCoreLog" &&
149 (aa.Prod_pdg == 211 || aa.Prod_pdg == -211 || aa.Prod_pdg ==321 || aa.Prod_pdg == -321 || aa.Prod_pdg ==310 || aa.Prod_pdg == 130) &&
152 double inc_mom[3] = {aa.Inc_P4[0], aa.Inc_P4[1], aa.Inc_P4[2]};
153 double prod_mom[3] = {aa.Prod_P4[0],aa.Prod_P4[1],aa.Prod_P4[2]};
154 double vtx_int[3] = {aa.Vtx[0],aa.Vtx[1],aa.Vtx[2]};
156 if((mode==
"REF")||(mode==
"OPT"))tgtent=
"tCoreLog";
157 InteractionData aux_aa2(aa.gen,inc_mom,aa.Inc_pdg,prod_mom,aa.Prod_pdg,tgtent,aa.Proc,vtx_int);
159 bool not_handled =
false;
163 double mc_prod = mc->getMCxs_pC_piK(0,aa.Inc_P);
167 if(aa.Inc_pdg == 2212){
169 if(aa.Prod_pdg == 211 || aa.Prod_pdg == -211){
176 if(aux_aa2.gen == 0) wgt *= fact_gen0;
178 else not_handled =
true;
181 else if(aa.Prod_pdg == 321 || aa.Prod_pdg == -321 || aa.Prod_pdg == 130 || aa.Prod_pdg == 310){
188 if(aux_aa2.gen == 0) wgt *= fact_gen0;
190 else not_handled =
true;
192 else not_handled =
true;
194 else if(aa.Inc_pdg == 2112){
195 if(aa.Prod_pdg == 211 || aa.Prod_pdg == -211){
202 if(aux_aa2.gen == 0) wgt *= fact_gen0;
204 else not_handled =
true;
206 else not_handled =
true;
208 else not_handled =
true;
210 double scaling = 1.0;
217 if(!not_handled)
return wgt;
221 int binnu = Thinbins->meson_inc_BinID(aa.xF,aa.Pt,211);
222 if(binnu<0)
return 1.0;
224 if(aa.Inc_pdg ==2212){
229 else if(aa.Prod_pdg ==130 || aa.Prod_pdg ==310) wgt =
vbin_prt_inc_k0[binnu];
234 else if(aa.Inc_pdg ==2112){
239 else if(aa.Prod_pdg ==130 || aa.Prod_pdg ==310) wgt =
vbin_neu_inc_k0[binnu];
virtual double calculateWeight(const InteractionData &aa)
calculate a weight for this interaction given the central value parameters and the parameters for thi...
float bin_neuleftover_inc
std::vector< float > vbin_neu_inc_k0
ThinTargetnCPionReweighter * tt_nCPionRew
std::vector< float > vbin_neu_inc_pip
std::vector< float > vbin_neu_inc_pim
std::vector< float > vbin_data_kap
static MakeReweight * getInstance()
ThinTargetpCKaonReweighter * tt_pCKaonRew
std::vector< float > vbin_prt_inc_n
virtual double calculateWeight(const InteractionData &aa)
calculate a weight for this interaction given the central value parameters and the parameters for thi...
std::vector< float > vbin_prt_inc_p
virtual double calculateWeight(const InteractionData &inter_data)
calculate a weight for this interaction given the central value parameters and the parameters for thi...
std::vector< float > vbin_prt_inc_pip
std::vector< float > vbin_neu_inc_n
std::vector< float > vbin_neu_inc_kam
std::string getenv(std::string const &name)
std::vector< float > vbin_data_kam
std::vector< float > vbin_prt_inc_pim
virtual bool canReweight(const InteractionData &aa)
can the particular instance of this class reweight this interaction?
std::vector< float > vbin_prt_inc_kam
std::vector< float > vbin_prt_inc_kap
virtual bool canReweight(const InteractionData &aa)
can the particular instance of this class reweight this interaction?
float bin_prtleftover_inc
std::vector< float > vbin_prt_inc_k0
std::vector< float > vbin_neu_inc_kap
static ThinTargetBins * getInstance()
QTextStream & bin(QTextStream &s)
virtual bool canReweight(const InteractionData &aa)
can the particular instance of this class reweight this interaction?
ThinTargetpCPionReweighter * tt_pCPionRew
std::vector< float > vbin_neu_inc_p
std::vector< float > vbin_data_pim
std::vector< float > vbin_data_pip
static ThinTargetMC * getInstance()