Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ppfx
src
TargetData.cpp
Go to the documentation of this file.
1
2
#include "
TargetData.h
"
3
#include <iomanip>
4
5
namespace
NeutrinoFluxReweight
{
6
7
TargetData::TargetData
(){
8
9
Tar_pdg
= 0;
10
11
Px
= -1000.;
12
Py
= -1000.;
13
Pz
= -1000.;
14
Pt
= -1000.;
15
Theta
= -1000.;
16
17
Vx
= -1000.;
18
Vy
= -1000.;
19
Vz
= -1000.;
20
21
Idx_ancestry
= -1;
22
23
}
24
25
TargetData::TargetData
(
double
tarMom[],
int
tarPdg,
double
position
[],
int
anc_idx){
26
27
TargetData::Tar_pdg
= tarPdg;
28
29
TargetData::Px
= tarMom[0];
30
TargetData::Py
= tarMom[1];
31
TargetData::Pz
= tarMom[2];
32
TargetData::Pt
= std::sqrt(tarMom[0]*tarMom[0] + tarMom[1]*tarMom[1]);
33
TargetData::Theta
= std::atan(
TargetData::Pt
/
TargetData::Pz
);
34
35
TargetData::Vx
= position[0];
36
TargetData::Vy
= position[1];
37
TargetData::Vz
= position[2];
38
39
Idx_ancestry
= anc_idx;
40
}
41
42
//----------------------------------------------------------------------
43
TargetData::~TargetData
(){
44
45
}
46
std::ostream&
TargetData::print
(std::ostream& os)
const
{
47
48
using namespace
std
;
49
50
os<<
"pid:"
<<
setw
(5)<<
Tar_pdg
51
<<
"|p3:"
<<setiosflags(ios::fixed) <<
setprecision
(2);
52
os<<
Px
<<
","
<<
Py
<<
","
<<
Pz
;
53
os <<
"|v3:"
;
54
os<<
Vx
<<
","
<<
Vy
<<
","
<<
Vz
;
55
// os<<endl;
56
return
os;
57
}
58
59
}
NeutrinoFluxReweight::TargetData::Idx_ancestry
int Idx_ancestry
The index of the hadron leaving the target in the ancestry chain.
Definition:
TargetData.h:51
NeutrinoFluxReweight::TargetData::~TargetData
virtual ~TargetData()
Definition:
TargetData.cpp:43
MakeVectorFile.position
position
Definition:
MakeVectorFile.py:80
NeutrinoFluxReweight::TargetData::Vz
double Vz
The z position of the hadron leaving the target.
Definition:
TargetData.h:48
NeutrinoFluxReweight::TargetData::Theta
double Theta
Angle (rad) of the particle.
Definition:
TargetData.h:36
std
STL namespace.
NeutrinoFluxReweight::TargetData::TargetData
TargetData()
Default Constructor.
Definition:
TargetData.cpp:7
NeutrinoFluxReweight::TargetData::Tar_pdg
int Tar_pdg
pdg code of the particle
Definition:
TargetData.h:24
NeutrinoFluxReweight::TargetData::print
std::ostream & print(std::ostream &os) const
Definition:
TargetData.cpp:46
setprecision
Q_EXPORT QTSManip setprecision(int p)
Definition:
qtextstream.h:343
NeutrinoFluxReweight::TargetData::Px
double Px
P_{x} (GeV/c) of the particle.
Definition:
TargetData.h:30
setw
Q_EXPORT QTSManip setw(int w)
Definition:
qtextstream.h:331
NeutrinoFluxReweight::TargetData::Vx
double Vx
The x position of the hadron leaving the target.
Definition:
TargetData.h:42
NeutrinoFluxReweight::TargetData::Pt
double Pt
Transversal momentum (GeV/c) of the particle.
Definition:
TargetData.h:39
NeutrinoFluxReweight::TargetData::Pz
double Pz
Longitudinal momentum (GeV/c) of the particle.
Definition:
TargetData.h:27
TargetData.h
NeutrinoFluxReweight::TargetData::Py
double Py
P_{y} (GeV/c) of the particle.
Definition:
TargetData.h:33
NeutrinoFluxReweight
Definition:
AbsorptionDPIPReweighter.h:12
NeutrinoFluxReweight::TargetData::Vy
double Vy
The y position of the hadron leaving the target.
Definition:
TargetData.h:45
Generated by
1.8.11