diff --git a/NPSimulation/Core/Target.cc b/NPSimulation/Core/Target.cc index 0ffa9abb04efd029c9398f8e888eadf43fc80406..ddf19b7c4f800145719d7fde14704b488720db38 100644 --- a/NPSimulation/Core/Target.cc +++ b/NPSimulation/Core/Target.cc @@ -12,7 +12,8 @@ * Last update : 06/11/2009 * *---------------------------------------------------------------------------* * Decription: * - * This class describe Cryogenic and standard Target. Derived fromNPS::VDetector* + * This class describe Cryogenic and standard Target. Derived from * + * NPS::VDetector * * * *---------------------------------------------------------------------------* * Comment: * @@ -67,7 +68,6 @@ Target::Target(){ m_TargetRadius = 0 ; m_WindowsThickness = 0 ; m_TargetDensity = 0 ; - m_EffectiveThickness = 0 ; // effective thickness at 0 deg, compute using angle and thickness m_TargetNbLayers = 5; // Number of steps by default // Set the global pointer TargetInstance = this; @@ -254,7 +254,7 @@ G4double Target::SlowDownBeam(G4ParticleDefinition* Beam, } G4double ThicknessBeforeInteraction = - abs(ZInteraction - 0.5*m_EffectiveThickness) / cos(m_TargetAngle); + abs(ZInteraction - 0.5*m_TargetThickness) / cos(m_TargetAngle); G4double dedx,de; static G4EmCalculator emCalculator; @@ -278,7 +278,7 @@ G4double Target::SlowDownBeam(G4ParticleDefinition* Beam, if(m_WindowsThickness!=0) for (G4int i = 0; i < m_TargetNbLayers; i++){ dedx = emCalculator.ComputeTotalDEDX(IncidentEnergy, Beam, m_WindowsMaterial); - de = dedx * m_TargetNbLayers * m_WindowsThickness / cos(IncidentTheta); + de = dedx * m_WindowsThickness / (cos(IncidentTheta)* m_TargetNbLayers); IncidentEnergy -= de; if(IncidentEnergy<0){ IncidentEnergy = 0; diff --git a/NPSimulation/Core/Target.hh b/NPSimulation/Core/Target.hh index 45c33930f7933bcfdb969a1d212a190801b4c2bb..833243887047c596dc17dc4e0c70219bf8826f97 100644 --- a/NPSimulation/Core/Target.hh +++ b/NPSimulation/Core/Target.hh @@ -108,7 +108,6 @@ private: G4double m_TargetThickness; G4double m_TargetRadius; G4double m_TargetAngle; - G4double m_EffectiveThickness; G4Material* m_TargetMaterial; G4int m_TargetNbLayers;