34 sprintf(namepar,
"MIPP_NuMI_%s_sys_%d",
"pip",ii);
37 sprintf(namepar,
"MIPP_NuMI_%s_stats_%d",
"pip",ii);
48 sprintf(namepar,
"MIPP_NuMI_%s_sys_%d",
"pim",ii);
51 sprintf(namepar,
"MIPP_NuMI_%s_stats_%d",
"pim",ii);
61 sprintf(namepar,
"MIPP_NuMI_%s_sys_%d",
"kap_pip",ii);
64 sprintf(namepar,
"MIPP_NuMI_%s_stats_%d",
"kap_pip",ii);
70 sprintf(namepar,
"MIPP_NuMI_%s_sys_%d",
"kam_pim",ii);
73 sprintf(namepar,
"MIPP_NuMI_%s_stats_%d",
"kam_pim",ii);
89 std::vector<bool> this_nodes;
91 this_nodes.push_back(
false);
105 if(tar.
Pz<20.0 || tar.
Pz>80.0 || tar.
Pt>2.0)
return this_nodes;
110 if(binID<0)
return this_nodes;
113 int pip_bin = MIPPbins->
BinID(tar.
Pz,tar.
Pt, 211);
114 int pim_bin = MIPPbins->
BinID(tar.
Pz,tar.
Pt,-211);
115 if(tar.
Tar_pdg == 321 && pip_bin<0)
return this_nodes;
116 if(tar.
Tar_pdg ==-321 && pim_bin<0)
return this_nodes;
118 if(pip_bin<0 || pim_bin<0)
return this_nodes;
129 this_nodes[ii] =
true;
141 double low_value = 1.e-18;
153 int pip_bin = MIPPbins->
BinID(tar.
Pz,tar.
Pt, 211);
154 int pim_bin = MIPPbins->
BinID(tar.
Pz,tar.
Pt,-211);
158 if(pip_bin<0 || pim_bin<0)
return aux_par;
168 float K_data_cv = -1.0;
169 float K_data_sys = -1.0;
170 float K_data_sta = -1.0;
178 K_data = K_data_sys + K_data_sta - K_data_cv;
185 K_data = K_data_sys + K_data_sta - K_data_cv;
192 K_aux = K_data_sys + K_data_sta - K_data_cv;
197 K_data = K_data_sys + K_data_sta - K_data_cv;
204 if(K_data_cv<low_value || K_data_sys<low_value || K_data_sta<low_value || K_data<low_value){
208 wgt = double(K_data)/binC;
int Idx_ancestry
The index of the hadron leaving the target in the ancestry chain.
double getMCval(double pz, double pt, int pdgcode)
MC value for this HP production.
A list/table of parameter names and values.
A class to manage the MC value for MIPP NuMI.
MIPPNumiKaonYieldsReweighter(int iuniv, const ParameterTable &cv_pars, const ParameterTable &univ_pars)
std::vector< float > vbin_datasys_pim
std::vector< float > vbin_datasta_pip
Information about the chain of interactions leading to a neutrino.
const ParameterTable & cvPars
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 ...
std::vector< InteractionData > interaction_chain
vector of neutrino ancestors
std::vector< float > vbin_datasys_kam_pim
int Tar_pdg
pdg code of the particle
int GetNbins_pim_MIPPNuMI()
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
std::vector< float > vbin_datasys_pip
static MIPPNumiMC * getInstance()
std::vector< float > vbin_datasta_pim
int GetNbins_pip_MIPPNuMI()
std::vector< float > vbin_datacv_kam_pim
int BinID(double pz, double pt, int pdgcode)
Return the Bin ID for this data.
virtual std::vector< bool > canReweight(const InteractionChainData &aa)
Look through the InteractionChainData input and identify those Interactions that can be reweighted as...
virtual double calculateWeight(const InteractionChainData &aa)
calculate a weight for this interaction chain given the central value parameters and the parameters f...
A class to manage the bin definitions for MIPP Numi Yields.
std::vector< float > vbin_datacv_kap_pip
virtual ~MIPPNumiKaonYieldsReweighter()
std::vector< float > vbin_datasys_kap_pip
static MIPPNumiYieldsBins * getInstance()
double Pt
Transversal momentum (GeV/c) of the particle.
std::vector< float > vbin_datacv_pip
The information about the hadron that exits the target.
std::vector< float > vbin_datasta_kam_pim
double Pz
Longitudinal momentum (GeV/c) of the particle.
std::vector< float > vbin_datasta_kap_pip
std::vector< float > vbin_datacv_pim
TargetData tar_info
Information about the hadron which exited the target.
const ParameterTable & univPars
int GetNbins_K_MIPPNuMI()