42 const char* cinc[4] = {
"pip",
"pim",
"kap",
"kam"};
43 for(
int ii=0;ii<4;ii++){
45 sprintf(namepar,
"ThinTarget_material_scaling_%s_%d",cinc[ii],jj);
56 const char* nuinc[2] = {
"prt",
"neu"};
57 const char* cpro[7] = {
"pip",
"pim",
"kap",
"kam",
"k0",
"n",
"p"};
59 for(
int ii=0;ii<2;ii++){
60 for(
int jj=0;jj<7;jj++){
62 sprintf(namepar,
"ThinTarget_%s_incident_%s_%d",nuinc[ii],cpro[jj],kk);
82 sprintf(namepar,
"ThinTarget_prtleftover_incident_%d",0);
84 sprintf(namepar,
"ThinTarget_neuleftover_incident_%d",0);
143 bool is_data_based = (aa.
Inc_P >= 12.0) && (aa.
Vol !=
"TGT1" && aa.
Vol !=
"BudalMonitor" && aa.
Vol !=
"Budal_HFVS" && aa.
Vol !=
"Budal_VFHS") &&
147 if((mode==
"REF")||(mode==
"OPT")){
148 is_data_based = (aa.
Inc_P >= 12.0) && (aa.
Vol !=
"TargetNoSplitSegment" && aa.
Vol !=
"TargetFinHorizontal") && aa.
Vol!=
"tCoreLog" &&
154 double vtx_int[3] = {aa.
Vtx[0],aa.
Vtx[1],aa.
Vtx[2]};
156 if((mode==
"REF")||(mode==
"OPT"))tgtent=
"tCoreLog";
159 bool not_handled =
false;
176 if(aux_aa2.
gen == 0) wgt *= fact_gen0;
178 else not_handled =
true;
188 if(aux_aa2.
gen == 0) wgt *= fact_gen0;
190 else not_handled =
true;
192 else not_handled =
true;
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;
222 if(binnu<0)
return 1.0;
A class to manage the bin definitions for MIPP Numi Yields.
A list/table of parameter names and values.
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
A class to make the reweight event by event.
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
virtual double calculateWeight(const InteractionData &aa)
calculate a weight for this interaction given the central value parameters and the parameters for thi...
int Prod_pdg
pdg code of the produced particle
static MakeReweight * getInstance()
double Pt
Transversal momentum (GeV/c) of the produced particle.
ThinTargetnucleonAReweighter(int iuniv, const ParameterTable &cv_pars, const ParameterTable &univ_pars)
double Vtx[3]
Location of the interaction.
double getParameterValue(const std::string &name) const
get the value of a parameter. throw an exception of a well defined type if we don't have it ...
ThinTargetpCKaonReweighter * tt_pCKaonRew
The information about a hadronic interaction needed to calculate weights.
virtual bool canReweight(const InteractionData &aa)
can the particular instance of this class reweight this interaction?
double Inc_P4[4]
Momentum 4 vector of the incident particle, E=p[3].
std::vector< float > vbin_prt_inc_n
double xF
Feynmann-x of the produced particle: .
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...
int GetNbins_material_scaling()
A class to manage the MC value for thin target.
std::vector< float > vbin_prt_inc_pip
int material_scaling_BinID(double xf, double pt, int pdgcode)
Return material scaling bin.
double Prod_P4[4]
Momentum 4 vector of the produced particle, E=p[3].
std::vector< float > vbin_neu_inc_n
int meson_inc_BinID(double xf, double pt, int pdgcode)
Return Pion incident bin.
std::vector< float > vbin_neu_inc_kam
std::string getenv(std::string const &name)
std::vector< float > vbin_data_kam
int GetNbins_meson_incident()
std::vector< float > vbin_prt_inc_pim
std::string Proc
Interaction process.
virtual bool canReweight(const InteractionData &aa)
can the particular instance of this class reweight this interaction?
double Inc_P
Momentum magnitude of the incident particle.
std::string Vol
Interaction volume.
virtual ~ThinTargetnucleonAReweighter()
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
int Inc_pdg
pdg code of the incident particle
double getMCxs_pC_piK(int genid, double inc_mom)
Get the MC roduction cross-section pC->pi, K:
std::vector< float > vbin_neu_inc_kap
const ParameterTable & univPars
static ThinTargetBins * getInstance()
std::vector< ReweightDriver * > vec_rws
vector of Reweighter Drivers, one per universe
QTextStream & bin(QTextStream &s)
virtual bool canReweight(const InteractionData &aa)
can the particular instance of this class reweight this interaction?
ThinTargetpCPionReweighter * tt_pCPionRew
ReweightDriver * cv_rw
Reweighter Drivers for the central value.
std::vector< float > vbin_neu_inc_p
std::vector< float > vbin_data_pim
std::vector< float > vbin_data_pip
static ThinTargetMC * getInstance()