Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
and
there
.
Show more breadcrumbs
np
nptool
Commits
0e25ff17
Commit
0e25ff17
authored
3 years ago
by
flavigny
Browse files
Options
Downloads
Patches
Plain Diff
*Cleanup and comment TReactionConditions aboutangle definitions
parent
b454f8f7
No related branches found
No related tags found
No related merge requests found
Pipeline
#151680
passed
3 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPLib/Physics/TReactionConditions.cxx
+11
-4
11 additions, 4 deletions
NPLib/Physics/TReactionConditions.cxx
NPLib/Physics/TReactionConditions.h
+29
-25
29 additions, 25 deletions
NPLib/Physics/TReactionConditions.h
with
40 additions
and
29 deletions
NPLib/Physics/TReactionConditions.cxx
+
11
−
4
View file @
0e25ff17
...
...
@@ -72,7 +72,8 @@ void TReactionConditions::Dump() const{
cout
<<
"
\t
Phi_Y: "
<<
fRC_Beam_Emittance_PhiY
<<
endl
;
cout
<<
"
\t
Theta: "
<<
fRC_Beam_Emittance_Theta
<<
endl
;
cout
<<
"
\t
Phi: "
<<
fRC_Beam_Emittance_Phi
<<
endl
;
cout
<<
"
\t
Direction: "
;
GetBeamDirection
().
Print
();
// Beam status at the initial interaction point
cout
<<
"
\t
---- Interaction Point ---- "
<<
endl
;
...
...
@@ -87,17 +88,23 @@ void TReactionConditions::Dump() const{
<<
fRC_Internal_Momentum
.
Y
()
<<
" ; "
<<
fRC_Internal_Momentum
.
Z
()
<<
")"
<<
endl
;
TVector3
*
emitted
=
new
TVector3
();
// emmitted particle
unsigned
int
size
=
fRC_Particle_Name
.
size
();
for
(
unsigned
int
i
=
0
;
i
<
size
;
i
++
){
cout
<<
"
\t
---- Particle "
<<
i
<<
" ---- "
<<
endl
;
cout
<<
"
\t
Particle Name: "
<<
fRC_Particle_Name
[
i
]
<<
endl
;
cout
<<
"
\t
Kinetic Energy: "
<<
fRC_Kinetic_Energy
[
i
]
<<
endl
;
cout
<<
"
\t
Momentum Direction: ( "
cout
<<
"
\t
Kinetic Energy: "
<<
fRC_Kinetic_Energy
[
i
]
<<
endl
;
cout
<<
"
\t
Angles in beam frame (along Z)"
<<
endl
;
cout
<<
"
\t
Theta: "
<<
fRC_Theta
[
i
]
<<
endl
;
cout
<<
"
\t
Phi: "
<<
fRC_Phi
[
i
]
<<
endl
;
cout
<<
"
\t
Momentum Direction in world frame: ( "
<<
fRC_Momentum_Direction_X
[
i
]
<<
" ; "
<<
fRC_Momentum_Direction_Y
[
i
]
<<
" ; "
<<
fRC_Momentum_Direction_Z
[
i
]
<<
")"
<<
endl
;
emitted
->
SetXYZ
(
fRC_Momentum_Direction_X
[
i
],
fRC_Momentum_Direction_Y
[
i
],
fRC_Momentum_Direction_Z
[
i
]);
cout
<<
"
\t
ThetaWorld: "
<<
emitted
->
Theta
()
*
180.
/
pi
<<
endl
;
cout
<<
"
\t
PhiWorld: "
<<
emitted
->
Phi
()
*
180.
/
pi
<<
endl
;
}
...
...
This diff is collapsed.
Click to expand it.
NPLib/Physics/TReactionConditions.h
+
29
−
25
View file @
0e25ff17
...
...
@@ -48,27 +48,33 @@ private:
// Beam beam parameter
string
fRC_Beam_Particle_Name
;
double
fRC_Beam_Emittance_ThetaX
;
double
fRC_Beam_Emittance_PhiY
;
double
fRC_Beam_Emittance_Theta
;
double
fRC_Beam_Emittance_Phi
;
double
fRC_Beam_Reaction_Energy
;
double
fRC_Beam_Emittance_ThetaX
;
//beam angle between Pxz and Z axis
double
fRC_Beam_Emittance_PhiY
;
//beam angle between Pyz and Z axis
double
fRC_Beam_Emittance_Theta
;
//spher. theta (betw. beam dir. and Z axis)
double
fRC_Beam_Emittance_Phi
;
//spher. phi (betw. Pyz and X axis)
double
fRC_Beam_Reaction_Energy
;
//beam kinetic energy at vertex
//Reaction vertex coordinates
double
fRC_Vertex_Position_X
;
double
fRC_Vertex_Position_Y
;
double
fRC_Vertex_Position_Z
;
//Center of mass angle for the reaction
double
fRC_ThetaCM
;
//Two-Body reaction: Exc. energy of the two products
double
fRC_ExcitationEnergy3
;
double
fRC_ExcitationEnergy4
;
double
fRC_ThetaCM
;
//QFS reacion only: Internal mom. of the removed particle
TVector3
fRC_Internal_Momentum
;
// emmitted particles
// Emitted reaction products properties
vector
<
string
>
fRC_Particle_Name
;
vector
<
double
>
fRC_Theta
;
vector
<
double
>
fRC_Phi
;
vector
<
double
>
fRC_Theta
;
//in the frame with beam on Z axis
vector
<
double
>
fRC_Phi
;
//in the frame with beam on Z axis
vector
<
double
>
fRC_Kinetic_Energy
;
vector
<
double
>
fRC_Momentum_Direction_X
;
vector
<
double
>
fRC_Momentum_Direction_Y
;
vector
<
double
>
fRC_Momentum_Direction_Z
;
vector
<
double
>
fRC_Momentum_Direction_X
;
//in the world frame
vector
<
double
>
fRC_Momentum_Direction_Y
;
//in the world frame
vector
<
double
>
fRC_Momentum_Direction_Z
;
//in the world frame
public:
TReactionConditions
();
...
...
@@ -139,31 +145,29 @@ public:
double
GetMomentumDirectionX
(
const
int
&
i
)
const
{
return
fRC_Momentum_Direction_X
[
i
];}
//!
double
GetMomentumDirectionY
(
const
int
&
i
)
const
{
return
fRC_Momentum_Direction_Y
[
i
];}
//!
double
GetMomentumDirectionZ
(
const
int
&
i
)
const
{
return
fRC_Momentum_Direction_Z
[
i
];}
//!
TVector3
GetParticleMomentum
(
const
int
&
i
)
const
{
return
TVector3
(
fRC_Momentum_Direction_X
[
i
],
fRC_Momentum_Direction_Y
[
i
],
fRC_Momentum_Direction_Z
[
i
]).
Unit
();}
//!
TVector3
GetBeamDirection
()
const
;
TVector3
GetParticleDirection
(
const
int
i
)
const
;
double
GetThetaLab_WorldFrame
(
const
int
i
)
const
{
double
GetTheta_WorldFrame
(
const
int
i
)
const
{
return
(
GetParticleDirection
(
i
).
Theta
())
/
deg
;
}
double
GetThetaLab_BeamFrame
(
const
int
i
)
const
{
return
(
GetParticleDirection
(
i
).
Angle
(
GetBeamDirection
()))
/
deg
;
}
double
GetPhiLab_WorldFrame
(
const
int
i
)
const
{
double
GetPhi_WorldFrame
(
const
int
i
)
const
{
return
(
M_PI
+
GetParticleDirection
(
i
).
Phi
())
/
deg
;
// to have Phi in [0,2pi]] and not [-pi,pi]]
}
double
GetPhiLab_BeamFrame
(
const
int
i
)
const
{
//Two following methods should return angles identical as GetTheta() and GetPhi()
//spherical angles when beam axis along Z
// Only used for consistency checks
double
GetTheta_BeamFrame
(
const
int
i
)
const
{
return
(
GetParticleDirection
(
i
).
Angle
(
GetBeamDirection
()))
/
deg
;
}
double
GetPhi_BeamFrame
(
const
int
i
)
const
{
TVector3
rot
=
GetParticleDirection
(
i
);
rot
.
RotateUz
(
GetBeamDirection
());
return
(
M_PI
+
rot
.
Phi
())
/
deg
;
}
unsigned
int
GetEmittedMult
()
const
{
return
fRC_Particle_Name
.
size
();}
ClassDef
(
TReactionConditions
,
1
)
// TReactionConditions structure
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment