ThinTargetBins.h
Go to the documentation of this file.
1 #ifndef THINTARGETBINS_H
2 #define THINTARGETBINS_H
3 
4 #include <utility>
5 #include <map>
6 #include <vector>
7 
8 namespace NeutrinoFluxReweight{
9 
10  /*! \class ThinTargetBins
11  * \brief A class to manage the bin definitions for MIPP Numi Yields
12  */
14 
15 
16  private:
18 
19  public:
20  static ThinTargetBins* getInstance();
21 
22  //! Read a NA49 data pip xml file name to parse the bins
23  void pC_pi_from_xml(const char* filename);
24 
25  //!Barton:
26  void barton_pC_pi_from_xml(const char* filename);
27 
28  //! Read a NA49 data K xml file name to parse the bins
29  void pC_k_from_xml(const char* filename);
30 
31  //! Read a NA49 data prt xml file name to parse the bins
32  void pC_p_from_xml(const char* filename);
33 
34  //! Read a NA49 data neutron xml file name to parse the bins
35  void pC_n_from_xml(const char* filename);
36 
37  //!MIPP k/pi:
38  void mipp_pC_k_pi_from_xml(const char* filename);
39 
40  //! Read a pion incident
41  void meson_incident_from_xml(const char* filename);
42 
43  //! Read a pion incident
44  void material_scaling_from_xml(const char* filename);
45 
46  //! Return the Bin ID for this data
47  int BinID_pC_pi(double xf, double pt,int pdgcode);
48 
49  //! Return the Bin ID for this data
50  int barton_BinID_pC_pi(double xf, double pt,int pdgcode);
51 
52  //! Return the Bin ID for this data
53  int BinID_pC_p(double xf, double pt,int pdgcode);
54 
55  //! Return the Bin ID for this data
56  int BinID_pC_n(double xf,int pdgcode);
57 
58  //! Return the Bin ID for this data
59  int BinID_pC_k(double xf, double pt,int pdgcode);
60 
61  //! Return the MIPP Thin Target Bin ID for this data
62  int mipp_BinID_pC_k(double pz, double pt,int pdgcode);
63 
64  //! Return Pion incident bin
65  int meson_inc_BinID(double xf, double pt,int pdgcode);
66 
67  //! Return material scaling bin
68  int material_scaling_BinID(double xf, double pt,int pdgcode);
69 
70  //Pions production:
73 
74  //Proton production:
75  std::vector<double> pC_p_xfmin, pC_p_xfmax, pC_p_ptmin, pC_p_ptmax;
76 
77  //Neutron production:
78  std::vector<double> pC_n_xfmin, pC_n_xfmax;
79 
80  //Kaons production:
81  std::vector<double> pC_k_xfmin, pC_k_xfmax, pC_k_ptmin, pC_k_ptmax;
83 
84  //Pion incident
86 
87  //Material scaling
89 
90  //Number of bins:
93 
94  int GetNbins_pC_pX_NA49();
95  int GetNbins_pC_nX_NA49();
96 
97  int GetNbins_pC_KX_NA49();
98  int GetNbins_pC_KX_MIPP();
99 
102 
103  private:
105 
106  };
107 
108 
109 
110 }
111 #endif
A class to manage the bin definitions for MIPP Numi Yields.
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.
static ThinTargetBins * instance
std::vector< double > mipp_pC_k_ptmin
std::vector< double > meson_inc_ptmin
std::vector< double > mipp_pC_k_pzmin
string filename
Definition: train.py:213
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
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
std::vector< double > b_pC_pi_ptmax
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
void pC_p_from_xml(const char *filename)
Read a NA49 data prt xml file name to parse the bins.
void pC_n_from_xml(const char *filename)
Read a NA49 data neutron xml file name to parse the bins.
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
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 > 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
void pC_k_from_xml(const char *filename)
Read a NA49 data K xml file name to parse the bins.