ParticlesThroughVolumesData.cpp
Go to the documentation of this file.
1 
3 #include <iomanip>
4 
5 namespace NeutrinoFluxReweight{
6 
8 
9  //!default values:
10  Pdgs[0] = 0;
11  Pdgs[1] = 0;
12  Pdgs[2] = 0;
13 
14  AmountMat[0] = -1.0;
15  AmountMat[1] = -1.0;
16  AmountMat[2] = -1.0;
17 
18  Moms[0] = 0.0;
19  Moms[1] = 0.0;
20  Moms[2] = 0.0;
21 
22  Vol = "None";
23  }
24 
25  ParticlesThroughVolumesData::ParticlesThroughVolumesData(int ptv_pdg[], double ptv_amount_mat[],double ptv_mom[],std::string ptv_vol){
26 
27  //!I assumed arrays of dimmension 3:
28  ParticlesThroughVolumesData::Pdgs[0] = ptv_pdg[0];
29  ParticlesThroughVolumesData::Pdgs[1] = ptv_pdg[1];
30  ParticlesThroughVolumesData::Pdgs[2] = ptv_pdg[2];
31 
32  ParticlesThroughVolumesData::AmountMat[0] = ptv_amount_mat[0];
33  ParticlesThroughVolumesData::AmountMat[1] = ptv_amount_mat[1];
34  ParticlesThroughVolumesData::AmountMat[2] = ptv_amount_mat[2];
35 
36  ParticlesThroughVolumesData::Moms[0] = ptv_mom[0];
37  ParticlesThroughVolumesData::Moms[1] = ptv_mom[1];
38  ParticlesThroughVolumesData::Moms[2] = ptv_mom[2];
39 
41 
42  }
43 
44  //----------------------------------------------------------------------
46 
47  }
48  std::ostream& ParticlesThroughVolumesData::print(std::ostream& os) const {
49 
50  using namespace std;
51 
52  os<<"Vol: "<<Vol<<endl;
53  for(int ii=0;ii<3;ii++){
54  os<<"pid:"<<setw(5)<<Pdgs[ii]<<
55  "|dist, mom: "<<setiosflags(ios::fixed) << setprecision(2);
56  os<<AmountMat[ii]<<","<<Moms[ii];
57  os<<endl;
58  }
59  return os;
60  }
61 
62 }
std::string string
Definition: nybbler.cc:12
STL namespace.
Q_EXPORT QTSManip setprecision(int p)
Definition: qtextstream.h:343
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
QTextStream & endl(QTextStream &s)