Skip to content
Snippets Groups Projects
Commit ee2fc522 authored by deserevi's avatar deserevi
Browse files

merge of 'eef5a90d8d15236f6b24ed457583cdc91ebacaaf'

     and 'f8dc1a99e621bae624c49d9e7236785909f07a84'
parents 9f7c4c58 e64cd3ee
No related branches found
No related tags found
No related merge requests found
......@@ -4,30 +4,30 @@
%Temperature in K, Pressure in bar
%Material name according to the target library
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Target
THICKNESS= 0.001
RADIUS= 45
MATERIAL= CD2
ANGLE= 45
X= 0
Y= 0
Z= 0
%CryoTarget
THICKNESS= 3
RADIUS= 45
TEMPERATURE= 26
PRESSURE= 1
MATERIAL= D2
WINDOWSTHICKNESS= 0
WINDOWSMATERIAL= Mylar
X= 0
Y= 0
Z= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Target
% THICKNESS= 0.001
% RADIUS= 45
% MATERIAL= CD2
% ANGLE= 45
% X= 0
% Y= 0
% Z= 0
%
%%CryoTarget
% THICKNESS= 3
% RADIUS= 45
% TEMPERATURE= 26
% PRESSURE= 1
% MATERIAL= D2
% WINDOWSTHICKNESS= 0
% WINDOWSMATERIAL= Mylar
% X= 0
% Y= 0
% Z= 0
%
%%%%%%%%%%%%%%%%%%%%%
MUST2Array
%%%%%%% Telescope 1 %%%%%%%
......@@ -85,7 +85,7 @@ SILI= 0
CSI= 1
VIS= all
%%%%%%% Telescope 6 %%%%%%%
%M2Telescope
M2Telescope
X1_Y1= 155.77 50.23 8.18
X1_Y128= 155.77 -50.23 8.18
X128_Y1= 133.17 50.23 -89.7
......@@ -94,16 +94,16 @@ SI= 1
SILI= 1
CSI= 0
VIS= all
% Alternate Telescope 6 %%
M2Telescope
THETA= -130
PHI= 0
R= 150
BETA= 0 0 0
SI= 1
SILI= 1
CSI= 0
VIS= all
%% Alternate Telescope 6 %%
%M2Telescope
% THETA= -130
% PHI= 0
% R= 150
% BETA= 0 0 0
% SI= 1
% SILI= 1
% CSI= 0
% VIS= all
%%%%%%% Telescope 7 %%%%%%%
M2Telescope
X1_Y1= 27.07 50.23 -154.49
......
......@@ -83,8 +83,12 @@ int main(int argc,char** argv)
// Angle between beam and particle
ThetaLab = ThetaCalculation ( HitDirection , TVector3(0,0,1) ) ;
ELab = M2 -> Si_E[hit] + M2 -> SiLi_E[hit] ;
}
e530Reaction -> ;
RootOutput::getInstance()->GetTree()->Fill() ;
}
......
......@@ -295,3 +295,40 @@ double EnergyLoss::EvaluateInitialEnergy( double Energy , // Energy of the
return (Energy*fNumberOfMass) ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double EnergyLoss::EvaluateMaterialThickness( double InitialEnergy , // Energy of the detected particle
double FinalEnergy ,
double ThicknessLimit,
double ThicknessStep) // Target Thickness at 0 degree
const
{
double Thickness = ThicknessStep ;
double Energy = InitialEnergy;
while(Energy<FinalEnergy && Thickness > 0)
{
Energy = EvaluateInitialEnergy(Energy,ThicknessStep,0);
Thickness+=ThicknessStep;
if (Thickness>ThicknessLimit)
Thickness= -1 ;
}
return Thickness ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
......@@ -16,18 +16,19 @@
*---------------------------------------------------------------------------*
* Decription: *
* Deal with energy loss on basis of a dEdX input file, from SRIM or LISE++ *
* The class can be used to evaluate energy loss in material or to Evaluate*
* initial energy before crossing the material. *
* or Geant4 *
* The class can be used to evaluate energy loss in material or to Evaluate *
* initial energy before crossing the material. *
* *
* The use of Interpolator derived form the GSL insure a very good speed of*
* execution. *
* The use of Interpolator derived form the GSL insure a very good speed of *
* execution. *
* *
* Table Should come in the following unit: *
* Particle Energy: MeV/u *
* dEdX: MeV/micrometer *
*---------------------------------------------------------------------------*
* Comment: *
* *
* Based on N.Desereville previous classes *
* *
*****************************************************************************/
......@@ -48,14 +49,8 @@ using namespace CLHEP ;
#include "Math/Interpolator.h"
using namespace ROOT::Math;
// Class by Nicolas de Sereville.
// Added and update June 2009
// Used to correct Energy Loss in material using a dE/dX Table input (ASCII) from SRIM or LISE++
namespace NPL
{
//class EnergyLoss : public TObject {
class EnergyLoss {
public : // Constructor
......@@ -63,50 +58,59 @@ namespace NPL
EnergyLoss( string Path , // Path of dE/dX table file
string Source , // Type of file : Geant4,Lise,SRIM
int NumberOfSlice , // Low number = Faster, High Number = more accurate / typical: 100 to 1000
int LiseColumns=0 , // Indicate which model to read in a lise File, set to 0 (Default value) for a SRIM file
int LiseColumns=0 , // Indicate which model to read in a lise File, set to 0 (Default value) for a SRIM / Geant4 file
int NumberOfMass=1 );// Number of mass A of the nucleus (used only for Lise file)
~EnergyLoss();
private : // dE/dX, slice parameter
int fNumberOfSlice ; // Number Of Slice used to evaluate energy loss
int fNumberOfMass ; // Number of mass A of the nucleus (used only for Lise file)
vector<double> fEnergy ; // Energy
vector<double> fdEdX_Nuclear ; // Nuclear Stopping Power
int fNumberOfSlice ; // Number Of Slice used to evaluate energy loss
int fNumberOfMass ; // Number of mass A of the nucleus (used only for Lise file)
vector<double> fEnergy ; // Energy
vector<double> fdEdX_Nuclear ; // Nuclear Stopping Power
vector<double> fdEdX_Electronic ; // Electronic Stopping Power
vector<double> fdEdX_Total ; // Total Stopping Power
Interpolator* fInter ; // Interpolator Used to evaluate Energy loss at given energy
vector<double> fdEdX_Total ; // Total Stopping Power
Interpolator* fInter ; // Interpolator Used to evaluate Energy loss at given energy
public : // General Function on dE/dX table
double EvaluateNuclearLoss (double ener) const;
double EvaluateNuclearLoss (double ener) const;
double EvaluateElectronicLoss (double ener) const;
double EvaluateTotalLoss (double ener) const;
double EvaluateTotalLoss (double ener) const;
public : // Function to Slow down particle or reconstruct their initial energy
// Calculate Energy of a particle after crossing material
double Slow( double Energy , // Energy of the detected particle
double TargetThickness , // Target Thickness at 0 degree
double Angle ) // Particle Angle
const;
double Slow( double Energy , // Energy of the detected particle
double TargetThickness , // Target Thickness at 0 degree
double Angle ) // Particle Angle
const;
// Calculate Energy Loss of a particle inside a material
double EnergyLossCalulation( double Energy , // Energy of the detected particle
double TargetThickness , // Target Thickness at 0 degree
double Angle ) // Particle Angle
const;
double EnergyLossCalulation( double Energy , // Energy of the detected particle
double TargetThickness , // Target Thickness at 0 degree
double Angle ) // Particle Angle
const;
// Evaluate Initial Energy of particle before crossing material knowing Angle, final Energy
// and Target Thickness.
double EvaluateInitialEnergy( double energy , // Energy of the detected particle
double TargetThickness , // Target Thickness at 0 degree
double Angle ) // Particle Angle
const ;
double EvaluateInitialEnergy( double energy , // Energy of the detected particle
double TargetThickness , // Target Thickness at 0 degree
double Angle ) // Particle Angle
const ;
// Evaluate the thickness the particle has been through using the energy loss and initial energy
// usefull for thickness measurement using particle sources
double EvaluateMaterialThickness( double InitialEnergy , // Energy of the detected particle
double FinalEnergy ,
double ThicknessLimit ,
double ThicknessStep = 0.1*micrometer) // Target Thickness at 0 degree
const ;
public : // Usefull function
// Display parameter
void Print() const;
void Print() const;
// Draw (CERN ROOT)
void Draw() const;
//ClassDef(EnergyLoss,1) // Une Classe EnergyLoss
void Draw() const;
};
}
......
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