Skip to content
Snippets Groups Projects
Commit 0e25ff17 authored by flavigny's avatar flavigny
Browse files

*Cleanup and comment TReactionConditions aboutangle definitions

parent b454f8f7
No related branches found
No related tags found
No related merge requests found
Pipeline #151680 passed
......@@ -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;
}
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment