Skip to content
Snippets Groups Projects
Commit 1841dce8 authored by Pierre Morfouace's avatar Pierre Morfouace
Browse files

Adding EnergyToEnergyImpulsion

parent 4d07ca4e
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
...@@ -509,6 +509,13 @@ void Particle::EnergyToBrho(double Q){ ...@@ -509,6 +509,13 @@ void Particle::EnergyToBrho(double Q){
fBrho = 3.107*GetA()/Q*fBeta*fGamma; fBrho = 3.107*GetA()/Q*fBeta*fGamma;
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Particle::EnergyToEnergyImpulsion(double energy, double ThetaLab, double PhiLab){
double p = sqrt(pow(energy,2) + 2*Mass()*energy);
TVector3 Impulsion = TVector3(p*sin(ThetaLab)*cos(PhiLab), p*sin(ThetaLab)*sin(PhiLab), p*cos(ThetaLab));
fEnergyImpulsion = TLorentzVector(Impulsion, energy+Mass());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Particle::EnergyToTof(){ void Particle::EnergyToTof(){
......
...@@ -93,6 +93,7 @@ namespace NPL { ...@@ -93,6 +93,7 @@ namespace NPL {
void TofToEnergy(); void TofToEnergy();
void TofToBrho(){TofToEnergy(); EnergyToBrho();} void TofToBrho(){TofToEnergy(); EnergyToBrho();}
void EnergyToBeta(); void EnergyToBeta();
void EnergyToEnergyImpulsion(double, double, double);
void BetaToEnergy(); void BetaToEnergy();
void BetaToGamma(); void BetaToGamma();
double DopplerCorrection(double EnergyLabGamma, double ThetaLabGamma); double DopplerCorrection(double EnergyLabGamma, double ThetaLabGamma);
...@@ -130,13 +131,15 @@ namespace NPL { ...@@ -130,13 +131,15 @@ namespace NPL {
void SetParity(const char* parity) {fParity = parity;} void SetParity(const char* parity) {fParity = parity;}
void SetLifeTime(double LifeTime) {fLifeTime=LifeTime;} void SetLifeTime(double LifeTime) {fLifeTime=LifeTime;}
void SetLifeTimeError(double LifeTimeErr) {fLifeTimeErr=LifeTimeErr;} void SetLifeTimeError(double LifeTimeErr) {fLifeTimeErr=LifeTimeErr;}
void SetKineticEnergy(double energy){ void SetKineticEnergy(double energy, double ThetaLab=0, double PhiLab=0){
fKineticEnergy = energy; fKineticEnergy = energy;
EnergyToBrho(); EnergyToBrho();
EnergyToTof(); EnergyToTof();
EnergyToBeta(); EnergyToBeta();
BetaToGamma(); BetaToGamma();
BetaToVelocity();} BetaToVelocity();
EnergyToEnergyImpulsion(energy,ThetaLab,PhiLab);
}
void SetBrho(double brho){ void SetBrho(double brho){
fBrho = brho; fBrho = brho;
BrhoToEnergy(); BrhoToEnergy();
......
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