Skip to content
Snippets Groups Projects
Commit cc42e2f5 authored by matta's avatar matta
Browse files

* Adding beam energy loss in the rear windows target

parent 3337cfe7
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeneralTarget GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Target %Target
THICKNESS= 10000 THICKNESS= 10000
RADIUS= 45 RADIUS= 45
MATERIAL= CD2 MATERIAL= CD2
...@@ -16,7 +16,7 @@ Target ...@@ -16,7 +16,7 @@ Target
Y= 0 Y= 0
Z= 0 Z= 0
%CryoTarget CryoTarget
THICKNESS= 3000 THICKNESS= 3000
RADIUS= 45 RADIUS= 45
TEMPERATURE= 26 TEMPERATURE= 26
......
...@@ -555,12 +555,35 @@ void Target::CalculateBeamInteraction( double MeanPosX, double SigmaPosX, double ...@@ -555,12 +555,35 @@ void Target::CalculateBeamInteraction( double MeanPosX, double SigmaPosX, double
InterCoord = G4ThreeVector(x0, y0, z0); InterCoord = G4ThreeVector(x0, y0, z0);
G4EmCalculator emCalculator; G4EmCalculator emCalculator;
for (G4int i = 0; i < m_TargetNbLayers; i++) if(m_TargetType)
{ {
G4double dedx = emCalculator.ComputeTotalDEDX(IncidentBeamEnergy, BeamName, m_TargetMaterial); for (G4int i = 0; i < m_TargetNbLayers; i++)
G4double de = dedx * EffectiveTargetThicknessBeforeInteraction / m_TargetNbLayers; {
IncidentBeamEnergy -= de; G4double dedx = emCalculator.ComputeTotalDEDX(IncidentBeamEnergy, BeamName, m_TargetMaterial);
G4double de = dedx * EffectiveTargetThicknessBeforeInteraction / m_TargetNbLayers;
IncidentBeamEnergy -= de;
}
}
else
{ // Windows
for (G4int i = 0; i < m_TargetNbLayers; i++)
{
G4double dedx = emCalculator.ComputeTotalDEDX(IncidentBeamEnergy, BeamName, m_WindowsMaterial);
G4double de = dedx * m_WindowsThickness * uniform / (cos(AngleIncidentTheta)*m_TargetNbLayers);
IncidentBeamEnergy -= de;
}
// Target
for (G4int i = 0; i < m_TargetNbLayers; i++)
{
G4double dedx = emCalculator.ComputeTotalDEDX(IncidentBeamEnergy, BeamName, m_TargetMaterial);
G4double de = dedx * EffectiveTargetThicknessBeforeInteraction / m_TargetNbLayers;
IncidentBeamEnergy -= de;
}
} }
FinalBeamEnergy=IncidentBeamEnergy; FinalBeamEnergy=IncidentBeamEnergy;
} }
......
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