Commit 37875911 authored by Valérian Alcindor's avatar Valérian Alcindor
Browse files

Several updates. 1) enable possiblity to record more information from the

tracks using Stepping Action. 2) Add to the p2p reaction the possibility
for the heavy nucleus to decay using the ABLA deexcitation code included
  in G4.
parent ad2e4305
Pipeline #134880 passed with stages
in 7 minutes and 13 seconds
......@@ -14,6 +14,8 @@ add_custom_command(OUTPUT NPEnergyLossDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scrip
add_custom_command(OUTPUT TInitialConditionsDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh TInitialConditions.h TInitialConditionsDict.cxx TInitialConditions.rootmap libNPInitialConditions.so DEPENDS TInitialConditions.h)
add_custom_command(OUTPUT TTrackInfoDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh TTrackInfo.h TTrackInfoDict.cxx TTrackInfo.rootmap libNPTrackInfo.so DEPENDS TTrackInfo.h)
add_custom_command(OUTPUT TInteractionCoordinatesDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh TInteractionCoordinates.h TInteractionCoordinatesDict.cxx TInteractionCoordinates.rootmap libNPInteractionCoordinates.so DEPENDS TInteractionCoordinates.h)
add_custom_command(OUTPUT TReactionConditionsDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh TReactionConditions.h TReactionConditionsDict.cxx TReactionConditions.rootmap libNPReactionConditions.so DEPENDS TReactionConditions.h)
......@@ -26,6 +28,9 @@ target_link_libraries(NPPhysics ${ROOT_LIBRARIES} Physics NPCore)
add_library(NPInitialConditions SHARED TInitialConditions.cxx TInitialConditionsDict.cxx )
target_link_libraries(NPInitialConditions ${ROOT_LIBRARIES} )
add_library(NPTrackInfo SHARED TTrackInfo.cxx TTrackInfoDict.cxx )
target_link_libraries(NPTrackInfo ${ROOT_LIBRARIES} )
add_library(NPInteractionCoordinates SHARED TInteractionCoordinates.cxx TInteractionCoordinatesDict.cxx)
target_link_libraries(NPInteractionCoordinates ${ROOT_LIBRARIES} )
......@@ -36,4 +41,4 @@ add_library(NPFissionConditions SHARED TFissionConditions.cxx TFissionConditions
target_link_libraries(NPFissionConditions ${ROOT_LIBRARIES} )
install(FILES GEF.h NPFissionDecay.h NPDecay.h NPBeam.h NPEnergyLoss.h NPFunction.h NPParticle.h NPNucleus.h NPReaction.h NPQFS.h TInitialConditions.h TInteractionCoordinates.h TReactionConditions.h TFissionConditions.h DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY})
install(FILES GEF.h NPFissionDecay.h NPDecay.h NPBeam.h NPEnergyLoss.h NPFunction.h NPParticle.h NPNucleus.h NPReaction.h NPQFS.h TInitialConditions.h TTrackInfo.h TInteractionCoordinates.h TReactionConditions.h TFissionConditions.h DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY})
......@@ -374,73 +374,88 @@ namespace NPL{
string NumberOfMass ;
string Nucleid;
bool g4_exc = false;
for (unsigned int i = 0; i < OriginalName.length(); i++) {
ostringstream character;
character << OriginalName[i];
if (character.str()=="0") NumberOfMass+="0";
else if (character.str()=="1") NumberOfMass+="1";
else if (character.str()=="2") NumberOfMass+="2";
else if (character.str()=="3") NumberOfMass+="3";
else if (character.str()=="4") NumberOfMass+="4";
else if (character.str()=="5") NumberOfMass+="5";
else if (character.str()=="6") NumberOfMass+="6";
else if (character.str()=="7") NumberOfMass+="7";
else if (character.str()=="8") NumberOfMass+="8";
else if (character.str()=="9") NumberOfMass+="9";
// std::cout << OriginalName << " "<< OriginalName[i]<< std::endl;
else if (character.str()=="A") Nucleid+="A";
else if (character.str()=="B") Nucleid+="B";
else if (character.str()=="C") Nucleid+="C";
else if (character.str()=="D") Nucleid+="D";
else if (character.str()=="E") Nucleid+="E";
else if (character.str()=="F") Nucleid+="F";
else if (character.str()=="G") Nucleid+="G";
else if (character.str()=="H") Nucleid+="H";
else if (character.str()=="I") Nucleid+="I";
else if (character.str()=="J") Nucleid+="J";
else if (character.str()=="K") Nucleid+="K";
else if (character.str()=="L") Nucleid+="L";
else if (character.str()=="M") Nucleid+="M";
else if (character.str()=="N") Nucleid+="N";
else if (character.str()=="O") Nucleid+="O";
else if (character.str()=="P") Nucleid+="P";
else if (character.str()=="Q") Nucleid+="Q";
else if (character.str()=="R") Nucleid+="R";
else if (character.str()=="S") Nucleid+="S";
else if (character.str()=="T") Nucleid+="T";
else if (character.str()=="U") Nucleid+="U";
else if (character.str()=="V") Nucleid+="V";
else if (character.str()=="W") Nucleid+="W";
else if (character.str()=="X") Nucleid+="X";
else if (character.str()=="Y") Nucleid+="Y";
else if (character.str()=="Z") Nucleid+="Z";
// To remove Nuclei excitation from the name
if (character.str()=="["){
g4_exc=true;
}
if (character.str()=="]"){
g4_exc=false;
}
else if (character.str()=="a") Nucleid+="a";
else if (character.str()=="b") Nucleid+="b";
else if (character.str()=="c") Nucleid+="c";
else if (character.str()=="d") Nucleid+="d";
else if (character.str()=="e") Nucleid+="e";
else if (character.str()=="f") Nucleid+="f";
else if (character.str()=="g") Nucleid+="g";
else if (character.str()=="h") Nucleid+="h";
else if (character.str()=="i") Nucleid+="i";
else if (character.str()=="j") Nucleid+="j";
else if (character.str()=="k") Nucleid+="k";
else if (character.str()=="l") Nucleid+="l";
else if (character.str()=="m") Nucleid+="m";
else if (character.str()=="n") Nucleid+="n";
else if (character.str()=="o") Nucleid+="o";
else if (character.str()=="p") Nucleid+="p";
else if (character.str()=="q") Nucleid+="q";
else if (character.str()=="r") Nucleid+="r";
else if (character.str()=="s") Nucleid+="s";
else if (character.str()=="t") Nucleid+="t";
else if (character.str()=="u") Nucleid+="u";
else if (character.str()=="v") Nucleid+="v";
else if (character.str()=="w") Nucleid+="w";
else if (character.str()=="x") Nucleid+="x";
else if (character.str()=="y") Nucleid+="y";
else if (character.str()=="z") Nucleid+="z";
if(g4_exc == true){
continue;
}
if (character.str()=="0") NumberOfMass+="0";
else if (character.str()=="1") NumberOfMass+="1";
else if (character.str()=="2") NumberOfMass+="2";
else if (character.str()=="3") NumberOfMass+="3";
else if (character.str()=="4") NumberOfMass+="4";
else if (character.str()=="5") NumberOfMass+="5";
else if (character.str()=="6") NumberOfMass+="6";
else if (character.str()=="7") NumberOfMass+="7";
else if (character.str()=="8") NumberOfMass+="8";
else if (character.str()=="9") NumberOfMass+="9";
else if (character.str()=="A") Nucleid+="A";
else if (character.str()=="B") Nucleid+="B";
else if (character.str()=="C") Nucleid+="C";
else if (character.str()=="D") Nucleid+="D";
else if (character.str()=="E") Nucleid+="E";
else if (character.str()=="F") Nucleid+="F";
else if (character.str()=="G") Nucleid+="G";
else if (character.str()=="H") Nucleid+="H";
else if (character.str()=="I") Nucleid+="I";
else if (character.str()=="J") Nucleid+="J";
else if (character.str()=="K") Nucleid+="K";
else if (character.str()=="L") Nucleid+="L";
else if (character.str()=="M") Nucleid+="M";
else if (character.str()=="N") Nucleid+="N";
else if (character.str()=="O") Nucleid+="O";
else if (character.str()=="P") Nucleid+="P";
else if (character.str()=="Q") Nucleid+="Q";
else if (character.str()=="R") Nucleid+="R";
else if (character.str()=="S") Nucleid+="S";
else if (character.str()=="T") Nucleid+="T";
else if (character.str()=="U") Nucleid+="U";
else if (character.str()=="V") Nucleid+="V";
else if (character.str()=="W") Nucleid+="W";
else if (character.str()=="X") Nucleid+="X";
else if (character.str()=="Y") Nucleid+="Y";
else if (character.str()=="Z") Nucleid+="Z";
else if (character.str()=="a") Nucleid+="a";
else if (character.str()=="b") Nucleid+="b";
else if (character.str()=="c") Nucleid+="c";
else if (character.str()=="d") Nucleid+="d";
else if (character.str()=="e") Nucleid+="e";
else if (character.str()=="f") Nucleid+="f";
else if (character.str()=="g") Nucleid+="g";
else if (character.str()=="h") Nucleid+="h";
else if (character.str()=="i") Nucleid+="i";
else if (character.str()=="j") Nucleid+="j";
else if (character.str()=="k") Nucleid+="k";
else if (character.str()=="l") Nucleid+="l";
else if (character.str()=="m") Nucleid+="m";
else if (character.str()=="n") Nucleid+="n";
else if (character.str()=="o") Nucleid+="o";
else if (character.str()=="p") Nucleid+="p";
else if (character.str()=="q") Nucleid+="q";
else if (character.str()=="r") Nucleid+="r";
else if (character.str()=="s") Nucleid+="s";
else if (character.str()=="t") Nucleid+="t";
else if (character.str()=="u") Nucleid+="u";
else if (character.str()=="v") Nucleid+="v";
else if (character.str()=="w") Nucleid+="w";
else if (character.str()=="x") Nucleid+="x";
else if (character.str()=="y") Nucleid+="y";
else if (character.str()=="z") Nucleid+="z";
}
string FinalName=NumberOfMass+Nucleid;
......
......@@ -87,7 +87,7 @@ QFS::QFS(){
fPerpMomentumHist = NULL;
fParMomentumHist = NULL;
fDeexcitation = false;
}
////////////////////////////////////////////////////////////////////////////////
......@@ -174,6 +174,9 @@ void QFS::ReadConfigurationFile(NPL::InputParser parser){
TH1F* Partemp = Read1DProfile(file_par[0], file_par[1]);
SetParMomentumHist(Partemp);
}
if(blocks[i]->HasToken("Deexcitation")){
fDeexcitation = blocks[i]->GetInt("Deexcitation");
}
}
cout << "\033[0m" ;
......
......@@ -93,6 +93,7 @@ namespace NPL{
bool fshoot1; // shoot light ejectile &
bool fshoot2; // shoot light ejectile 2
bool fUseExInGeant4;
bool fDeexcitation;
public:
Particle GetParticle(string name, NPL::InputParser parser);
......@@ -182,6 +183,7 @@ namespace NPL{
bool GetShoot1() const {return fshoot1;}
bool GetShoot2() const {return fshoot2;}
bool GetShootB() const {return fshootB;}
bool GetDeexcitation() const {return fDeexcitation;}
double GetThetaCM() const {return fThetaCM;}
double GetPhiCM() const {return fPhiCM;}
double GetMomentumSigma() const {return fMomentumSigma;}
......
......@@ -35,6 +35,7 @@ TInteractionCoordinates::~TInteractionCoordinates()
{}
void TInteractionCoordinates::Clear(){
fDetected_Index.clear();
// Incident particle properties (before interactions in the target)
// Energy and Time
fDetected_Energy.clear();
......@@ -46,6 +47,13 @@ void TInteractionCoordinates::Clear(){
// Incident particle angles
fDetected_Angle_Theta.clear();
fDetected_Angle_Phi.clear();
fDetected_Particle_Name.clear();
fDetected_A.clear();
fDetected_Z.clear();
fDetected_Mass.clear();
fDetected_Charge.clear();
fDetected_Brho.clear();
}
......
......@@ -11,7 +11,8 @@
* Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr *
* *
* Creation Date : 10/06/09 *
* Last update : *
* Last update : 01/09/2021 Valerian Alcindor adding particle name to *
* interaction coordinate for easier g4 analysis simulation *
*---------------------------------------------------------------------------*
* Decription: This class mainly records the coordinates of interaction *
* between a particle and a detector. *
......@@ -25,14 +26,18 @@
#include "NPFunction.h"
#include <vector>
#include "TObject.h"
#include <iostream>
using namespace std ;
class TInteractionCoordinates : public TObject{
private:
// TrackID or index for correlations
vector<int> fDetected_Index;
// Detected particle properties (before interactions in the target)
// Energy and Time
vector<double> fDetected_Energy;
......@@ -44,6 +49,13 @@ class TInteractionCoordinates : public TObject{
// Particle angles
vector<double> fDetected_Angle_Theta;
vector<double> fDetected_Angle_Phi;
// Particle characteristics
vector<std::string> fDetected_Particle_Name;
vector<int> fDetected_A;
vector<int> fDetected_Z;
vector<double> fDetected_Mass;
vector<int> fDetected_Charge;
vector<double> fDetected_Brho;
public:
TInteractionCoordinates();
......@@ -64,6 +76,37 @@ class TInteractionCoordinates : public TObject{
fDetected_Angle_Phi.push_back(Phi);
}
void SetInteraction(const int& Index, const double& Energy, const double&Time, const double& PositionX, const double& PositionY, const double& PositionZ,const double& Theta, const double& Phi){
fDetected_Index.push_back(Index);
fDetected_Energy.push_back(Energy);
fDetected_Time.push_back(Time);
fDetected_Position_X.push_back(PositionX);
fDetected_Position_Y.push_back(PositionY);
fDetected_Position_Z.push_back(PositionZ);
fDetected_Angle_Theta.push_back(Theta);
fDetected_Angle_Phi.push_back(Phi);
}
void SetInteraction(const int& Index, const double& Energy, const double&Time, const double& PositionX, const double& PositionY, const double& PositionZ,const double& Theta, const double& Phi, const std::string &ParticleName, const int &A, const int &Z, const double &Mass, const int &Charge, const double &Brho){
fDetected_Index.push_back(Index);
fDetected_Energy.push_back(Energy);
fDetected_Time.push_back(Time);
fDetected_Position_X.push_back(PositionX);
fDetected_Position_Y.push_back(PositionY);
fDetected_Position_Z.push_back(PositionZ);
fDetected_Angle_Theta.push_back(Theta);
fDetected_Angle_Phi.push_back(Phi);
if(ParticleName != "e-" && ParticleName != "e+")
fDetected_Particle_Name.push_back(NPL::ChangeNameFromG4Standard(ParticleName));
else
fDetected_Particle_Name.push_back(ParticleName);
fDetected_A.push_back(A);
fDetected_Z.push_back(Z);
fDetected_Mass.push_back(Mass);
fDetected_Charge.push_back(Charge);
fDetected_Brho.push_back(Brho);
}
///////////////////// SETTERS ////////////////////////
// Incident particle properties (before interactions in the target)
// Vertex of interaction
......@@ -74,11 +117,18 @@ class TInteractionCoordinates : public TObject{
void SetDetectedAngleTheta(const double& AngleTheta) {fDetected_Angle_Theta.push_back(AngleTheta);}//!
void SetDetectedAnglePhi(const double& AnglePhi) {fDetected_Angle_Phi.push_back(AnglePhi);}//!
void SetDetectedParticleName(const std::string& ParticleName) {fDetected_Particle_Name.push_back(ParticleName);}//!
void SetDetectedA(const int& A) {fDetected_A.push_back(A);}//!
void SetDetectedZ(const int& Z) {fDetected_Z.push_back(Z);}//!
void SetDetectedMass(const double& Mass) {fDetected_Mass.push_back(Mass);}//!
void SetDetectedCharge(const int& Charge) {fDetected_Charge.push_back(Charge);}//!
void SetDetectedBrho(const double& Brho) {fDetected_Brho.push_back(Brho);}//!
///////////////////// GETTERS ////////////////////////
// Number of interactions (multiplicity)
int GetDetectedMultiplicity() const {return fDetected_Position_X.size();}
// Incident particle properties (before interactions in the target)
// Enery and Time
// Energy and Time
double GetEnergy(const int& i) const {return fDetected_Energy[i];}//!
double GetTime(const int& i) const {return fDetected_Time[i];}//!
// Vertex of interaction
......@@ -89,6 +139,14 @@ class TInteractionCoordinates : public TObject{
double GetDetectedAngleTheta(const int& i) const {return fDetected_Angle_Theta[i];}//!
double GetDetectedAnglePhi(const int& i) const {return fDetected_Angle_Phi[i];}//!
std::string GetParticleName(const int& i) const {return fDetected_Particle_Name[i];}//!
int GetA(const int& i) const {return fDetected_A[i];}//!
int GetZ(const int& i) const {return fDetected_Z[i];}//!
double GetMass(const int& i) const {return fDetected_Mass[i];}//!
int GetCharge(const int& i) const {return fDetected_Charge[i];}//!
double GetBrho(const int& i) const {return fDetected_Brho[i];}//!
ClassDef(TInteractionCoordinates, 2) // InteractionCoordinates structure
};
......
/*****************************************************************************
* Copyright (C) 2009-2016 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr *
* *
* Creation Date : 10/06/09 *
* Last update : 04/09/09 *
*---------------------------------------------------------------------------*
* Decription: This class records all the information concerning the event *
* generators, e.g. vertex of interaction, angles of emitted *
* particles... *
* This class derives from TObject (ROOT) and its aim is to be *
* stored in the output TTree of the G4 simulation *
*---------------------------------------------------------------------------*
* Comment: *
* + 04/09/09: Add private members for emittance (N. de Sereville) *
* *
* *
*****************************************************************************/
#include <iostream>
using namespace std;
#include "TTrackInfo.h"
ClassImp(TTrackInfo)
////////////////////////////////////////////////////////////////////////////////
TTrackInfo::TTrackInfo(){
}
////////////////////////////////////////////////////////////////////////////////
TTrackInfo::~TTrackInfo(){
}
////////////////////////////////////////////////////////////////////////////////
void TTrackInfo::Clear(){
// emmitted particle
fTI_Particle_Name.clear();
fTI_Volume_Name.clear();
fTI_Kinetic_Energy.clear();
fTI_Mass.clear();
fTI_Charge.clear();
fTI_Z.clear();
fTI_A.clear();
fTI_Brho.clear();
fTI_Momentum.clear();
fTI_Momentum_X.clear();
fTI_Momentum_Y.clear();
fTI_Momentum_Z.clear();
fTI_PositionX.clear();
fTI_PositionY.clear();
fTI_PositionZ.clear();
fTI_Index.clear();
fTI_Theta.clear();
fTI_Phi.clear();
}
////////////////////////////////////////////////////////////////////////////////
void TTrackInfo::Dump() const{
cout << "--------- Initial Condition Dump ---------" << endl ;
// emmitted particle
unsigned int size = fTI_Particle_Name.size();
for(unsigned int i = 0 ; i < size; i ++){
cout << "\t ---- Particle " << i << " ---- " << endl;
cout << "\t Particle Name" << fTI_Particle_Name[i] << endl;
cout << "\t Energy" << fTI_Kinetic_Energy[i] << endl;
cout << "\t Momentum Direction: ( "
<< fTI_Momentum_X[i] << " ; "
<< fTI_Momentum_Y[i] << " ; "
<< fTI_Momentum_Z[i] << ")" << endl;
}
}
////////////////////////////////////////////////////////////////////////////////
TVector3 TTrackInfo::GetParticleDirection (const int &i) const {
return TVector3( fTI_Momentum_X[i],
fTI_Momentum_Y[i],
fTI_Momentum_Z[i]).Unit();
}
#ifndef __TRACKINFO__
#define __TRACKINFO__
/*****************************************************************************
* Copyright (C) 2009-2016 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr *
* *
* Creation Date : 10/06/09 *
* Last update : 04/09/09 *
*---------------------------------------------------------------------------*
* Decription: This class records all the information concerning the event *
* generators, e.g. vertex of interaction, angles of emitted *
* particles... *
* This class derives from TObject (ROOT) and its aim is to be *
* stored in the output TTree of the G4 simulation *
*---------------------------------------------------------------------------*
* Comment: *
* + 04/09/09: Add private members for emittance (N. de Sereville) *
* *
* *
*****************************************************************************/
// STL Header
#include <cmath>
#include <string>
#include <vector>
using namespace std;
// Root Header
#include "TObject.h"
#include "TVector3.h"
// NPTOOL headers
#include "NPGlobalSystemOfUnits.h"
#include "NPPhysicalConstants.h"
#ifdef NP_SYSTEM_OF_UNITS_H
using namespace NPUNITS;
#endif
class TTrackInfo : public TObject {
private:
// Track info
public:
// Particles info
vector<string> fTI_Particle_Name;
vector<string> fTI_Volume_Name;
vector<double> fTI_Kinetic_Energy;
vector<double> fTI_Theta;
vector<double> fTI_Phi;
vector<double> fTI_Mass;
vector<double> fTI_Charge;
vector<double> fTI_Z;
vector<double> fTI_A;
vector<double> fTI_Brho;
// vector<double> fTI_Spin;
vector<TVector3> fTI_Momentum;
vector<double> fTI_Momentum_X;
vector<double> fTI_Momentum_Y;
vector<double> fTI_Momentum_Z;
vector<double> fTI_PositionX;
vector<double> fTI_PositionY;
vector<double> fTI_PositionZ;
vector<int> fTI_Index;
// vector<double> fTI_;
public:
TTrackInfo();
virtual ~TTrackInfo();
void Clear();
void Clear(const Option_t*) { Clear(); };
void Dump() const;
// emmitted particle
void SetParticleName(const string& Particle_Name) {
fTI_Particle_Name.push_back(Particle_Name);
}
void SetVolumeName(const string& Volume_Name) {
fTI_Volume_Name.push_back(Volume_Name);
}
void SetKineticEnergy(const double& Kinetic_Energy) {
fTI_Kinetic_Energy.push_back(Kinetic_Energy);
}
void SetTheta(const double& Theta) {
fTI_Theta.push_back(Theta);
}
void SetPhi(const double& Phi) {
fTI_Phi.push_back(Phi);
}
void SetMass(const double& Mass) { fTI_Mass.push_back(Mass); }
void SetCharge(const double& Charge) { fTI_Charge.push_back(Charge); }
void SetA(const double& A) { fTI_A.push_back(A); }
void SetZ(const double& Z) { fTI_Z.push_back(Z); }
void SetBrho(const double& Brho) { fTI_Brho.push_back(Brho); }
void SetMomentum(const TVector3& Momentum) {
fTI_Momentum.push_back(Momentum);
}
void SetMomentumX(const double& Momentum_X) {
fTI_Momentum_X.push_back(Momentum_X);
}
void SetMomentumY(const double& Momentum_Y) {
fTI_Momentum_Y.push_back(Momentum_Y);
}
void SetMomentumZ(const double& Momentum_Z) {
fTI_Momentum_Z.push_back(Momentum_Z);
}
void SetPositionX(const double& X) { fTI_PositionX.push_back(X); }
void SetPositionY(const double& Y) { fTI_PositionY.push_back(Y); }
void SetPositionZ(const double& Z) { fTI_PositionZ.push_back(Z); }
void SetIndex(const int& Index) { fTI_Index.push_back(Index); }
// emmitted particle
int GetParticleMultiplicity() const { return fTI_Kinetic_Energy.size(); }
string GetParticleName(const int& i) const { return fTI_Particle_Name[i]; }
double GetKineticEnergy(const int& i) const { return fTI_Kinetic_Energy[i]; }
TVector3 GetMomentum(const int& i) const { return fTI_Momentum[i]; }
double GetMomentumX(const int& i) const { return fTI_Momentum_X[i]; }
double GetMomentumY(const int& i) const { return fTI_Momentum_Y[i]; }
double GetMomentumZ(const int& i) const { return fTI_Momentum_Z[i]; }
TVector3 GetParticleDirection(const int& i) const;
double GetThetaLab_WorldFrame(const int& i) const {
return (GetParticleDirection(i).Angle(TVector3(0, 0, 1))) / deg;
}
unsigned int GetEmittedMult() const { return fTI_Particle_Name.size(); }
ClassDef(TTrackInfo, 1) // TrackInfo structure
};
#endif
add_library(NPSCore SHARED $<TARGET_OBJECTS:NPSEventGenerator> $<TARGET_OBJECTS:NPSProcess> SteppingAction.cc EventAction.cc PrimaryGeneratorAction.cc Target.cc Chamber.cc PrimaryGeneratorActionMessenger.cc NPSVDetector.cc DetectorConstruction.cc MaterialManager.cc DetectorMessenger.cc MyMagneticField.cc SteppingVerbose.cc NPSDetectorFactory.cc RunAction.cc Particle.cc ParticleStack.cc NPSFunction.cc)
target_link_libraries(NPSCore ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${NPLib_LIBRARIES} NPSScorers NPInitialConditions NPInteractionCoordinates NPReactionConditions NPFissionConditions )
target_link_libraries(NPSCore ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${NPLib_LIBRARIES} NPSScorers NPInitialConditions NPInteractionCoordinates NPReactionConditions NPFissionConditions NPTrackInfo)
......@@ -90,7 +90,7 @@ void ParticleStack::AddParticleToStack(Particle& particle){