Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Attributes | List of all members
NeutrinoFluxReweight::ThinTargetBins Class Reference

A class to manage the bin definitions for MIPP Numi Yields. More...

#include <ThinTargetBins.h>

Public Member Functions

void pC_pi_from_xml (const char *filename)
 Read a NA49 data pip xml file name to parse the bins. More...
 
void barton_pC_pi_from_xml (const char *filename)
 Barton: More...
 
void pC_k_from_xml (const char *filename)
 Read a NA49 data K xml file name to parse the bins. More...
 
void pC_p_from_xml (const char *filename)
 Read a NA49 data prt xml file name to parse the bins. More...
 
void pC_n_from_xml (const char *filename)
 Read a NA49 data neutron xml file name to parse the bins. More...
 
void mipp_pC_k_pi_from_xml (const char *filename)
 MIPP k/pi: More...
 
void meson_incident_from_xml (const char *filename)
 Read a pion incident. More...
 
void material_scaling_from_xml (const char *filename)
 Read a pion incident. More...
 
int BinID_pC_pi (double xf, double pt, int pdgcode)
 Return the Bin ID for this data. More...
 
int barton_BinID_pC_pi (double xf, double pt, int pdgcode)
 Return the Bin ID for this data. More...
 
int BinID_pC_p (double xf, double pt, int pdgcode)
 Return the Bin ID for this data. More...
 
int BinID_pC_n (double xf, int pdgcode)
 Return the Bin ID for this data. More...
 
int BinID_pC_k (double xf, double pt, int pdgcode)
 Return the Bin ID for this data. More...
 
int mipp_BinID_pC_k (double pz, double pt, int pdgcode)
 Return the MIPP Thin Target Bin ID for this data. More...
 
int meson_inc_BinID (double xf, double pt, int pdgcode)
 Return Pion incident bin. More...
 
int material_scaling_BinID (double xf, double pt, int pdgcode)
 Return material scaling bin. More...
 
int GetNbins_pC_piX_NA49 ()
 
int GetNbins_pC_piX_Barton ()
 
int GetNbins_pC_pX_NA49 ()
 
int GetNbins_pC_nX_NA49 ()
 
int GetNbins_pC_KX_NA49 ()
 
int GetNbins_pC_KX_MIPP ()
 
int GetNbins_meson_incident ()
 
int GetNbins_material_scaling ()
 

Static Public Member Functions

static ThinTargetBinsgetInstance ()
 

Public Attributes

std::vector< double > pC_pi_xfmin
 
std::vector< double > pC_pi_xfmax
 
std::vector< double > pC_pi_ptmin
 
std::vector< double > pC_pi_ptmax
 
std::vector< double > b_pC_pi_xfmin
 
std::vector< double > b_pC_pi_xfmax
 
std::vector< double > b_pC_pi_ptmin
 
std::vector< double > b_pC_pi_ptmax
 
std::vector< double > pC_p_xfmin
 
std::vector< double > pC_p_xfmax
 
std::vector< double > pC_p_ptmin
 
std::vector< double > pC_p_ptmax
 
std::vector< double > pC_n_xfmin
 
std::vector< double > pC_n_xfmax
 
std::vector< double > pC_k_xfmin
 
std::vector< double > pC_k_xfmax
 
std::vector< double > pC_k_ptmin
 
std::vector< double > pC_k_ptmax
 
std::vector< double > mipp_pC_k_pzmin
 
std::vector< double > mipp_pC_k_pzmax
 
std::vector< double > mipp_pC_k_ptmin
 
std::vector< double > mipp_pC_k_ptmax
 
std::vector< double > meson_inc_xfmin
 
std::vector< double > meson_inc_xfmax
 
std::vector< double > meson_inc_ptmin
 
std::vector< double > meson_inc_ptmax
 
std::vector< double > mat_scal_xfmin
 
std::vector< double > mat_scal_xfmax
 
std::vector< double > mat_scal_ptmin
 
std::vector< double > mat_scal_ptmax
 

Private Member Functions

 ThinTargetBins ()
 

Static Private Attributes

static ThinTargetBinsinstance = 0
 

Detailed Description

A class to manage the bin definitions for MIPP Numi Yields.

Definition at line 13 of file ThinTargetBins.h.

Constructor & Destructor Documentation

NeutrinoFluxReweight::ThinTargetBins::ThinTargetBins ( )
private

Definition at line 15 of file ThinTargetBins.cpp.

15  {
16 
17  }

Member Function Documentation

int NeutrinoFluxReweight::ThinTargetBins::barton_BinID_pC_pi ( double  xf,
double  pt,
int  pdgcode 
)

Return the Bin ID for this data.

Definition at line 248 of file ThinTargetBins.cpp.

248  {
249 
250  int ibinID = -1;
251  int size = 0;
252 
253  if(pdgcode == 211 || pdgcode == -211){
254  size = b_pC_pi_xfmin.size();
255  for(int ii=0;ii<size;ii++){
256  if(xf>b_pC_pi_xfmin[ii] && xf<b_pC_pi_xfmax[ii] && pt>b_pC_pi_ptmin[ii] && pt<b_pC_pi_ptmax[ii]){
257  ibinID = ii;
258  }
259  }
260  }
261 
262  return ibinID;
263 
264  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< double > b_pC_pi_xfmax
std::vector< double > b_pC_pi_xfmin
std::vector< double > b_pC_pi_ptmax
std::vector< double > b_pC_pi_ptmin
void NeutrinoFluxReweight::ThinTargetBins::barton_pC_pi_from_xml ( const char *  filename)

Barton:

Definition at line 46 of file ThinTargetBins.cpp.

46  {
47  using boost::property_tree::ptree;
48  ptree top;
49  read_xml(filename,top,2);
50  ptree& binsPI = top.get_child("bins.ThinTargetBarton_pC_pi");
51  ptree::iterator it = binsPI.begin();
52 
53  //int idx=0;
54  double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
55  for(; it!=binsPI.end(); ++it){
56  std::string xf_string=it->second.get<std::string>("xfrange");
57  std::string pt_string=it->second.get<std::string>("ptrange");
58 
59  std::stringstream ss1(xf_string);
60  std::stringstream ss2(pt_string);
61  ss1 >> aux_xfmin >> aux_xfmax;
62  ss2 >> aux_ptmin >> aux_ptmax;
63 
64  b_pC_pi_xfmin.push_back(aux_xfmin);
65  b_pC_pi_xfmax.push_back(aux_xfmax);
66  b_pC_pi_ptmin.push_back(aux_ptmin);
67  b_pC_pi_ptmax.push_back(aux_ptmax);
68 
69  }
70 
71  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
string filename
Definition: train.py:213
std::vector< double > b_pC_pi_xfmax
std::vector< double > b_pC_pi_xfmin
std::vector< double > b_pC_pi_ptmax
std::vector< double > b_pC_pi_ptmin
int NeutrinoFluxReweight::ThinTargetBins::BinID_pC_k ( double  xf,
double  pt,
int  pdgcode 
)

Return the Bin ID for this data.

Definition at line 301 of file ThinTargetBins.cpp.

301  {
302 
303  int ibinID = -1;
304  int size = 0;
305 
306  if(pdgcode == 321 || pdgcode == -321 || pdgcode == 130 || pdgcode == 310){
307  size = pC_k_xfmin.size();
308  for(int ii=0;ii<size;++ii){
309  if(xf>pC_k_xfmin[ii] && xf<pC_k_xfmax[ii] && pt>pC_k_ptmin[ii] && pt<pC_k_ptmax[ii]){
310  ibinID = ii;
311  }
312  }
313  }
314 
315  return ibinID;
316 
317  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
int NeutrinoFluxReweight::ThinTargetBins::BinID_pC_n ( double  xf,
int  pdgcode 
)

Return the Bin ID for this data.

Definition at line 284 of file ThinTargetBins.cpp.

284  {
285 
286  int ibinID = -1;
287  int size = 0;
288  if(pdgcode == 2112){
289  size = pC_n_xfmin.size();
290  for(int ii=0;ii<size;++ii){
291  if( (xf>pC_n_xfmin[ii]) && (xf<pC_n_xfmax[ii])){
292  ibinID = ii;
293  }
294  }
295  }
296 
297  return ibinID;
298 
299  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
int NeutrinoFluxReweight::ThinTargetBins::BinID_pC_p ( double  xf,
double  pt,
int  pdgcode 
)

Return the Bin ID for this data.

Definition at line 266 of file ThinTargetBins.cpp.

266  {
267 
268  int ibinID = -1;
269  int size = 0;
270 
271  if(pdgcode == 2212){
272  size = pC_p_xfmin.size();
273  for(int ii=0;ii<size;++ii){
274  if(xf>pC_p_xfmin[ii] && xf<pC_p_xfmax[ii] && pt>pC_p_ptmin[ii] && pt<pC_p_ptmax[ii]){
275  ibinID = ii;
276  }
277  }
278  }
279 
280  return ibinID;
281 
282  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
int NeutrinoFluxReweight::ThinTargetBins::BinID_pC_pi ( double  xf,
double  pt,
int  pdgcode 
)

Return the Bin ID for this data.

Definition at line 230 of file ThinTargetBins.cpp.

230  {
231 
232  int ibinID = -1;
233  int size = 0;
234 
235  if(pdgcode == 211 || pdgcode == -211){
236  size = pC_pi_xfmin.size();
237  for(int ii=0;ii<size;++ii){
238  if(xf>pC_pi_xfmin[ii] && xf<pC_pi_xfmax[ii] && pt>pC_pi_ptmin[ii] && pt<pC_pi_ptmax[ii]){
239  ibinID = ii;
240  }
241  }
242  }
243 
244  return ibinID;
245 
246  }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
ThinTargetBins * NeutrinoFluxReweight::ThinTargetBins::getInstance ( )
static

Definition at line 406 of file ThinTargetBins.cpp.

406  {
407  if (instance == 0) instance = new ThinTargetBins;
408  return instance;
409  }
static ThinTargetBins * instance
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_material_scaling ( )

Definition at line 401 of file ThinTargetBins.cpp.

401  {
402  if(mat_scal_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
403  return mat_scal_xfmin.size();
404  }
std::vector< double > mat_scal_xfmin
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_meson_incident ( )

Definition at line 397 of file ThinTargetBins.cpp.

397  {
398  if(meson_inc_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
399  return meson_inc_xfmin.size();
400  }
std::vector< double > meson_inc_xfmin
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_pC_KX_MIPP ( )

Definition at line 393 of file ThinTargetBins.cpp.

393  {
394  if(mipp_pC_k_pzmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
395  return mipp_pC_k_pzmin.size();
396  }
std::vector< double > mipp_pC_k_pzmin
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_pC_KX_NA49 ( )

Definition at line 389 of file ThinTargetBins.cpp.

389  {
390  if(pC_k_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
391  return pC_k_xfmin.size();
392  }
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_pC_nX_NA49 ( )

Definition at line 385 of file ThinTargetBins.cpp.

385  {
386  if(pC_n_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
387  return pC_n_xfmin.size();
388  }
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_pC_piX_Barton ( )

Definition at line 377 of file ThinTargetBins.cpp.

377  {
378  if(b_pC_pi_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
379  return b_pC_pi_xfmin.size();
380  }
std::vector< double > b_pC_pi_xfmin
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_pC_piX_NA49 ( )

Definition at line 373 of file ThinTargetBins.cpp.

373  {
374  if(pC_pi_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
375  return pC_pi_xfmin.size();
376  }
int NeutrinoFluxReweight::ThinTargetBins::GetNbins_pC_pX_NA49 ( )

Definition at line 381 of file ThinTargetBins.cpp.

381  {
382  if(pC_p_xfmin.size()==0)throw std::runtime_error("ThinTargetBins has not been initialized!!");
383  return pC_p_xfmin.size();
384  }
int NeutrinoFluxReweight::ThinTargetBins::material_scaling_BinID ( double  xf,
double  pt,
int  pdgcode 
)

Return material scaling bin.

Definition at line 355 of file ThinTargetBins.cpp.

355  {
356 
357  int ibinID = -1;
358  int size = 0;
359 
360  if(pdgcode == 211 || pdgcode == -211 || pdgcode == 321 || pdgcode == -321|| pdgcode == 130 || pdgcode == 310){
361  size = mat_scal_xfmin.size();
362  for(int ii=0;ii<size;++ii){
363  if((xf>mat_scal_xfmin[ii]) && (xf<mat_scal_xfmax[ii]) && (pt>mat_scal_ptmin[ii]) && (pt<mat_scal_ptmax[ii])){
364  ibinID = ii;
365  }
366  }
367  }
368 
369  return ibinID;
370 
371  }
std::vector< double > mat_scal_ptmin
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< double > mat_scal_ptmax
std::vector< double > mat_scal_xfmax
std::vector< double > mat_scal_xfmin
void NeutrinoFluxReweight::ThinTargetBins::material_scaling_from_xml ( const char *  filename)

Read a pion incident.

Definition at line 202 of file ThinTargetBins.cpp.

202  {
203  using boost::property_tree::ptree;
204  ptree top;
205  read_xml(filename,top,2);
206  ptree& bins = top.get_child("bins.ThinTarget_material_scaling");
207  ptree::iterator it = bins.begin();
208 
209  //int idx=0;
210  double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
211  for(; it!=bins.end(); ++it){
212  std::string xf_string=it->second.get<std::string>("xfrange");
213  std::string pt_string=it->second.get<std::string>("ptrange");
214 
215  std::stringstream ss1(xf_string);
216  std::stringstream ss2(pt_string);
217  ss1 >> aux_xfmin >> aux_xfmax;
218  ss2 >> aux_ptmin >> aux_ptmax;
219 
220  mat_scal_xfmin.push_back(aux_xfmin);
221  mat_scal_xfmax.push_back(aux_xfmax);
222  mat_scal_ptmin.push_back(aux_ptmin);
223  mat_scal_ptmax.push_back(aux_ptmax);
224 
225  }
226 
227  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
string filename
Definition: train.py:213
std::vector< double > mat_scal_ptmin
std::vector< double > mat_scal_ptmax
std::vector< double > mat_scal_xfmax
std::vector< double > mat_scal_xfmin
int NeutrinoFluxReweight::ThinTargetBins::meson_inc_BinID ( double  xf,
double  pt,
int  pdgcode 
)

Return Pion incident bin.

Definition at line 337 of file ThinTargetBins.cpp.

337  {
338 
339  int ibinID = -1;
340  int size = 0;
341 
342  if(pdgcode == 211 || pdgcode == -211 || pdgcode == 321 || pdgcode == -321|| pdgcode == 130 || pdgcode == 310){
343  size = meson_inc_xfmin.size();
344  for(int ii=0;ii<size;++ii){
345  if(xf>meson_inc_xfmin[ii] && xf<meson_inc_xfmax[ii] && pt>meson_inc_ptmin[ii] && pt<meson_inc_ptmax[ii]){
346  ibinID = ii;
347  }
348  }
349  }
350 
351  return ibinID;
352 
353  }
std::vector< double > meson_inc_ptmin
std::vector< double > meson_inc_xfmax
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< double > meson_inc_xfmin
std::vector< double > meson_inc_ptmax
void NeutrinoFluxReweight::ThinTargetBins::meson_incident_from_xml ( const char *  filename)

Read a pion incident.

Definition at line 175 of file ThinTargetBins.cpp.

175  {
176  using boost::property_tree::ptree;
177  ptree top;
178  read_xml(filename,top,2);
179  ptree& bins = top.get_child("bins.ThinTarget_MesonIncident");
180  ptree::iterator it = bins.begin();
181 
182  //int idx=0;
183  double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
184  for(; it!=bins.end(); ++it){
185  std::string xf_string=it->second.get<std::string>("xfrange");
186  std::string pt_string=it->second.get<std::string>("ptrange");
187 
188  std::stringstream ss1(xf_string);
189  std::stringstream ss2(pt_string);
190  ss1 >> aux_xfmin >> aux_xfmax;
191  ss2 >> aux_ptmin >> aux_ptmax;
192 
193  meson_inc_xfmin.push_back(aux_xfmin);
194  meson_inc_xfmax.push_back(aux_xfmax);
195  meson_inc_ptmin.push_back(aux_ptmin);
196  meson_inc_ptmax.push_back(aux_ptmax);
197 
198  }
199 
200  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
std::vector< double > meson_inc_ptmin
string filename
Definition: train.py:213
std::vector< double > meson_inc_xfmax
std::vector< double > meson_inc_xfmin
std::vector< double > meson_inc_ptmax
int NeutrinoFluxReweight::ThinTargetBins::mipp_BinID_pC_k ( double  pz,
double  pt,
int  pdgcode 
)

Return the MIPP Thin Target Bin ID for this data.

Definition at line 319 of file ThinTargetBins.cpp.

319  {
320 
321  int ibinID = -1;
322  int size = 0;
323 
324  if(pdgcode == 321 || pdgcode == -321 || pdgcode == 130 || pdgcode == 310){
325  size = mipp_pC_k_pzmin.size();
326  for(int ii=0;ii<size;++ii){
327  if(pz>mipp_pC_k_pzmin[ii] && pz<mipp_pC_k_pzmax[ii] && pt>mipp_pC_k_ptmin[ii] && pt<mipp_pC_k_ptmax[ii]){
328  ibinID = ii;
329  }
330  }
331  }
332 
333  return ibinID;
334 
335  }
std::vector< double > mipp_pC_k_ptmin
std::vector< double > mipp_pC_k_pzmin
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
std::vector< double > mipp_pC_k_ptmax
std::vector< double > mipp_pC_k_pzmax
void NeutrinoFluxReweight::ThinTargetBins::mipp_pC_k_pi_from_xml ( const char *  filename)

MIPP k/pi:

Definition at line 148 of file ThinTargetBins.cpp.

148  {
149  using boost::property_tree::ptree;
150  ptree top;
151  read_xml(filename,top,2);
152  ptree& binsK = top.get_child("bins.ThinTarget_k_pi");
153  ptree::iterator it = binsK.begin();
154 
155  //int idx=0;
156  double aux_pzmin,aux_pzmax,aux_ptmin,aux_ptmax;
157  for(; it!=binsK.end(); ++it){
158  std::string pz_string=it->second.get<std::string>("pzrange");
159  std::string pt_string=it->second.get<std::string>("ptrange");
160 
161  std::stringstream ss1(pz_string);
162  std::stringstream ss2(pt_string);
163  ss1 >> aux_pzmin >> aux_pzmax;
164  ss2 >> aux_ptmin >> aux_ptmax;
165 
166  mipp_pC_k_pzmin.push_back(aux_pzmin);
167  mipp_pC_k_pzmax.push_back(aux_pzmax);
168  mipp_pC_k_ptmin.push_back(aux_ptmin);
169  mipp_pC_k_ptmax.push_back(aux_ptmax);
170 
171  }
172 
173 }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
std::vector< double > mipp_pC_k_ptmin
std::vector< double > mipp_pC_k_pzmin
string filename
Definition: train.py:213
std::vector< double > mipp_pC_k_ptmax
std::vector< double > mipp_pC_k_pzmax
void NeutrinoFluxReweight::ThinTargetBins::pC_k_from_xml ( const char *  filename)

Read a NA49 data K xml file name to parse the bins.

Definition at line 121 of file ThinTargetBins.cpp.

121  {
122  using boost::property_tree::ptree;
123  ptree top;
124  read_xml(filename,top,2);
125  ptree& binsK = top.get_child("bins.ThinTargetLowxF_pC_k");
126  ptree::iterator it = binsK.begin();
127 
128  //int idx=0;
129  double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
130  for(; it!=binsK.end(); ++it){
131  std::string xf_string=it->second.get<std::string>("xfrange");
132  std::string pt_string=it->second.get<std::string>("ptrange");
133 
134  std::stringstream ss1(xf_string);
135  std::stringstream ss2(pt_string);
136  ss1 >> aux_xfmin >> aux_xfmax;
137  ss2 >> aux_ptmin >> aux_ptmax;
138 
139  pC_k_xfmin.push_back(aux_xfmin);
140  pC_k_xfmax.push_back(aux_xfmax);
141  pC_k_ptmin.push_back(aux_ptmin);
142  pC_k_ptmax.push_back(aux_ptmax);
143 
144  }
145 
146  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
string filename
Definition: train.py:213
void NeutrinoFluxReweight::ThinTargetBins::pC_n_from_xml ( const char *  filename)

Read a NA49 data neutron xml file name to parse the bins.

Definition at line 100 of file ThinTargetBins.cpp.

100  {
101  using boost::property_tree::ptree;
102  ptree top;
103  read_xml(filename,top,2);
104  ptree& binsN = top.get_child("bins.ThinTarget_pC_n");
105  ptree::iterator it = binsN.begin();
106 
107  //int idx=0;
108  double aux_xfmin,aux_xfmax;
109  for(; it!=binsN.end(); ++it){
110  std::string xf_string=it->second.get<std::string>("xfrange");
111  std::stringstream ss1(xf_string);
112  ss1 >> aux_xfmin >> aux_xfmax;
113 
114  pC_n_xfmin.push_back(aux_xfmin);
115  pC_n_xfmax.push_back(aux_xfmax);
116 
117  }
118 
119  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
string filename
Definition: train.py:213
void NeutrinoFluxReweight::ThinTargetBins::pC_p_from_xml ( const char *  filename)

Read a NA49 data prt xml file name to parse the bins.

Definition at line 73 of file ThinTargetBins.cpp.

73  {
74  using boost::property_tree::ptree;
75  ptree top;
76  read_xml(filename,top,2);
77  ptree& binsP = top.get_child("bins.ThinTarget_pC_p");
78  ptree::iterator it = binsP.begin();
79 
80  //int idx=0;
81  double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
82  for(; it!=binsP.end(); ++it){
83  std::string xf_string=it->second.get<std::string>("xfrange");
84  std::string pt_string=it->second.get<std::string>("ptrange");
85 
86  std::stringstream ss1(xf_string);
87  std::stringstream ss2(pt_string);
88  ss1 >> aux_xfmin >> aux_xfmax;
89  ss2 >> aux_ptmin >> aux_ptmax;
90 
91  pC_p_xfmin.push_back(aux_xfmin);
92  pC_p_xfmax.push_back(aux_xfmax);
93  pC_p_ptmin.push_back(aux_ptmin);
94  pC_p_ptmax.push_back(aux_ptmax);
95 
96  }
97 
98  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
string filename
Definition: train.py:213
void NeutrinoFluxReweight::ThinTargetBins::pC_pi_from_xml ( const char *  filename)

Read a NA49 data pip xml file name to parse the bins.

Definition at line 19 of file ThinTargetBins.cpp.

19  {
20  using boost::property_tree::ptree;
21  ptree top;
22  read_xml(filename,top,2);
23  ptree& binsPI = top.get_child("bins.ThinTarget_pC_pi");
24  ptree::iterator it = binsPI.begin();
25 
26  //int idx=0;
27  double aux_xfmin,aux_xfmax,aux_ptmin,aux_ptmax;
28  for(; it!=binsPI.end(); ++it){
29  std::string xf_string=it->second.get<std::string>("xfrange");
30  std::string pt_string=it->second.get<std::string>("ptrange");
31 
32  std::stringstream ss1(xf_string);
33  std::stringstream ss2(pt_string);
34  ss1 >> aux_xfmin >> aux_xfmax;
35  ss2 >> aux_ptmin >> aux_ptmax;
36 
37  pC_pi_xfmin.push_back(aux_xfmin);
38  pC_pi_xfmax.push_back(aux_xfmax);
39  pC_pi_ptmin.push_back(aux_ptmin);
40  pC_pi_ptmax.push_back(aux_ptmax);
41 
42  }
43 
44  }
intermediate_table::iterator iterator
std::string string
Definition: nybbler.cc:12
string filename
Definition: train.py:213

Member Data Documentation

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::b_pC_pi_ptmax

Definition at line 72 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::b_pC_pi_ptmin

Definition at line 72 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::b_pC_pi_xfmax

Definition at line 72 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::b_pC_pi_xfmin

Definition at line 72 of file ThinTargetBins.h.

ThinTargetBins * NeutrinoFluxReweight::ThinTargetBins::instance = 0
staticprivate

Definition at line 104 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mat_scal_ptmax

Definition at line 88 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mat_scal_ptmin

Definition at line 88 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mat_scal_xfmax

Definition at line 88 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mat_scal_xfmin

Definition at line 88 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::meson_inc_ptmax

Definition at line 85 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::meson_inc_ptmin

Definition at line 85 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::meson_inc_xfmax

Definition at line 85 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::meson_inc_xfmin

Definition at line 85 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mipp_pC_k_ptmax

Definition at line 82 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mipp_pC_k_ptmin

Definition at line 82 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mipp_pC_k_pzmax

Definition at line 82 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::mipp_pC_k_pzmin

Definition at line 82 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_k_ptmax

Definition at line 81 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_k_ptmin

Definition at line 81 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_k_xfmax

Definition at line 81 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_k_xfmin

Definition at line 81 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_n_xfmax

Definition at line 78 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_n_xfmin

Definition at line 78 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_p_ptmax

Definition at line 75 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_p_ptmin

Definition at line 75 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_p_xfmax

Definition at line 75 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_p_xfmin

Definition at line 75 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_pi_ptmax

Definition at line 71 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_pi_ptmin

Definition at line 71 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_pi_xfmax

Definition at line 71 of file ThinTargetBins.h.

std::vector<double> NeutrinoFluxReweight::ThinTargetBins::pC_pi_xfmin

Definition at line 71 of file ThinTargetBins.h.


The documentation for this class was generated from the following files: