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

The information about a hadronic interaction needed to calculate weights. More...

#include <InteractionData.h>

Public Member Functions

 InteractionData ()
 Default Constructor. More...
 
 InteractionData (int genid, double incMom[], int incPdg, double prodMom[], int prodPdg, std::string volname, std::string procname, double vtx[])
 Constructor given kinematic of the interaction. More...
 
virtual ~InteractionData ()
 
std::ostream & print (std::ostream &os) const
 

Public Attributes

int gen
 generation index More...
 
int Inc_pdg
 pdg code of the incident particle More...
 
int Prod_pdg
 pdg code of the produced particle More...
 
double Inc_P
 Momentum magnitude of the incident particle. More...
 
double Inc_P4 [4]
 Momentum 4 vector of the incident particle, E=p[3]. More...
 
double Prod_P
 Momentum magnitude of the produced particle. More...
 
double Prod_P4 [4]
 Momentum 4 vector of the produced particle, E=p[3]. More...
 
double Vtx [3]
 Location of the interaction. More...
 
double Inc_Mass
 Mass of the incident particle. More...
 
double Prod_Mass
 Mass of the produced particle. More...
 
double xF
 Feynmann-x of the produced particle: $ x_{F} = 2P_{L}/\sqrt(s) $. More...
 
double Pz
 Longitudinal momentum (GeV/c) of the produced particle. More...
 
double Theta
 Angle (rad) of the produced particle. More...
 
double Pt
 Transversal momentum (GeV/c) of the produced particle. More...
 
double Ecm
 Center of mass energy of the collision indident particle - nuclear proton. More...
 
double Betacm
 $ \beta_{CM} $ More...
 
double Gammacm
 $ \gamma_{CM} $ More...
 
std::string Vol
 Interaction volume. More...
 
std::string Proc
 Interaction process. More...
 

Private Attributes

TDatabasePDG * particle
 

Detailed Description

The information about a hadronic interaction needed to calculate weights.

Information about the kinematics of the interaction, the identity of the projectile and target, the producted particles, etc. This looks like KinProd to me.

Definition at line 19 of file InteractionData.h.

Constructor & Destructor Documentation

NeutrinoFluxReweight::InteractionData::InteractionData ( )

Default Constructor.

Definition at line 8 of file InteractionData.cpp.

8  {
9 
10  particle = TDatabasePDG::Instance();
11 
12  gen = 0;
13  Inc_pdg = 0;
14  Prod_pdg= 0;
15 
16  Inc_P = -1000.;
17  Prod_P = -1000.;
18  Inc_Mass = -1000.;
19  Prod_Mass = -1000.;
20 
21  for(int i=0; i<4; i++){
22  Inc_P4[i]=0;
23  Prod_P4[i]=0;
24  if(i<3) Vtx[i]=0;
25  }
26 
27  xF = -1000.;
28  Pz = -1000.;
29  Theta = -1000.;
30  Pt = -1000.;
31 
32  Ecm = -1000.;
33  Betacm = -1000.;
34  Gammacm = -1000.;
35 
36  Vol = "NoDefinied";
37 
38  }
double Ecm
Center of mass energy of the collision indident particle - nuclear proton.
int Prod_pdg
pdg code of the produced particle
double Pt
Transversal momentum (GeV/c) of the produced particle.
double Vtx[3]
Location of the interaction.
double Pz
Longitudinal momentum (GeV/c) of the produced particle.
double Inc_P4[4]
Momentum 4 vector of the incident particle, E=p[3].
double Prod_P
Momentum magnitude of the produced particle.
double xF
Feynmann-x of the produced particle: .
double Prod_P4[4]
Momentum 4 vector of the produced particle, E=p[3].
double Inc_P
Momentum magnitude of the incident particle.
std::string Vol
Interaction volume.
double Theta
Angle (rad) of the produced particle.
double Inc_Mass
Mass of the incident particle.
int Inc_pdg
pdg code of the incident particle
double Prod_Mass
Mass of the produced particle.
NeutrinoFluxReweight::InteractionData::InteractionData ( int  genid,
double  incMom[],
int  incPdg,
double  prodMom[],
int  prodPdg,
std::string  volname,
std::string  procname,
double  vtx[] 
)

Constructor given kinematic of the interaction.

Definition at line 40 of file InteractionData.cpp.

40  {
41 
42  particle = TDatabasePDG::Instance();
43  // Z direction along the direction of the incident particle
44  // Cos between incMom and prodMom:
45  // The units are in GeV
46 
47  InteractionData::gen = genid;
48 
49  InteractionData::Inc_pdg = incPdg;
50  InteractionData::Prod_pdg = prodPdg;
51 
52  InteractionData::Inc_P = std::sqrt(incMom[0]*incMom[0] + incMom[1]*incMom[1] +incMom[2]*incMom[2]);
53  InteractionData::Prod_P = std::sqrt(prodMom[0]*prodMom[0] + prodMom[1]*prodMom[1] +prodMom[2]*prodMom[2]);
54 
55  double cos_theta = (incMom[0]*prodMom[0]+incMom[1]*prodMom[1]+incMom[2]*prodMom[2])/(Inc_P*Prod_P);
56  double sin_theta = std::sqrt(1.-pow(cos_theta,2.0));
57 
58  //Theta in rads:
59  InteractionData::Theta = std::acos(cos_theta);
60 
61  InteractionData::Pt = Prod_P*sin_theta;
62  InteractionData::Pz = Prod_P*cos_theta;
63 
64  if(Inc_pdg != 1000010020)Inc_Mass = particle->GetParticle(Inc_pdg)->Mass();
65  else {Inc_Mass = 1.875;}
66 
67  if(Prod_pdg != 1000010020)Prod_Mass = particle->GetParticle(Prod_pdg)->Mass();
68  else{Prod_Mass = 1.875;}
69 
70  InteractionData::Inc_Mass = particle->GetParticle(Inc_pdg)->Mass();
71  InteractionData::Prod_Mass = particle->GetParticle(Prod_pdg)->Mass();
72 
73 
74  //Ecm, gamma:
75  double inc_E_lab = std::sqrt(Inc_P*Inc_P + pow(Inc_Mass,2));
76  InteractionData::Ecm = std::sqrt(2.*pow(Inc_Mass,2)+2.*inc_E_lab*Inc_Mass);
77  InteractionData::Betacm = std::sqrt(pow(inc_E_lab,2)-pow(Inc_Mass,2.0))/(inc_E_lab + Inc_Mass);
78  InteractionData::Gammacm = 1./std::sqrt(1.-pow(Betacm,2.0));
79 
80  //xF:
81  double prod_E_lab = std::sqrt(Prod_P*Prod_P + pow(Prod_Mass,2));
82  double PL = Gammacm*(Pz-Betacm*prod_E_lab); // PL is measured in CM frame
83  InteractionData::xF = PL*2./Ecm;
84 
85  //4 momenta:
86  Inc_P4[3]=inc_E_lab;
87  Prod_P4[3]=prod_E_lab;
88  for(int i=0; i<3; i++) {Inc_P4[i]=incMom[i]; Prod_P4[i]=prodMom[i];}
89 
90 
91  //Volume:
92  InteractionData::Vol = volname;
93 
94  //Process:
95  InteractionData::Proc = procname;
96 
97  //Vertex:
98  for(int i=0; i<3; i++) Vtx[i]=vtx[i];
99 
100  }
double Ecm
Center of mass energy of the collision indident particle - nuclear proton.
constexpr T pow(T x)
Definition: pow.h:72
int Prod_pdg
pdg code of the produced particle
double Pt
Transversal momentum (GeV/c) of the produced particle.
double Vtx[3]
Location of the interaction.
double Pz
Longitudinal momentum (GeV/c) of the produced particle.
double Inc_P4[4]
Momentum 4 vector of the incident particle, E=p[3].
double Prod_P
Momentum magnitude of the produced particle.
double xF
Feynmann-x of the produced particle: .
double Prod_P4[4]
Momentum 4 vector of the produced particle, E=p[3].
std::string Proc
Interaction process.
double Inc_P
Momentum magnitude of the incident particle.
std::string Vol
Interaction volume.
double Theta
Angle (rad) of the produced particle.
double Inc_Mass
Mass of the incident particle.
int Inc_pdg
pdg code of the incident particle
double Prod_Mass
Mass of the produced particle.
NeutrinoFluxReweight::InteractionData::~InteractionData ( )
virtual

Definition at line 103 of file InteractionData.cpp.

103  {
104 
105  }

Member Function Documentation

std::ostream & NeutrinoFluxReweight::InteractionData::print ( std::ostream &  os) const

Definition at line 107 of file InteractionData.cpp.

107  {
108  using namespace std;
109  os<<"in:"<<setw(5)<<Inc_pdg
110  <<"|p3:";
111  for(int i=0; i<3; i++) {
112  os<<setiosflags(ios::fixed) << setprecision(2)<<setw(6)<<Inc_P4[i]<<" ";
113  }
114  os<<"||out:"<<setw(5)<<Prod_pdg
115  <<"|p3:"<<setiosflags(ios::fixed) << setprecision(2);
116  for(int i=0; i<3; i++) {
117  os<<setiosflags(ios::fixed) << setprecision(2)<<setw(6)<<Prod_P4[i]<<" ";
118  }
119  os <<"|v3:";
120  for(int i=0; i<3; i++) {
121  os<<setiosflags(ios::fixed) << setprecision(2)<<setw(5)<<Vtx[i]<<" ";
122  }
123  os<<"xF,pT:"<<xF<<","<<Pt;
124  os<<endl;
125  return os;
126  }
int Prod_pdg
pdg code of the produced particle
double Pt
Transversal momentum (GeV/c) of the produced particle.
double Vtx[3]
Location of the interaction.
STL namespace.
double Inc_P4[4]
Momentum 4 vector of the incident particle, E=p[3].
Q_EXPORT QTSManip setprecision(int p)
Definition: qtextstream.h:343
double xF
Feynmann-x of the produced particle: .
double Prod_P4[4]
Momentum 4 vector of the produced particle, E=p[3].
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
int Inc_pdg
pdg code of the incident particle
QTextStream & endl(QTextStream &s)

Member Data Documentation

double NeutrinoFluxReweight::InteractionData::Betacm

$ \beta_{CM} $

Definition at line 77 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Ecm

Center of mass energy of the collision indident particle - nuclear proton.

Definition at line 74 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Gammacm

$ \gamma_{CM} $

Definition at line 80 of file InteractionData.h.

int NeutrinoFluxReweight::InteractionData::gen

generation index

Definition at line 32 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Inc_Mass

Mass of the incident particle.

Definition at line 56 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Inc_P

Momentum magnitude of the incident particle.

Definition at line 41 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Inc_P4[4]

Momentum 4 vector of the incident particle, E=p[3].

Definition at line 44 of file InteractionData.h.

int NeutrinoFluxReweight::InteractionData::Inc_pdg

pdg code of the incident particle

Definition at line 35 of file InteractionData.h.

TDatabasePDG* NeutrinoFluxReweight::InteractionData::particle
private

Definition at line 91 of file InteractionData.h.

std::string NeutrinoFluxReweight::InteractionData::Proc

Interaction process.

Definition at line 86 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Prod_Mass

Mass of the produced particle.

Definition at line 59 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Prod_P

Momentum magnitude of the produced particle.

Definition at line 47 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Prod_P4[4]

Momentum 4 vector of the produced particle, E=p[3].

Definition at line 50 of file InteractionData.h.

int NeutrinoFluxReweight::InteractionData::Prod_pdg

pdg code of the produced particle

Definition at line 38 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Pt

Transversal momentum (GeV/c) of the produced particle.

Definition at line 71 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Pz

Longitudinal momentum (GeV/c) of the produced particle.

Definition at line 65 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Theta

Angle (rad) of the produced particle.

Definition at line 68 of file InteractionData.h.

std::string NeutrinoFluxReweight::InteractionData::Vol

Interaction volume.

Definition at line 83 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::Vtx[3]

Location of the interaction.

Definition at line 53 of file InteractionData.h.

double NeutrinoFluxReweight::InteractionData::xF

Feynmann-x of the produced particle: $ x_{F} = 2P_{L}/\sqrt(s) $.

Definition at line 62 of file InteractionData.h.


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