8 #include <boost/property_tree/ptree.hpp>     9 #include <boost/property_tree/xml_parser.hpp>    20     using boost::property_tree::ptree;
    22     read_xml(filename,top,2); 
    23     ptree& binsPI = top.get_child(
"bins.ThinTarget_pC_pi"); 
    27     double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
    28     for(; it!=binsPI.end(); ++it){
    32       std::stringstream ss1(xf_string);
    33       std::stringstream ss2(pt_string);
    34       ss1 >> aux_xfmin >> aux_xfmax;
    35       ss2 >> aux_ptmin >> aux_ptmax;
    47     using boost::property_tree::ptree;
    49     read_xml(filename,top,2); 
    50     ptree& binsPI = top.get_child(
"bins.ThinTargetBarton_pC_pi"); 
    54     double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
    55     for(; it!=binsPI.end(); ++it){
    59       std::stringstream ss1(xf_string);
    60       std::stringstream ss2(pt_string);
    61       ss1 >> aux_xfmin >> aux_xfmax;
    62       ss2 >> aux_ptmin >> aux_ptmax;
    74     using boost::property_tree::ptree;
    76     read_xml(filename,top,2); 
    77     ptree& binsP = top.get_child(
"bins.ThinTarget_pC_p"); 
    81     double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
    82     for(; it!=binsP.end(); ++it){
    86       std::stringstream ss1(xf_string);
    87       std::stringstream ss2(pt_string);
    88       ss1 >> aux_xfmin >> aux_xfmax;
    89       ss2 >> aux_ptmin >> aux_ptmax;
   101     using boost::property_tree::ptree;
   103     read_xml(filename,top,2); 
   104     ptree& binsN = top.get_child(
"bins.ThinTarget_pC_n"); 
   108     double aux_xfmin,aux_xfmax;
   109     for(; it!=binsN.end(); ++it){
   111       std::stringstream ss1(xf_string);
   112       ss1 >> aux_xfmin >> aux_xfmax;
   122     using boost::property_tree::ptree;
   124     read_xml(filename,top,2); 
   125     ptree& binsK = top.get_child(
"bins.ThinTargetLowxF_pC_k"); 
   129     double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
   130     for(; it!=binsK.end(); ++it){
   134       std::stringstream ss1(xf_string);
   135       std::stringstream ss2(pt_string);
   136       ss1 >> aux_xfmin >> aux_xfmax;
   137       ss2 >> aux_ptmin >> aux_ptmax;
   149     using boost::property_tree::ptree;
   151     read_xml(filename,top,2); 
   152     ptree& binsK = top.get_child(
"bins.ThinTarget_k_pi"); 
   156     double aux_pzmin,aux_pzmax,aux_ptmin,aux_ptmax;
   157     for(; it!=binsK.end(); ++it){
   161       std::stringstream ss1(pz_string);
   162       std::stringstream ss2(pt_string);
   163       ss1 >> aux_pzmin >> aux_pzmax;
   164       ss2 >> aux_ptmin >> aux_ptmax;
   176     using boost::property_tree::ptree;
   178     read_xml(filename,top,2); 
   179     ptree& bins = top.get_child(
"bins.ThinTarget_MesonIncident"); 
   183     double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
   184     for(; it!=bins.end(); ++it){
   188       std::stringstream ss1(xf_string);
   189       std::stringstream ss2(pt_string);
   190       ss1 >> aux_xfmin >> aux_xfmax;
   191       ss2 >> aux_ptmin >> aux_ptmax;
   203     using boost::property_tree::ptree;
   205     read_xml(filename,top,2); 
   206     ptree& bins = top.get_child(
"bins.ThinTarget_material_scaling"); 
   210     double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
   211     for(; it!=bins.end(); ++it){
   215       std::stringstream ss1(xf_string);
   216       std::stringstream ss2(pt_string);
   217       ss1 >> aux_xfmin >> aux_xfmax;
   218       ss2 >> aux_ptmin >> aux_ptmax;
   235     if(pdgcode == 211 || pdgcode == -211){
   237       for(
int ii=0;ii<
size;++ii){
   253     if(pdgcode == 211 || pdgcode == -211){
   255       for(
int ii=0;ii<
size;ii++){
   273       for(
int ii=0;ii<
size;++ii){
   290       for(
int ii=0;ii<
size;++ii){
   306     if(pdgcode == 321 || pdgcode == -321 || pdgcode == 130 || pdgcode == 310){
   308       for(
int ii=0;ii<
size;++ii){
   324     if(pdgcode == 321 || pdgcode == -321 || pdgcode == 130 || pdgcode == 310){
   326       for(
int ii=0;ii<
size;++ii){
   342     if(pdgcode == 211 || pdgcode == -211 || pdgcode == 321 || pdgcode == -321||  pdgcode == 130 ||  pdgcode == 310){
   344       for(
int ii=0;ii<
size;++ii){
   360     if(pdgcode == 211 || pdgcode == -211 || pdgcode == 321 || pdgcode == -321||  pdgcode == 130 ||  pdgcode == 310){
   362       for(
int ii=0;ii<
size;++ii){
   374     if(
pC_pi_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   378     if(
b_pC_pi_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   382     if(
pC_p_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   386     if(
pC_n_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   390     if(
pC_k_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   394     if(
mipp_pC_k_pzmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   398     if(
meson_inc_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
   402     if(
mat_scal_xfmin.size()==0)
throw std::runtime_error(
"ThinTargetBins has not been initialized!!");
 std::vector< double > pC_n_xfmin
 
A class to manage the bin definitions for MIPP Numi Yields. 
 
std::vector< double > pC_pi_xfmax
 
int BinID_pC_n(double xf, int pdgcode)
Return the Bin ID for this data. 
 
void meson_incident_from_xml(const char *filename)
Read a pion incident. 
 
std::vector< double > pC_pi_xfmin
 
std::vector< double > pC_n_xfmax
 
std::vector< double > pC_p_xfmax
 
std::vector< double > pC_k_ptmax
 
static ThinTargetBins * instance
 
std::vector< double > mipp_pC_k_ptmin
 
std::vector< double > pC_k_xfmin
 
std::vector< double > meson_inc_ptmin
 
std::vector< double > mipp_pC_k_pzmin
 
std::vector< double > pC_pi_ptmax
 
int GetNbins_pC_piX_NA49()
 
void barton_pC_pi_from_xml(const char *filename)
Barton: 
 
std::vector< double > mat_scal_ptmin
 
void material_scaling_from_xml(const char *filename)
Read a pion incident. 
 
std::vector< double > meson_inc_xfmax
 
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size. 
 
int GetNbins_material_scaling()
 
std::vector< double > b_pC_pi_xfmax
 
int material_scaling_BinID(double xf, double pt, int pdgcode)
Return material scaling bin. 
 
int BinID_pC_p(double xf, double pt, int pdgcode)
Return the Bin ID for this data. 
 
void mipp_pC_k_pi_from_xml(const char *filename)
MIPP k/pi: 
 
std::vector< double > b_pC_pi_xfmin
 
int GetNbins_pC_KX_MIPP()
 
std::vector< double > b_pC_pi_ptmax
 
std::vector< double > pC_pi_ptmin
 
int meson_inc_BinID(double xf, double pt, int pdgcode)
Return Pion incident bin. 
 
void pC_pi_from_xml(const char *filename)
Read a NA49 data pip xml file name to parse the bins. 
 
std::vector< double > mat_scal_ptmax
 
int GetNbins_meson_incident()
 
void pC_p_from_xml(const char *filename)
Read a NA49 data prt xml file name to parse the bins. 
 
int GetNbins_pC_nX_NA49()
 
std::vector< double > pC_p_ptmax
 
std::vector< double > pC_k_ptmin
 
void pC_n_from_xml(const char *filename)
Read a NA49 data neutron xml file name to parse the bins. 
 
int GetNbins_pC_KX_NA49()
 
std::vector< double > b_pC_pi_ptmin
 
int BinID_pC_k(double xf, double pt, int pdgcode)
Return the Bin ID for this data. 
 
std::vector< double > mat_scal_xfmax
 
std::vector< double > meson_inc_xfmin
 
int GetNbins_pC_piX_Barton()
 
std::vector< double > mat_scal_xfmin
 
int BinID_pC_pi(double xf, double pt, int pdgcode)
Return the Bin ID for this data. 
 
static ThinTargetBins * getInstance()
 
int barton_BinID_pC_pi(double xf, double pt, int pdgcode)
Return the Bin ID for this data. 
 
std::vector< double > pC_k_xfmax
 
int GetNbins_pC_pX_NA49()
 
std::vector< double > mipp_pC_k_ptmax
 
std::vector< double > meson_inc_ptmax
 
int mipp_BinID_pC_k(double pz, double pt, int pdgcode)
Return the MIPP Thin Target Bin ID for this data. 
 
std::vector< double > mipp_pC_k_pzmax
 
std::vector< double > pC_p_xfmin
 
std::vector< double > pC_p_ptmin
 
void pC_k_from_xml(const char *filename)
Read a NA49 data K xml file name to parse the bins.