Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
|
||||
/*! \page Examples_field Category "field"
|
||||
|
||||
Examples in this directory demonstrate specific simulation setups
|
||||
Examples in this directory demonstrate specific simulation setups
|
||||
in magnetic field.
|
||||
|
||||
|
||||
\link Examplefield01 field01 \endlink
|
||||
|
||||
Example enabling investigation of tracking in a magnetic field.
|
||||
|
||||
\link Examplefield02 field02 \endlink
|
||||
|
||||
Test for investigation of tracking in electric field and field dependent
|
||||
Test for investigation of tracking in electric field and field dependent
|
||||
electromagnetic processes.
|
||||
|
||||
\link Examplefield03 field03 \endlink
|
||||
@@ -23,7 +23,7 @@ to selected logical volumes varies.
|
||||
|
||||
\link Examplefield04 field04 \endlink
|
||||
|
||||
This example shows how to define/use OVERLAPPING field elements
|
||||
This example shows how to define/use OVERLAPPING field elements
|
||||
in Geant4. Fields might be either magnetic, electric or both.
|
||||
|
||||
\link Examplefield05 field05 \endlink
|
||||
@@ -34,10 +34,10 @@ This example demonstrates so-called "spin-frozen" condition.
|
||||
|
||||
This example exercises the capability of tracking massive
|
||||
particles in a gravity field.
|
||||
|
||||
|
||||
\link ExampleBlineTracer BlineTracer \endlink
|
||||
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
lines in a Geant4 application where particle are tracked through the
|
||||
magnetic field (in future, these functionalities may be integrated in
|
||||
the Geant4 kernel).
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
\author Laurent Desorgher (desorgher@phim.unibe.ch) - 04/10/2003
|
||||
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
lines in a Geant4 application where particle are tracked through the
|
||||
magnetic field (in future, these functionalities may be integrated in
|
||||
the Geant4 kernel).
|
||||
@@ -27,17 +27,17 @@ G4BlineTracer* theBlineTool = new G4BlineTracer();
|
||||
The core of the tool is the method G4BlineTracer::ComputeBlines() of G4BlineTracer class.
|
||||
In this method a bline is computed by tracking a ChargedGeantino in the user
|
||||
defined magnetic field and by using a Bline equation of motion (class
|
||||
G4BlineEquation, motion along the field) instead of a Lorentz equation.
|
||||
G4BlineEquation, motion along the field) instead of a Lorentz equation.
|
||||
|
||||
During the execution of this method :
|
||||
|
||||
- The user defined equations of motion associated to the different
|
||||
global and local fields are replaced by instances of G4BlineEquation
|
||||
associated to the same fields.
|
||||
The G4BlineEquation class defines the differential equation of a
|
||||
magnetic field line.
|
||||
|
||||
- User defined ChordFinders are replaced by new ChordFinders
|
||||
- The user defined equations of motion associated to the different
|
||||
global and local fields are replaced by instances of G4BlineEquation
|
||||
associated to the same fields.
|
||||
The G4BlineEquation class defines the differential equation of a
|
||||
magnetic field line.
|
||||
|
||||
- User defined ChordFinders are replaced by new ChordFinders
|
||||
associated to the G4BlineEquation object.
|
||||
|
||||
- The user primary generator action, run action, event action and
|
||||
@@ -47,33 +47,33 @@ During the execution of this method :
|
||||
a NULL pointer.
|
||||
|
||||
After the execution of the method, the original user defined actions, equation
|
||||
of motions and chord-finders are restored.
|
||||
|
||||
of motions and chord-finders are restored.
|
||||
|
||||
In other words, the deafult run-action is temporarly replaced by a
|
||||
G4BlineTracer run-action using the same Geometry, physics and magnetic fields
|
||||
but with a different equation of motion and user actions.
|
||||
|
||||
The G4BlinePrimaryGeneratorAction::GeneratePrimaries() method of the G4BlinePrimaryGeneratorAction class
|
||||
call the GeneratePrimaries() method of the user defined PrimaryGeneratorAction
|
||||
for defining the start position and start time of tracking.
|
||||
call the GeneratePrimaries() method of the user defined PrimaryGeneratorAction
|
||||
for defining the start position and start time of tracking.
|
||||
Start position for user application and for Bline tracking are therefore
|
||||
controlled by the same UI commands.
|
||||
The type of particles to be tracked when tracing Blines is always set
|
||||
controlled by the same UI commands.
|
||||
The type of particles to be tracked when tracing Blines is always set
|
||||
to Charged-Geantino. This allows to switch off the effect of electromagnetic
|
||||
and hadronics physics when tracing field lines.
|
||||
and hadronics physics when tracing field lines.
|
||||
|
||||
|
||||
The G4BlineEventAction class is responsible to store computed magnetic field
|
||||
lines as a vector of Polylines and Polymarkers for later visualisation.
|
||||
These vectors can be drawn and reset at any time.
|
||||
|
||||
The stepping action does nothing in this implementation but it can be used
|
||||
The stepping action does nothing in this implementation but it can be used
|
||||
in future versions to limit field line tracing to physical volumes defined
|
||||
by the user. For this purpose a G4BlineStackingAction could also be
|
||||
implemented.
|
||||
implemented.
|
||||
|
||||
\section ExampleBlineTracer_s2 User Manual
|
||||
|
||||
|
||||
\subsection ExampleBlineTracer_subs21 General description
|
||||
|
||||
The BlineTracer is controlled by the UI commands contained in the directory
|
||||
@@ -81,64 +81,64 @@ The BlineTracer is controlled by the UI commands contained in the directory
|
||||
lines passing through user defined start positions are computed.
|
||||
Start positions are generated by the user primary generator action.
|
||||
By doing so, the definition of start positions is the same for usual particles
|
||||
tracking and magnetic field line tracking.
|
||||
tracking and magnetic field line tracking.
|
||||
|
||||
A magnetic field line is computed as a track of a charged geantino that moves
|
||||
A magnetic field line is computed as a track of a charged geantino that moves
|
||||
along the field line. The user can define the maximum length of a tracking step
|
||||
(only valid for Bline tracing purposes) by the use of the 'setMaxStepLength'
|
||||
command.
|
||||
|
||||
By using small enough maximum step length, smooth magnetic field lines are
|
||||
obtained. By using the command 'stockLines' and 'stockPoints' the user
|
||||
can decide to store the series of tracking step positions defining
|
||||
By using small enough maximum step length, smooth magnetic field lines are
|
||||
obtained. By using the command 'stockLines' and 'stockPoints' the user
|
||||
can decide to store the series of tracking step positions defining
|
||||
a magnetic field line as a Polyline object and/or a PolyMarker object
|
||||
(circles) respectively.
|
||||
|
||||
These objects are stored in vectors of PolyLines and PolyMarkers.
|
||||
By using the command 'draw', these vectors are added to the scene
|
||||
of the visualisation manager, provided that a scene handler and
|
||||
of the visualisation manager, provided that a scene handler and
|
||||
visualisation driver have been properly created.
|
||||
|
||||
The scene is visualised by invoking the vis command '/vis/show'.
|
||||
Polyline objects are visualised as line segments joining the different
|
||||
Polyline objects are visualised as line segments joining the different
|
||||
step positions defining a line, while for a Polymarker object markers
|
||||
(here circles), are drawn at each step positions.
|
||||
|
||||
By using the 'setColour' the user defines the visualisation colour
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
By using the 'setColour' the user defines the visualisation colour
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
By calling 'setPointSize' the user defines the size of visualisation markers
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
The user can remove the vector of Polymarker and Polyline from the memory
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
The user can remove the vector of Polymarker and Polyline from the memory
|
||||
by invoking 'resetMaterialToBeDrawn'.
|
||||
|
||||
When using small max step size and polymarkers for visualisation purposes, the
|
||||
thickness of a smooth magnetic field line is obtained. It is controlled by the
|
||||
Marker size parameter ('setPointSize')
|
||||
Marker size parameter ('setPointSize')
|
||||
|
||||
\subsection ExampleBlineTracer_subs22 Command description
|
||||
|
||||
|
||||
\verbatim
|
||||
/vis/blineTracer/computeBline nb_of_lines
|
||||
/vis/blineTracer/computeBline nb_of_lines
|
||||
\endverbatim
|
||||
- Parameters: integer nb_of_lines
|
||||
- Parameters: integer nb_of_lines
|
||||
- Description: Compute nb_of_lines different magnetic field lines
|
||||
|
||||
|
||||
\verbatim
|
||||
/vis/blineTracer/setMaxStepLength max_step_length
|
||||
/vis/blineTracer/setMaxStepLength max_step_length
|
||||
\endverbatim
|
||||
- Parameters: double max_step_length
|
||||
- Description: Set the maximum tracking step length for computing
|
||||
- Parameters: double max_step_length
|
||||
- Description: Set the maximum tracking step length for computing
|
||||
magnetic field lines
|
||||
|
||||
|
||||
\verbatim
|
||||
/vis/blineTracer/setColour red green blue
|
||||
\endverbatim
|
||||
- Parameters: double red, green, blue
|
||||
- Description: Define the colour for visualisation of the
|
||||
- Description: Define the colour for visualisation of the
|
||||
next computed magnetic field lines. The color is
|
||||
defined by a RGB code (red,green,blue) with all
|
||||
parameters smaller than 1.
|
||||
|
||||
|
||||
\verbatim
|
||||
/vis/blineTracer/stockLines aBool
|
||||
\endverbatim
|
||||
@@ -160,21 +160,23 @@ Marker size parameter ('setPointSize')
|
||||
- Description: set the size of the visualisation markers
|
||||
that will be associated with the next computed
|
||||
magnetic field lines
|
||||
|
||||
|
||||
\verbatim
|
||||
/vis/blineTracer/resetMaterialToBeDrawn
|
||||
\endverbatim
|
||||
- Parameters: none
|
||||
- Description: The vector of Polyline and Polymarker representing
|
||||
- Description: The vector of Polyline and Polymarker representing
|
||||
magnetic field lines to be visualised are removed
|
||||
from memory
|
||||
|
||||
|
||||
\verbatim
|
||||
/tracking/storeTrajectory 1
|
||||
\endverbatim
|
||||
- If the storeTrajectory parameter is not set no field lines are
|
||||
stored.
|
||||
|
||||
stored.
|
||||
|
||||
An example for Bline visualisation is provided in the bline_vis.mac macro.
|
||||
|
||||
\section ExampleBlineTracer_s3 Current limitations & known problems
|
||||
|
||||
The tool is working properly only for detectors parts where magnetic
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Geant4 version Name: geant4-11-02-ref-00 (8-December-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(BlineTracer)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -17,7 +17,7 @@ include(${Geant4_USE_FILE})
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
|
||||
@@ -5,6 +5,13 @@ which **must** added in reverse chronological order (newest at the top). It must
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-11-10 I. Hrivnacova (BlineTracer-V11-01-01)
|
||||
- Coding guidelines: document macro in README
|
||||
|
||||
## 2023-07-05 I. Hrivnacova (BlineTracer-V11-01-00)
|
||||
- Clang-tidy, new coding guidelines, agreed separators in .cc
|
||||
- Clean-up trailing white-spaces
|
||||
|
||||
## 2021-12-10 Ben Morgan (BlineTracer-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
README file for the Geant4 BlineTracer module
|
||||
|
||||
|
||||
Author : Laurent Desorgher (desorgher@phim.unibe.ch) - 04/10/2003
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
lines in a Geant4 application where particle are tracked through the
|
||||
magnetic field (in future, these functionalities may be integrated in
|
||||
the Geant4 kernel).
|
||||
@@ -23,17 +23,17 @@ Design principles:
|
||||
The core of the tool is the method ComputeBlines() of G4BlineTracer class.
|
||||
In this method a bline is computed by tracking a ChargedGeantino in the user
|
||||
defined magnetic field and by using a Bline equation of motion (class
|
||||
G4BlineEquation, motion along the field) instead of a Lorentz equation.
|
||||
G4BlineEquation, motion along the field) instead of a Lorentz equation.
|
||||
|
||||
During the execution of this method :
|
||||
|
||||
-The user defined equations of motion associated to the different
|
||||
global and local fields are replaced by instances of G4BlineEquation
|
||||
associated to the same fields.
|
||||
The G4BlineEquation class defines the differential equation of a
|
||||
magnetic field line.
|
||||
|
||||
-User defined ChordFinders are replaced by new ChordFinders
|
||||
-The user defined equations of motion associated to the different
|
||||
global and local fields are replaced by instances of G4BlineEquation
|
||||
associated to the same fields.
|
||||
The G4BlineEquation class defines the differential equation of a
|
||||
magnetic field line.
|
||||
|
||||
-User defined ChordFinders are replaced by new ChordFinders
|
||||
associated to the G4BlineEquation object.
|
||||
|
||||
-The user primary generator action, run action, event action and
|
||||
@@ -43,33 +43,33 @@ During the execution of this method :
|
||||
a NULL pointer.
|
||||
|
||||
After the execution of the method, the original user defined actions, equation
|
||||
of motions and chord-finders are restored.
|
||||
|
||||
of motions and chord-finders are restored.
|
||||
|
||||
In other words, the deafult run-action is temporarly replaced by a
|
||||
G4BlineTracer run-action using the same Geometry, physics and magnetic fields
|
||||
but with a different equation of motion and user actions.
|
||||
|
||||
The GeneratePrimaries() method of the G4BlinePrimaryGeneratorAction class
|
||||
call the GeneratePrimaries() method of the user defined PrimaryGeneratorAction
|
||||
for defining the start position and start time of tracking.
|
||||
call the GeneratePrimaries() method of the user defined PrimaryGeneratorAction
|
||||
for defining the start position and start time of tracking.
|
||||
Start position for user application and for Bline tracking are therefore
|
||||
controlled by the same UI commands.
|
||||
The type of particles to be tracked when tracing Blines is always set
|
||||
controlled by the same UI commands.
|
||||
The type of particles to be tracked when tracing Blines is always set
|
||||
to Charged-Geantino. This allows to switch off the effect of electromagnetic
|
||||
and hadronics physics when tracing field lines.
|
||||
and hadronics physics when tracing field lines.
|
||||
|
||||
|
||||
The G4BlineEventAction class is responsible to store computed magnetic field
|
||||
lines as a vector of Polylines and Polymarkers for later visualisation.
|
||||
These vectors can be drawn and reset at any time.
|
||||
|
||||
The stepping action does nothing in this implementation but it can be used
|
||||
The stepping action does nothing in this implementation but it can be used
|
||||
in future versions to limit field line tracing to physical volumes defined
|
||||
by the user. For this purpose a G4BlineStackingAction could also be
|
||||
implemented.
|
||||
implemented.
|
||||
|
||||
User Manual:
|
||||
|
||||
|
||||
General description:
|
||||
|
||||
The BlineTracer is controlled by the UI commands contained in the directory
|
||||
@@ -77,52 +77,52 @@ The BlineTracer is controlled by the UI commands contained in the directory
|
||||
lines passing through user defined start positions are computed.
|
||||
Start positions are generated by the user primary generator action.
|
||||
By doing so, the definition of start positions is the same for usual particles
|
||||
tracking and magnetic field line tracking.
|
||||
tracking and magnetic field line tracking.
|
||||
|
||||
A magnetic field line is computed as a track of a charged geantino that moves
|
||||
A magnetic field line is computed as a track of a charged geantino that moves
|
||||
along the field line. The user can define the maximum length of a tracking step
|
||||
(only valid for Bline tracing purposes) by the use of the 'setMaxStepLength'
|
||||
command.
|
||||
By using small enough maximum step length, smooth magnetic field lines are
|
||||
obtained. By using the command 'stockLines' and 'stockPoints' the user
|
||||
can decide to store the series of tracking step positions defining
|
||||
By using small enough maximum step length, smooth magnetic field lines are
|
||||
obtained. By using the command 'stockLines' and 'stockPoints' the user
|
||||
can decide to store the series of tracking step positions defining
|
||||
a magnetic field line as a Polyline object and/or a PolyMarker object
|
||||
(circles) respectively.
|
||||
These objects are stored in vectors of PolyLines and PolyMarkers.
|
||||
By using the command 'draw', these vectors are added to the scene
|
||||
of the visualisation manager, provided that a scene handler and
|
||||
of the visualisation manager, provided that a scene handler and
|
||||
visualisation driver have been properly created.
|
||||
The scene is visualised by invoking the vis command '/vis/show'.
|
||||
Polyline objects are visualised as line segments joining the different
|
||||
Polyline objects are visualised as line segments joining the different
|
||||
step positions defining a line, while for a Polymarker object markers
|
||||
(here circles), are drawn at each step positions.
|
||||
By using the 'setColour' the user defines the visualisation colour
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
By using the 'setColour' the user defines the visualisation colour
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
By calling 'setPointSize' the user defines the size of visualisation markers
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
The user can remove the vector of Polymarker and Polyline from the memory
|
||||
that will be associated to the next computed magnetic field lines.
|
||||
The user can remove the vector of Polymarker and Polyline from the memory
|
||||
by invoking 'resetMaterialToBeDrawn'.
|
||||
When using small max step size and polymarkers for visualisation purposes, the
|
||||
thickness of a smooth magnetic field line is obtained. It is controlled by the
|
||||
Marker size parameter ('setPointSize')
|
||||
Marker size parameter ('setPointSize')
|
||||
|
||||
Command description:
|
||||
/vis/blineTracer/computeBline nb_of_lines :
|
||||
Parameters: integer nb_of_lines
|
||||
Command description:
|
||||
/vis/blineTracer/computeBline nb_of_lines :
|
||||
Parameters: integer nb_of_lines
|
||||
Description: Compute nb_of_lines different magnetic field lines
|
||||
|
||||
/vis/blineTracer/setMaxStepLength max_step_length :
|
||||
Parameters: double max_step_length
|
||||
Description: Set the maximum tracking step length for computing
|
||||
|
||||
/vis/blineTracer/setMaxStepLength max_step_length :
|
||||
Parameters: double max_step_length
|
||||
Description: Set the maximum tracking step length for computing
|
||||
magnetic field lines
|
||||
|
||||
|
||||
/vis/blineTracer/setColour red green blue
|
||||
Parameters: double red, green, blue
|
||||
Description: Define the colour for visualisation of the
|
||||
Description: Define the colour for visualisation of the
|
||||
next computed magnetic field lines. The color is
|
||||
defined by a RGB code (red,green,blue) with all
|
||||
parameters smaller than 1.
|
||||
|
||||
|
||||
/vis/blineTracer/stockLines aBool
|
||||
Parameters: boolean aBool
|
||||
Description: If true the next computed field lines are stored
|
||||
@@ -131,23 +131,25 @@ Marker size parameter ('setPointSize')
|
||||
Parameters: boolean aBool
|
||||
Description: If true the next computed field lines are stored
|
||||
as Polymarkers for further visualisation
|
||||
|
||||
|
||||
/vis/blineTracer/setPointSize point_size
|
||||
Parameters: double point_size
|
||||
DEscription: set the size of the visualisation markers
|
||||
that will be associated with the next computed
|
||||
magnetic field lines
|
||||
|
||||
|
||||
/vis/blineTracer/resetMaterialToBeDrawn
|
||||
Parameters: none
|
||||
Description: The vector of Polyline and Polymarker representing
|
||||
Description: The vector of Polyline and Polymarker representing
|
||||
magnetic field lines to be visualised are removed
|
||||
from memory
|
||||
|
||||
|
||||
/tracking/storeTrajectory 1 :
|
||||
If the storeTrajectory parameter is not set no field lines are
|
||||
stored.
|
||||
|
||||
stored.
|
||||
|
||||
An example for Bline visualisation is provided in the bline_vis.mac macro.
|
||||
|
||||
Current limitations & known problems:
|
||||
|
||||
The tool is working properly only for detectors parts where magnetic
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// G4BlineEquation
|
||||
@@ -36,7 +36,7 @@
|
||||
// Class description:
|
||||
//
|
||||
// This class defines the equation of motion needed to trace magnetic
|
||||
// field lines in the simulation.
|
||||
// field lines in the simulation.
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// Author: Laurent Desorgher (desorgher@phim.unibe.ch)
|
||||
@@ -52,22 +52,22 @@ class G4BlineEquation : public G4Mag_EqRhs
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4BlineEquation( G4MagneticField* MagField );
|
||||
virtual ~G4BlineEquation();
|
||||
G4BlineEquation( G4MagneticField* magField );
|
||||
~G4BlineEquation() override = default;
|
||||
// Constructor and destructor.
|
||||
|
||||
virtual void EvaluateRhsGivenB( const G4double y[],
|
||||
void EvaluateRhsGivenB( const G4double y[],
|
||||
const G4double B[3],
|
||||
G4double dydx[] ) const;
|
||||
// Given the value of the magnetic field B, this function
|
||||
G4double dydx[] ) const override;
|
||||
// Given the value of the magnetic field B, this function
|
||||
// calculates the value of the derivative dydx.
|
||||
|
||||
void SetBackwardDirectionOfIntegration(G4bool abool);
|
||||
void SetBackwardDirectionOfIntegration(G4bool abool);
|
||||
|
||||
private:
|
||||
|
||||
G4bool fBackward_direction;
|
||||
G4double fDirection;
|
||||
G4bool fBackward_direction = false;
|
||||
G4double fDirection = 1.;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// G4BlineEventAction
|
||||
@@ -46,7 +46,7 @@
|
||||
// Created - 2003-10-06
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4BlineEventAction_h
|
||||
#define G4BlineEventAction_h 1
|
||||
#define G4BlineEventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
@@ -62,12 +62,12 @@ class G4BlineEventAction : public G4UserEventAction
|
||||
public: // with description
|
||||
|
||||
G4BlineEventAction(G4BlineTracer* aBlineTool);
|
||||
virtual ~G4BlineEventAction();
|
||||
~G4BlineEventAction() override;
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
void BeginOfEventAction(const G4Event*) override;
|
||||
void EndOfEventAction(const G4Event*) override;
|
||||
|
||||
void DrawFieldLines(G4double zoom, G4double theta, G4double phi);
|
||||
void DrawFieldLines(G4double zoom, G4double theta, G4double phi);
|
||||
void ResetVectorObjectToBeDrawn();
|
||||
|
||||
public: // with description
|
||||
@@ -87,12 +87,12 @@ class G4BlineEventAction : public G4UserEventAction
|
||||
// Future implementation...
|
||||
|
||||
private:
|
||||
|
||||
G4BlineTracer* fBlineTool;
|
||||
|
||||
G4BlineTracer* fBlineTool = nullptr;
|
||||
G4Colour fDrawColour;
|
||||
G4bool fDrawBline;
|
||||
G4bool fDrawPoints;
|
||||
G4double fPointSize;
|
||||
G4bool fDrawBline = false;
|
||||
G4bool fDrawPoints = false;
|
||||
G4double fPointSize = 1;
|
||||
std::vector<G4VisAttributes*> fTrajectoryVisAttributes;
|
||||
std::vector<G4Polyline> fTrajectoryPolyline;
|
||||
std::vector<G4Polymarker> fTrajectoryPoints;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// Class description:
|
||||
@@ -56,23 +56,23 @@
|
||||
|
||||
class G4Event;
|
||||
|
||||
class G4BlinePrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class G4BlinePrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4BlinePrimaryGeneratorAction();
|
||||
virtual ~G4BlinePrimaryGeneratorAction();
|
||||
G4BlinePrimaryGeneratorAction() = default;
|
||||
~G4BlinePrimaryGeneratorAction() override = default;
|
||||
|
||||
virtual void GeneratePrimaries(G4Event* anEvent);
|
||||
void GeneratePrimaries(G4Event* anEvent) override;
|
||||
inline void SetUserPrimaryAction(G4VUserPrimaryGeneratorAction* anAction)
|
||||
{ fUserPrimaryAction=anAction; }
|
||||
|
||||
private:
|
||||
|
||||
G4VUserPrimaryGeneratorAction* fUserPrimaryAction;
|
||||
G4bool fFirstPartOfBline;
|
||||
G4VUserPrimaryGeneratorAction* fUserPrimaryAction = nullptr;
|
||||
G4bool fFirstPartOfBline = true;
|
||||
G4ThreeVector fBlineStartPosition;
|
||||
G4double fT0;
|
||||
G4double fT0 = 0.;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// G4BlineSteppingAction
|
||||
@@ -54,12 +54,12 @@ class G4BlineSteppingAction : public G4UserSteppingAction
|
||||
public: // with description
|
||||
|
||||
G4BlineSteppingAction(G4BlineTracer* aBlineTool);
|
||||
virtual ~G4BlineSteppingAction();
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
|
||||
~G4BlineSteppingAction() override = default;
|
||||
void UserSteppingAction(const G4Step*) override;
|
||||
|
||||
private:
|
||||
|
||||
G4BlineTracer* fBlineTool;
|
||||
G4BlineTracer* fBlineTool = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// G4BlineTracer
|
||||
@@ -36,7 +36,7 @@
|
||||
// Class description:
|
||||
//
|
||||
// Defines a tool to trace and visualise magnetic field lines
|
||||
// To use this tool in a Geant4 application the user should
|
||||
// To use this tool in a Geant4 application the user should
|
||||
// create an instance of this class in the code as a run action.
|
||||
// It will only work if a G4MagneticField field object is declared.
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
#include "G4Types.hh"
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4VUserPrimaryGeneratorAction;
|
||||
class G4MagneticField;
|
||||
class G4FieldManager;
|
||||
@@ -63,15 +65,15 @@ class G4BlineEventAction;
|
||||
class G4BlinePrimaryGeneratorAction;
|
||||
class G4BlineEquation;
|
||||
|
||||
class G4BlineTracer : public G4UserRunAction
|
||||
class G4BlineTracer : public G4UserRunAction
|
||||
{
|
||||
public: // with description
|
||||
|
||||
|
||||
G4BlineTracer();
|
||||
virtual ~G4BlineTracer();
|
||||
|
||||
virtual void BeginOfRunAction(const G4Run* aRun);
|
||||
virtual void EndOfRunAction(const G4Run* aRun);
|
||||
~G4BlineTracer() override;
|
||||
|
||||
void BeginOfRunAction(const G4Run* aRun) override;
|
||||
void EndOfRunAction(const G4Run* aRun) override;
|
||||
|
||||
void ComputeBlines(G4int nlines);
|
||||
|
||||
@@ -86,13 +88,13 @@ class G4BlineTracer : public G4UserRunAction
|
||||
|
||||
private:
|
||||
|
||||
G4BlineTracerMessenger* fMessenger;
|
||||
G4BlineSteppingAction* fSteppingAction;
|
||||
G4BlineEventAction* fEventAction;
|
||||
G4BlinePrimaryGeneratorAction* fPrimaryGeneratorAction;
|
||||
G4double fMaxTrackingStep;
|
||||
G4bool fWas_ResetChordFinders_already_called;
|
||||
|
||||
G4BlineTracerMessenger* fMessenger = nullptr;
|
||||
G4BlineSteppingAction* fSteppingAction = nullptr;
|
||||
G4BlineEventAction* fEventAction = nullptr;
|
||||
G4BlinePrimaryGeneratorAction* fPrimaryGeneratorAction = nullptr;
|
||||
G4double fMaxTrackingStep = 1000. * CLHEP::m;
|
||||
G4bool fWas_ResetChordFinders_already_called = false;
|
||||
|
||||
//G4VUserPrimaryGeneratorAction* fUserPrimaryAction;
|
||||
// User defined primary generator action
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// G4BlineTracerMessenger
|
||||
@@ -63,25 +63,25 @@ class G4BlineTracerMessenger : public G4UImessenger
|
||||
public: // with description
|
||||
|
||||
G4BlineTracerMessenger(G4BlineTracer* aBlineTool);
|
||||
virtual ~G4BlineTracerMessenger();
|
||||
~G4BlineTracerMessenger() override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
void SetNewValue(G4UIcommand * command,G4String newValues) override;
|
||||
|
||||
private:
|
||||
|
||||
G4BlineTracer* fTheBlineTool;
|
||||
G4UIdirectory* fBlineToolDir;
|
||||
G4BlineTracer* fTheBlineTool = nullptr;
|
||||
G4UIdirectory* fBlineToolDir = nullptr;
|
||||
|
||||
// commands
|
||||
|
||||
G4UIcmdWithAnInteger* fBlineCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetMaxTrackingStepCmd;
|
||||
G4UIcmdWith3Vector* fSetDrawColourCmd;
|
||||
G4UIcmdWithABool* fSetDrawBlineCmd;
|
||||
G4UIcmdWithABool* fSetDrawPointsCmd;
|
||||
G4UIcmdWithADouble* fSetPointSizeCmd;
|
||||
G4UIcmdWithoutParameter* fDrawCmd;
|
||||
G4UIcmdWithoutParameter* fResetCmd;
|
||||
G4UIcmdWithAnInteger* fBlineCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetMaxTrackingStepCmd = nullptr;
|
||||
G4UIcmdWith3Vector* fSetDrawColourCmd = nullptr;
|
||||
G4UIcmdWithABool* fSetDrawBlineCmd = nullptr;
|
||||
G4UIcmdWithABool* fSetDrawPointsCmd = nullptr;
|
||||
G4UIcmdWithADouble* fSetPointSizeCmd = nullptr;
|
||||
G4UIcmdWithoutParameter* fDrawCmd = nullptr;
|
||||
G4UIcmdWithoutParameter* fResetCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
// G4BlineEquation implementation
|
||||
@@ -40,30 +40,21 @@
|
||||
|
||||
#include "G4BlineEquation.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineEquation::G4BlineEquation( G4MagneticField* MagField )
|
||||
: G4Mag_EqRhs( MagField )
|
||||
{
|
||||
fBackward_direction=false;
|
||||
fDirection=1.;
|
||||
}
|
||||
G4BlineEquation::G4BlineEquation( G4MagneticField* magField )
|
||||
: G4Mag_EqRhs( magField )
|
||||
{}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4BlineEquation::~G4BlineEquation()
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineEquation::EvaluateRhsGivenB( const G4double y[],
|
||||
const G4double B[3],
|
||||
G4double dydx[] ) const
|
||||
{
|
||||
G4double Bmag = fDirection*std::sqrt(B[0]*B[0] + B[1]*B[1] + B[2]*B[2]);
|
||||
dydx[0] = B[0]/Bmag;
|
||||
dydx[1] = B[1]/Bmag;
|
||||
dydx[0] = B[0]/Bmag;
|
||||
dydx[1] = B[1]/Bmag;
|
||||
dydx[2] = B[2]/Bmag;
|
||||
|
||||
dydx[3]=0. * y[0]; //y[0] is used to remove warning
|
||||
@@ -71,7 +62,7 @@ void G4BlineEquation::EvaluateRhsGivenB( const G4double y[],
|
||||
dydx[5]=0.;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineEquation::SetBackwardDirectionOfIntegration(G4bool abool)
|
||||
{
|
||||
|
||||
@@ -49,14 +49,14 @@
|
||||
#include "G4Polyline.hh"
|
||||
#include "G4Polymarker.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineEventAction::G4BlineEventAction(G4BlineTracer* aBlineTool)
|
||||
{
|
||||
fBlineTool=aBlineTool;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineEventAction::~G4BlineEventAction()
|
||||
{
|
||||
@@ -64,26 +64,26 @@ G4BlineEventAction::~G4BlineEventAction()
|
||||
delete fTrajectoryVisAttributes[i];
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineEventAction::BeginOfEventAction(const G4Event*)
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineEventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
if(trajectoryContainer)
|
||||
if(trajectoryContainer)
|
||||
{
|
||||
// visualisation
|
||||
// -------------
|
||||
|
||||
|
||||
if (fDrawBline || fDrawPoints)
|
||||
{
|
||||
G4int n_point = (*(evt->GetTrajectoryContainer()))[0]->GetPointEntries();
|
||||
|
||||
|
||||
G4Polyline pPolyline;
|
||||
G4Polymarker stepPoints;
|
||||
fTrajectoryVisAttributes.push_back(new G4VisAttributes(fDrawColour));
|
||||
@@ -108,7 +108,7 @@ void G4BlineEventAction::EndOfEventAction(const G4Event* evt)
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineEventAction::
|
||||
DrawFieldLines( G4double, G4double, G4double )
|
||||
@@ -117,14 +117,14 @@ DrawFieldLines( G4double, G4double, G4double )
|
||||
size_t npoints =fTrajectoryPoints.size();
|
||||
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if (!pVVisManager)
|
||||
if (!pVVisManager)
|
||||
{
|
||||
G4Exception("G4BlineEventAction::DrawFieldLines()",
|
||||
"NullPointer", JustWarning,
|
||||
"Missing visualisation driver for visualising magnetic field lines!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (nline ==0)
|
||||
{
|
||||
G4cout << "WARNING - G4BlineEventAction::DrawFieldLines()" << G4endl
|
||||
@@ -137,13 +137,13 @@ DrawFieldLines( G4double, G4double, G4double )
|
||||
for (size_t i=0;i<nline;i++)
|
||||
pVVisManager->Draw(fTrajectoryPolyline[i]);
|
||||
for (size_t i=0;i<npoints;i++)
|
||||
pVVisManager->Draw(fTrajectoryPoints[i]);
|
||||
pVVisManager->Draw(fTrajectoryPoints[i]);
|
||||
|
||||
// ((G4VisManager*)pVVisManager)->GetCurrentViewer()->DrawView();
|
||||
// ((G4VisManager*)pVVisManager)->GetCurrentViewer()->DrawView();
|
||||
// ((G4VisManager*)pVVisManager)->GetCurrentViewer()->ShowView();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineEventAction::ResetVectorObjectToBeDrawn()
|
||||
{
|
||||
|
||||
@@ -45,21 +45,7 @@
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4BlinePrimaryGeneratorAction::G4BlinePrimaryGeneratorAction()
|
||||
{
|
||||
fUserPrimaryAction = 0;
|
||||
fFirstPartOfBline = true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4BlinePrimaryGeneratorAction::~G4BlinePrimaryGeneratorAction()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlinePrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
@@ -74,41 +60,41 @@ void G4BlinePrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
// For the first part of a bline the start position and time are defined
|
||||
// by using the USER primary action while for the second part the previous
|
||||
// values are taken.
|
||||
|
||||
|
||||
if (fFirstPartOfBline)
|
||||
{
|
||||
// set the position and time defined by using the USER primary action
|
||||
|
||||
G4Event* tmpEvent = new G4Event();
|
||||
|
||||
auto tmpEvent = new G4Event();
|
||||
fUserPrimaryAction->GeneratePrimaries(tmpEvent);
|
||||
fBlineStartPosition = tmpEvent->GetPrimaryVertex()->GetPosition();
|
||||
fT0 = tmpEvent->GetPrimaryVertex()->GetT0();
|
||||
delete tmpEvent;
|
||||
}
|
||||
fFirstPartOfBline = false;
|
||||
fFirstPartOfBline = false;
|
||||
|
||||
G4PrimaryVertex* primary_vertex =
|
||||
auto primary_vertex =
|
||||
new G4PrimaryVertex(fBlineStartPosition, fT0);
|
||||
|
||||
// Define the particle to be tracked as Charged Geantino
|
||||
|
||||
|
||||
G4ChargedGeantino* pdef = G4ChargedGeantino::ChargedGeantino();
|
||||
|
||||
|
||||
G4double mass = pdef->GetPDGMass();
|
||||
G4double energy = 10000.*MeV + mass;
|
||||
G4double pmom = std::sqrt(energy*energy-mass*mass);
|
||||
|
||||
// The momentum direction and energy do not have an effect in tracing of
|
||||
// The momentum direction and energy do not have an effect in tracing of
|
||||
// bline but still need to be defined.
|
||||
|
||||
|
||||
G4double px = 0.;
|
||||
G4double py = 0.;
|
||||
G4double pz = pmom;
|
||||
|
||||
G4PrimaryParticle* particle = new G4PrimaryParticle(pdef,px,py,pz);
|
||||
auto particle = new G4PrimaryParticle(pdef,px,py,pz);
|
||||
particle->SetMass( mass );
|
||||
particle->SetCharge(pdef->GetPDGCharge());
|
||||
primary_vertex->SetPrimary( particle );
|
||||
|
||||
|
||||
anEvent->AddPrimaryVertex( primary_vertex );
|
||||
}
|
||||
|
||||
@@ -40,22 +40,15 @@
|
||||
|
||||
#include "G4BlineSteppingAction.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineSteppingAction::
|
||||
G4BlineSteppingAction(G4BlineTracer* aBlineTool)
|
||||
G4BlineSteppingAction::G4BlineSteppingAction(G4BlineTracer* aBlineTool)
|
||||
{
|
||||
fBlineTool=aBlineTool;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
G4BlineSteppingAction::~G4BlineSteppingAction()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineSteppingAction::UserSteppingAction(const G4Step*)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "G4ChordFinder.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineTracer::G4BlineTracer()
|
||||
{
|
||||
@@ -63,38 +63,36 @@ G4BlineTracer::G4BlineTracer()
|
||||
fSteppingAction = new G4BlineSteppingAction(this) ;
|
||||
fEventAction = new G4BlineEventAction(this);
|
||||
fPrimaryGeneratorAction = new G4BlinePrimaryGeneratorAction();
|
||||
fMaxTrackingStep =1000.*m;
|
||||
fWas_ResetChordFinders_already_called=false;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineTracer::~G4BlineTracer()
|
||||
{
|
||||
delete fMessenger;
|
||||
delete fSteppingAction;
|
||||
delete fEventAction;
|
||||
delete fEventAction;
|
||||
delete fPrimaryGeneratorAction;
|
||||
for (size_t i=0; i< fVecEquationOfMotion.size();i++)
|
||||
{
|
||||
if (fVecEquationOfMotion[i]) delete fVecEquationOfMotion[i];
|
||||
if (fVecChordFinders[i]) delete fVecChordFinders[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineTracer::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineTracer::EndOfRunAction(const G4Run*)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineTracer::ComputeBlines(G4int n_of_lines)
|
||||
{
|
||||
@@ -107,38 +105,38 @@ void G4BlineTracer::ComputeBlines(G4int n_of_lines)
|
||||
}
|
||||
|
||||
// Replace the user action by the ad-hoc actions for Blines
|
||||
|
||||
|
||||
G4RunManager* theRunManager = G4RunManager::GetRunManager();
|
||||
G4UserRunAction* user_run_action =
|
||||
auto user_run_action =
|
||||
(G4UserRunAction*)theRunManager->GetUserRunAction();
|
||||
theRunManager->SetUserAction(this);
|
||||
|
||||
G4UserSteppingAction* user_stepping_action =
|
||||
auto user_stepping_action =
|
||||
(G4UserSteppingAction*)theRunManager->GetUserSteppingAction();
|
||||
theRunManager->SetUserAction(fSteppingAction);
|
||||
|
||||
G4VUserPrimaryGeneratorAction* userPrimaryAction =
|
||||
|
||||
auto userPrimaryAction =
|
||||
(G4VUserPrimaryGeneratorAction*)theRunManager->GetUserPrimaryGeneratorAction();
|
||||
if (userPrimaryAction)
|
||||
if (userPrimaryAction)
|
||||
fPrimaryGeneratorAction->SetUserPrimaryAction(userPrimaryAction);
|
||||
theRunManager->SetUserAction(fPrimaryGeneratorAction);
|
||||
|
||||
G4UserEventAction* user_event_action =
|
||||
auto user_event_action =
|
||||
(G4UserEventAction*)theRunManager->GetUserEventAction();
|
||||
theRunManager->SetUserAction(fEventAction);
|
||||
|
||||
G4UserTrackingAction* user_tracking_action =
|
||||
|
||||
auto user_tracking_action =
|
||||
(G4UserTrackingAction*)theRunManager->GetUserTrackingAction();
|
||||
G4UserTrackingAction* aNullTrackingAction = 0;
|
||||
G4UserTrackingAction* aNullTrackingAction = nullptr;
|
||||
theRunManager->SetUserAction(aNullTrackingAction);
|
||||
|
||||
G4UserStackingAction* user_stacking_action =
|
||||
auto user_stacking_action =
|
||||
(G4UserStackingAction*)theRunManager->GetUserStackingAction();
|
||||
G4UserStackingAction* aNullStackingAction = 0;
|
||||
G4UserStackingAction* aNullStackingAction = nullptr;
|
||||
theRunManager->SetUserAction(aNullStackingAction);
|
||||
|
||||
// replace the user defined chordfinder by the element of fVecChordFinders
|
||||
|
||||
// replace the user defined chordfinder by the element of fVecChordFinders
|
||||
|
||||
std::vector<G4ChordFinder*> user_chord_finders;
|
||||
std::vector<G4double> user_largest_acceptable_step;
|
||||
for (size_t i=0;i<fVecChordFinders.size();i++)
|
||||
@@ -150,14 +148,14 @@ void G4BlineTracer::ComputeBlines(G4int n_of_lines)
|
||||
fVecChordFinders[i]->SetDeltaChord(user_chord_finders[i]->GetDeltaChord());
|
||||
fVecFieldManagers[i]->SetChordFinder(fVecChordFinders[i]);
|
||||
}
|
||||
else user_chord_finders.push_back(0);
|
||||
else user_chord_finders.push_back(nullptr);
|
||||
}
|
||||
|
||||
// I have tried to use the smooth line filter ability but I could not obtain
|
||||
// I have tried to use the smooth line filter ability but I could not obtain
|
||||
// a smooth trajectory in the G4TrajectoryContainer after an event
|
||||
// Another solution for obtaining a smooth trajectory is to limit
|
||||
// the LargestAcceptableStep in the G4PropagatorInField object.
|
||||
// This is the solution I used.
|
||||
// This is the solution I used.
|
||||
|
||||
// Old solution:
|
||||
// G4TransportationManager::GetTransportationManager()
|
||||
@@ -185,7 +183,7 @@ void G4BlineTracer::ComputeBlines(G4int n_of_lines)
|
||||
|
||||
for (size_t i=0; i< fVecEquationOfMotion.size();i++)
|
||||
{
|
||||
if (fVecEquationOfMotion[i])
|
||||
if (fVecEquationOfMotion[i])
|
||||
fVecEquationOfMotion[i]->SetBackwardDirectionOfIntegration(true);
|
||||
}
|
||||
theRunManager->BeamOn(1);
|
||||
@@ -194,7 +192,7 @@ void G4BlineTracer::ComputeBlines(G4int n_of_lines)
|
||||
|
||||
for (size_t i=0; i < fVecEquationOfMotion.size();i++)
|
||||
{
|
||||
if (fVecEquationOfMotion[i])
|
||||
if (fVecEquationOfMotion[i])
|
||||
fVecEquationOfMotion[i]->SetBackwardDirectionOfIntegration(false);
|
||||
}
|
||||
theRunManager->BeamOn(1);
|
||||
@@ -226,9 +224,10 @@ void G4BlineTracer::ComputeBlines(G4int n_of_lines)
|
||||
{
|
||||
if (user_chord_finders[i])
|
||||
fVecFieldManagers[i]->SetChordFinder(user_chord_finders[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
@@ -243,8 +242,8 @@ G4bool G4BlineTracer::CheckMagneticFields()
|
||||
return false;
|
||||
if (fVecMagneticFields[0] != tmanager->GetFieldManager()->GetDetectorField())
|
||||
return false;
|
||||
G4LogicalVolumeStore* theVolumeStore = G4LogicalVolumeStore::GetInstance();
|
||||
|
||||
G4LogicalVolumeStore* theVolumeStore = G4LogicalVolumeStore::GetInstance();
|
||||
|
||||
std::vector<G4FieldManagers*> LogicalVolumeFields;
|
||||
size_t j=0;
|
||||
for (size_t i=0; i<theVolumeStore.size();i++)
|
||||
@@ -266,7 +265,7 @@ G4bool G4BlineTracer::CheckMagneticFields()
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineTracer::ResetChordFinders()
|
||||
{
|
||||
@@ -274,7 +273,7 @@ void G4BlineTracer::ResetChordFinders()
|
||||
{
|
||||
delete fVecEquationOfMotion[i];
|
||||
delete fVecChordFinders[i];
|
||||
}
|
||||
}
|
||||
|
||||
fVecChordFinders.clear();
|
||||
fVecFieldManagers.clear();
|
||||
@@ -283,9 +282,9 @@ void G4BlineTracer::ResetChordFinders()
|
||||
|
||||
// global field
|
||||
|
||||
fVecChordFinders.push_back(0);
|
||||
fVecMagneticFields.push_back(0);
|
||||
fVecEquationOfMotion.push_back(0);
|
||||
fVecChordFinders.push_back(nullptr);
|
||||
fVecMagneticFields.push_back(nullptr);
|
||||
fVecEquationOfMotion.push_back(nullptr);
|
||||
fVecFieldManagers.push_back(G4TransportationManager::GetTransportationManager()
|
||||
->GetFieldManager());
|
||||
if (fVecFieldManagers[0])
|
||||
@@ -295,14 +294,14 @@ void G4BlineTracer::ResetChordFinders()
|
||||
if (fVecMagneticFields[0])
|
||||
{
|
||||
fVecEquationOfMotion[0] = new G4BlineEquation(fVecMagneticFields[0]);
|
||||
G4CashKarpRKF45* pStepper = new G4CashKarpRKF45(fVecEquationOfMotion[0]);
|
||||
G4MagInt_Driver* pIntgrDriver =
|
||||
auto pStepper = new G4CashKarpRKF45(fVecEquationOfMotion[0]);
|
||||
auto pIntgrDriver =
|
||||
new G4MagInt_Driver(0.01*mm,pStepper,pStepper->GetNumberOfVariables());
|
||||
fVecChordFinders[0] = new G4ChordFinder(pIntgrDriver);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// local fields
|
||||
// local fields
|
||||
|
||||
G4LogicalVolumeStore* theVolumeStore = G4LogicalVolumeStore::GetInstance();
|
||||
|
||||
@@ -315,16 +314,16 @@ void G4BlineTracer::ResetChordFinders()
|
||||
fVecFieldManagers.push_back(((*theVolumeStore)[i])->GetFieldManager());
|
||||
fVecMagneticFields.push_back((G4MagneticField*)
|
||||
fVecFieldManagers[j]->GetDetectorField());
|
||||
fVecEquationOfMotion.push_back(0);
|
||||
fVecChordFinders.push_back(0);
|
||||
fVecEquationOfMotion.push_back(nullptr);
|
||||
fVecChordFinders.push_back(nullptr);
|
||||
if (fVecMagneticFields[j])
|
||||
{
|
||||
fVecEquationOfMotion[j]= new G4BlineEquation(fVecMagneticFields[j]);
|
||||
G4CashKarpRKF45* pStepper = new G4CashKarpRKF45(fVecEquationOfMotion[j]);
|
||||
G4MagInt_Driver* pIntgrDriver =
|
||||
auto pStepper = new G4CashKarpRKF45(fVecEquationOfMotion[j]);
|
||||
auto pIntgrDriver =
|
||||
new G4MagInt_Driver(.01*mm,pStepper,pStepper->GetNumberOfVariables());
|
||||
fVecChordFinders[j] = new G4ChordFinder(pIntgrDriver);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
#include "G4UIcmdWith3Vector.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineTracerMessenger::G4BlineTracerMessenger( G4BlineTracer* aBlineTool )
|
||||
: fTheBlineTool(aBlineTool)
|
||||
{
|
||||
fTheBlineTool = aBlineTool;
|
||||
fBlineToolDir = new G4UIdirectory("/vis/blineTracer/");
|
||||
fBlineToolDir->SetGuidance("Commands to trace and visualise magnetic field lines.");
|
||||
fBlineToolDir->SetGuidance("These commands work only if a magnetic-field is set");
|
||||
@@ -67,13 +67,13 @@ G4BlineTracerMessenger::G4BlineTracerMessenger( G4BlineTracer* aBlineTool )
|
||||
fBlineCmd->SetGuidance("Compute magnetic field lines for visualisation.");
|
||||
fBlineCmd->SetParameterName("nb_of_lines",false);
|
||||
fBlineCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fSetMaxTrackingStepCmd =
|
||||
new G4UIcmdWithADoubleAndUnit("/vis/blineTracer/setMaxStepLength",this);
|
||||
new G4UIcmdWithADoubleAndUnit("/vis/blineTracer/setMaxStepLength",this);
|
||||
fSetMaxTrackingStepCmd->SetGuidance("Set the maximum length of tracking step");
|
||||
fSetMaxTrackingStepCmd->SetGuidance("when integrating magnetic field line.");
|
||||
fSetMaxTrackingStepCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fSetDrawColourCmd = new G4UIcmdWith3Vector("/vis/blineTracer/setColour",this);
|
||||
fSetDrawColourCmd->SetGuidance("Set the colour drawing trajectories");
|
||||
fSetDrawColourCmd->SetGuidance("and magnetic field lines.");
|
||||
@@ -84,29 +84,29 @@ G4BlineTracerMessenger::G4BlineTracerMessenger( G4BlineTracer* aBlineTool )
|
||||
fSetDrawBlineCmd->SetGuidance("to be drawn.");
|
||||
fSetDrawBlineCmd->SetParameterName("StockLines",false);
|
||||
fSetDrawBlineCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fSetDrawPointsCmd = new G4UIcmdWithABool("/vis/blineTracer/stockPoints",this);
|
||||
fSetDrawPointsCmd->SetGuidance("If true step field line points are stocked");
|
||||
fSetDrawPointsCmd->SetGuidance("in vector of points to be drawn.");
|
||||
fSetDrawPointsCmd->SetParameterName("StockPoints",false);
|
||||
fSetDrawPointsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fSetPointSizeCmd = new G4UIcmdWithADouble("/vis/blineTracer/setPointSize",this);
|
||||
fSetPointSizeCmd->SetGuidance("Set the size of points for drawing.");
|
||||
fSetPointSizeCmd->SetParameterName("StepSize",false);
|
||||
fSetPointSizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fDrawCmd = new G4UIcmdWithoutParameter("/vis/blineTracer/show",this);
|
||||
fDrawCmd->SetGuidance("Show the stored magnetic field lines.");
|
||||
fDrawCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fResetCmd =
|
||||
new G4UIcmdWithoutParameter("/vis/blineTracer/resetMaterialToBeDrawn",this);
|
||||
fResetCmd->SetGuidance("Clear the vectors of lines and points to be drawn.");
|
||||
fResetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4BlineTracerMessenger::~G4BlineTracerMessenger()
|
||||
{
|
||||
@@ -119,34 +119,34 @@ G4BlineTracerMessenger::~G4BlineTracerMessenger()
|
||||
delete fSetMaxTrackingStepCmd;
|
||||
delete fBlineCmd;
|
||||
delete fBlineToolDir;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4BlineTracerMessenger::SetNewValue( G4UIcommand * command,
|
||||
G4String newValues )
|
||||
{
|
||||
{
|
||||
if (command == fBlineCmd)
|
||||
fTheBlineTool->ComputeBlines(1);
|
||||
else if( command == fSetMaxTrackingStepCmd )
|
||||
else if( command == fSetMaxTrackingStepCmd )
|
||||
fTheBlineTool->SetMaxTrackingStep(fSetMaxTrackingStepCmd
|
||||
->GetNewDoubleValue(newValues));
|
||||
else if( command == fSetDrawBlineCmd )
|
||||
else if( command == fSetDrawBlineCmd )
|
||||
fTheBlineTool->GetEventAction()->SetDrawBline(fSetDrawBlineCmd
|
||||
->GetNewBoolValue(newValues));
|
||||
else if( command == fSetDrawColourCmd )
|
||||
else if( command == fSetDrawColourCmd )
|
||||
{
|
||||
G4ThreeVector vec=fSetDrawColourCmd->GetNew3VectorValue(newValues);
|
||||
fTheBlineTool->GetEventAction()->
|
||||
SetDrawColour(G4Colour(vec.x(),vec.y(),vec.z()));
|
||||
}
|
||||
else if( command == fSetDrawPointsCmd )
|
||||
else if( command == fSetDrawPointsCmd )
|
||||
fTheBlineTool->GetEventAction()->SetDrawPoints(fSetDrawPointsCmd
|
||||
->GetNewBoolValue(newValues));
|
||||
else if( command == fSetPointSizeCmd )
|
||||
else if( command == fSetPointSizeCmd )
|
||||
fTheBlineTool->GetEventAction()->SetPointSize(fSetPointSizeCmd
|
||||
->GetNewDoubleValue(newValues));
|
||||
else if( command == fDrawCmd )
|
||||
->GetNewDoubleValue(newValues));
|
||||
else if( command == fDrawCmd )
|
||||
fTheBlineTool->GetEventAction()->DrawFieldLines(.5,45.,45.);
|
||||
else if( command == fResetCmd )
|
||||
fTheBlineTool->GetEventAction()->ResetVectorObjectToBeDrawn();
|
||||
|
||||
@@ -42,7 +42,7 @@ int main()
|
||||
runManager->SetUserInitialization(new FTFP_BERT);
|
||||
|
||||
// Instantiate the G4BlineTracer class
|
||||
G4BlineTracer* theBlineTool = new G4BlineTracer();
|
||||
auto theBlineTool = new G4BlineTracer();
|
||||
|
||||
// delete it
|
||||
delete theBlineTool;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#---Adding all field examples subdirectories explicitly
|
||||
#---Adding all field examples subdirectories explicitly
|
||||
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
|
||||
add_subdirectory(BlineTracer)
|
||||
add_subdirectory(field01)
|
||||
|
||||
@@ -5,6 +5,14 @@ which **must** added in reverse chronological order (newest at the top). It must
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-11-15 I. Hrivnacova (fieldex-V11-01-01)
|
||||
- Updated vis.mac macros:
|
||||
- Changed "/vis/open XYZ [600x600-0+0]" to "/vis/open" to allow run-time choices
|
||||
and simplified comments.
|
||||
|
||||
## 2023-07-05 I. Hrivnacova (fieldex-V11-01-00)
|
||||
- Clean-up trailing white-spaces in README's and CMake files
|
||||
|
||||
## 2021-12-10 Ben Morgan (fieldex-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Geant4 extended examples - field
|
||||
----------------------------------
|
||||
|
||||
Examples in this directory demonstrate specific simulation setups
|
||||
Examples in this directory demonstrate specific simulation setups
|
||||
in magnetic field.
|
||||
|
||||
|
||||
field01
|
||||
--------
|
||||
Example enabling investigation of tracking in a magnetic field.
|
||||
|
||||
field02
|
||||
--------
|
||||
Test for investigation of tracking in electric field and field dependent
|
||||
Test for investigation of tracking in electric field and field dependent
|
||||
electromagnetic processes.
|
||||
|
||||
field03
|
||||
@@ -21,7 +21,7 @@ to selected logical volumes varies.
|
||||
|
||||
field04
|
||||
--------
|
||||
This example shows how to define/use OVERLAPPING field elements
|
||||
This example shows how to define/use OVERLAPPING field elements
|
||||
in Geant4. Fields might be either magnetic, electric or both.
|
||||
|
||||
field05
|
||||
@@ -32,10 +32,10 @@ field06
|
||||
--------
|
||||
This example exercises the new (in 9.5) capability of tracking massive
|
||||
particles in a gravity field.
|
||||
|
||||
BlineTracer
|
||||
|
||||
BlineTracer
|
||||
------------
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
The BlineTracer module allows to trace and visualise magnetic field
|
||||
lines in a Geant4 application where particle are tracked through the
|
||||
magnetic field (in future, these functionalities may be integrated in
|
||||
the Geant4 kernel).
|
||||
|
||||
@@ -29,16 +29,16 @@
|
||||
|
||||
The basic capabilities of choosing the stepper type are demonstrated in the
|
||||
field.in macro file:
|
||||
|
||||
|
||||
\verbatim
|
||||
/field/setStepperType 145 ## Choose a stepper type ( Tsito
|
||||
/field/setStepperType 101 ## Choose an FSAL stepper ( FE
|
||||
/field/setMinStep 0.1 mm ## Smaller steps always s
|
||||
/field/update ## Initialise using parameters above
|
||||
\endverbatim
|
||||
|
||||
|
||||
In addition it is possible to choose to use a new type of stepper, known
|
||||
as 'First Same as Last' or FSAL, which in each step obtains the field value
|
||||
as 'First Same as Last' or FSAL, which in each step obtains the field value
|
||||
at the step endpoint and evaluates the 'right hand size' of the equation
|
||||
for the next integration step. This reduces the number of calls to the field
|
||||
evaluation, which can be one the most computationally expensive methods,
|
||||
@@ -50,15 +50,15 @@
|
||||
Number Name of Stepper Comments
|
||||
===========================================================================
|
||||
Recommended - default since Geant4 10.4:
|
||||
|
||||
15 - 'DoPri5' or
|
||||
|
||||
15 - 'DoPri5' or
|
||||
Dormand Prince 745 : Uses a pair 4th & 5th order formulae (like other 4/5
|
||||
well-known and very efficient embedded method
|
||||
methods); their difference is the error estimate.
|
||||
Highly recommended in literature, including
|
||||
Hairer & Wanner, & Numerical Recipes
|
||||
Used in several established RK code (e.g. DOPRI5)
|
||||
===========================================================================
|
||||
===========================================================================
|
||||
Good choices for reasonably smooth fields:
|
||||
|
||||
45 - BogackiShampine45 : more efficient embedded 4/5 pair
|
||||
@@ -89,14 +89,14 @@
|
||||
step size is not known, this type of stepper
|
||||
converges faster and more smoothly to good
|
||||
step sizes.
|
||||
===========================================================================
|
||||
The old default and old first alternative -
|
||||
|
||||
===========================================================================
|
||||
The old default and old first alternative -
|
||||
|
||||
4 - ClassicalRK4 : original Runge-Kutta method, very robust but slower )
|
||||
( obtains error estimate by doing 2 half steps )
|
||||
Good baseline for comparison - long experience of use.
|
||||
May be good alternative for less smooth fields.
|
||||
|
||||
|
||||
8 - Cash Karp RKF 45 : The oldest 'embedded' RK method in Geant4 -
|
||||
also fairly robust.
|
||||
Faster than ClassicalRK4 for smoother fields,
|
||||
@@ -105,14 +105,14 @@
|
||||
|
||||
===========================================================================
|
||||
Other potential choices for non-smooth fields (with kinks, abrupt changes):
|
||||
|
||||
|
||||
3 - SimpleHeum : low order, with error obtained from half-steps
|
||||
23 - BogackiShampine23 : lower order embedded method (new in 10.3-beta)
|
||||
===========================================================================
|
||||
===========================================================================
|
||||
\endverbatim
|
||||
|
||||
\section field01_s02 Controlling the killing of looping particles
|
||||
|
||||
|
||||
Occasionally tracks 'looping' in a strong magnetic field, making little
|
||||
progress even over hundreds of integration steps. This is due to a
|
||||
combination of a strong magnetic field and a thin material (gas or vacuum)
|
||||
@@ -135,7 +135,7 @@ three thresholds exist
|
||||
loop is killed silently (no warning.)
|
||||
Above the 'Warning Energy', if a track is selected for killing a warning is
|
||||
generated.
|
||||
|
||||
|
||||
- **The 'Important' Energy**: the threshold energy above which a track will survive
|
||||
for multiple steps if found looping.
|
||||
|
||||
@@ -166,7 +166,7 @@ This works only if either
|
||||
- the G4ModularPhysicsList and its AddTransporation method are used to create and register a common transportation process for all particles (one for each thread).
|
||||
|
||||
\subsection field01_s02_sub2 ii) Fine grained control (available in Geant4 versions since 7.0)
|
||||
|
||||
|
||||
Fine grained control of the Transportation's parameters for looping particles
|
||||
is also possible.
|
||||
|
||||
@@ -201,18 +201,18 @@ Note that for all pre-configured and modular physics lists share a single
|
||||
Transportation process for all types of particles. So the parameters for
|
||||
killing loopers will be shared by all particle types in this case.
|
||||
|
||||
\section field01_s1 Background Information
|
||||
\section field01_s1 Background Information
|
||||
|
||||
\subsection field01_s1_sub1 GEOMETRY DEFINITION
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
The volume "World" contains the "Absorber".
|
||||
In this test the parameters of the "World" can be changed , too.
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
@@ -220,9 +220,9 @@ killing loopers will be shared by all particle types in this case.
|
||||
The default geometry is constructed in F01DetectorConstruction class,
|
||||
but all the parameters can be changed via
|
||||
the commands defined in the F01DetectorMessenger class.
|
||||
|
||||
|
||||
\subsection field01_s1_sub2 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
|
||||
The primary kinematic consists of a single particle (electron, Ekin = 0.5 GeV)
|
||||
which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
@@ -235,35 +235,35 @@ killing loopers will be shared by all particle types in this case.
|
||||
F01PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
\subsection field01_s1_sub3 DETECTOR RESPONSE
|
||||
|
||||
The spatial distribution of charged particles transported in magnetic
|
||||
field is envistigated.
|
||||
A HIT is a record, event per event , of all the
|
||||
A HIT is a record, event per event , of all the
|
||||
informations needed to simulate and analyse the detector response.
|
||||
|
||||
In this example a F01CalorHit is defined as a set of 2 informations:
|
||||
- the total energy deposit in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
Therefore the absorber is declared
|
||||
'sensitive detector' (SD), see F01CalorimeterSD, which means they can contribute to the hit.
|
||||
|
||||
|
||||
\subsection field01_s1_sub4 PHYSICS LIST
|
||||
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
requires data files for electromagnetic and hadronic processes.
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
|
||||
\subsection field01_s1_sub5 HOW TO START ?
|
||||
|
||||
|
||||
- Execute field01 in 'batch' mode from macro file e.g.
|
||||
\verbatim
|
||||
% ./field01 field01.in
|
||||
\endverbatim
|
||||
|
||||
|
||||
- Execute field01 in 'interactive' mode with visualization e.g.
|
||||
\verbatim
|
||||
% ./field01
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(field01)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -23,7 +23,7 @@ include(${Geant4_USE_FILE})
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
|
||||
@@ -4,9 +4,16 @@ See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
## 2023-11-10 I. Hrivnacova (fieldex01-V11-01-01)
|
||||
- Coding guidelines: split long lines
|
||||
|
||||
## 2023-07-05 I. Hrivnacova (fieldex01-V11-01-00)
|
||||
- Clang-tidy, new coding guidelines
|
||||
- Clean-up trailing white-spaces
|
||||
|
||||
## 2022-11-05 J. Apostolakis (fieldex01-V11-00-03)
|
||||
- field01.cc: Demonstrate using G4TransporationParameters to set looper values for Transportation.
|
||||
- F01FieldSetup:
|
||||
- F01FieldSetup:
|
||||
* Show how to control Epsilon Min/Max
|
||||
* Boris method is now available only by modifying the source code (search for 'Boris')
|
||||
|
||||
@@ -29,7 +36,7 @@ Nov 28, 2019 I. Hrivnacova - fieldex01-V10-05-00
|
||||
- Fixed formatting in .README.txt
|
||||
|
||||
Dec 4, 2018 J.Apostolakis - fieldex01-V10-04-06
|
||||
- Corrections to use arguments of methods in F01RunAction.
|
||||
- Corrections to use arguments of methods in F01RunAction.
|
||||
Fixes compilation warnings.
|
||||
- Added information to README, .README.txt about new choice of
|
||||
FSAL drivers and choices to control killing of particles looping
|
||||
@@ -58,9 +65,9 @@ July 27, 2018 I.Hrivnacova - fieldex01-V10-04-02,03
|
||||
- Macro review and code clean-up:
|
||||
- Removed EventAction, RunAction, RunActionMessenger
|
||||
used only for storing random numbers, already available in kernel
|
||||
- Separated other than visualization settings from vis.mac in a
|
||||
- Separated other than visualization settings from vis.mac in a
|
||||
new init_vis.mac
|
||||
- Added test for commands defined in the example at the end
|
||||
- Added test for commands defined in the example at the end
|
||||
of field01.in macro
|
||||
- Improved visualization of geometry
|
||||
- Added "beamOn 10" button in gui.mac
|
||||
@@ -97,10 +104,10 @@ July 1, 2016 - I. Hrivnacova - fieldex01-V10-02-01
|
||||
- Propagated last update of README in .README.txt and fixed text format
|
||||
|
||||
June 8, 2016 - J. Apostolakis - fieldex01-V10-02-00
|
||||
- Added option to use new Runge Kutta Steppers
|
||||
- Added option to use new Runge Kutta Steppers
|
||||
|
||||
September 01, 2015 - I. Hrivnacova - fieldex01-V10-01-02
|
||||
- Removed F01EventActionMessenger classes, now obsolete, and
|
||||
- Removed F01EventActionMessenger classes, now obsolete, and
|
||||
replaced /event/printModulo commands in macros with /run/printProgress
|
||||
- Code cleanup
|
||||
|
||||
@@ -129,7 +136,7 @@ November 26, 2013 - I.Hrivnacova - fieldex01-V09-06-07
|
||||
- Fixed ConstructSDandField():
|
||||
Moved setting the SD to logical volume outside the test
|
||||
- Do not test (fAbsorberThickness > 0.) in ConstructCalorimeter()
|
||||
as setting 0 is not allowed in set command
|
||||
as setting 0 is not allowed in set command
|
||||
|
||||
November 25, 2013 - I.Hrivnacova - fieldex01-V09-06-06
|
||||
- Put back cleaning volumes and solid stores in ConstructGeometry()
|
||||
@@ -138,12 +145,12 @@ November 22, 2013 - P.Gumplinger - fieldex01-V09-06-05
|
||||
- add gui.mac and avoid long line
|
||||
|
||||
November 21, 2013 - I.Hrivnacova - fieldex01-V09-06-04
|
||||
- Use new G4RunManager::ReinitializeGeometry to trigger geometry rebuild
|
||||
- Use new G4RunManager::ReinitializeGeometry to trigger geometry rebuild
|
||||
when geometry changes
|
||||
- Remove DetectorConstruction::Update and corresponding UI command that
|
||||
is not needed anymore
|
||||
- Set "ToBeBroadcasted == false" for UI commands that modify detector
|
||||
since these should be executed only by master
|
||||
- Set "ToBeBroadcasted == false" for UI commands that modify detector
|
||||
since these should be executed only by master
|
||||
- Fixed main (do not call gui.mac which does not exist)
|
||||
- Code cleanup in F01FieldSetup.*
|
||||
|
||||
@@ -236,8 +243,8 @@ Dec 1st, 2003 John Apostolakis (fieldex01-V05-02-01)
|
||||
|
||||
Nov 25th, 2003 John Apostolakis (fieldex01-V05-02-00)
|
||||
-----------------------------------------------------
|
||||
- Renamed F01ElectroMagneticField into F01FieldSetup (as it is a creator,
|
||||
not a field).
|
||||
- Renamed F01ElectroMagneticField into F01FieldSetup (as it is a creator,
|
||||
not a field).
|
||||
- FieldSetup is now called in Detector Construction, not main.
|
||||
|
||||
Nov 25th, 2003 Gabriele Cosmo
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
-------
|
||||
|
||||
Example that enables investigation of the accuracy and performance of the
|
||||
tracking in a magnetic field.
|
||||
tracking in a magnetic field.
|
||||
|
||||
The key Geant4 capabilities demonstrated in this example are:
|
||||
- creating a uniform magnetic field interactively using the field
|
||||
messenger,
|
||||
- choosing the type of Runge Kutta stepper used for integration of the
|
||||
- choosing the type of Runge Kutta stepper used for integration of the
|
||||
motion of charged particles in the magnetic field,
|
||||
- controlling the thresholds that determine which looping particles are
|
||||
killed by G4Transporation.
|
||||
@@ -39,10 +39,10 @@
|
||||
/field/update ## Initialise using parameters above
|
||||
|
||||
In addition it is possible to choose to use a new type of stepper, known
|
||||
as 'First Same as Last' or FSAL, which in each step obtains the field value
|
||||
as 'First Same as Last' or FSAL, which in each step obtains the field value
|
||||
at the step endpoint and evaluates the 'right hand size' of the equation
|
||||
for the next integration step. This reduces the number of calls to the field
|
||||
evaluation, which can be one the most computationally expensive methods,
|
||||
evaluation, which can be one the most computationally expensive methods,
|
||||
while providing similar accuracy.
|
||||
|
||||
There are several potential choices of the stepper type. Here are some
|
||||
@@ -51,15 +51,15 @@
|
||||
Number Name of Stepper Comments
|
||||
===========================================================================
|
||||
Recommended - default since Geant4 10.4:
|
||||
|
||||
15 - 'DoPri5' or
|
||||
|
||||
15 - 'DoPri5' or
|
||||
Dormand Prince 745 : Uses a pair 4th & 5th order formulae (like other 4/5
|
||||
well-known and very efficient embedded method
|
||||
methods); their difference is the error estimate.
|
||||
Highly recommended in literature, including
|
||||
Hairer & Wanner, & Numerical Recipes
|
||||
Used in several established RK code (e.g. DOPRI5)
|
||||
===========================================================================
|
||||
===========================================================================
|
||||
Good choices for reasonably smooth fields:
|
||||
|
||||
45 - BogackiShampine45 : more efficient embedded 4/5 pair
|
||||
@@ -90,14 +90,14 @@
|
||||
step size is not known, this type of stepper
|
||||
converges faster and more smoothly to good
|
||||
step sizes.
|
||||
===========================================================================
|
||||
The old default and old first alternative -
|
||||
|
||||
===========================================================================
|
||||
The old default and old first alternative -
|
||||
|
||||
4 - ClassicalRK4 : original Runge-Kutta method, very robust but slower )
|
||||
( obtains error estimate by doing 2 half steps )
|
||||
Good baseline for comparison - long experience of use.
|
||||
May be good alternative for less smooth fields.
|
||||
|
||||
|
||||
8 - Cash Karp RKF 45 : The oldest 'embedded' RK method in Geant4 -
|
||||
also fairly robust.
|
||||
Faster than ClassicalRK4 for smoother fields,
|
||||
@@ -106,15 +106,15 @@
|
||||
|
||||
===========================================================================
|
||||
Other potential choices for non-smooth fields (with kinks, abrupt changes):
|
||||
|
||||
|
||||
3 - SimpleHeum : low order, with error obtained from half-steps
|
||||
23 - BogackiShampine23 : lower order embedded method (new in 10.3-beta)
|
||||
===========================================================================
|
||||
===========================================================================
|
||||
|
||||
|
||||
|
||||
C. Controlling the killing of looping particles
|
||||
|
||||
|
||||
|
||||
Occasionally tracks 'looping' in a strong magnetic field, making little
|
||||
progress even over hundreds of integration steps. This is due to a
|
||||
@@ -127,7 +127,7 @@
|
||||
spent on these tracks. The module for propagation in field in Geant4
|
||||
flags tracks which take more than a certain number (default 1,000) integration
|
||||
steps without reaching the requested end of the step size, which was
|
||||
determined by the physics and geometry.
|
||||
determined by the physics and geometry.
|
||||
|
||||
The Geant4 G4Transportation and G4CoupledTransportation processes are tasked
|
||||
to select which of the looping tracks are killed and which survive. To
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
Above the 'Warning Energy', if a track is selected for killing a warning is
|
||||
generated.
|
||||
|
||||
|
||||
The 'Important' Energy: the threshold energy above which a track will survive
|
||||
for multiple steps if found looping.
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
The first method is new in Geant4 release 10.5, and uses the G4PhysicsListHelper
|
||||
which has methods to choose a pre-selected set of parameter values. The choices
|
||||
are between a set each of low and high thresholds. Either one can be enabled
|
||||
by calling correspondingly
|
||||
by calling correspondingly
|
||||
- G4PhysicsListHelper::GetPhysicsListHelper()->UseLowLooperThresholds();
|
||||
or
|
||||
- G4PhysicsListHelper::GetPhysicsListHelper()->UseHighLooperThresholds();
|
||||
@@ -164,16 +164,16 @@
|
||||
before RunManager's Initialise() method is called.
|
||||
This works only if either
|
||||
- a modular physics lists is used, or if
|
||||
- the G4ModularPhysicsList and its AddTransporation method are used
|
||||
- the G4ModularPhysicsList and its AddTransporation method are used
|
||||
to create and register a common transportation process for all particles
|
||||
(one for each thread).
|
||||
|
||||
ii) Fine grained control (available in Geant4 versions since 7.0)
|
||||
|
||||
|
||||
Fine grained control of the Transportation's parameters for looping particles
|
||||
is also possible.
|
||||
|
||||
This is demonstrated in the F01RunAction's ChangeLooperParameters method,
|
||||
This is demonstrated in the F01RunAction's ChangeLooperParameters method,
|
||||
which is called by the BeginOfRunAction. There the appropriate
|
||||
Transportation object for the electron is obtained, and its parameters
|
||||
(if valid) are used to overwrite the thresholds in the G4Transportation class.
|
||||
@@ -190,10 +190,10 @@
|
||||
will generate a warning.
|
||||
|
||||
A second configurable energy threshold enables tracks above it to survive a
|
||||
chosen number of 'tracking' steps. They will be only be killed only if they
|
||||
still loop after than number of tracking steps. F01RunAction's methods are
|
||||
chosen number of 'tracking' steps. They will be only be killed only if they
|
||||
still loop after than number of tracking steps. F01RunAction's methods are
|
||||
used to configure these parameters:
|
||||
|
||||
|
||||
runAction->SetImportantEnergy( 0.1 * CLHEP::MeV );
|
||||
runAction->SetNumberOfTrials( 30 );
|
||||
|
||||
@@ -205,28 +205,28 @@
|
||||
killing loopers will be shared by all particle types in this case.
|
||||
|
||||
|
||||
Background Information
|
||||
|
||||
Background Information
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
In this test the parameters of the "World" can be changed , too.
|
||||
|
||||
In addition a transverse uniform magnetic field can be applied.
|
||||
|
||||
|
||||
The default geometry is constructed in F01DetectorConstruction class,
|
||||
but all the parameters can be changed via
|
||||
the commands defined in the F01DetectorMessenger class.
|
||||
|
||||
|
||||
2- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
|
||||
The primary kinematic consists of a single particle (electron, Ekin = 0.5 GeV)
|
||||
which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
@@ -237,35 +237,35 @@ Background Information
|
||||
It is also possible to change the position of the primary particle vertex
|
||||
or activate its randomization via the commands defined in the
|
||||
F01PrimaryGeneratorMessenger class.
|
||||
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
3- DETECTOR RESPONSE
|
||||
|
||||
The spatial distribution of charged particles transported in magnetic
|
||||
field is envistigated.
|
||||
A HIT is a record, event per event , of all the
|
||||
A HIT is a record, event per event , of all the
|
||||
informations needed to simulate and analyse the detector response.
|
||||
|
||||
|
||||
In this example a F01CalorHit is defined as a set of 2 informations:
|
||||
- the total energy deposit in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
Therefore the absorber is declared
|
||||
'sensitive detector' (SD), see F01CalorimeterSD, which means they can contribute to the hit.
|
||||
|
||||
|
||||
4- PHYSICS LIST
|
||||
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
requires data files for electromagnetic and hadronic processes.
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
|
||||
- Execute field01 in 'batch' mode from macro file e.g.
|
||||
% ./field01 field01.in
|
||||
|
||||
|
||||
- Execute field01 in 'interactive' mode with visualization e.g.
|
||||
% ./field01
|
||||
....
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
// To control verbosity
|
||||
// To control verbosity
|
||||
#include "G4EmParameters.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
|
||||
@@ -80,20 +80,20 @@ int main(int argc,char** argv)
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
|
||||
G4VSteppingVerbose::SetInstance(new F01SteppingVerbose);
|
||||
|
||||
|
||||
// Construct the sequential (or default) run manager
|
||||
auto* runManager =
|
||||
G4RunManagerFactory::CreateRunManager(G4RunManagerType::Serial);
|
||||
|
||||
// G4TransportationWithMscType: fDisabled, fEnabled, fMultipleSteps
|
||||
// G4EmParameters::Instance()->SetTransportationWithMsc(G4TransportationWithMscType::fEnabled);
|
||||
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
// Detector construction
|
||||
F01DetectorConstruction* detector = new F01DetectorConstruction();
|
||||
auto detector = new F01DetectorConstruction();
|
||||
// detector->SetUseFSALstepper(); // Uncomment to use FSAL steppers
|
||||
|
||||
|
||||
runManager->SetUserInitialization(detector);
|
||||
|
||||
// Configure the use of low thresholds for looping particles
|
||||
@@ -107,7 +107,7 @@ int main(int argc,char** argv)
|
||||
// - Low for 'low-E' applications, medical, ..
|
||||
// Note: If helper is used select low or high thresholds , it will overwrite
|
||||
// values from TransportationParameters!
|
||||
|
||||
|
||||
// They are currently applied in the following order:
|
||||
// 1. Transportation Parameters - fine grained control in Transportation construction
|
||||
// 2. Physics List Helper - impose a fixed set of new values in Transport classes
|
||||
@@ -116,7 +116,7 @@ int main(int argc,char** argv)
|
||||
// Note that this also could customise by particle type, e.g. giving different values
|
||||
// to mu-/mu+ , e-/e+ vs others)
|
||||
// If multiple are present, later methods overwrite previous ones in this list.
|
||||
|
||||
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics(new G4StepLimiterPhysics());
|
||||
@@ -130,7 +130,7 @@ int main(int argc,char** argv)
|
||||
G4int numTrials = 30;
|
||||
|
||||
G4bool useTransportParams= true; // Use the new way - Nov 2022
|
||||
|
||||
|
||||
if( useTransportParams )
|
||||
{
|
||||
auto transportParams= G4TransportationParameters::Instance();
|
||||
@@ -147,22 +147,22 @@ int main(int argc,char** argv)
|
||||
// Looping particles with E < 10 keV will be killed after 1 step
|
||||
// with warning.
|
||||
// Looping particles with E > 10 keV will generate a warning.
|
||||
runAction->SetImportantEnergy( importantE );
|
||||
runAction->SetNumberOfTrials( numTrials );
|
||||
runAction->SetImportantEnergy( importantE );
|
||||
runAction->SetNumberOfTrials( numTrials );
|
||||
// Looping particles with E > 0.1 MeV will survive for up to
|
||||
// 30 'tracking' steps, and only be killed if they still loop.
|
||||
|
||||
G4cout << "field01: Using F01RunAction to set looper parameters." << G4endl;
|
||||
runManager->SetUserAction(runAction);
|
||||
}
|
||||
|
||||
|
||||
// Note: this mechanism overwrites the thresholds established by
|
||||
// the call to UseLowLooperThresholds() above.
|
||||
|
||||
// Suppress large verbosity from EM & hadronic processes
|
||||
G4EmParameters::Instance()->SetVerbose(0);
|
||||
G4HadronicParameters::Instance()->SetVerboseLevel(0);
|
||||
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Geant4 version Name: geant4-11-02-ref-00 (8-December-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -136,7 +136,7 @@ Step# X Y Z Direction x dir y dir
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.001220s Sys=0.000000s
|
||||
User=0.000000s Real=0.001322s Sys=0.000000s
|
||||
|
||||
========= Table of registered couples ============================
|
||||
|
||||
@@ -218,7 +218,7 @@ Step# X Y Z Direction x dir y dir
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000746s Sys=0.000000s
|
||||
User=0.000000s Real=0.000832s Sys=0.000000s
|
||||
|
||||
========= Table of registered couples ============================
|
||||
|
||||
@@ -300,7 +300,7 @@ Step# X Y Z Direction x dir y dir
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000725s Sys=0.000000s
|
||||
User=0.000000s Real=0.000796s Sys=0.000000s
|
||||
|
||||
========= Table of registered couples ============================
|
||||
|
||||
@@ -321,68 +321,68 @@ Index : 0 used in the geometry : Yes
|
||||
|
||||
Step# X Y Z Direction x dir y dir z KineE dEStep StepLeng TrakLeng Volume Process
|
||||
0 0 fm 0 fm 21.9895 m 0 0 -1 100 MeV 0 eV 0 fm 0 fm World initStep
|
||||
1 8.92113 mm -1.78691 cm 17.5806 m 6.28145e-08 -3.40789e-08 -1 100 MeV 9.34671 meV 4.40903 m 4.40903 m World Transportation
|
||||
2 8.92403 mm -1.78679 cm 13.6125 m -1.23559e-05 2.85155e-05 -1 100 MeV 8.41188 meV 3.96806 m 8.37709 m World Transportation
|
||||
3 8.91722 mm -1.78731 cm 10.0412 m 3.96458e-05 -3.85094e-05 -1 100 MeV 7.57069 meV 3.57125 m 11.9483 m World Transportation
|
||||
4 -967.158 um -1.5954 cm 6.82712 m 6.58553e-05 -5.02286e-05 -1 100 MeV 6.81368 meV 3.21415 m 15.1625 m World Transportation
|
||||
5 -958.285 um -1.59381 cm 3.93441 m -9.10665e-05 3.71204e-05 -1 100 MeV 6.13226 meV 2.89271 m 18.0552 m World Transportation
|
||||
6 -963.758 um -1.59356 cm 1.33097 m -0.000115374 -1.67489e-05 -1 100 MeV 5.51903 meV 2.60344 m 20.6586 m World Transportation
|
||||
7 -949.121 um -1.59515 cm -1.01213 m 4.12576e-05 0.000127324 -1 100 MeV 4.96728 meV 2.34317 m 23.0018 m World Transportation
|
||||
8 -962.698 um -1.59313 cm -3.12092 m -0.000157685 -6.31324e-06 -1 100 MeV 4.47044 meV 2.1088 m 25.1106 m World Transportation
|
||||
9 -960.719 um -1.593 cm -5.01882 m -0.000170399 1.31717e-05 -1 100 MeV 4.02354 meV 1.89799 m 27.0086 m World Transportation
|
||||
10 -945.594 um -1.59565 cm -6.72694 m 9.04455e-05 0.000162039 -1 100 MeV 3.62104 meV 1.70812 m 28.7167 m World Transportation
|
||||
11 -972.522 um -1.59296 cm -8.26425 m -0.000174202 -0.000103012 -1 100 MeV 3.25893 meV 1.53731 m 30.254 m World Transportation
|
||||
12 -984.115 um -1.59485 cm -9.64782 m 1.19868e-05 -0.000217118 -1 100 MeV 2.93304 meV 1.38358 m 31.6376 m World Transportation
|
||||
13 -984.877 um -1.59421 cm -10.893 m -5.08682e-05 -0.000224623 -1 100 MeV 2.63974 meV 1.24522 m 32.8828 m World Transportation
|
||||
14 800.786 um -1.17185 cm -12.0137 m -0.000243515 3.73474e-05 -1 100 MeV 2.3758 meV 1.12071 m 34.0035 m World Transportation
|
||||
15 15.2238 um -4.43631 mm -13.0224 m 0.000236792 9.4724e-05 -1 100 MeV 2.13829 meV 1.00868 m 35.0122 m World Transportation
|
||||
16 -2.61206 mm 1.70801 mm -13.9301 m -0.000267891 2.1271e-05 -1 100 MeV 1.92446 meV 90.7809 cm 35.92 m World Transportation
|
||||
17 -4.00024 mm -6.32998 mm -14.7471 m 3.9528e-05 -0.000285409 -1 100 MeV 1.73209 meV 81.7063 cm 36.7371 m World Transportation
|
||||
18 -3.98467 mm -6.35405 mm -15.4824 m 0.000276508 -0.000132098 -1 100 MeV 1.55874 meV 73.5289 cm 37.4724 m World Transportation
|
||||
19 -3.97751 mm -6.35879 mm -16.1442 m 0.000323174 -6.15286e-05 -1 100 MeV 1.40286 meV 66.176 cm 38.1341 m World Transportation
|
||||
20 -514.338 um -8.12297 mm -16.7397 m 0.000282701 -0.000188329 -1 100 MeV 1.26263 meV 59.5608 cm 38.7297 m World Transportation
|
||||
21 -457.327 um -1.45866 cm -17.2758 m -1.70759e-07 -0.000357301 -1 100 MeV 1.13648 meV 53.61 cm 39.2658 m World Transportation
|
||||
22 -423.016 um -1.45486 cm -17.7582 m -0.000374209 -1.95608e-05 -1 100 MeV 1.02269 meV 48.2423 cm 39.7483 m World Transportation
|
||||
23 880.064 um -1.42544 cm -18.1924 m 0.000142683 0.000367796 -1 100 MeV 0.920428 meV 43.4185 cm 40.1824 m World Transportation
|
||||
24 802.829 um -1.42546 cm -18.5831 m 0.00014445 -0.000392422 -1 100 MeV 0.828378 meV 39.0763 cm 40.5732 m World Transportation
|
||||
25 876.238 um -1.42123 cm -18.9348 m -0.000271515 0.000330125 -1 100 MeV 0.74554 meV 35.1687 cm 40.9249 m World Transportation
|
||||
26 807.893 um -1.42677 cm -19.2513 m 0.000273734 -0.000342592 -1 100 MeV 0.671084 meV 31.6564 cm 41.2415 m World Transportation
|
||||
27 886.273 um -1.42241 cm -19.5362 m -0.00015545 0.000428891 -1 100 MeV 0.603888 meV 28.4866 cm 41.5263 m World Transportation
|
||||
28 795.255 um -1.42272 cm -19.7926 m -0.000124947 -0.000466972 -1 100 MeV 0.543499 meV 25.638 cm 41.7827 m World Transportation
|
||||
29 865.433 um -1.42878 cm -20.0233 m 0.00047133 0.000223749 -1 100 MeV 0.489149 meV 23.0742 cm 42.0134 m World Transportation
|
||||
30 1.40242 mm -1.41072 cm -20.231 m -0.000433155 0.000324557 -1 100 MeV 0.440237 meV 20.7669 cm 42.2211 m World Transportation
|
||||
31 1.31721 mm -1.41312 cm -20.4179 m -0.000196196 -0.000514169 -1 100 MeV 0.396213 meV 18.6902 cm 42.408 m World Transportation
|
||||
32 -319.037 um -1.49261 cm -20.5861 m 0.00053364 -0.00014956 -1 100 MeV 0.356629 meV 16.8229 cm 42.5762 m World Transportation
|
||||
33 898.805 um -1.84475 cm -20.7375 m 0.000190615 0.000522034 -1 100 MeV 0.321114 meV 15.1476 cm 42.7277 m World Transportation
|
||||
34 -1.46189 mm -1.92746 cm -20.8737 m -0.00046609 0.000303764 -1 100 MeV 0.288929 meV 13.6294 cm 42.864 m World Transportation
|
||||
35 247.118 um -2.13265 cm -20.9964 m -0.000449498 -0.000328146 -1 100 MeV 0.260073 meV 12.2682 cm 42.9867 m World Transportation
|
||||
36 224.518 um -2.13804 cm -21.1067 m 8.14043e-05 -0.000550583 -1 100 MeV 0.233958 meV 11.0363 cm 43.0971 m World Transportation
|
||||
37 256.062 um -2.14231 cm -21.2061 m 0.000502151 -0.000240152 -1 100 MeV 0.210562 meV 9.93266 cm 43.1964 m World Transportation
|
||||
38 304.238 um -2.14234 cm -21.2955 m 0.000505007 0.000233991 -1 100 MeV 0.189506 meV 8.93939 cm 43.2858 m World Transportation
|
||||
39 333.68 um -2.13912 cm -21.3759 m 0.000188219 0.000523807 -1 100 MeV 0.170555 meV 8.04545 cm 43.3662 m World Transportation
|
||||
40 231.893 um -2.23569 cm -21.4483 m -0.000200163 0.000519247 -1 100 MeV 0.153528 meV 7.24223 cm 43.4387 m World Transportation
|
||||
41 209.238 um -2.23293 cm -21.5135 m -0.000471082 0.000296287 -1 100 MeV 0.13815 meV 6.51681 cm 43.5038 m World Transportation
|
||||
42 178.239 um -2.23207 cm -21.5721 m -0.000556512 -8.86477e-06 -1 100 MeV 0.124335 meV 5.86513 cm 43.5625 m World Transportation
|
||||
43 150.285 um -2.23286 cm -21.6249 m -0.00047868 -0.000283965 -1 100 MeV 0.111901 meV 5.27862 cm 43.6153 m World Transportation
|
||||
44 131.461 um -2.23468 cm -21.6724 m -0.000299297 -0.000469293 -1 100 MeV 0.100711 meV 4.75076 cm 43.6628 m World Transportation
|
||||
45 123.199 um -2.23689 cm -21.7152 m -8.14392e-05 -0.000550543 -1 100 MeV 0.0906401 meV 4.27568 cm 43.7055 m World Transportation
|
||||
46 829.389 um -2.06493 cm -21.7537 m 0.000127906 -0.00054162 -1 100 MeV 0.0817583 meV 3.85671 cm 43.7441 m World Transportation
|
||||
47 836.9 um -2.06669 cm -21.7883 m 0.000301625 -0.000467655 -1 100 MeV 0.0734183 meV 3.46329 cm 43.7787 m World Transportation
|
||||
48 671.265 um -2.21725 cm -21.8195 m 0.000428784 -0.000354743 -1 100 MeV 0.0662205 meV 3.12376 cm 43.81 m World Transportation
|
||||
49 -454.602 um -2.22725 cm -21.8475 m 0.000509221 -0.000224405 -1 100 MeV 0.0595614 meV 2.80964 cm 43.8381 m World Transportation
|
||||
50 592.901 um -2.29551 cm -21.8728 m 0.000548798 -9.22693e-05 -1 100 MeV 0.0536423 meV 2.53042 cm 43.8634 m World Transportation
|
||||
51 605.501 um -2.29558 cm -21.8955 m 0.000555569 3.17603e-05 -1 100 MeV 0.0481699 meV 2.27227 cm 43.8861 m World Transportation
|
||||
52 616.721 um -2.2954 cm -21.9159 m 0.000538039 0.000142242 -1 100 MeV 0.0433529 meV 2.04504 cm 43.9065 m World Transportation
|
||||
53 626.333 um -2.29505 cm -21.9344 m 0.00050362 0.000236858 -1 100 MeV 0.0390176 meV 1.84054 cm 43.9249 m World Transportation
|
||||
54 1.0511 mm -2.32086 cm -21.9509 m 0.000458528 0.000315441 -1 100 MeV 0.035145 meV 1.65786 cm 43.9415 m World Transportation
|
||||
55 1.05756 mm -2.32034 cm -21.9658 m 0.000407455 0.000379071 -1 100 MeV 0.0316043 meV 1.49084 cm 43.9564 m World Transportation
|
||||
56 778.914 um -2.36491 cm -21.9792 m 0.000353979 0.000429397 -1 100 MeV 0.0284859 meV 1.34374 cm 43.9699 m World Transportation
|
||||
57 782.871 um -2.36437 cm -21.9913 m 0.000300612 0.000468301 -1 100 MeV 0.0255994 meV 1.20758 cm 43.9819 m World Transportation
|
||||
58 785.258 um -2.36395 cm -22 m 0.000259545 0.00049225 -1 100 MeV 0.0184973 meV 8.72558 mm 43.9907 m OutOfWorld Transportation
|
||||
1 0 fm 0 fm 17.5806 m 6.28145e-08 -3.40789e-08 -1 100 MeV 9.34653 meV 4.40895 m 4.40895 m World Transportation
|
||||
2 2.9005 um 1.26168 um 13.6125 m -1.23683e-05 2.85633e-05 -1 100 MeV 8.41188 meV 3.96806 m 8.37701 m World Transportation
|
||||
3 -3.87279 um -4.03772 um 10.0412 m 3.97233e-05 -3.81572e-05 -1 100 MeV 7.57069 meV 3.57125 m 11.9483 m World Transportation
|
||||
4 613.175 um -1.0056 cm 6.82712 m 6.60471e-05 -5.04612e-05 -1 100 MeV 6.81368 meV 3.21415 m 15.1624 m World Transportation
|
||||
5 622.567 um -1.00394 cm 3.93441 m -9.71966e-05 4.18851e-05 -1 100 MeV 6.13226 meV 2.89271 m 18.0551 m World Transportation
|
||||
6 616.526 um -1.00365 cm 1.33097 m -0.000126553 -1.7578e-05 -1 100 MeV 5.51903 meV 2.60344 m 20.6586 m World Transportation
|
||||
7 632.547 um -1.00543 cm -1.01213 m 4.86764e-05 0.000140116 -1 100 MeV 4.96728 meV 2.34317 m 23.0017 m World Transportation
|
||||
8 617.219 um -1.00309 cm -3.12092 m -0.000180994 -1.0756e-05 -1 100 MeV 4.47044 meV 2.1088 m 25.1105 m World Transportation
|
||||
9 619.784 um -1.00295 cm -5.01882 m -0.000194786 1.44934e-05 -1 100 MeV 4.02354 meV 1.89799 m 27.0085 m World Transportation
|
||||
10 637.016 um -1.00594 cm -6.72694 m 9.92782e-05 0.000184105 -1 100 MeV 3.62104 meV 1.70812 m 28.7166 m World Transportation
|
||||
11 606.832 um -1.00298 cm -8.26425 m -0.000191657 -0.000112991 -1 100 MeV 3.25893 meV 1.53731 m 30.2539 m World Transportation
|
||||
12 593.303 um -1.00507 cm -9.64782 m 1.3341e-05 -0.000246156 -1 100 MeV 2.93304 meV 1.38358 m 31.6375 m World Transportation
|
||||
13 592.714 um -1.00435 cm -10.893 m -5.73864e-05 -0.000251958 -1 100 MeV 2.63974 meV 1.24522 m 32.8827 m World Transportation
|
||||
14 2.40354 mm -5.8355 mm -12.0137 m -0.000266576 4.2495e-05 -1 100 MeV 2.3758 meV 1.12071 m 34.0034 m World Transportation
|
||||
15 1.67523 mm 1.44414 mm -13.0224 m 0.000262201 0.000102545 -1 100 MeV 2.13829 meV 1.00868 m 35.0121 m World Transportation
|
||||
16 -907.758 um 7.60846 mm -13.9301 m -0.000290587 2.5148e-05 -1 100 MeV 1.92446 meV 90.7809 cm 35.9199 m World Transportation
|
||||
17 -2.36937 mm -416.676 um -14.7471 m 3.94644e-05 -0.000305001 -1 100 MeV 1.73209 meV 81.7063 cm 36.737 m World Transportation
|
||||
18 -2.3528 mm -441.46 um -15.4824 m 0.000283443 -0.000141921 -1 100 MeV 1.55874 meV 73.5289 cm 37.4723 m World Transportation
|
||||
19 -2.34545 mm -446.31 um -16.1442 m 0.000331153 -6.94555e-05 -1 100 MeV 1.40286 meV 66.176 cm 38.134 m World Transportation
|
||||
20 1.0886 mm -2.25757 mm -16.7397 m 0.000290982 -0.000199831 -1 100 MeV 1.26263 meV 59.5608 cm 38.7297 m World Transportation
|
||||
21 1.04555 mm -8.71798 mm -17.2758 m -5.91348e-06 -0.000374044 -1 100 MeV 1.13648 meV 53.61 cm 39.2658 m World Transportation
|
||||
22 1.08208 mm -8.67886 mm -17.7582 m -0.000391 -1.45007e-05 -1 100 MeV 1.02269 meV 48.2423 cm 39.7482 m World Transportation
|
||||
23 2.38256 mm -8.40898 mm -18.1924 m 0.00015432 0.000380541 -1 100 MeV 0.920428 meV 43.4185 cm 40.1824 m World Transportation
|
||||
24 2.30231 mm -8.4079 mm -18.5831 m 0.000143653 -0.000409357 -1 100 MeV 0.828378 meV 39.0763 cm 40.5731 m World Transportation
|
||||
25 2.37911 mm -8.36523 mm -18.9348 m -0.000276311 0.000346559 -1 100 MeV 0.74554 meV 35.1687 cm 40.9248 m World Transportation
|
||||
26 2.30743 mm -8.42154 mm -19.2513 m 0.000277934 -0.000358956 -1 100 MeV 0.671084 meV 31.6564 cm 41.2414 m World Transportation
|
||||
27 2.38914 mm -8.37767 mm -19.5362 m -0.000153811 0.00044533 -1 100 MeV 0.603888 meV 28.4866 cm 41.5262 m World Transportation
|
||||
28 2.29525 mm -8.37952 mm -19.7926 m -0.000135641 -0.00047884 -1 100 MeV 0.543499 meV 25.638 cm 41.7826 m World Transportation
|
||||
29 2.36658 mm -8.44293 mm -20.0233 m 0.000488565 0.000223254 -1 100 MeV 0.489149 meV 23.0742 cm 42.0134 m World Transportation
|
||||
30 2.9015 mm -8.26826 mm -20.231 m -0.00044103 0.000340618 -1 100 MeV 0.440237 meV 20.7669 cm 42.221 m World Transportation
|
||||
31 2.81342 mm -8.29176 mm -20.4179 m -0.000209695 -0.000526357 -1 100 MeV 0.396213 meV 18.6902 cm 42.4079 m World Transportation
|
||||
32 1.16768 mm -9.06454 mm -20.5861 m 0.000547103 -0.000161978 -1 100 MeV 0.356629 meV 16.8229 cm 42.5762 m World Transportation
|
||||
33 2.33596 mm -1.2602 cm -20.7375 m 0.000204067 0.00053454 -1 100 MeV 0.321114 meV 15.1476 cm 42.7276 m World Transportation
|
||||
34 -36.9407 um -1.33924 cm -20.8737 m -0.000475249 0.000319707 -1 100 MeV 0.288929 meV 13.6294 cm 42.8639 m World Transportation
|
||||
35 1.6399 mm -1.54689 cm -20.9964 m -0.00046766 -0.000331055 -1 100 MeV 0.260073 meV 12.2682 cm 42.9866 m World Transportation
|
||||
36 1.61582 mm -1.55241 cm -21.1067 m 7.55298e-05 -0.000568015 -1 100 MeV 0.233958 meV 11.0363 cm 43.097 m World Transportation
|
||||
37 1.64765 mm -1.55685 cm -21.2061 m 0.000513325 -0.000254764 -1 100 MeV 0.210562 meV 9.93266 cm 43.1963 m World Transportation
|
||||
38 1.69724 mm -1.55696 cm -21.2955 m 0.000523387 0.000233296 -1 100 MeV 0.189506 meV 8.93939 cm 43.2857 m World Transportation
|
||||
39 1.72803 mm -1.55369 cm -21.3759 m 0.000201625 0.0005364 -1 100 MeV 0.170555 meV 8.04545 cm 43.3662 m World Transportation
|
||||
40 1.6122 mm -1.64995 cm -21.4483 m -0.000198257 0.000537541 -1 100 MeV 0.153528 meV 7.24223 cm 43.4386 m World Transportation
|
||||
41 1.58929 mm -1.64709 cm -21.5135 m -0.000480501 0.000312085 -1 100 MeV 0.13815 meV 6.51681 cm 43.5037 m World Transportation
|
||||
42 1.55751 mm -1.64615 cm -21.5721 m -0.000573026 -7.6658e-07 -1 100 MeV 0.124335 meV 5.86513 cm 43.5624 m World Transportation
|
||||
43 1.52862 mm -1.64692 cm -21.6249 m -0.000497035 -0.000285135 -1 100 MeV 0.111901 meV 5.27862 cm 43.6152 m World Transportation
|
||||
44 1.50896 mm -1.64877 cm -21.6724 m -0.000315155 -0.000478611 -1 100 MeV 0.100711 meV 4.75076 cm 43.6627 m World Transportation
|
||||
45 1.50013 mm -1.65103 cm -21.7152 m -9.21054e-05 -0.000565527 -1 100 MeV 0.0906401 meV 4.27568 cm 43.7054 m World Transportation
|
||||
46 2.23134 mm -1.48018 cm -21.7537 m 0.000123537 -0.000559486 -1 100 MeV 0.0817583 meV 3.85671 cm 43.744 m World Transportation
|
||||
47 2.2388 mm -1.48201 cm -21.7883 m 0.000303481 -0.000485953 -1 100 MeV 0.0734183 meV 3.46329 cm 43.7786 m World Transportation
|
||||
48 2.05155 mm -1.63234 cm -21.8195 m 0.00043608 -0.000371627 -1 100 MeV 0.0662205 meV 3.12376 cm 43.8099 m World Transportation
|
||||
49 924.749 um -1.64072 cm -21.8475 m 0.000520843 -0.00023866 -1 100 MeV 0.0595614 meV 2.80964 cm 43.838 m World Transportation
|
||||
50 1.96258 mm -1.71052 cm -21.8728 m 0.000563569 -0.000103228 -1 100 MeV 0.0536423 meV 2.53042 cm 43.8633 m World Transportation
|
||||
51 1.97554 mm -1.71061 cm -21.8955 m 0.000572403 2.4351e-05 -1 100 MeV 0.0481699 meV 2.27227 cm 43.886 m World Transportation
|
||||
52 1.98712 mm -1.71044 cm -21.9159 m 0.000556015 0.000138347 -1 100 MeV 0.0433529 meV 2.04504 cm 43.9065 m World Transportation
|
||||
53 1.99707 mm -1.7101 cm -21.9344 m 0.000522004 0.000236266 -1 100 MeV 0.0390176 meV 1.84054 cm 43.9249 m World Transportation
|
||||
54 2.41825 mm -1.73651 cm -21.9509 m 0.000476764 0.00031784 -1 100 MeV 0.035145 meV 1.65786 cm 43.9414 m World Transportation
|
||||
55 2.42498 mm -1.73599 cm -21.9658 m 0.000425143 0.000384111 -1 100 MeV 0.0316043 meV 1.49084 cm 43.9563 m World Transportation
|
||||
56 2.14002 mm -1.78013 cm -21.9792 m 0.000370849 0.000436723 -1 100 MeV 0.0284859 meV 1.34374 cm 43.9698 m World Transportation
|
||||
57 2.14418 mm -1.77958 cm -21.9913 m 0.000316494 0.000477575 -1 100 MeV 0.0255994 meV 1.20758 cm 43.9819 m World Transportation
|
||||
58 2.1467 mm -1.77915 cm -22 m 0.000274578 0.000502846 -1 100 MeV 0.0184973 meV 8.72558 mm 43.9906 m OutOfWorld Transportation
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.001013s Sys=0.000000s
|
||||
User=0.000000s Real=0.001088s Sys=0.000000s
|
||||
|
||||
========= Table of registered couples ============================
|
||||
|
||||
@@ -464,7 +464,7 @@ Step# X Y Z Direction x dir y dir
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.001193s Sys=0.000000s
|
||||
User=0.010000s Real=0.001311s Sys=0.000000s
|
||||
F01FieldSetup::CreateStepperAndChordFinder() called.
|
||||
1. Creating Stepper.
|
||||
G4DormandPrince745 Stepper is chosen
|
||||
@@ -520,7 +520,7 @@ Step# X Y Z Direction x dir y dir
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000404s Sys=0.000000s
|
||||
User=0.000000s Real=0.000445s Sys=0.000000s
|
||||
|
||||
========= Table of registered couples ============================
|
||||
|
||||
@@ -547,7 +547,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=0.020000s Real=0.014555s Sys=0.000000s
|
||||
User=0.010000s Real=0.016340s Sys=0.000000s
|
||||
#
|
||||
/calor/setAbsMat Xe20CO2
|
||||
/calor/setWorldMat Kr20CO2
|
||||
@@ -616,7 +616,7 @@ Index : 2 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.005287s Sys=0.000000s
|
||||
User=0.010000s Real=0.010972s Sys=0.000000s
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.3 MB
|
||||
|
||||
@@ -48,15 +48,15 @@ class F01ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
F01ActionInitialization(F01DetectorConstruction*);
|
||||
virtual ~F01ActionInitialization();
|
||||
~F01ActionInitialization() override = default;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
|
||||
G4VSteppingVerbose* InitializeSteppingVerbose() const override;
|
||||
|
||||
private:
|
||||
F01DetectorConstruction* fDetConstruction;
|
||||
F01DetectorConstruction* fDetConstruction = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -45,9 +45,9 @@ class F01CalorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
F01CalorHit();
|
||||
F01CalorHit() = default;
|
||||
F01CalorHit(const F01CalorHit&);
|
||||
virtual ~F01CalorHit();
|
||||
~F01CalorHit() override = default;
|
||||
|
||||
const F01CalorHit& operator=(const F01CalorHit&);
|
||||
G4bool operator==(const F01CalorHit&) const;
|
||||
@@ -55,7 +55,7 @@ class F01CalorHit : public G4VHit
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
|
||||
virtual void Print();
|
||||
void Print() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -71,14 +71,15 @@ class F01CalorHit : public G4VHit
|
||||
|
||||
private:
|
||||
|
||||
G4double fEdepAbs, fTrackLengthAbs;
|
||||
G4double fEdepGap, fTrackLengthGap;
|
||||
|
||||
G4double fEdepAbs = 0.;
|
||||
G4double fTrackLengthAbs = 0.;
|
||||
G4double fEdepGap = 0.;
|
||||
G4double fTrackLengthGap = 0.;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
typedef G4THitsCollection<F01CalorHit> F01CalorHitsCollection;
|
||||
using F01CalorHitsCollection = G4THitsCollection<F01CalorHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<F01CalorHit>* F01CalorHitAllocator;
|
||||
|
||||
|
||||
@@ -49,17 +49,17 @@ class F01CalorimeterSD : public G4VSensitiveDetector
|
||||
public:
|
||||
|
||||
F01CalorimeterSD(G4String, F01DetectorConstruction* );
|
||||
virtual ~F01CalorimeterSD();
|
||||
~F01CalorimeterSD() override;
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*) override;
|
||||
void EndOfEvent(G4HCofThisEvent*) override;
|
||||
|
||||
private:
|
||||
|
||||
F01CalorHitsCollection* fCalCollection;
|
||||
F01DetectorConstruction* fDetector;
|
||||
G4int* fHitID;
|
||||
F01CalorHitsCollection* fCalCollection = nullptr;
|
||||
F01DetectorConstruction* fDetector = nullptr;
|
||||
G4int* fHitID = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4Cache.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4Box;
|
||||
class G4Tubs;
|
||||
class G4LogicalVolume;
|
||||
@@ -57,7 +59,7 @@ class F01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
public:
|
||||
|
||||
F01DetectorConstruction();
|
||||
virtual ~F01DetectorConstruction();
|
||||
~F01DetectorConstruction() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -71,8 +73,8 @@ class F01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
void SetWorldSizeZ(G4double);
|
||||
void SetWorldSizeR(G4double);
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -96,36 +98,37 @@ class F01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
void SetUseFSALstepper( G4bool val ) { fUseFSALstepper = val; }
|
||||
G4bool AreUsingFSALstepper() { return fUseFSALstepper; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
F01DetectorMessenger* fDetectorMessenger; // pointer -> Messenger
|
||||
F01DetectorMessenger* fDetectorMessenger = nullptr; // pointer -> Messenger
|
||||
G4Cache<F01CalorimeterSD*> fCalorimeterSD; // pointer -> sensitive detector
|
||||
G4Cache<F01FieldSetup*> fEmFieldSetup;
|
||||
|
||||
G4Tubs* fSolidWorld; // pointer to the solid World
|
||||
G4LogicalVolume* fLogicWorld; // pointer to the logical World
|
||||
G4VPhysicalVolume* fPhysiWorld; // pointer to the physical World
|
||||
G4Tubs* fSolidWorld = nullptr; // pointer to the solid World
|
||||
G4LogicalVolume* fLogicWorld = nullptr; // pointer to the logical World
|
||||
G4VPhysicalVolume* fPhysiWorld = nullptr; // pointer to the physical World
|
||||
|
||||
G4Tubs* fSolidAbsorber; // pointer to the solid Absorber
|
||||
G4LogicalVolume* fLogicAbsorber; // pointer to the logical Absorber
|
||||
G4VPhysicalVolume* fPhysiAbsorber; // pointer to the physical Absorber
|
||||
|
||||
G4Material* fAbsorberMaterial;
|
||||
G4double fAbsorberThickness;
|
||||
G4double fAbsorberRadius;
|
||||
G4Tubs* fSolidAbsorber = nullptr; // pointer to the solid Absorber
|
||||
G4LogicalVolume* fLogicAbsorber = nullptr; // pointer to the logical Absorber
|
||||
G4VPhysicalVolume* fPhysiAbsorber = nullptr; // pointer to the physical Absorber
|
||||
|
||||
G4double fZAbsorber;
|
||||
G4double fZStartAbs, fZEndAbs;
|
||||
G4Material* fAbsorberMaterial = nullptr;
|
||||
G4double fAbsorberThickness = 1.0 * CLHEP::mm;
|
||||
G4double fAbsorberRadius = 20000. * CLHEP::mm;
|
||||
|
||||
G4Material* fWorldMaterial;
|
||||
G4double fWorldSizeR;
|
||||
G4double fWorldSizeZ;
|
||||
G4double fZAbsorber = 21990. * CLHEP::mm;
|
||||
G4double fZStartAbs = 0.;
|
||||
G4double fZEndAbs = 0.;
|
||||
|
||||
G4Material* fWorldMaterial = nullptr;
|
||||
G4double fWorldSizeR = 22000. * CLHEP::mm;
|
||||
G4double fWorldSizeZ = 44000. * CLHEP::mm;
|
||||
|
||||
G4bool fUseFSALstepper= false;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
void DefineMaterials();
|
||||
void ComputeCalorParameters();
|
||||
G4VPhysicalVolume* ConstructCalorimeter();
|
||||
|
||||
@@ -52,25 +52,25 @@ class F01DetectorMessenger: public G4UImessenger
|
||||
public:
|
||||
|
||||
F01DetectorMessenger(F01DetectorConstruction* );
|
||||
virtual ~F01DetectorMessenger();
|
||||
~F01DetectorMessenger() override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
F01DetectorConstruction* fDetector;
|
||||
F01DetectorConstruction* fDetector = nullptr;
|
||||
|
||||
G4UIdirectory* fDetDir;
|
||||
G4UIdirectory* fDetDir = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fAbsMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsRadCmd;
|
||||
G4UIcmdWithAString* fAbsMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsRadCmd = nullptr;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fAbsZposCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsZposCmd = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fWorldMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldZCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldRCmd;
|
||||
G4UIcmdWithAString* fWorldMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldZCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldRCmd = nullptr;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
//
|
||||
/// \file field/field01/include/F01FieldMessenger.hh
|
||||
/// \brief F01FieldMessenger allows interactive user control of
|
||||
// - the strength of the (uniform) magnetic field
|
||||
// - the key parameters for the accuracy of integration
|
||||
// - the strength of the (uniform) magnetic field
|
||||
// - the key parameters for the accuracy of integration
|
||||
// - the integration method used - a choice between
|
||||
// * different embedded Runge-Kutta methods or 'tableaus'
|
||||
// * the symplectic Boris method for accelerator setups
|
||||
@@ -53,24 +53,24 @@ class F01FieldMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F01FieldMessenger(F01FieldSetup* );
|
||||
virtual ~F01FieldMessenger();
|
||||
~F01FieldMessenger() override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
F01FieldSetup* fEMfieldSetup;
|
||||
F01FieldSetup* fEMfieldSetup = nullptr;
|
||||
|
||||
G4UIdirectory* fFieldDir;
|
||||
G4UIdirectory* fFieldDir = nullptr;
|
||||
|
||||
G4UIcmdWithAnInteger* fStepperCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMagFieldZCmd;
|
||||
G4UIcmdWith3VectorAndUnit* fMagFieldCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMinStepCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fDeltaOneStepCmd;
|
||||
G4UIcmdWithADouble* fEpsMinCmd;
|
||||
G4UIcmdWithADouble* fEpsMaxCmd;
|
||||
G4UIcmdWithoutParameter* fUpdateCmd;
|
||||
G4UIcmdWithAnInteger* fStepperCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMagFieldZCmd = nullptr;
|
||||
G4UIcmdWith3VectorAndUnit* fMagFieldCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMinStepCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fDeltaOneStepCmd = nullptr;
|
||||
G4UIcmdWithADouble* fEpsMinCmd = nullptr;
|
||||
G4UIcmdWithADouble* fEpsMaxCmd = nullptr;
|
||||
G4UIcmdWithoutParameter* fUpdateCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -124,10 +124,10 @@ protected:
|
||||
F01FieldMessenger* fFieldMessenger = nullptr;
|
||||
|
||||
// Parameters / Invariant during tracking loop
|
||||
G4double fMinStep = -1.0;
|
||||
G4double fDeltaOneStep= -1.0;
|
||||
G4double fDesiredEpsilonMin = 1.0e-05; // tight: 1.0e-8 std: 1.0e-5 to 1.e-6 loose: 1.0e-4
|
||||
G4double fDesiredEpsilonMax = 0.005; // tight: 1.0e-5 std: 1.0e-4 to 5.e-3 loose: 1.0e-3+
|
||||
G4double fMinStep = -1.0;
|
||||
G4double fDeltaOneStep= -1.0;
|
||||
G4double fDesiredEpsilonMin = 1.0e-05; // tight: 1.0e-8 std: 1.0e-5 to 1.e-6 loose: 1.0e-4
|
||||
G4double fDesiredEpsilonMax = 0.005; // tight: 1.0e-5 std: 1.0e-4 to 5.e-3 loose: 1.0e-3+
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,10 +50,10 @@ class F01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
F01PrimaryGeneratorAction(F01DetectorConstruction*);
|
||||
virtual ~F01PrimaryGeneratorAction();
|
||||
~F01PrimaryGeneratorAction() override;
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
void SetRndmFlag(G4String val) { fRndmFlag = val; }
|
||||
void SetXVertex(G4double x);
|
||||
void SetYVertex(G4double y);
|
||||
@@ -62,16 +62,17 @@ class F01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
static G4String GetPrimaryName();
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun; //pointer a to G4 service class
|
||||
F01DetectorConstruction* fDetector; //pointer to the geometry
|
||||
G4ParticleGun* fParticleGun = nullptr; //pointer a to G4 service class
|
||||
F01DetectorConstruction* fDetector = nullptr; //pointer to the geometry
|
||||
|
||||
F01PrimaryGeneratorMessenger* fGunMessenger; //messenger of this class
|
||||
G4String fRndmFlag; //flag for random impact point
|
||||
F01PrimaryGeneratorMessenger* fGunMessenger = nullptr; //messenger of this class
|
||||
G4String fRndmFlag = "off"; //flag for random impact point
|
||||
|
||||
static G4ParticleDefinition* fgPrimaryParticle;
|
||||
G4double fXVertex, fYVertex, fZVertex;
|
||||
G4bool fVertexDefined;
|
||||
|
||||
G4double fXVertex = 0.;
|
||||
G4double fYVertex = 0.;
|
||||
G4double fZVertex = 0.;
|
||||
G4bool fVertexDefined = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,16 +47,16 @@ class F01PrimaryGeneratorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F01PrimaryGeneratorMessenger(F01PrimaryGeneratorAction*);
|
||||
virtual ~F01PrimaryGeneratorMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
~F01PrimaryGeneratorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
F01PrimaryGeneratorAction* fAction;
|
||||
G4UIcmdWithAString* fRndmCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetXVertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetYVertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetZVertexCmd;
|
||||
F01PrimaryGeneratorAction* fAction = nullptr;
|
||||
G4UIcmdWithAString* fRndmCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetXVertexCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetYVertexCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetZVertexCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4ParticleDefinition;
|
||||
class G4Transportation;
|
||||
class G4CoupledTransportation;
|
||||
@@ -38,13 +40,13 @@ class F01RunAction: public G4UserRunAction {
|
||||
|
||||
public:
|
||||
|
||||
F01RunAction();
|
||||
virtual ~F01RunAction();
|
||||
|
||||
virtual void BeginOfRunAction( const G4Run* aRun );
|
||||
virtual void EndOfRunAction( const G4Run* aRun );
|
||||
F01RunAction() = default;
|
||||
~F01RunAction() override = default;
|
||||
|
||||
// Helper method to change the Transportation's 'looper' parameters
|
||||
void BeginOfRunAction( const G4Run* aRun ) override;
|
||||
void EndOfRunAction( const G4Run* aRun ) override;
|
||||
|
||||
// Helper method to change the Transportation's 'looper' parameters
|
||||
void ChangeLooperParameters(const G4ParticleDefinition* particleDef );
|
||||
|
||||
// Helper method to find the Transportation process for a particle type
|
||||
@@ -59,13 +61,16 @@ public:
|
||||
G4int GetNumberOfTrials() { return fNumberOfTrials; }
|
||||
G4double GetWarningEnergy() { return fWarningEnergy; }
|
||||
G4double GetImportantEnergy() { return fImportantEnergy; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Values for initialising 'loopers' parameters of Transport process
|
||||
G4int fNumberOfTrials = 0; // Default will not overwrite
|
||||
G4double fWarningEnergy = -1.0; // Default values - non operational
|
||||
G4double fImportantEnergy = -1.0; // Default - will not overwrite
|
||||
G4int fNumberOfTrials = 15; // Arbitrary
|
||||
G4double fWarningEnergy = 1.0 * CLHEP::kiloelectronvolt; // Arbitrary
|
||||
G4double fImportantEnergy = 10.0 * CLHEP::kiloelectronvolt; // Arbitrary
|
||||
// Applications should determine these thresholds according to
|
||||
// - physics requirements, and
|
||||
// - the computing cost of continuing integration for looping tracks
|
||||
|
||||
G4int fVerboseLevel = 0;
|
||||
};
|
||||
|
||||
@@ -55,15 +55,15 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class F01SteppingVerbose : public G4SteppingVerbose
|
||||
class F01SteppingVerbose : public G4SteppingVerbose
|
||||
{
|
||||
public:
|
||||
|
||||
F01SteppingVerbose();
|
||||
virtual ~F01SteppingVerbose();
|
||||
F01SteppingVerbose() = default;
|
||||
~F01SteppingVerbose() override = default;
|
||||
|
||||
virtual void StepInfo();
|
||||
virtual void TrackingStarted();
|
||||
void StepInfo() override;
|
||||
void TrackingStarted() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,13 +37,7 @@
|
||||
|
||||
F01ActionInitialization::F01ActionInitialization
|
||||
(F01DetectorConstruction* detConstruction)
|
||||
: G4VUserActionInitialization(),
|
||||
fDetConstruction(detConstruction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01ActionInitialization::~F01ActionInitialization()
|
||||
: fDetConstruction(detConstruction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -34,22 +34,7 @@
|
||||
|
||||
#include "F01CalorHit.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<F01CalorHit>* F01CalorHitAllocator=0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01CalorHit::F01CalorHit()
|
||||
: G4VHit(),
|
||||
fEdepAbs(0.),
|
||||
fTrackLengthAbs(0.),
|
||||
fEdepGap(0.),
|
||||
fTrackLengthGap(0.)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01CalorHit::~F01CalorHit()
|
||||
{;}
|
||||
G4ThreadLocal G4Allocator<F01CalorHit>* F01CalorHitAllocator=nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -80,6 +65,6 @@ G4bool F01CalorHit::operator==(const F01CalorHit& right) const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01CalorHit::Print()
|
||||
{;}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
F01CalorimeterSD::F01CalorimeterSD(G4String name,
|
||||
F01DetectorConstruction* det)
|
||||
: G4VSensitiveDetector(name),
|
||||
fCalCollection(0),
|
||||
fDetector(det),
|
||||
fHitID(new G4int[500])
|
||||
{
|
||||
@@ -82,7 +81,7 @@ G4bool F01CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
|
||||
if ((edep == 0.) && (stepl == 0.) ) return false;
|
||||
|
||||
G4TouchableHistory* theTouchable
|
||||
auto theTouchable
|
||||
= (G4TouchableHistory*)(step->GetPreStepPoint()->GetTouchable());
|
||||
|
||||
G4VPhysicalVolume* physVol = theTouchable->GetVolume();
|
||||
@@ -90,7 +89,7 @@ G4bool F01CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
G4int number = 0;
|
||||
if (fHitID[number]==-1)
|
||||
{
|
||||
F01CalorHit* calHit = new F01CalorHit();
|
||||
auto calHit = new F01CalorHit();
|
||||
if (physVol == fDetector->GetAbsorber()) calHit->AddAbs(edep,stepl);
|
||||
fHitID[number] = fCalCollection->insert(calHit) - 1;
|
||||
if (verboseLevel>0)
|
||||
@@ -101,7 +100,7 @@ G4bool F01CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
if (physVol == fDetector->GetAbsorber())
|
||||
(*fCalCollection)[fHitID[number]]->AddAbs(edep,stepl);
|
||||
if (verboseLevel>0)
|
||||
G4cout << " Energy added to F01: " << number << G4endl;
|
||||
G4cout << " Energy added to F01: " << number << G4endl;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,24 +57,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01DetectorConstruction::F01DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fDetectorMessenger(0),
|
||||
fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
|
||||
fSolidAbsorber(0), fLogicAbsorber(0), fPhysiAbsorber(0),
|
||||
fAbsorberMaterial(0), fAbsorberThickness(0.), fAbsorberRadius(0.),
|
||||
fZAbsorber(0.), fZStartAbs(0.), fZEndAbs(0.),
|
||||
fWorldMaterial(0), fWorldSizeR(0.), fWorldSizeZ(0.)
|
||||
{
|
||||
// default parameter values of the calorimeter
|
||||
|
||||
fWorldSizeZ = 44000.*mm;
|
||||
fWorldSizeR = 22000.*mm;
|
||||
|
||||
fAbsorberThickness = 1.0*mm;
|
||||
|
||||
fAbsorberRadius = 20000.*mm;
|
||||
fZAbsorber = 21990.0*mm;
|
||||
|
||||
// create commands for interactive definition of the calorimeter
|
||||
|
||||
fDetectorMessenger = new F01DetectorMessenger(this);
|
||||
@@ -104,7 +87,7 @@ G4VPhysicalVolume* F01DetectorConstruction::Construct()
|
||||
void F01DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
//This function illustrates the possible ways to define materials
|
||||
|
||||
|
||||
G4String name, symbol; // a=mass of a mole;
|
||||
G4double a, z, density; // z=mean number of protons;
|
||||
G4int nel;
|
||||
@@ -116,19 +99,19 @@ void F01DetectorConstruction::DefineMaterials()
|
||||
//
|
||||
|
||||
a = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
auto elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
|
||||
a = 12.01*g/mole;
|
||||
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
|
||||
auto elC = new G4Element(name="Carbon", symbol="C", z=6., a);
|
||||
|
||||
a = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
auto elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
|
||||
a = 16.00*g/mole;
|
||||
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
auto elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
|
||||
a = 39.948*g/mole;
|
||||
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
|
||||
auto elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
|
||||
|
||||
//
|
||||
// define simple materials
|
||||
@@ -137,14 +120,14 @@ void F01DetectorConstruction::DefineMaterials()
|
||||
// Mylar
|
||||
|
||||
density = 1.39*g/cm3;
|
||||
G4Material* mylar = new G4Material(name="Mylar", density, nel=3);
|
||||
auto mylar = new G4Material(name="Mylar", density, nel=3);
|
||||
mylar->AddElement(elO,2);
|
||||
mylar->AddElement(elC,5);
|
||||
mylar->AddElement(elH,4);
|
||||
|
||||
// Polypropelene
|
||||
|
||||
G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
|
||||
auto CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
|
||||
CH2->AddElement(elH,2);
|
||||
CH2->AddElement(elC,1);
|
||||
|
||||
@@ -152,20 +135,20 @@ void F01DetectorConstruction::DefineMaterials()
|
||||
|
||||
density = 3.700*mg/cm3;
|
||||
a = 83.80*g/mole;
|
||||
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
|
||||
auto Kr = new G4Material(name="Kr",z=36., a, density );
|
||||
|
||||
// Dry air (average composition)
|
||||
|
||||
density = 1.7836*mg/cm3; // STP
|
||||
G4Material* argon = new G4Material(name="Argon" , density, ncomponents=1);
|
||||
auto argon = new G4Material(name="Argon" , density, ncomponents=1);
|
||||
argon->AddElement(elAr, 1);
|
||||
|
||||
density = 1.25053*mg/cm3; // STP
|
||||
G4Material* nitrogen = new G4Material(name="N2" , density, ncomponents=1);
|
||||
auto nitrogen = new G4Material(name="N2" , density, ncomponents=1);
|
||||
nitrogen->AddElement(elN, 2);
|
||||
|
||||
density = 1.4289*mg/cm3; // STP
|
||||
G4Material* oxygen = new G4Material(name="O2" , density, ncomponents=1);
|
||||
auto oxygen = new G4Material(name="O2" , density, ncomponents=1);
|
||||
oxygen->AddElement(elO, 2);
|
||||
|
||||
density = 1.2928*mg/cm3; // STP
|
||||
@@ -174,7 +157,7 @@ void F01DetectorConstruction::DefineMaterials()
|
||||
temperature = STP_Temperature;
|
||||
pressure = 1.0e-8*STP_Pressure;
|
||||
|
||||
G4Material* air = new G4Material(name="Air" , density, ncomponents=3,
|
||||
auto air = new G4Material(name="Air" , density, ncomponents=3,
|
||||
kStateGas,temperature,pressure);
|
||||
air->AddMaterial( nitrogen, fractionmass = 0.7557 );
|
||||
air->AddMaterial( oxygen, fractionmass = 0.2315 );
|
||||
@@ -185,26 +168,26 @@ void F01DetectorConstruction::DefineMaterials()
|
||||
|
||||
density = 5.858*mg/cm3;
|
||||
a = 131.29*g/mole;
|
||||
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
|
||||
auto Xe = new G4Material(name="Xenon",z=54., a, density );
|
||||
|
||||
// Carbon dioxide, STP
|
||||
|
||||
density = 1.842*mg/cm3;
|
||||
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
|
||||
auto CarbonDioxide = new G4Material(name="CO2", density, nel=2);
|
||||
CarbonDioxide->AddElement(elC,1);
|
||||
CarbonDioxide->AddElement(elO,2);
|
||||
|
||||
// 80% Xe + 20% CO2, STP
|
||||
|
||||
density = 5.0818*mg/cm3;
|
||||
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
|
||||
auto Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
|
||||
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 );
|
||||
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 );
|
||||
|
||||
// 80% Kr + 20% CO2, STP
|
||||
|
||||
density = 3.601*mg/cm3;
|
||||
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
|
||||
auto Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
|
||||
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 );
|
||||
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 );
|
||||
|
||||
@@ -212,9 +195,9 @@ void F01DetectorConstruction::DefineMaterials()
|
||||
// G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
G4cout << "F01DetectorConstruction: not printing material table - to see it edit the source."
|
||||
<< G4endl;
|
||||
|
||||
|
||||
// default materials of the calorimeter
|
||||
|
||||
|
||||
fAbsorberMaterial = air; // Kr20CO2; // XeCO2CF4;
|
||||
|
||||
fWorldMaterial = air;
|
||||
@@ -238,7 +221,7 @@ G4VPhysicalVolume* F01DetectorConstruction::ConstructCalorimeter()
|
||||
|
||||
ComputeCalorParameters();
|
||||
PrintCalorParameters();
|
||||
|
||||
|
||||
// World
|
||||
|
||||
fSolidWorld = new G4Tubs("World", // its name
|
||||
@@ -248,11 +231,11 @@ G4VPhysicalVolume* F01DetectorConstruction::ConstructCalorimeter()
|
||||
fWorldMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
fPhysiWorld = new G4PVPlacement(0, // no rotation
|
||||
fPhysiWorld = new G4PVPlacement(nullptr, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
"World", // its name
|
||||
fLogicWorld, // its logical volume
|
||||
0, // its mother volume
|
||||
nullptr, // its mother volume
|
||||
false, // no boolean op.
|
||||
0); // copy number
|
||||
// Absorber
|
||||
@@ -266,7 +249,7 @@ G4VPhysicalVolume* F01DetectorConstruction::ConstructCalorimeter()
|
||||
fAbsorberMaterial,
|
||||
"Absorber");
|
||||
|
||||
fPhysiAbsorber = new G4PVPlacement(0,
|
||||
fPhysiAbsorber = new G4PVPlacement(nullptr,
|
||||
G4ThreeVector(0.,0.,fZAbsorber),
|
||||
"Absorber",
|
||||
fLogicAbsorber,
|
||||
@@ -389,15 +372,15 @@ void F01DetectorConstruction::ConstructSDandField()
|
||||
// Sensitive Detectors: Absorber
|
||||
|
||||
if (!fCalorimeterSD.Get()) {
|
||||
F01CalorimeterSD* calorimeterSD = new F01CalorimeterSD("CalorSD",this);
|
||||
auto calorimeterSD = new F01CalorimeterSD("CalorSD",this);
|
||||
fCalorimeterSD.Put(calorimeterSD);
|
||||
}
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(fCalorimeterSD.Get());
|
||||
SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
|
||||
|
||||
|
||||
// Construct the field creator - this will register the field it creates
|
||||
if (!fEmFieldSetup.Get()) {
|
||||
F01FieldSetup* fieldSetup
|
||||
auto fieldSetup
|
||||
= new F01FieldSetup(G4ThreeVector( 0.0, 0.0, 3.3*tesla ),
|
||||
fUseFSALstepper );
|
||||
G4AutoDelete::Register(fieldSetup); // Kernel will delete the F01FieldSetup
|
||||
|
||||
@@ -42,20 +42,11 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01DetectorMessenger::F01DetectorMessenger(F01DetectorConstruction* det)
|
||||
: G4UImessenger(),
|
||||
fDetector(det),
|
||||
fDetDir(0),
|
||||
fAbsMaterCmd(0),
|
||||
fAbsThickCmd(0),
|
||||
fAbsRadCmd(0),
|
||||
fAbsZposCmd(0),
|
||||
fWorldMaterCmd(0),
|
||||
fWorldZCmd(0),
|
||||
fWorldRCmd(0)
|
||||
: fDetector(det)
|
||||
{
|
||||
fDetDir = new G4UIdirectory("/calor/");
|
||||
fDetDir->SetGuidance("F01 detector control.");
|
||||
|
||||
|
||||
fAbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
|
||||
fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
|
||||
fAbsMaterCmd->SetParameterName("choice",true);
|
||||
@@ -133,19 +124,19 @@ void F01DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
|
||||
if( command == fWorldMaterCmd )
|
||||
{ fDetector->SetWorldMaterial(newValue);}
|
||||
|
||||
|
||||
if( command == fAbsThickCmd )
|
||||
{fDetector->SetAbsorberThickness(fAbsThickCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == fAbsRadCmd )
|
||||
{ fDetector->SetAbsorberRadius(fAbsRadCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fAbsZposCmd )
|
||||
{ fDetector->SetAbsorberZpos(fAbsZposCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fWorldZCmd )
|
||||
{ fDetector->SetWorldSizeZ(fWorldZCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fWorldRCmd )
|
||||
{ fDetector->SetWorldSizeR(fWorldRCmd->GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
@@ -46,14 +46,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01FieldMessenger::F01FieldMessenger(F01FieldSetup* fieldSetup)
|
||||
: G4UImessenger(),
|
||||
fEMfieldSetup(fieldSetup),
|
||||
fFieldDir(0),
|
||||
fStepperCmd(0),
|
||||
fMagFieldZCmd(0),
|
||||
fMagFieldCmd(0),
|
||||
fMinStepCmd(0),
|
||||
fUpdateCmd(0)
|
||||
: fEMfieldSetup(fieldSetup)
|
||||
{
|
||||
fFieldDir = new G4UIdirectory("/field/");
|
||||
fFieldDir->SetGuidance("F01 field tracking control.");
|
||||
@@ -76,13 +69,13 @@ F01FieldMessenger::F01FieldMessenger(F01FieldSetup* fieldSetup)
|
||||
fMagFieldZCmd->SetParameterName("Bz",false,false);
|
||||
fMagFieldZCmd->SetDefaultUnit("tesla");
|
||||
fMagFieldZCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fMagFieldCmd = new G4UIcmdWith3VectorAndUnit("/field/setField",this);
|
||||
fMagFieldCmd->SetGuidance("Define magnetic field.");
|
||||
fMagFieldCmd->SetParameterName("Bx", "By", "Bz" ,false,false);
|
||||
fMagFieldCmd->SetDefaultUnit("tesla");
|
||||
fMagFieldCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fMinStepCmd = new G4UIcmdWithADoubleAndUnit("/field/setMinStep",this);
|
||||
fMinStepCmd->SetGuidance("Define minimal step");
|
||||
fMinStepCmd->SetGuidance("Magnetic field will be in Z direction.");
|
||||
@@ -90,7 +83,7 @@ F01FieldMessenger::F01FieldMessenger(F01FieldSetup* fieldSetup)
|
||||
fMinStepCmd->SetDefaultUnit("mm");
|
||||
fMinStepCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
// Commands for integration accuracy
|
||||
// Commands for integration accuracy
|
||||
// 1. Delta One Step = length of potential error in each integration substep
|
||||
// Recall that there can be up to 300 substeps in a physics step !!
|
||||
fDeltaOneStepCmd = new G4UIcmdWithADoubleAndUnit("/field/setDeltaOneStep",this);
|
||||
@@ -103,15 +96,21 @@ F01FieldMessenger::F01FieldMessenger(F01FieldSetup* fieldSetup)
|
||||
// A choice: Allow the user to reset the Eps Min/Max values to our default
|
||||
G4bool omitable= true, currentAsDefault= false;
|
||||
fEpsMinCmd = new G4UIcmdWithADouble("/field/setEpsilonMin",this);
|
||||
fEpsMinCmd->SetGuidance("Define minimum value of the relative integration error (EpsilonMin) - a dimensionless number");
|
||||
fEpsMinCmd->SetGuidance("Limit to ensure that large steps do NOT result in a very low value (ie high accuracy) that integration needs many steps and CPU cycles.");
|
||||
fEpsMinCmd->SetGuidance(
|
||||
"Define minimum value of the relative integration error (EpsilonMin)"
|
||||
" - a dimensionless number\n"
|
||||
"Limit to ensure that large steps do NOT result in a very low value"
|
||||
"(ie high accuracy) that integration needs many steps and CPU cycles.");
|
||||
fEpsMinCmd->SetParameterName("minEpsilon",omitable,currentAsDefault);
|
||||
fEpsMinCmd->SetDefaultValue(1.0e-4); // A default eps_min
|
||||
fEpsMinCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
fEpsMaxCmd = new G4UIcmdWithADouble("/field/setEpsilonMax",this);
|
||||
fEpsMaxCmd->SetGuidance("Define minimum value of the relative integration error (EpsilonMax) - a dimensionless number");
|
||||
fEpsMaxCmd->SetGuidance("Limit to ensure a very small step does NOT result in a large relative error (ie low accuracy) with unreliable results.");
|
||||
fEpsMaxCmd->SetGuidance(
|
||||
"Define minimum value of the relative integration error (EpsilonMax)"
|
||||
" - a dimensionless number\n"
|
||||
"Limit to ensure a very small step does NOT result in a large relative"
|
||||
" error (ie low accuracy) with unreliable results.");
|
||||
fEpsMaxCmd->SetParameterName("maxEpsilon",omitable,currentAsDefault);
|
||||
fEpsMinCmd->SetDefaultValue(1.0e-5); // A default eps_max
|
||||
fEpsMaxCmd->AvailableForStates(G4State_Idle);
|
||||
@@ -128,7 +127,7 @@ F01FieldMessenger::~F01FieldMessenger()
|
||||
delete fMagFieldZCmd;
|
||||
delete fMagFieldCmd;
|
||||
delete fMinStepCmd;
|
||||
delete fDeltaOneStepCmd;
|
||||
delete fDeltaOneStepCmd;
|
||||
delete fEpsMinCmd;
|
||||
delete fEpsMaxCmd;
|
||||
delete fFieldDir;
|
||||
@@ -150,7 +149,7 @@ void F01FieldMessenger::SetNewValue( G4UIcommand* command, G4String newValue)
|
||||
if( command == fMinStepCmd )
|
||||
fEMfieldSetup->SetMinStep(fMinStepCmd->GetNewDoubleValue(newValue));
|
||||
if( command == fDeltaOneStepCmd )
|
||||
fEMfieldSetup->SetDeltaOneStep(fDeltaOneStepCmd->GetNewDoubleValue(newValue));
|
||||
fEMfieldSetup->SetDeltaOneStep(fDeltaOneStepCmd->GetNewDoubleValue(newValue));
|
||||
if( command == fEpsMinCmd )
|
||||
fEMfieldSetup->SetEpsilonMin(fEpsMinCmd->GetNewDoubleValue(newValue));
|
||||
if( command == fEpsMaxCmd )
|
||||
|
||||
@@ -127,14 +127,16 @@ F01FieldSetup::F01FieldSetup()
|
||||
void F01FieldSetup::InitialiseAll()
|
||||
{
|
||||
fFieldMessenger = new F01FieldMessenger(this);
|
||||
|
||||
|
||||
fEquation = new G4Mag_UsualEqRhs(fMagneticField);
|
||||
|
||||
fMinStep = 3.0e-3*mm; // minimal step of 1 um is default ==> accept any error for smaller steps!
|
||||
fDeltaOneStep = 1.0e-5*mm; // Errors of this size in an integration sub-step are acceptable
|
||||
// except limited by the relative integration error limits (epsilon_min/max)
|
||||
// Notes: - their initial values are set in the header.
|
||||
// - both this and the eps min/max can be changed using Set methods.
|
||||
|
||||
fMinStep = 3.0e-3*mm;
|
||||
// minimal step of 1 um is default ==> accept any error for smallersteps!
|
||||
fDeltaOneStep = 1.0e-5*mm;
|
||||
// Errors of this size in an integration sub-step are acceptable
|
||||
// except limited by the relative integration error limits (epsilon_min/max)
|
||||
// Notes: - their initial values are set in the header.
|
||||
// - both this and the eps min/max can be changed using Set methods.
|
||||
fFieldManager = G4TransportationManager::GetTransportationManager()
|
||||
->GetFieldManager();
|
||||
|
||||
@@ -144,16 +146,17 @@ void F01FieldSetup::InitialiseAll()
|
||||
else
|
||||
{
|
||||
CreateStepperAndChordFinder();
|
||||
// To try the symplectic method (Boris Scheme/Driver) replace the line above with the one below:
|
||||
// To try the symplectic method (Boris Scheme/Driver) replace the line above
|
||||
// with the one below:
|
||||
// CreateAndSetupBorisDriver();
|
||||
}
|
||||
|
||||
|
||||
G4cout << " 4/5. Updating eps_min and eps_max in Field Manager." << G4endl;
|
||||
fFieldManager->SetChordFinder( fChordFinder );
|
||||
fFieldManager->SetDetectorField(fMagneticField );
|
||||
|
||||
// For controling the accurancy
|
||||
fFieldManager -> SetMinimumEpsilonStep( fDesiredEpsilonMin ) ;
|
||||
// For controling the accurancy
|
||||
fFieldManager -> SetMinimumEpsilonStep( fDesiredEpsilonMin ) ;
|
||||
//
|
||||
// const G4double increaseFactor = 3.0 ; // typical rangle 1.0 - 10.0
|
||||
// maxEpsilon must not exceed a ceiling, ideally 0.001 -- above this integration is unreliable
|
||||
@@ -184,14 +187,14 @@ void F01FieldSetup::InitialiseAll()
|
||||
}
|
||||
}
|
||||
// To demonstrate that it is now possible to change the maximum accepted epsilon
|
||||
|
||||
|
||||
// Note: The values of both epsilon parameters must be between
|
||||
// fMaxAcceptedEpsilon = 0.001
|
||||
// to ensure robustness of integration (adequate accuracy of intermediate results)
|
||||
// and (much bigger than)
|
||||
// fMinAcceptedEpsilon ~= 2.2e-13 ( 1000.0 * std::numeric_limits<G4double>::epsilon() )
|
||||
// which even the best integration methods would struggle greatly to achieve.
|
||||
|
||||
|
||||
G4cout << " Changed FieldManager epsilon values to epsilon_min= "
|
||||
<< fFieldManager -> GetMinimumEpsilonStep()
|
||||
<< " and epsilon_max= "
|
||||
@@ -214,7 +217,7 @@ void F01FieldSetup::CreateStepperAndChordFinder()
|
||||
{
|
||||
delete fChordFinder;
|
||||
fChordFinder= nullptr;
|
||||
|
||||
|
||||
// Update field
|
||||
G4cout << " F01FieldSetup::CreateStepperAndChordFinder() called. " << G4endl
|
||||
<< " 1. Creating Stepper." << G4endl;
|
||||
@@ -236,18 +239,18 @@ void F01FieldSetup::SetStepper()
|
||||
{
|
||||
// Set stepper according to the stepper type
|
||||
|
||||
if (fStepper) delete fStepper;
|
||||
delete fStepper;
|
||||
|
||||
switch ( fStepperType )
|
||||
{
|
||||
// The new default in G4 and here ( since G4 10.4 Dec 2017 )
|
||||
case 17:
|
||||
case 17:
|
||||
case 457:
|
||||
case 745:
|
||||
fStepper = new G4DormandPrince745( fEquation );
|
||||
G4cout<<"G4DormandPrince745 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
|
||||
|
||||
case 0:
|
||||
fStepper = new G4ExplicitEuler( fEquation );
|
||||
G4cout<<"G4ExplicitEuler is chosen."<<G4endl;
|
||||
@@ -288,16 +291,16 @@ void F01FieldSetup::SetStepper()
|
||||
fStepper = new G4RKG3_Stepper( fEquation );
|
||||
G4cout<<"G4RKG3_Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 10:
|
||||
fStepper = new G4ExactHelixStepper( fEquation );
|
||||
case 10:
|
||||
fStepper = new G4ExactHelixStepper( fEquation );
|
||||
G4cout<<"G4ExactHelixStepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 11:
|
||||
fStepper = new G4HelixMixedStepper( fEquation );
|
||||
case 11:
|
||||
fStepper = new G4HelixMixedStepper( fEquation );
|
||||
G4cout<<"G4HelixMixedStepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 12:
|
||||
fStepper = new G4ConstRK4( fEquation );
|
||||
case 12:
|
||||
fStepper = new G4ConstRK4( fEquation );
|
||||
G4cout<<"G4ConstRK4 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 13:
|
||||
@@ -305,7 +308,7 @@ void F01FieldSetup::SetStepper()
|
||||
fStepper = new G4NystromRK4( fEquation );
|
||||
G4cout<<" G4NystromRK4 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
case 14:
|
||||
case 14:
|
||||
case 23:
|
||||
fStepper = new G4BogackiShampine23( fEquation );
|
||||
G4cout<<"G4BogackiShampine23 Stepper is chosen"<<G4endl;
|
||||
@@ -313,16 +316,16 @@ void F01FieldSetup::SetStepper()
|
||||
|
||||
// Other optimised 4/5th order embedded steppers
|
||||
case 15:
|
||||
case 45:
|
||||
case 45:
|
||||
fStepper = new G4BogackiShampine45( fEquation );
|
||||
G4cout<<"G4BogackiShampine45 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
|
||||
// case 145:
|
||||
case kTsitouras45:
|
||||
case kTsitouras45:
|
||||
fStepper = new G4TsitourasRK45( fEquation );
|
||||
G4cout<<"G4TsitourasRK45 Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
break;
|
||||
|
||||
// Higher order embedded steppers - for very smooth fields
|
||||
case 56:
|
||||
@@ -339,7 +342,7 @@ void F01FieldSetup::SetStepper()
|
||||
// G4cout<<"G4ClassicalRK4 Stepper (default) is chosen"<<G4endl;
|
||||
fStepper = new G4DormandPrince745( fEquation );
|
||||
G4cout<<"G4DormandPrince745 (default) Stepper is chosen"<<G4endl;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,10 +359,10 @@ F01FieldSetup::CreateFSALStepperAndDriver()
|
||||
{
|
||||
// using FsalStepperType = G4RK547FEq1;
|
||||
const char *methodName= "F01FieldSetup::CreateFSALStepperAndDriver()";
|
||||
if (fStepper) delete fStepper;
|
||||
delete fStepper;
|
||||
fStepper = nullptr;
|
||||
|
||||
G4cout << " F01FieldSetup::CreateFSALStepperAndDriver() called. " << G4endl;
|
||||
|
||||
G4cout << " F01FieldSetup::CreateFSALStepperAndDriver() called. " << G4endl;
|
||||
G4cout << " 1. Creating Stepper." << G4endl;
|
||||
// auto fsalStepper = new FsalStepperType( fEquation );
|
||||
G4RK547FEq1* stepper1 = nullptr;
|
||||
@@ -379,7 +382,7 @@ F01FieldSetup::CreateFSALStepperAndDriver()
|
||||
fStepper = stepper1;
|
||||
stepper1 = nullptr;
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
case 102:
|
||||
stepper2= new G4RK547FEq2( fEquation );
|
||||
@@ -389,13 +392,13 @@ F01FieldSetup::CreateFSALStepperAndDriver()
|
||||
fStepper = stepper2;
|
||||
stepper2 = nullptr;
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
case 103:
|
||||
stepper3 = new G4RK547FEq3( fEquation );
|
||||
stepper3 = new G4RK547FEq3( fEquation );
|
||||
fsalDriver = new G4FSALIntegrationDriver<G4RK547FEq3>( fMinStep, stepper3 );
|
||||
G4cout << " Stepper type '3' is G4RK547FEq3 stepper (in FSAL mode) with FSAL driver. "
|
||||
<< G4endl;
|
||||
<< G4endl;
|
||||
fStepper = stepper3;
|
||||
stepper3 = nullptr;
|
||||
break;
|
||||
@@ -405,7 +408,7 @@ F01FieldSetup::CreateFSALStepperAndDriver()
|
||||
<< fStepperType << " ) is unknown. " << G4endl
|
||||
<< " Using value '1' instead - i.e. G4RK547FEq1 stepper. "
|
||||
<< G4endl;
|
||||
stepper1 = new G4RK547FEq1( fEquation );
|
||||
stepper1 = new G4RK547FEq1( fEquation );
|
||||
fsalDriver = new G4FSALIntegrationDriver<G4RK547FEq1>( fMinStep, stepper1 );
|
||||
fStepper = stepper1;
|
||||
stepper1 = nullptr;
|
||||
@@ -413,21 +416,21 @@ F01FieldSetup::CreateFSALStepperAndDriver()
|
||||
}
|
||||
|
||||
delete stepper1; stepper1 = nullptr;
|
||||
delete stepper2; stepper2 = nullptr;
|
||||
delete stepper2; stepper2 = nullptr;
|
||||
delete stepper3; stepper3 = nullptr;
|
||||
|
||||
|
||||
if( fsalDriver )
|
||||
fStepper = fsalDriver->GetStepper();
|
||||
|
||||
|
||||
return fsalDriver;
|
||||
}
|
||||
|
||||
void F01FieldSetup::CreateFSALStepperAndChordFinder()
|
||||
{
|
||||
// using FsalStepperType = G4DormandPrince745; // eventually ?
|
||||
// using FsalStepperType = G4DormandPrince745; // eventually ?
|
||||
delete fChordFinder;
|
||||
fChordFinder= nullptr;
|
||||
|
||||
|
||||
G4cout << " F01FieldSetup::CreateFSALStepperAndChordFinder() called. " << G4endl;
|
||||
|
||||
auto FSALdriver= CreateFSALStepperAndDriver();
|
||||
@@ -454,8 +457,8 @@ void F01FieldSetup::SetFieldValue(G4ThreeVector fieldVector)
|
||||
{
|
||||
// Set the value of the Global Field
|
||||
|
||||
if (fMagneticField) delete fMagneticField;
|
||||
|
||||
delete fMagneticField;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
G4cout << "Setting Field strength to "
|
||||
<< fieldVector / gauss << " Gauss." << G4endl;
|
||||
@@ -472,7 +475,7 @@ void F01FieldSetup::SetFieldValue(G4ThreeVector fieldVector)
|
||||
#endif
|
||||
// If the new field's value is Zero, signal it as below
|
||||
// so that it is not used for propagation.
|
||||
fMagneticField = 0;
|
||||
fMagneticField = nullptr;
|
||||
}
|
||||
|
||||
// Set this as the field of the global Field Manager
|
||||
@@ -501,8 +504,8 @@ G4FieldManager* F01FieldSetup::GetGlobalFieldManager()
|
||||
void
|
||||
F01FieldSetup::CreateAndSetupBorisDriver()
|
||||
{
|
||||
|
||||
G4cout << " F01FieldSetup::CreateAndSetupBorisDriver() called. " << G4endl;
|
||||
|
||||
G4cout << " F01FieldSetup::CreateAndSetupBorisDriver() called. " << G4endl;
|
||||
G4cout << " 1. Creating Scheme (Stepper)." << G4endl;
|
||||
auto borisStepr = new G4BorisScheme(fEquation);
|
||||
G4cout << " 2. Creating Driver." << G4endl;
|
||||
|
||||
@@ -47,22 +47,14 @@
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ParticleDefinition* F01PrimaryGeneratorAction::fgPrimaryParticle = 0;
|
||||
|
||||
G4ParticleDefinition* F01PrimaryGeneratorAction::fgPrimaryParticle = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01PrimaryGeneratorAction::F01PrimaryGeneratorAction(
|
||||
F01DetectorConstruction* det)
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0),
|
||||
fDetector(det),
|
||||
fGunMessenger(0),
|
||||
fRndmFlag("off"),
|
||||
fXVertex(0.),
|
||||
fYVertex(0.),
|
||||
fZVertex(0.),
|
||||
fVertexDefined(false)
|
||||
: fDetector(det)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
@@ -43,12 +43,7 @@
|
||||
|
||||
F01PrimaryGeneratorMessenger::F01PrimaryGeneratorMessenger(
|
||||
F01PrimaryGeneratorAction* action)
|
||||
: G4UImessenger(),
|
||||
fAction(action),
|
||||
fRndmCmd(0),
|
||||
fSetXVertexCmd(0),
|
||||
fSetYVertexCmd(0),
|
||||
fSetZVertexCmd(0)
|
||||
: fAction(action)
|
||||
{
|
||||
fRndmCmd = new G4UIcmdWithAString("/gun/random",this);
|
||||
fRndmCmd->SetGuidance("Shoot randomly the incident particle.");
|
||||
@@ -57,7 +52,7 @@ F01PrimaryGeneratorMessenger::F01PrimaryGeneratorMessenger(
|
||||
fRndmCmd->SetDefaultValue("off");
|
||||
fRndmCmd->SetCandidates("on off");
|
||||
fRndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fSetXVertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/xvertex",this);
|
||||
fSetXVertexCmd->SetGuidance(" Set x coord. of the primary vertex.");
|
||||
fSetXVertexCmd->SetParameterName("xv",true);
|
||||
|
||||
@@ -34,19 +34,7 @@
|
||||
#include "G4Transportation.hh"
|
||||
#include "G4CoupledTransportation.hh"
|
||||
|
||||
F01RunAction::F01RunAction() {
|
||||
fWarningEnergy = 1.0 * CLHEP::kiloelectronvolt; // Arbitrary
|
||||
fImportantEnergy = 10.0 * CLHEP::kiloelectronvolt; // Arbitrary
|
||||
fNumberOfTrials = 15; // Arbitrary
|
||||
// Applications should determine these thresholds according to
|
||||
// - physics requirements, and
|
||||
// - the computing cost of continuing integration for looping tracks
|
||||
}
|
||||
|
||||
F01RunAction::~F01RunAction() {}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01RunAction::BeginOfRunAction( const G4Run* aRun ) {
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
@@ -55,7 +43,7 @@ void F01RunAction::BeginOfRunAction( const G4Run* aRun ) {
|
||||
ChangeLooperParameters( G4Electron::Definition() );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01RunAction::
|
||||
ChangeLooperParameters(const G4ParticleDefinition* particleDef )
|
||||
@@ -79,7 +67,7 @@ ChangeLooperParameters(const G4ParticleDefinition* particleDef )
|
||||
G4cout << " UNKNOWN -- it is neither G4Transportation nor G4CoupledTransportation";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
|
||||
|
||||
if( transport != nullptr ) {
|
||||
if( fWarningEnergy >= 0.0 ){
|
||||
transport->SetThresholdWarningEnergy( fWarningEnergy );
|
||||
@@ -88,18 +76,18 @@ ChangeLooperParameters(const G4ParticleDefinition* particleDef )
|
||||
}
|
||||
if( fImportantEnergy >= 0.0 ) {
|
||||
transport->SetThresholdImportantEnergy( fImportantEnergy );
|
||||
|
||||
|
||||
G4cout << "-- Changed Threshold Important Energy (for loopers) = "
|
||||
<< fImportantEnergy / CLHEP::MeV << " MeV " << G4endl;
|
||||
}
|
||||
|
||||
|
||||
if( fNumberOfTrials > 0 ) {
|
||||
transport->SetThresholdTrials( fNumberOfTrials );
|
||||
|
||||
|
||||
G4cout << "-- Changed number of Trials (for loopers) = " << fNumberOfTrials << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( transport == nullptr ) {
|
||||
if( fWarningEnergy >= 0.0 )
|
||||
G4cerr << " Unknown transport process> Cannot change Warning Energy. " << G4endl;
|
||||
@@ -110,7 +98,7 @@ ChangeLooperParameters(const G4ParticleDefinition* particleDef )
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01RunAction::EndOfRunAction( const G4Run* ) {
|
||||
if( fVerboseLevel > 1 )
|
||||
@@ -126,14 +114,14 @@ void F01RunAction::EndOfRunAction( const G4Run* ) {
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4Transportation*
|
||||
F01RunAction::FindTransportation( const G4ParticleDefinition* particleDef,
|
||||
bool reportError )
|
||||
{
|
||||
const auto *partPM= particleDef->GetProcessManager();
|
||||
|
||||
|
||||
G4VProcess* partTransport = partPM->GetProcess("Transportation");
|
||||
auto transport= dynamic_cast<G4Transportation*>(partTransport);
|
||||
|
||||
@@ -152,7 +140,7 @@ F01RunAction::FindTransportation( const G4ParticleDefinition* particleDef,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( reportError && !transport )
|
||||
{
|
||||
G4cerr << "Unable to find Transportation process for particle type "
|
||||
@@ -160,6 +148,6 @@ F01RunAction::FindTransportation( const G4ParticleDefinition* particleDef,
|
||||
<< " ( PDG code = " << particleDef->GetPDGEncoding() << " ) "
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
return transport;
|
||||
}
|
||||
|
||||
@@ -38,17 +38,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01SteppingVerbose::F01SteppingVerbose()
|
||||
: G4SteppingVerbose()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F01SteppingVerbose::~F01SteppingVerbose()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F01SteppingVerbose::StepInfo()
|
||||
{
|
||||
CopyState();
|
||||
@@ -88,13 +77,13 @@ void F01SteppingVerbose::StepInfo()
|
||||
<< std::setw(10) << G4BestUnit(fStep->GetStepLength(),"Length") << " "
|
||||
<< std::setw(10) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " ";
|
||||
|
||||
if( fTrack->GetNextVolume() != 0 ) {
|
||||
if( fTrack->GetNextVolume() != nullptr ) {
|
||||
G4cout << std::setw(10) << fTrack->GetVolume()->GetName();
|
||||
} else {
|
||||
G4cout << std::setw(10) << "OutOfWorld";
|
||||
}
|
||||
|
||||
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0){
|
||||
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr){
|
||||
G4cout << " "
|
||||
<< std::setw(10)
|
||||
<< fStep->GetPostStepPoint()->GetProcessDefinedStep()
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
# Macro file for the visualization setting in the initialization phase
|
||||
# of the field01 example.
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
///\file "field/field02/.README.txt"
|
||||
///\brief Example field02 README page
|
||||
|
||||
/*! \page Examplefield02 Example field02
|
||||
/*! \page Examplefield02 Example field02
|
||||
|
||||
Test for investigation of tracking in electric field
|
||||
Test for investigation of tracking in electric field
|
||||
and field dependent electromagnetic processes.
|
||||
|
||||
\section field02_s0 FIELD DEFINITION
|
||||
@@ -12,23 +12,23 @@
|
||||
|
||||
Technical note: in order to use any electric field, it is
|
||||
necessary to create the objects for its equation of motion,
|
||||
the stepper and driver for the integration, and the
|
||||
the stepper and driver for the integration, and the
|
||||
chord finder.
|
||||
|
||||
The class that does these is F02ElectricFieldSetup. Its object
|
||||
is created in the ConstructSDandField() function in the F02DetectorConstruction
|
||||
class. The interactive commands are implemented in F02FieldMessenger.
|
||||
|
||||
|
||||
\section field02_s1 GEOMETRY DEFINITION
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
The volume "World" contains the "Absorber".
|
||||
In this test the parameters of the "World" can be changed , too.
|
||||
|
||||
In addition a transverse uniform electric field can be applied.
|
||||
@@ -36,9 +36,9 @@
|
||||
The default geometry is constructed in F02DetectorConstruction class,
|
||||
but all the parameters can be changed via
|
||||
the commands defined in the F02DetectorMessenger class.
|
||||
|
||||
|
||||
\section field02_s2 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the F02PrimaryGeneratorAction class, and can
|
||||
@@ -50,34 +50,34 @@
|
||||
F01PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
\section field02_s3 DETECTOR RESPONSE
|
||||
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
informations needed to simulate and analyse the detector response.
|
||||
|
||||
In this example a F02CalorHit is defined as a set of 2 informations:
|
||||
- the total energy deposit in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
Therefore the absorber is declared
|
||||
'sensitive detector' (SD), see F02CalorimeterSD, which means they can contribute to the hit.
|
||||
|
||||
|
||||
\section field02_s4 PHYSICS LIST
|
||||
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
requires data files for electromagnetic and hadronic processes.
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
|
||||
|
||||
\section field02_s5 HOW TO START ?
|
||||
|
||||
|
||||
- Execute field02 in 'batch' mode from macro file e.g.
|
||||
\verbatim
|
||||
% ./field02 field02.in
|
||||
\endverbatim
|
||||
|
||||
|
||||
- Execute field02 in 'interactive' mode with visualization e.g.
|
||||
\verbatim
|
||||
% ./field02
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(field02)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -23,7 +23,7 @@ include(${Geant4_USE_FILE})
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
|
||||
@@ -5,6 +5,10 @@ which **must** added in reverse chronological order (newest at the top). It must
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-07-05 I. Hrivnacova (fieldex02-V11-01-00)
|
||||
- Clang-tidy, new coding guidelines
|
||||
- Clean-up trailing white-spaces
|
||||
|
||||
## 2021-12-10 Ben Morgan (fieldex02-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -18,9 +22,9 @@ July 27, 2018 I.Hrivnacova - fieldex02-V10-04-02
|
||||
- Macro review and code clean-up:
|
||||
- Removed EventAction, RunAction, RunActionMessenger
|
||||
used only for storing random numbers, already available in kernel
|
||||
- Separated other than visualization settings from vis.mac in a
|
||||
- Separated other than visualization settings from vis.mac in a
|
||||
new init_vis.mac
|
||||
- Added test for commands defined in the example at the end
|
||||
- Added test for commands defined in the example at the end
|
||||
of field02.in macro
|
||||
- Improved visualization of geometry
|
||||
- Added "beamOn 10" button in gui.mac
|
||||
@@ -59,7 +63,7 @@ July 01, 2015 - I. Hrivnacova - fieldex02-V10-02-00
|
||||
- Replaced F02PhysicsList with FTFP_BERT with G4StepLimiterPhysics
|
||||
|
||||
September 01, 2015 - I. Hrivnacova - fieldex02-V10-01-02
|
||||
- Removed F02EventActionMessenger class, now obsolete, and
|
||||
- Removed F02EventActionMessenger class, now obsolete, and
|
||||
replaced /event/printModulo commands in macros with /run/printProgress
|
||||
- Code cleanup
|
||||
|
||||
@@ -84,7 +88,7 @@ November 26, 2013 - I.Hrivnacova - fieldex02-V09-06-05
|
||||
- Fixed ConstructSDandField():
|
||||
Moved setting the SD to logical volume outside the test
|
||||
- Do not test (fAbsorberThickness > 0.) in ConstructCalorimeter()
|
||||
as setting 0 is not allowed in set command
|
||||
as setting 0 is not allowed in set command
|
||||
|
||||
November 25, 2013 - I.Hrivnacova - fieldex02-V09-06-04
|
||||
- Put back cleaning volumes and solid stores in ConstructGeometry()
|
||||
@@ -93,12 +97,12 @@ November 22, 2013 - P.Gumplinger - fieldex02-V09-06-03
|
||||
- add gui.mac back in and avoid long line
|
||||
|
||||
November 21, 2013 - I.Hrivnacova - fieldex02-V09-06-02
|
||||
- Use new G4RunManager::ReinitializeGeometry to trigger geometry rebuild
|
||||
- Use new G4RunManager::ReinitializeGeometry to trigger geometry rebuild
|
||||
when geometry changes
|
||||
- Remove DetectorConstruction::Update and corresponding UI command that
|
||||
is not needed anymore
|
||||
- Set "ToBeBroadcasted == false" for UI commands that modify detector
|
||||
since these should be executed only by master
|
||||
- Set "ToBeBroadcasted == false" for UI commands that modify detector
|
||||
since these should be executed only by master
|
||||
- Fixed main (do not call gui.mac which does not exist)
|
||||
- Code cleanup in F02ElectricFieldSetup.cc
|
||||
|
||||
@@ -195,7 +199,7 @@ Nov 12th, 2003 - J.Apostolakis (fieldex-V05-02-01)
|
||||
------------------------------
|
||||
- Revised to work with new field tags (field-V05-02-04 and later)
|
||||
* creation of chord finder for electric field must be explicit
|
||||
- Created helper class F02ElectricFieldSetup, using nearly all of
|
||||
- Created helper class F02ElectricFieldSetup, using nearly all of
|
||||
F02ElectroMagneticField, but not being a field.
|
||||
- Changed other parts to use this class.
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
field02
|
||||
field02
|
||||
-------
|
||||
|
||||
Test for investigation of tracking in electric field
|
||||
Test for investigation of tracking in electric field
|
||||
and field dependent electromagnetic processes.
|
||||
|
||||
1- FIELD DEFINITION
|
||||
@@ -15,70 +15,70 @@
|
||||
|
||||
Technical note: in order to use any electric field, it is
|
||||
necessary to create the objects for its equation of motion,
|
||||
the stepper and driver for the integration, and the
|
||||
the stepper and driver for the integration, and the
|
||||
chord finder.
|
||||
|
||||
The class that does these is F02ElectricFieldSetup. Its object
|
||||
is created in the ConstructSDandField() function in the F02DetectorConstruction
|
||||
class. The interactive commands are implemented in F02FieldMessenger.
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
In this test the parameters of the "World" can be changed , too.
|
||||
|
||||
In addition a transverse uniform electric field can be applied.
|
||||
|
||||
|
||||
The default geometry is constructed in F02DetectorConstruction class,
|
||||
but all the parameters can be changed via
|
||||
the commands defined in the F02DetectorMessenger class.
|
||||
|
||||
|
||||
2- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the F02PrimaryGeneratorAction class, and can
|
||||
be changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
|
||||
|
||||
It is also possible to change the position of the primary particle vertex
|
||||
or activate its randomization via the commands defined in the
|
||||
F01PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
3- DETECTOR RESPONSE
|
||||
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
informations needed to simulate and analyse the detector response.
|
||||
|
||||
|
||||
In this example a F02CalorHit is defined as a set of 2 informations:
|
||||
- the total energy deposit in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
Therefore the absorber is declared
|
||||
'sensitive detector' (SD), see F02CalorimeterSD, which means they can contribute to the hit.
|
||||
|
||||
|
||||
4- PHYSICS LIST
|
||||
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
requires data files for electromagnetic and hadronic processes.
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
|
||||
- Execute field02 in 'batch' mode from macro file e.g.
|
||||
% ./field02 field02.in
|
||||
|
||||
|
||||
- Execute field02 in 'interactive' mode with visualization e.g.
|
||||
% ./field02
|
||||
....
|
||||
|
||||
@@ -73,13 +73,13 @@ int main(int argc,char** argv)
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
#else
|
||||
G4VSteppingVerbose::SetInstance(new F02SteppingVerbose);
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
auto runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
// Detector construction
|
||||
F02DetectorConstruction* detector = new F02DetectorConstruction();
|
||||
auto detector = new F02DetectorConstruction();
|
||||
runManager->SetUserInitialization(detector);
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Geant4 version Name: geant4-11-02-ref-00 (8-December-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -22,7 +22,7 @@
|
||||
***** Table : Nb of materials = 11 *****
|
||||
|
||||
Material: Mylar density: 1.390 g/cm3 RadL: 28.743 cm Nucl.Int.Length: 56.319 cm
|
||||
Imean: 74.266 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 75.967 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Oxygen (O) Z = 8.0 N = 16 A = 16.000 g/mole
|
||||
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
Material: Polypropelene density: 910.000 mg/cm3 RadL: 49.214 cm Nucl.Int.Length: 74.282 cm
|
||||
Imean: 54.941 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 56.518 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Hydrogen (H) Z = 1.0 N = 1 A = 1.010 g/mole
|
||||
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.989 %
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
|
||||
Material: CO2 density: 1.842 mg/cm3 RadL: 196.501 m Nucl.Int.Length: 466.037 m
|
||||
Imean: 90.026 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 90.958 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Carbon (C) Z = 6.0 N = 12 A = 12.010 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
|
||||
Material: Xe20CO2 density: 5.082 mg/cm3 RadL: 17.750 m Nucl.Int.Length: 323.034 m
|
||||
Imean: 412.201 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 412.597 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Xe (Xe) Z = 54.0 N = 131 A = 131.292 g/mole
|
||||
---> Isotope: Xe124 Z = 54 N = 124 A = 123.91 g/mole abundance: 0.090 %
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
|
||||
Material: Kr20CO2 density: 3.601 mg/cm3 RadL: 34.157 m Nucl.Int.Length: 391.554 m
|
||||
Imean: 296.542 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 296.926 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Kr (Kr) Z = 36.0 N = 84 A = 83.799 g/mole
|
||||
---> Isotope: Kr78 Z = 36 N = 78 A = 77.92 g/mole abundance: 0.350 %
|
||||
@@ -245,6 +245,10 @@ Registered graphics systems are:
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -717,384 +721,243 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
|
||||
====================================================================
|
||||
HADRONIC PROCESSES SUMMARY (verbose level 1)
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for neutron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticCHIPS: 0 eV ---> 100 TeV
|
||||
Cr_sctns: G4NeutronElasticXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: neutronInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: nCapture
|
||||
Model: nRadCapture: 0 eV ---> 100 TeV
|
||||
Cr_sctns: G4NeutronCaptureXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: nKiller
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for B-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: B-Inelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for D-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: D-Inelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for GenericIon
|
||||
|
||||
Process: ionInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for He3
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: He3Inelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for alpha
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: alphaInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_He3
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_He3Inelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_alpha
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_alphaInelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_deuteron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_deuteronInelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-------------------------------------------------------------------------
|
||||
Hadronic Processes for anti_hypertriton
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_lambda
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: anti_lambdaInelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_neutron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_neutronInelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_proton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_protonInelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_triton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_tritonInelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for deuteron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: dInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for e+
|
||||
|
||||
Process: positronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for e-
|
||||
|
||||
Process: electronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for gamma
|
||||
|
||||
Process: photonNuclear
|
||||
Model: GammaNPreco: 0 eV ---> 200 MeV
|
||||
Model: BertiniCascade: 199 MeV ---> 6 GeV
|
||||
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
|
||||
Cr_sctns: GammaNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for kaon+
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: kaon+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for kaon-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: kaon-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for lambda
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: lambdaInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for mu+
|
||||
|
||||
Process: muonNuclear
|
||||
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for mu-
|
||||
|
||||
Process: muonNuclear
|
||||
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: muMinusCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for pi+
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticGlauber: 0 eV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: pi+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for pi-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticGlauber: 0 eV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: pi-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for proton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticCHIPS: 0 eV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: protonInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for sigma-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: sigma-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for triton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: tInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
@@ -5895,7 +5758,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng Ne
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=0.030000s Real=0.039758s Sys=0.010000s
|
||||
User=0.040000s Real=0.091193s Sys=0.010000s
|
||||
#
|
||||
/calor/setAbsMat Air
|
||||
/calor/setWorldMat Xe20CO2
|
||||
@@ -5985,7 +5848,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng Ne
|
||||
Step# X Y Z KineE dEStep StepLeng TrakLeng NextVolu Process
|
||||
0 -1.46 mm -22.3 cm 2.94 cm 1.22 keV 0 eV 0 fm 0 fm World initStep
|
||||
1 -1.46 mm -22.3 cm 2.94 cm 67.9 keV 1.22 keV 51.7 um 51.7 um World eIoni
|
||||
2 -1.48 mm -22.6 cm 2.94 cm 29.6 MeV 11.1 keV 8.77 mm 8.82 mm World eIoni
|
||||
2 -1.48 mm -22.6 cm 2.94 cm 29.6 MeV 11.1 keV 8.77 mm 8.83 mm World eIoni
|
||||
3 -6.76 mm -25 cm 3.61 cm 272 MeV 13.5 keV 2.69 cm 3.57 cm OutOfWorldTransportation
|
||||
|
||||
*********************************************************************************************************
|
||||
@@ -5994,9 +5857,9 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng Ne
|
||||
|
||||
Step# X Y Z KineE dEStep StepLeng TrakLeng NextVolu Process
|
||||
0 -1.4 mm -19 cm 2.79 cm 1.21 keV 0 eV 0 fm 0 fm World initStep
|
||||
1 -1.4 mm -19 cm 2.79 cm 66.9 keV 1.21 keV 50.9 um 50.9 um World eIoni
|
||||
1 -1.4 mm -19 cm 2.79 cm 66.9 keV 1.21 keV 51 um 51 um World eIoni
|
||||
2 -1.41 mm -19.3 cm 2.79 cm 28.8 MeV 14.8 keV 8.58 mm 8.63 mm World eIoni
|
||||
3 -5.54 mm -25 cm 1.76 cm 595 MeV 39.1 keV 6.11 cm 6.97 cm OutOfWorldTransportation
|
||||
3 -5.55 mm -25 cm 1.76 cm 595 MeV 39.1 keV 6.11 cm 6.97 cm OutOfWorldTransportation
|
||||
|
||||
*********************************************************************************************************
|
||||
* G4Track Information: Particle = e-, Track ID = 2, Parent ID = 1
|
||||
@@ -6005,12 +5868,12 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng Ne
|
||||
Step# X Y Z KineE dEStep StepLeng TrakLeng NextVolu Process
|
||||
0 -1.24 mm -13.1 cm 2.3 cm 1.65 keV 0 eV 0 fm 0 fm World initStep
|
||||
1 -1.24 mm -13.1 cm 2.3 cm 99.7 keV 1.65 keV 77.9 um 77.9 um World eIoni
|
||||
2 -1.23 mm -13.7 cm 2.3 cm 54.8 MeV 6.26 keV 1.55 cm 1.56 cm World eIoni
|
||||
2 -1.23 mm -13.7 cm 2.3 cm 54.8 MeV 6.26 keV 1.56 cm 1.56 cm World eIoni
|
||||
3 4.02 mm -25 cm 7.21 mm 1.19 GeV 66.5 keV 11.6 cm 13.2 cm OutOfWorldTransportation
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000508s Sys=0.000000s
|
||||
User=0.000000s Real=0.000606s Sys=0.000000s
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
================== Deleting memory pools ===================
|
||||
|
||||
@@ -48,15 +48,15 @@ class F02ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
F02ActionInitialization(F02DetectorConstruction*);
|
||||
virtual ~F02ActionInitialization();
|
||||
~F02ActionInitialization() override = default;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
|
||||
G4VSteppingVerbose* InitializeSteppingVerbose() const override;
|
||||
|
||||
private:
|
||||
F02DetectorConstruction* fDetConstruction;
|
||||
F02DetectorConstruction* fDetConstruction = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -43,9 +43,9 @@ class F02CalorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
F02CalorHit();
|
||||
F02CalorHit() = default;
|
||||
F02CalorHit(const F02CalorHit&);
|
||||
virtual ~F02CalorHit();
|
||||
~F02CalorHit() override = default;
|
||||
|
||||
const F02CalorHit& operator=(const F02CalorHit&);
|
||||
G4bool operator==(const F02CalorHit&) const;
|
||||
@@ -53,7 +53,7 @@ class F02CalorHit : public G4VHit
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
|
||||
virtual void Print();
|
||||
void Print() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -69,14 +69,15 @@ class F02CalorHit : public G4VHit
|
||||
|
||||
private:
|
||||
|
||||
G4double fEdepAbs, fTrackLengthAbs;
|
||||
G4double fEdepGap, fTrackLengthGap;
|
||||
|
||||
G4double fEdepAbs = 0.;
|
||||
G4double fTrackLengthAbs = 0.;
|
||||
G4double fEdepGap = 0.;
|
||||
G4double fTrackLengthGap = 0.;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
typedef G4THitsCollection<F02CalorHit> F02CalorHitsCollection;
|
||||
using F02CalorHitsCollection = G4THitsCollection<F02CalorHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<F02CalorHit>* F02CalorHitAllocator;
|
||||
|
||||
|
||||
@@ -47,17 +47,17 @@ class F02CalorimeterSD : public G4VSensitiveDetector
|
||||
public:
|
||||
|
||||
F02CalorimeterSD(G4String, F02DetectorConstruction* );
|
||||
virtual ~F02CalorimeterSD();
|
||||
~F02CalorimeterSD() override;
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*) override;
|
||||
void EndOfEvent(G4HCofThisEvent*) override;
|
||||
|
||||
private:
|
||||
|
||||
F02CalorHitsCollection* fCalCollection;
|
||||
F02DetectorConstruction* fDetector;
|
||||
G4int* fHitID;
|
||||
F02CalorHitsCollection* fCalCollection = nullptr;
|
||||
F02DetectorConstruction* fDetector = nullptr;
|
||||
G4int* fHitID = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4Cache.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4Box;
|
||||
class G4Tubs;
|
||||
class G4LogicalVolume;
|
||||
@@ -57,7 +59,7 @@ class F02DetectorConstruction : public G4VUserDetectorConstruction
|
||||
public:
|
||||
|
||||
F02DetectorConstruction();
|
||||
virtual ~F02DetectorConstruction();
|
||||
~F02DetectorConstruction() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -71,8 +73,8 @@ class F02DetectorConstruction : public G4VUserDetectorConstruction
|
||||
void SetWorldSizeZ(G4double);
|
||||
void SetWorldSizeR(G4double);
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -96,32 +98,33 @@ class F02DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
private:
|
||||
|
||||
F02DetectorMessenger* fDetectorMessenger; // pointer -> Messenger
|
||||
G4Cache<F02CalorimeterSD*> fCalorimeterSD; // pointer -> sensitive detector
|
||||
G4Cache<F02ElectricFieldSetup*> fEmFieldSetup;
|
||||
F02DetectorMessenger* fDetectorMessenger = nullptr; // pointer -> Messenger
|
||||
G4Cache<F02CalorimeterSD*> fCalorimeterSD = nullptr; // pointer -> sensitive detector
|
||||
G4Cache<F02ElectricFieldSetup*> fEmFieldSetup = nullptr;
|
||||
|
||||
G4Tubs* fSolidWorld; // pointer to the solid World
|
||||
G4LogicalVolume* fLogicWorld; // pointer to the logical World
|
||||
G4VPhysicalVolume* fPhysiWorld; // pointer to the physical World
|
||||
G4Tubs* fSolidWorld = nullptr; // pointer to the solid World
|
||||
G4LogicalVolume* fLogicWorld = nullptr; // pointer to the logical World
|
||||
G4VPhysicalVolume* fPhysiWorld = nullptr; // pointer to the physical World
|
||||
|
||||
G4Tubs* fSolidAbsorber; // pointer to the solid Absorber
|
||||
G4LogicalVolume* fLogicAbsorber; // pointer to the logical Absorber
|
||||
G4VPhysicalVolume* fPhysiAbsorber; // pointer to the physical Absorber
|
||||
G4Tubs* fSolidAbsorber = nullptr; // pointer to the solid Absorber
|
||||
G4LogicalVolume* fLogicAbsorber = nullptr; // pointer to the logical Absorber
|
||||
G4VPhysicalVolume* fPhysiAbsorber = nullptr; // pointer to the physical Absorber
|
||||
|
||||
G4Material* fAbsorberMaterial;
|
||||
G4double fAbsorberThickness;
|
||||
G4double fAbsorberRadius;
|
||||
G4Material* fAbsorberMaterial = nullptr;
|
||||
G4double fAbsorberThickness = 4. * CLHEP::cm;
|
||||
G4double fAbsorberRadius = 10. * CLHEP::cm;
|
||||
G4bool fWorldChanged;
|
||||
|
||||
G4double fZAbsorber;
|
||||
G4double fZStartAbs, fZEndAbs;
|
||||
G4double fZAbsorber = 36. * CLHEP::cm;
|
||||
G4double fZStartAbs = 0.;
|
||||
G4double fZEndAbs = 0.;
|
||||
|
||||
G4Material* fWorldMaterial;
|
||||
G4double fWorldSizeR;
|
||||
G4double fWorldSizeZ;
|
||||
G4Material* fWorldMaterial = nullptr;
|
||||
G4double fWorldSizeR = 20. * CLHEP::cm;
|
||||
G4double fWorldSizeZ = 80. * CLHEP::cm;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
void DefineMaterials();
|
||||
void ComputeCalorParameters();
|
||||
G4VPhysicalVolume* ConstructCalorimeter();
|
||||
|
||||
@@ -51,25 +51,25 @@ class F02DetectorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F02DetectorMessenger(F02DetectorConstruction* );
|
||||
virtual ~F02DetectorMessenger();
|
||||
~F02DetectorMessenger() override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
F02DetectorConstruction* fDetector;
|
||||
F02DetectorConstruction* fDetector = nullptr;
|
||||
|
||||
G4UIdirectory* fDetDir;
|
||||
G4UIdirectory* fDetDir = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fAbsMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsRadCmd;
|
||||
G4UIcmdWithAString* fAbsMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsRadCmd = nullptr;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fAbsZposCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsZposCmd = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fWorldMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldZCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldRCmd;
|
||||
G4UIcmdWithAString* fWorldMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldZCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldRCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "G4ElectricField.hh"
|
||||
#include "G4UniformElectricField.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4FieldManager;
|
||||
class G4ChordFinder;
|
||||
class G4EquationOfMotion;
|
||||
@@ -62,7 +64,7 @@ public:
|
||||
|
||||
virtual ~F02ElectricFieldSetup();
|
||||
|
||||
// Methods to set parameters or select
|
||||
// Methods to set parameters or select
|
||||
void SetStepperType( G4int i) { fStepperType = i ; CreateStepper(); }
|
||||
|
||||
void SetMinStep(G4double s) { fMinStep = s ; }
|
||||
@@ -73,10 +75,10 @@ public:
|
||||
// Set/Get Field strength in Geant4 units
|
||||
|
||||
void UpdateIntegrator();
|
||||
// Prepare all the classes required for tracking - from stepper
|
||||
// Prepare all the classes required for tracking - from stepper
|
||||
// to Chord-Finder
|
||||
// NOTE: field and equation must have been created before calling this.
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Find the global Field Manager
|
||||
@@ -87,26 +89,21 @@ protected:
|
||||
// Implementation method - should not be exposed
|
||||
|
||||
private:
|
||||
G4double fMinStep;
|
||||
G4bool fVerbose;
|
||||
G4double fMinStep = 0.010 * CLHEP::mm;
|
||||
|
||||
G4FieldManager* fFieldManager;
|
||||
G4FieldManager* fFieldManager = nullptr;
|
||||
G4ChordFinder* fChordFinder = nullptr;
|
||||
G4EqMagElectricField* fEquation = nullptr;
|
||||
G4ElectricField* fEMfield = nullptr;
|
||||
|
||||
G4ChordFinder* fChordFinder;
|
||||
|
||||
G4EqMagElectricField* fEquation;
|
||||
|
||||
G4ElectricField* fEMfield;
|
||||
|
||||
G4ThreeVector fElFieldValue;
|
||||
|
||||
G4MagIntegratorStepper* fStepper;
|
||||
G4MagInt_Driver* fIntgrDriver;
|
||||
G4MagIntegratorStepper* fStepper = nullptr;
|
||||
G4MagInt_Driver* fIntgrDriver = nullptr;
|
||||
|
||||
G4int fStepperType;
|
||||
G4int fStepperType = 4; // ClassicalRK4 -- the default stepper;
|
||||
|
||||
|
||||
F02FieldMessenger* fFieldMessenger;
|
||||
F02FieldMessenger* fFieldMessenger = nullptr;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -50,20 +50,20 @@ class F02FieldMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F02FieldMessenger(F02ElectricFieldSetup* );
|
||||
virtual ~F02FieldMessenger();
|
||||
~F02FieldMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
F02ElectricFieldSetup* fElFieldSetup;
|
||||
F02ElectricFieldSetup* fElFieldSetup = nullptr;
|
||||
|
||||
G4UIdirectory* fFieldDir;
|
||||
G4UIcmdWithAnInteger* fStepperCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fElFieldZCmd;
|
||||
G4UIcmdWith3VectorAndUnit* fElFieldCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMinStepCmd;
|
||||
G4UIcmdWithoutParameter* fUpdateCmd;
|
||||
G4UIdirectory* fFieldDir = nullptr;
|
||||
G4UIcmdWithAnInteger* fStepperCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fElFieldZCmd = nullptr;
|
||||
G4UIcmdWith3VectorAndUnit* fElFieldCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMinStepCmd = nullptr;
|
||||
G4UIcmdWithoutParameter* fUpdateCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,10 +50,10 @@ class F02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
F02PrimaryGeneratorAction(F02DetectorConstruction*);
|
||||
virtual ~F02PrimaryGeneratorAction();
|
||||
~F02PrimaryGeneratorAction() override;
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
void SetRndmFlag(G4String val) { fRndmFlag = val; }
|
||||
void SetXVertex(G4double x);
|
||||
void SetYVertex(G4double y);
|
||||
@@ -62,16 +62,17 @@ class F02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
static G4String GetPrimaryName();
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun; //pointer a to G4 service class
|
||||
F02DetectorConstruction* fDetector; //pointer to the geometry
|
||||
G4ParticleGun* fParticleGun = nullptr; //pointer a to G4 service class
|
||||
F02DetectorConstruction* fDetector = nullptr; //pointer to the geometry
|
||||
|
||||
F02PrimaryGeneratorMessenger* fGunMessenger; //messenger of this class
|
||||
G4String fRndmFlag; //flag for random impact point
|
||||
F02PrimaryGeneratorMessenger* fGunMessenger = nullptr; //messenger of this class
|
||||
G4String fRndmFlag = "off"; //flag for random impact point
|
||||
|
||||
static G4ParticleDefinition* fgPrimaryParticle;
|
||||
G4double fXVertex, fYVertex, fZVertex;
|
||||
G4bool fVertexDefined;
|
||||
|
||||
G4double fXVertex = 0.;
|
||||
G4double fYVertex = 0.;
|
||||
G4double fZVertex = 0.;
|
||||
G4bool fVertexDefined = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,16 +47,16 @@ class F02PrimaryGeneratorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F02PrimaryGeneratorMessenger(F02PrimaryGeneratorAction*);
|
||||
virtual ~F02PrimaryGeneratorMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
~F02PrimaryGeneratorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
F02PrimaryGeneratorAction* fAction;
|
||||
G4UIcmdWithAString* fRndmCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetXVertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetYVertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetZVertexCmd;
|
||||
F02PrimaryGeneratorAction* fAction = nullptr;
|
||||
G4UIcmdWithAString* fRndmCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetXVertexCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetYVertexCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetZVertexCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -59,11 +59,11 @@ class F02SteppingVerbose : public G4SteppingVerbose
|
||||
{
|
||||
public:
|
||||
|
||||
F02SteppingVerbose();
|
||||
virtual ~F02SteppingVerbose();
|
||||
F02SteppingVerbose() = default;
|
||||
~F02SteppingVerbose() override = default;
|
||||
|
||||
virtual void StepInfo();
|
||||
virtual void TrackingStarted();
|
||||
void StepInfo() override;
|
||||
void TrackingStarted() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,13 +37,7 @@
|
||||
|
||||
F02ActionInitialization::F02ActionInitialization
|
||||
(F02DetectorConstruction* detConstruction)
|
||||
: G4VUserActionInitialization(),
|
||||
fDetConstruction(detConstruction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02ActionInitialization::~F02ActionInitialization()
|
||||
: fDetConstruction(detConstruction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -34,22 +34,7 @@
|
||||
|
||||
#include "F02CalorHit.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<F02CalorHit>* F02CalorHitAllocator=0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02CalorHit::F02CalorHit()
|
||||
: G4VHit(),
|
||||
fEdepAbs(0.),
|
||||
fTrackLengthAbs(0.),
|
||||
fEdepGap(0.),
|
||||
fTrackLengthGap(0.)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02CalorHit::~F02CalorHit()
|
||||
{;}
|
||||
G4ThreadLocal G4Allocator<F02CalorHit>* F02CalorHitAllocator=nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -80,6 +65,6 @@ G4bool F02CalorHit::operator==(const F02CalorHit& right) const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02CalorHit::Print()
|
||||
{;}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
F02CalorimeterSD::F02CalorimeterSD(G4String name,
|
||||
F02DetectorConstruction* det)
|
||||
: G4VSensitiveDetector(name),
|
||||
fCalCollection(0),
|
||||
fDetector(det),
|
||||
fHitID(new G4int[500])
|
||||
{
|
||||
@@ -67,7 +66,7 @@ F02CalorimeterSD::~F02CalorimeterSD()
|
||||
void F02CalorimeterSD::Initialize(G4HCofThisEvent*)
|
||||
{
|
||||
fCalCollection = new F02CalorHitsCollection
|
||||
(SensitiveDetectorName,collectionName[0]);
|
||||
(SensitiveDetectorName,collectionName[0]);
|
||||
for (G4int j=0;j<1; j++) {fHitID[j] = -1;};
|
||||
}
|
||||
|
||||
@@ -82,7 +81,7 @@ G4bool F02CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
|
||||
if ((edep == 0.) && (stepl == 0.) ) return false;
|
||||
|
||||
G4TouchableHistory* theTouchable
|
||||
auto theTouchable
|
||||
= (G4TouchableHistory*)(step->GetPreStepPoint()->GetTouchable());
|
||||
|
||||
G4VPhysicalVolume* physVol = theTouchable->GetVolume();
|
||||
@@ -90,7 +89,7 @@ G4bool F02CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
G4int number = 0;
|
||||
if (fHitID[number]==-1)
|
||||
{
|
||||
F02CalorHit* calHit = new F02CalorHit();
|
||||
auto calHit = new F02CalorHit();
|
||||
if (physVol == fDetector->GetAbsorber()) calHit->AddAbs(edep,stepl);
|
||||
fHitID[number] = fCalCollection->insert(calHit) - 1;
|
||||
if (verboseLevel>0)
|
||||
|
||||
@@ -57,24 +57,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02DetectorConstruction::F02DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fDetectorMessenger(0),
|
||||
fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
|
||||
fSolidAbsorber(0),fLogicAbsorber(0), fPhysiAbsorber(0),
|
||||
fAbsorberMaterial(0), fAbsorberThickness(0.), fAbsorberRadius(0.),
|
||||
fWorldChanged(false), fZAbsorber(0.), fZStartAbs(0.), fZEndAbs(0.),
|
||||
fWorldMaterial(0), fWorldSizeR(0.), fWorldSizeZ(0.)
|
||||
{
|
||||
// default parameter values of the calorimeter
|
||||
|
||||
fWorldSizeZ = 80.*cm;
|
||||
fWorldSizeR = 20.*cm;
|
||||
|
||||
fAbsorberThickness = 40.0*mm;
|
||||
|
||||
fAbsorberRadius = 10.*cm;
|
||||
fZAbsorber = 36.*cm;
|
||||
|
||||
// create commands for interactive definition of the calorimeter
|
||||
|
||||
fDetectorMessenger = new F02DetectorMessenger(this);
|
||||
@@ -104,7 +87,7 @@ G4VPhysicalVolume* F02DetectorConstruction::Construct()
|
||||
void F02DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
//This function illustrates the possible ways to define materials
|
||||
|
||||
|
||||
G4String name, symbol; // a=mass of a mole;
|
||||
G4double a, z, density; // z=mean number of protons;
|
||||
G4int nel;
|
||||
@@ -116,19 +99,19 @@ void F02DetectorConstruction::DefineMaterials()
|
||||
//
|
||||
|
||||
a = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
auto elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
|
||||
a = 12.01*g/mole;
|
||||
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
|
||||
auto elC = new G4Element(name="Carbon", symbol="C", z=6., a);
|
||||
|
||||
a = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
auto elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
|
||||
a = 16.00*g/mole;
|
||||
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
auto elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
|
||||
a = 39.948*g/mole;
|
||||
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
|
||||
auto elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
|
||||
|
||||
//
|
||||
// define simple materials
|
||||
@@ -137,14 +120,14 @@ void F02DetectorConstruction::DefineMaterials()
|
||||
// Mylar
|
||||
|
||||
density = 1.39*g/cm3;
|
||||
G4Material* mylar = new G4Material(name="Mylar", density, nel=3);
|
||||
auto mylar = new G4Material(name="Mylar", density, nel=3);
|
||||
mylar->AddElement(elO,2);
|
||||
mylar->AddElement(elC,5);
|
||||
mylar->AddElement(elH,4);
|
||||
|
||||
// Polypropelene
|
||||
|
||||
G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
|
||||
auto CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
|
||||
CH2->AddElement(elH,2);
|
||||
CH2->AddElement(elC,1);
|
||||
|
||||
@@ -152,20 +135,20 @@ void F02DetectorConstruction::DefineMaterials()
|
||||
|
||||
density = 3.700*mg/cm3;
|
||||
a = 83.80*g/mole;
|
||||
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
|
||||
auto Kr = new G4Material(name="Kr",z=36., a, density );
|
||||
|
||||
// Dry air (average composition)
|
||||
|
||||
density = 1.7836*mg/cm3; // STP
|
||||
G4Material* argon = new G4Material(name="Argon" , density, ncomponents=1);
|
||||
auto argon = new G4Material(name="Argon" , density, ncomponents=1);
|
||||
argon->AddElement(elAr, 1);
|
||||
|
||||
density = 1.25053*mg/cm3; // STP
|
||||
G4Material* nitrogen = new G4Material(name="N2" , density, ncomponents=1);
|
||||
auto nitrogen = new G4Material(name="N2" , density, ncomponents=1);
|
||||
nitrogen->AddElement(elN, 2);
|
||||
|
||||
density = 1.4289*mg/cm3; // STP
|
||||
G4Material* oxygen = new G4Material(name="O2" , density, ncomponents=1);
|
||||
auto oxygen = new G4Material(name="O2" , density, ncomponents=1);
|
||||
oxygen->AddElement(elO, 2);
|
||||
|
||||
density = 1.2928*mg/cm3; // STP
|
||||
@@ -173,7 +156,7 @@ void F02DetectorConstruction::DefineMaterials()
|
||||
temperature = STP_Temperature;
|
||||
pressure = 1.0e-0*STP_Pressure;
|
||||
|
||||
G4Material* air = new G4Material(name="Air" , density, ncomponents=3,
|
||||
auto air = new G4Material(name="Air" , density, ncomponents=3,
|
||||
kStateGas,temperature,pressure);
|
||||
air->AddMaterial( nitrogen, fractionmass = 0.7557 );
|
||||
air->AddMaterial( oxygen, fractionmass = 0.2315 );
|
||||
@@ -183,26 +166,26 @@ void F02DetectorConstruction::DefineMaterials()
|
||||
|
||||
density = 5.858*mg/cm3;
|
||||
a = 131.29*g/mole;
|
||||
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
|
||||
auto Xe = new G4Material(name="Xenon",z=54., a, density );
|
||||
|
||||
// Carbon dioxide, STP
|
||||
|
||||
density = 1.842*mg/cm3;
|
||||
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
|
||||
auto CarbonDioxide = new G4Material(name="CO2", density, nel=2);
|
||||
CarbonDioxide->AddElement(elC,1);
|
||||
CarbonDioxide->AddElement(elO,2);
|
||||
|
||||
// 80% Xe + 20% CO2, STP
|
||||
|
||||
density = 5.0818*mg/cm3;
|
||||
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
|
||||
auto Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
|
||||
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 );
|
||||
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 );
|
||||
|
||||
// 80% Kr + 20% CO2, STP
|
||||
|
||||
density = 3.601*mg/cm3;
|
||||
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
|
||||
auto Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
|
||||
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 );
|
||||
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 );
|
||||
|
||||
@@ -216,7 +199,7 @@ void F02DetectorConstruction::DefineMaterials()
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
G4VPhysicalVolume* F02DetectorConstruction::ConstructCalorimeter()
|
||||
{
|
||||
// Cleanup old geometry
|
||||
@@ -233,7 +216,7 @@ G4VPhysicalVolume* F02DetectorConstruction::ConstructCalorimeter()
|
||||
|
||||
ComputeCalorParameters();
|
||||
PrintCalorParameters();
|
||||
|
||||
|
||||
// World
|
||||
|
||||
fSolidWorld = new G4Tubs("World", // its name
|
||||
@@ -243,11 +226,11 @@ G4VPhysicalVolume* F02DetectorConstruction::ConstructCalorimeter()
|
||||
fWorldMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
fPhysiWorld = new G4PVPlacement(0, // no rotation
|
||||
fPhysiWorld = new G4PVPlacement(nullptr, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
"World", // its name
|
||||
fLogicWorld, // its logical volume
|
||||
0, // its mother volume
|
||||
nullptr, // its mother volume
|
||||
false, // no boolean op.
|
||||
0); // copy number
|
||||
// Absorber
|
||||
@@ -261,7 +244,7 @@ G4VPhysicalVolume* F02DetectorConstruction::ConstructCalorimeter()
|
||||
fAbsorberMaterial,
|
||||
"Absorber");
|
||||
|
||||
fPhysiAbsorber = new G4PVPlacement(0,
|
||||
fPhysiAbsorber = new G4PVPlacement(nullptr,
|
||||
G4ThreeVector(0.,0.,fZAbsorber),
|
||||
"Absorber",
|
||||
fLogicAbsorber,
|
||||
@@ -385,19 +368,19 @@ void F02DetectorConstruction::ConstructSDandField()
|
||||
// Sensitive Detectors: Absorber
|
||||
|
||||
if (!fCalorimeterSD.Get()) {
|
||||
F02CalorimeterSD* calorimeterSD = new F02CalorimeterSD("CalorSD",this);
|
||||
auto calorimeterSD = new F02CalorimeterSD("CalorSD",this);
|
||||
fCalorimeterSD.Put(calorimeterSD);
|
||||
}
|
||||
}
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(fCalorimeterSD.Get());
|
||||
SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
|
||||
|
||||
// Construct the field creator - this will register the field it creates
|
||||
|
||||
if (!fEmFieldSetup.Get()) {
|
||||
F02ElectricFieldSetup* fieldSetup = new F02ElectricFieldSetup();
|
||||
if (!fEmFieldSetup.Get()) {
|
||||
auto fieldSetup = new F02ElectricFieldSetup();
|
||||
G4AutoDelete::Register(fieldSetup); //Kernel will delete the messenger
|
||||
fEmFieldSetup.Put(fieldSetup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -42,20 +42,11 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02DetectorMessenger::F02DetectorMessenger(F02DetectorConstruction* det)
|
||||
: G4UImessenger(),
|
||||
fDetector(det),
|
||||
fDetDir(0),
|
||||
fAbsMaterCmd(0),
|
||||
fAbsThickCmd(0),
|
||||
fAbsRadCmd(0),
|
||||
fAbsZposCmd(0),
|
||||
fWorldMaterCmd(0),
|
||||
fWorldZCmd(0),
|
||||
fWorldRCmd(0)
|
||||
: fDetector(det)
|
||||
{
|
||||
fDetDir = new G4UIdirectory("/calor/");
|
||||
fDetDir->SetGuidance("F02 detector control.");
|
||||
|
||||
|
||||
fAbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
|
||||
fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
|
||||
fAbsMaterCmd->SetParameterName("choice",true);
|
||||
@@ -133,19 +124,19 @@ void F02DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
|
||||
if( command == fWorldMaterCmd )
|
||||
{ fDetector->SetWorldMaterial(newValue);}
|
||||
|
||||
|
||||
if( command == fAbsThickCmd )
|
||||
{fDetector->SetAbsorberThickness(fAbsThickCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == fAbsRadCmd )
|
||||
{ fDetector->SetAbsorberRadius(fAbsRadCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fAbsZposCmd )
|
||||
{ fDetector->SetAbsorberZpos(fAbsZposCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fWorldZCmd )
|
||||
{ fDetector->SetWorldSizeZ(fWorldZCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fWorldRCmd )
|
||||
{ fDetector->SetWorldSizeR(fWorldRCmd->GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
@@ -68,16 +68,6 @@
|
||||
// Constructors:
|
||||
|
||||
F02ElectricFieldSetup::F02ElectricFieldSetup()
|
||||
: fMinStep(0.010*mm), // minimal step of 10 microns
|
||||
fFieldManager(0),
|
||||
fChordFinder(0),
|
||||
fEquation(0),
|
||||
fEMfield(0),
|
||||
fElFieldValue(),
|
||||
fStepper(0),
|
||||
fIntgrDriver(0),
|
||||
fStepperType(4), // ClassicalRK4 -- the default stepper
|
||||
fFieldMessenger(nullptr)
|
||||
{
|
||||
fEMfield = new G4UniformElectricField(
|
||||
G4ThreeVector(0.0,100000.0*kilovolt/cm,0.0));
|
||||
@@ -92,23 +82,13 @@ F02ElectricFieldSetup::F02ElectricFieldSetup()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02ElectricFieldSetup::F02ElectricFieldSetup(G4ThreeVector fieldVector)
|
||||
: fMinStep(0.010*mm), // minimal step of 10 microns
|
||||
fFieldManager(0),
|
||||
fChordFinder(0),
|
||||
fEquation(0),
|
||||
fEMfield(0),
|
||||
fElFieldValue(),
|
||||
fStepper(0),
|
||||
fIntgrDriver(0),
|
||||
fStepperType(4), // ClassicalRK4 -- the default stepper
|
||||
fFieldMessenger(nullptr)
|
||||
{
|
||||
fEMfield = new G4UniformElectricField(fieldVector);
|
||||
fEquation = new G4EqMagElectricField(fEMfield);
|
||||
|
||||
fFieldManager = GetGlobalFieldManager();
|
||||
UpdateIntegrator();
|
||||
|
||||
|
||||
fFieldMessenger = new F02FieldMessenger(this);
|
||||
}
|
||||
|
||||
@@ -120,7 +100,7 @@ F02ElectricFieldSetup::~F02ElectricFieldSetup()
|
||||
|
||||
delete fFieldMessenger; fFieldMessenger= nullptr;
|
||||
// Delete the messenger first, to avoid messages to deleted classes!
|
||||
|
||||
|
||||
delete fChordFinder; fChordFinder= nullptr;
|
||||
delete fStepper; fStepper = nullptr;
|
||||
delete fEquation; fEquation = nullptr;
|
||||
@@ -147,7 +127,7 @@ void F02ElectricFieldSetup::UpdateIntegrator()
|
||||
// The chord-finder's destructor deletes the driver
|
||||
fIntgrDriver= nullptr;
|
||||
}
|
||||
|
||||
|
||||
// Currently driver does not 'own' stepper ( 17.05.2017 J.A. )
|
||||
// -- so this stepper is still a valid object after this
|
||||
|
||||
@@ -155,7 +135,7 @@ void F02ElectricFieldSetup::UpdateIntegrator()
|
||||
delete fStepper;
|
||||
fStepper = nullptr;
|
||||
}
|
||||
|
||||
|
||||
// Create the new objects, in turn for all relevant classes
|
||||
// -- Careful to call this after all old objects are destroyed, and
|
||||
// pointers nullified.
|
||||
@@ -168,7 +148,7 @@ void F02ElectricFieldSetup::UpdateIntegrator()
|
||||
fIntgrDriver = new G4MagInt_Driver(fMinStep,
|
||||
fStepper,
|
||||
fStepper->GetNumberOfVariables());
|
||||
if( fIntgrDriver ){
|
||||
if( fIntgrDriver ){
|
||||
fChordFinder = new G4ChordFinder(fIntgrDriver);
|
||||
}
|
||||
}
|
||||
@@ -215,20 +195,20 @@ void F02ElectricFieldSetup::CreateStepper()
|
||||
G4cout<<"G4CashKarpRKF45 is called"<<G4endl;
|
||||
break;
|
||||
case 6:
|
||||
fStepper = 0; // new G4RKG3_Stepper( fEquation, nvar );
|
||||
fStepper = nullptr; // new G4RKG3_Stepper( fEquation, nvar );
|
||||
G4cout<<"G4RKG3_Stepper is not currently working for Electric Field"
|
||||
<<G4endl;
|
||||
break;
|
||||
case 7:
|
||||
fStepper = 0; // new G4HelixExplicitEuler( fEquation );
|
||||
fStepper = nullptr; // new G4HelixExplicitEuler( fEquation );
|
||||
G4cout<<"G4HelixExplicitEuler is not valid for Electric Field"<<G4endl;
|
||||
break;
|
||||
case 8:
|
||||
fStepper = 0; // new G4HelixImplicitEuler( fEquation );
|
||||
fStepper = nullptr; // new G4HelixImplicitEuler( fEquation );
|
||||
G4cout<<"G4HelixImplicitEuler is not valid for Electric Field"<<G4endl;
|
||||
break;
|
||||
case 9:
|
||||
fStepper = 0; // new G4HelixSimpleRunge( fEquation );
|
||||
fStepper = nullptr; // new G4HelixSimpleRunge( fEquation );
|
||||
G4cout<<"G4HelixSimpleRunge is not valid for Electric Field"<<G4endl;
|
||||
break;
|
||||
default: /* fStepper = 0; // Older code */
|
||||
@@ -262,7 +242,7 @@ void F02ElectricFieldSetup::SetFieldZValue(G4double fieldValue)
|
||||
|
||||
void F02ElectricFieldSetup::SetFieldValue(G4ThreeVector fieldVector)
|
||||
{
|
||||
if (fEMfield) delete fEMfield;
|
||||
delete fEMfield;
|
||||
|
||||
// Set the value of the Global Field value to fieldVector
|
||||
|
||||
@@ -277,7 +257,7 @@ void F02ElectricFieldSetup::SetFieldValue(G4ThreeVector fieldVector)
|
||||
{
|
||||
// If the new field's value is Zero, then it is best to
|
||||
// insure that it is not used for propagation.
|
||||
fEMfield = 0;
|
||||
fEMfield = nullptr;
|
||||
}
|
||||
fieldMgr->SetDetectorField(fEMfield);
|
||||
fEquation->SetFieldObj(fEMfield); // must now point to the new field
|
||||
|
||||
@@ -43,14 +43,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02FieldMessenger::F02FieldMessenger(F02ElectricFieldSetup* fieldSetup)
|
||||
: G4UImessenger(),
|
||||
fElFieldSetup(fieldSetup),
|
||||
fFieldDir(0),
|
||||
fStepperCmd(0),
|
||||
fElFieldZCmd(0),
|
||||
fElFieldCmd(0),
|
||||
fMinStepCmd(0),
|
||||
fUpdateCmd(0)
|
||||
: fElFieldSetup(fieldSetup)
|
||||
{
|
||||
fFieldDir = new G4UIdirectory("/field/");
|
||||
fFieldDir->SetGuidance("F02 field tracking control.");
|
||||
@@ -74,14 +67,14 @@ F02FieldMessenger::F02FieldMessenger(F02ElectricFieldSetup* fieldSetup)
|
||||
fElFieldZCmd->SetParameterName("Ez",false,false);
|
||||
fElFieldZCmd->SetDefaultUnit("megavolt/m");
|
||||
fElFieldZCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fElFieldCmd = new G4UIcmdWith3VectorAndUnit("/field/setField",this);
|
||||
fElFieldCmd->SetGuidance("Define uniform Electric field.");
|
||||
fElFieldCmd->SetGuidance("Value of Electric field has to be given in volt/m");
|
||||
fElFieldCmd->SetParameterName("Ex","Ey","Ez",false,false);
|
||||
fElFieldCmd->SetDefaultUnit("megavolt/m");
|
||||
fElFieldCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fMinStepCmd = new G4UIcmdWithADoubleAndUnit("/field/setMinStep",this);
|
||||
fMinStepCmd->SetGuidance("Define minimal step");
|
||||
fMinStepCmd->SetParameterName("min step",false,false);
|
||||
|
||||
@@ -47,22 +47,14 @@
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ParticleDefinition* F02PrimaryGeneratorAction::fgPrimaryParticle = 0;
|
||||
|
||||
G4ParticleDefinition* F02PrimaryGeneratorAction::fgPrimaryParticle = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02PrimaryGeneratorAction::F02PrimaryGeneratorAction(
|
||||
F02DetectorConstruction* det)
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0),
|
||||
fDetector(det),
|
||||
fGunMessenger(0),
|
||||
fRndmFlag("off"),
|
||||
fXVertex(0.),
|
||||
fYVertex(0.),
|
||||
fZVertex(0.),
|
||||
fVertexDefined(false)
|
||||
: fDetector(det)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
@@ -43,12 +43,7 @@
|
||||
|
||||
F02PrimaryGeneratorMessenger::F02PrimaryGeneratorMessenger(
|
||||
F02PrimaryGeneratorAction* action)
|
||||
: G4UImessenger(),
|
||||
fAction(action),
|
||||
fRndmCmd(0),
|
||||
fSetXVertexCmd(0),
|
||||
fSetYVertexCmd(0),
|
||||
fSetZVertexCmd(0)
|
||||
: fAction(action)
|
||||
{
|
||||
fRndmCmd = new G4UIcmdWithAString("/gun/random",this);
|
||||
fRndmCmd->SetGuidance("Shoot randomly the incident particle.");
|
||||
@@ -57,7 +52,7 @@ F02PrimaryGeneratorMessenger::F02PrimaryGeneratorMessenger(
|
||||
fRndmCmd->SetDefaultValue("off");
|
||||
fRndmCmd->SetCandidates("on off");
|
||||
fRndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
fSetXVertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/xvertex",this);
|
||||
fSetXVertexCmd->SetGuidance(" Set x coord. of the primary vertex.");
|
||||
fSetXVertexCmd->SetParameterName("xv",true);
|
||||
|
||||
@@ -39,17 +39,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02SteppingVerbose::F02SteppingVerbose()
|
||||
: G4SteppingVerbose()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F02SteppingVerbose::~F02SteppingVerbose()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F02SteppingVerbose::StepInfo()
|
||||
{
|
||||
CopyState();
|
||||
@@ -81,14 +70,14 @@ void F02SteppingVerbose::StepInfo()
|
||||
<< std::setw( 6)<<G4BestUnit(fStep->GetStepLength(),"Length")
|
||||
<< std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length");
|
||||
|
||||
if( fTrack->GetNextVolume() != 0 ) {
|
||||
if( fTrack->GetNextVolume() != nullptr ) {
|
||||
G4cout << std::setw(10) << fTrack->GetNextVolume()->GetName();
|
||||
} else {
|
||||
G4cout << std::setw(10) << "OutOfWorld";
|
||||
}
|
||||
|
||||
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0){
|
||||
G4cout << std::setw(10)
|
||||
if(fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr){
|
||||
G4cout << std::setw(10)
|
||||
<< fStep->GetPostStepPoint()->GetProcessDefinedStep()
|
||||
->GetProcessName();
|
||||
} else {
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
# Macro file for the visualization setting in the initialization phase
|
||||
# of the field02 example.
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
/vis/open OGL 600x600-0+0
|
||||
#
|
||||
# Use this open statement to create a .prim file suitable for
|
||||
# viewing in DAWN:
|
||||
#/vis/open DAWNFILE
|
||||
#
|
||||
# Use this open statement to create a .heprep file suitable for
|
||||
# viewing in HepRApp:
|
||||
#/vis/open HepRepFile
|
||||
#
|
||||
# Use this open statement to create a .wrl file suitable for
|
||||
# viewing in a VRML viewer:
|
||||
#/vis/open VRML2FILE
|
||||
# Open a viewer
|
||||
/vis/open
|
||||
# This opens the default viewer - see examples/basic/B1/vis.mac for a
|
||||
# more comprehensive overview of options. Also the documentation.
|
||||
#
|
||||
# Disable auto refresh and quieten vis messages whilst scene and
|
||||
# trajectories are established:
|
||||
|
||||
@@ -11,69 +11,69 @@
|
||||
is created in the ConstructSDandField() function in the F03DetectorConstruction
|
||||
class. The local magnetic field is set to the "Radiator" volume.
|
||||
The interactive commands are implemented in F03FieldMessenger.
|
||||
|
||||
|
||||
\section field03_s1 GEOMETRY DEFINITION
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
In this test the parameters of the "World" can be changed , too.
|
||||
|
||||
A transverse global uniform magnetic field can be applied.
|
||||
In addition, the "Radiator" volume, which is placed in geometry next
|
||||
In addition, the "Radiator" volume, which is placed in geometry next
|
||||
to the absorber, has a local magnetic field.
|
||||
|
||||
|
||||
The default geometry is constructed in F03DetectorConstruction class,
|
||||
but all the parameters can be changed via
|
||||
the commands defined in the F03DetectorMessenger class.
|
||||
|
||||
|
||||
\section field03_s2 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the F03PrimaryGeneratorAction class, and can
|
||||
be changed via the G4 build-in commands of G4ParticleGun class (see
|
||||
the macros provided with this example).
|
||||
|
||||
|
||||
It is also possible to change the position of the primary particle vertex
|
||||
or activate its randomization via the commands defined in the
|
||||
F01PrimaryGeneratorMessenger class.
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
\section field03_s3 DETECTOR RESPONSE
|
||||
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
informations needed to simulate and analyse the detector response.
|
||||
|
||||
|
||||
In this example a F03CalorHit is defined as a set of 2 informations:
|
||||
- the total energy deposit in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
Therefore the absorber is declared
|
||||
'sensitive detector' (SD), see F03CalorimeterSD, which means they can contribute to the hit.
|
||||
|
||||
|
||||
|
||||
\subsection field01_s4 PHYSICS LIST
|
||||
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
requires data files for electromagnetic and hadronic processes.
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
|
||||
\section field03_s5 HOW TO START ?
|
||||
|
||||
|
||||
- Execute field03 in 'batch' mode from macro files e.g.
|
||||
\verbatim
|
||||
% ./field03 field03.in
|
||||
\endverbatim
|
||||
|
||||
|
||||
- Execute field03 in 'interactive' mode with visualization e.g.
|
||||
\verbatim
|
||||
% ./field03
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
cmake_minimum_required(VERSION 3.16...3.27)
|
||||
project(field03)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -23,7 +23,7 @@ include(${Geant4_USE_FILE})
|
||||
#----------------------------------------------------------------------------
|
||||
# Locate sources and headers for this project
|
||||
#
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include
|
||||
${Geant4_INCLUDE_DIR})
|
||||
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
|
||||
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
|
||||
|
||||
@@ -5,6 +5,10 @@ which **must** added in reverse chronological order (newest at the top). It must
|
||||
be used as a substitute for writing good git commit messages!
|
||||
|
||||
|
||||
## 2023-07-05 I. Hrivnacova (fieldex03-V11-01-00)
|
||||
- Clang-tidy, new coding guidelines
|
||||
- Clean-up trailing white-spaces
|
||||
|
||||
## 2021-12-10 Ben Morgan (fieldex03-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -16,14 +20,14 @@ July 27, 2018 I.Hrivnacova - fieldex03-V10-04-02
|
||||
- Added commands:
|
||||
/field/setField Bx By Bz unit
|
||||
/field/setLocalField Bx By Bz unit
|
||||
- Fixed geometry (corrected overlaps, parameters handling)
|
||||
- Fixed geometry (corrected overlaps, parameters handling)
|
||||
- Activated checkOverlaps in G4PVPlacements
|
||||
- Macro review and code clean-up:
|
||||
- Removed EventAction, RunAction, RunActionMessenger
|
||||
used only for storing random numbers, already available in kernel
|
||||
- Separated other than visualization settings from vis.mac in a
|
||||
- Separated other than visualization settings from vis.mac in a
|
||||
new init_vis.mac
|
||||
- Added test for commands defined in the example at the end
|
||||
- Added test for commands defined in the example at the end
|
||||
of field02.in macro
|
||||
- Improved visualization of geometry
|
||||
- Added "beamOn 10" button in gui.mac
|
||||
@@ -63,7 +67,7 @@ May 19, 2016 - G.Cosmo - fieldex03-V10-02-00
|
||||
- Fixed compilation warnings on gcc-6.1 in F03FieldMessenger.
|
||||
|
||||
September 01, 2015 - I. Hrivnacova - fieldex03-V10-01-00
|
||||
- Removed F03EventActionMessenger class, now obsolete, and
|
||||
- Removed F03EventActionMessenger class, now obsolete, and
|
||||
replaced /event/printModulo commands in macros with /run/printProgress
|
||||
- Code cleanup
|
||||
|
||||
@@ -85,7 +89,7 @@ November 26, 2013 - I.Hrivnacova - fieldex03-V09-06-05
|
||||
- Fixed ConstructSDandField():
|
||||
Moved setting the SD and field manager to logical volume outside the tests
|
||||
- Do not test (fAbsorberThickness > 0.) in ConstructCalorimeter()
|
||||
as setting 0 is not allowed in set command
|
||||
as setting 0 is not allowed in set command
|
||||
|
||||
November 25, 2013 - I.Hrivnacova - fieldex03-V09-06-04
|
||||
- Put back cleaning volumes and solid stores in ConstructGeometry()
|
||||
@@ -94,17 +98,17 @@ November 22, 2013 - P.Gumplinger - fieldex03-V09-06-03
|
||||
- add gui.mac back in and removed fWorldChanged
|
||||
|
||||
November 21, 2013 - I.Hrivnacova - fieldex03-V09-06-02
|
||||
- Use new G4RunManager::ReinitializeGeometry to trigger geometry rebuild
|
||||
- Use new G4RunManager::ReinitializeGeometry to trigger geometry rebuild
|
||||
when geometry changes
|
||||
- Remove DetectorConstruction::Update and corresponding UI command that
|
||||
is not needed anymore
|
||||
- Set "ToBeBroadcasted == false" for UI commands that modify detector
|
||||
since these should be executed only by master
|
||||
- Set "ToBeBroadcasted == false" for UI commands that modify detector
|
||||
since these should be executed only by master
|
||||
- Fixed main (do not call gui.mac which does not exist)
|
||||
- In F03FieldSetup:
|
||||
- In F03FieldSetup:
|
||||
- Do not declare fLocalFieldManager thread-local
|
||||
as the F03FieldSetup is already thread-local object
|
||||
- Code clean-up
|
||||
- Code clean-up
|
||||
|
||||
November 12, 2013 P.Gumplinger - fieldex03-V09-06-01
|
||||
- migration to MT and code cleanup
|
||||
@@ -191,8 +195,8 @@ Mar 23rd, 2004 John Apostolakis (fieldex03-V06-00-00)
|
||||
|
||||
Dec 1st, 2003 John Apostolakis (fieldex03-V05-02-00)
|
||||
-------------------------------
|
||||
- Renamed F03ElectroMagneticField into F03FieldSetup (as it is a creator,
|
||||
not a field).
|
||||
- Renamed F03ElectroMagneticField into F03FieldSetup (as it is a creator,
|
||||
not a field).
|
||||
- FieldSetup is now called only in Detector Construction, not in main.
|
||||
|
||||
Nov 25th, 2003 Gabriele Cosmo
|
||||
|
||||
@@ -15,29 +15,29 @@
|
||||
class. The local magnetic field is set to the "Radiator" volume.
|
||||
The interactive commands are implemented in F03FieldMessenger.
|
||||
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
|
||||
The "Absorber" is a solid made of a given material.
|
||||
|
||||
Three parameters define the absorber :
|
||||
- the material of the absorber,
|
||||
- the thickness of an absorber,
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
- the transverse size of the absorber (the input face is a square).
|
||||
|
||||
The volume "World" contains the "Absorber".
|
||||
In this test the parameters of the "World" can be changed , too.
|
||||
|
||||
A transverse global uniform magnetic field can be applied.
|
||||
In addition, the "Radiator" volume, which is placed in geometry next
|
||||
In addition, the "Radiator" volume, which is placed in geometry next
|
||||
to the absorber, has a local magnetic field.
|
||||
|
||||
|
||||
The default geometry is constructed in F03DetectorConstruction class,
|
||||
but all the parameters can be changed via
|
||||
the commands defined in the F03DetectorMessenger class.
|
||||
|
||||
|
||||
2- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
|
||||
The primary kinematic consists of a single particle which hits the
|
||||
absorber perpendicular to the input face. The type of the particle
|
||||
and its energy are set in the F03PrimaryGeneratorAction class, and can
|
||||
@@ -47,33 +47,33 @@
|
||||
It is also possible to change the position of the primary particle vertex
|
||||
or activate its randomization via the commands defined in the
|
||||
F01PrimaryGeneratorMessenger class.
|
||||
|
||||
|
||||
A RUN is a set of events.
|
||||
|
||||
|
||||
3- DETECTOR RESPONSE
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
|
||||
A HIT is a record, event per event , of all the
|
||||
informations needed to simulate and analyse the detector response.
|
||||
|
||||
|
||||
In this example a F03CalorHit is defined as a set of 2 informations:
|
||||
- the total energy deposit in the absorber,
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
- the total tracklength of all charged particles in the absorber,
|
||||
|
||||
Therefore the absorber is declared
|
||||
'sensitive detector' (SD), see F03CalorimeterSD, which means they can contribute to the hit.
|
||||
|
||||
|
||||
4- PHYSICS LIST
|
||||
|
||||
|
||||
The particle's type and the physic processes which will be available
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
in this example are set in the FTFP_BERT physics list. This physics list
|
||||
requires data files for electromagnetic and hadronic processes.
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
See more on installation of the datasets in Geant4 Installation Guide,
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
|
||||
- Execute field03 in 'batch' mode from macro files e.g.
|
||||
% ./field03 field03.in
|
||||
|
||||
|
||||
- Execute field03 in 'interactive' mode with visualization e.g.
|
||||
% ./field03
|
||||
....
|
||||
|
||||
@@ -73,13 +73,13 @@ int main(int argc,char** argv)
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
#else
|
||||
G4VSteppingVerbose::SetInstance(new F03SteppingVerbose);
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
auto runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
// Detector construction
|
||||
F03DetectorConstruction* detector = new F03DetectorConstruction();
|
||||
auto detector = new F03DetectorConstruction();
|
||||
runManager->SetUserInitialization(detector);
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-01-ref-06 (30-June-2023)
|
||||
Geant4 version Name: geant4-11-02-ref-00 (8-December-2023)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -22,7 +22,7 @@
|
||||
***** Table : Nb of materials = 11 *****
|
||||
|
||||
Material: Mylar density: 1.390 g/cm3 RadL: 28.743 cm Nucl.Int.Length: 56.319 cm
|
||||
Imean: 74.266 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 75.967 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Oxygen (O) Z = 8.0 N = 16 A = 16.000 g/mole
|
||||
---> Isotope: O16 Z = 8 N = 16 A = 15.99 g/mole abundance: 99.757 %
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
Material: Polypropelene density: 910.000 mg/cm3 RadL: 49.214 cm Nucl.Int.Length: 74.282 cm
|
||||
Imean: 54.941 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 56.518 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Hydrogen (H) Z = 1.0 N = 1 A = 1.010 g/mole
|
||||
---> Isotope: H1 Z = 1 N = 1 A = 1.01 g/mole abundance: 99.989 %
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
|
||||
Material: CO2 density: 1.842 mg/cm3 RadL: 196.501 m Nucl.Int.Length: 466.037 m
|
||||
Imean: 90.026 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 90.958 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Carbon (C) Z = 6.0 N = 12 A = 12.010 g/mole
|
||||
---> Isotope: C12 Z = 6 N = 12 A = 12.00 g/mole abundance: 98.930 %
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
|
||||
Material: Xe20CO2 density: 5.082 mg/cm3 RadL: 17.750 m Nucl.Int.Length: 323.034 m
|
||||
Imean: 412.201 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 412.597 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Xe (Xe) Z = 54.0 N = 131 A = 131.292 g/mole
|
||||
---> Isotope: Xe124 Z = 54 N = 124 A = 123.91 g/mole abundance: 0.090 %
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
|
||||
Material: Kr20CO2 density: 3.601 mg/cm3 RadL: 34.157 m Nucl.Int.Length: 391.554 m
|
||||
Imean: 296.542 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
Imean: 296.926 eV temperature: 293.15 K pressure: 1.00 atm
|
||||
|
||||
---> Element: Kr (Kr) Z = 36.0 N = 84 A = 83.799 g/mole
|
||||
---> Isotope: Kr78 Z = 36 N = 78 A = 77.92 g/mole abundance: 0.350 %
|
||||
@@ -258,6 +258,10 @@ Registered graphics systems are:
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -732,384 +736,243 @@ CoulombScat: for pi- XStype:1 SubType=1 BuildTable=1
|
||||
|
||||
====================================================================
|
||||
HADRONIC PROCESSES SUMMARY (verbose level 1)
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for neutron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticCHIPS: 0 eV ---> 100 TeV
|
||||
Cr_sctns: G4NeutronElasticXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: neutronInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: G4NeutronInelasticXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: nCapture
|
||||
Model: nRadCapture: 0 eV ---> 100 TeV
|
||||
Cr_sctns: G4NeutronCaptureXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: nKiller
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for B-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: B-Inelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for D-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: D-Inelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for GenericIon
|
||||
|
||||
Process: ionInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for He3
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: He3Inelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for alpha
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: alphaInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_He3
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_He3Inelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_alpha
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_alphaInelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_deuteron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_deuteronInelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-------------------------------------------------------------------------
|
||||
Hadronic Processes for anti_hypertriton
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_lambda
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: anti_lambdaInelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_neutron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_neutronInelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_proton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100.1 MeV
|
||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_protonInelastic
|
||||
Model: FTFP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for anti_triton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: anti_tritonInelastic
|
||||
Model: FTFP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for deuteron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: dInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for e+
|
||||
|
||||
Process: positronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for e-
|
||||
|
||||
Process: electronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for gamma
|
||||
|
||||
Process: photonNuclear
|
||||
Model: GammaNPreco: 0 eV ---> 200 MeV
|
||||
Model: BertiniCascade: 199 MeV ---> 6 GeV
|
||||
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
|
||||
Cr_sctns: GammaNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for kaon+
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: kaon+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for kaon-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: kaon-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for lambda
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: lambdaInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for mu+
|
||||
|
||||
Process: muonNuclear
|
||||
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for mu-
|
||||
|
||||
Process: muonNuclear
|
||||
Model: G4MuonVDNuclearModel: 0 eV ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: muMinusCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for pi+
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticGlauber: 0 eV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: pi+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for pi-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticGlauber: 0 eV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: pi-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for proton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticCHIPS: 0 eV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: protonInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for sigma-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: sigma-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 eV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 eV ---> 100 TeV
|
||||
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
---------------------------------------------------
|
||||
-----------------------------------------------------------------------
|
||||
Hadronic Processes for triton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 eV /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
Process: tInelastic
|
||||
Model: Binary Light Ion Cascade: 0 eV /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 eV ---> 25.6 PeV
|
||||
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
====== Geant4 Native Pre-compound Model Parameters ========
|
||||
=======================================================================
|
||||
@@ -1192,7 +1055,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.001047s Sys=0.000000s
|
||||
User=0.000000s Real=0.000946s Sys=0.000000s
|
||||
|
||||
========= Table of registered couples ============================
|
||||
|
||||
@@ -1211,7 +1074,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 100
|
||||
User=0.010000s Real=0.010588s Sys=0.000000s
|
||||
User=0.010000s Real=0.013373s Sys=0.000000s
|
||||
Set global field value to (0,0,1000) Gauss
|
||||
|
||||
========= Table of registered couples ============================
|
||||
@@ -1230,7 +1093,7 @@ Index : 0 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=0.000000s Real=0.002141s Sys=0.000000s
|
||||
User=0.000000s Real=0.002696s Sys=0.000000s
|
||||
Set global field value to (33000,0,0) Gauss
|
||||
F03FieldSetup::UpdateField> The minimal step is equal to 10 mm
|
||||
Stepper Type chosen = 4
|
||||
@@ -1275,7 +1138,7 @@ Step# X Y Z KineE dEStep StepLeng TrakLeng
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.000000s Real=0.000269s Sys=0.000000s
|
||||
User=0.000000s Real=0.000355s Sys=0.000000s
|
||||
/tracking/verbose 0
|
||||
#
|
||||
/calor/setAbsMat Xe20CO2
|
||||
@@ -1348,7 +1211,7 @@ Index : 2 used in the geometry : Yes
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1
|
||||
User=0.270000s Real=0.268407s Sys=0.000000s
|
||||
User=0.170000s Real=0.176658s Sys=0.010000s
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
================== Deleting memory pools ===================
|
||||
|
||||
@@ -48,15 +48,15 @@ class F03ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
F03ActionInitialization(F03DetectorConstruction*);
|
||||
virtual ~F03ActionInitialization();
|
||||
~F03ActionInitialization() override = default;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
|
||||
virtual G4VSteppingVerbose* InitializeSteppingVerbose() const;
|
||||
G4VSteppingVerbose* InitializeSteppingVerbose() const override;
|
||||
|
||||
private:
|
||||
F03DetectorConstruction* fDetConstruction;
|
||||
F03DetectorConstruction* fDetConstruction = nullptr;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -45,9 +45,9 @@ class F03CalorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
F03CalorHit();
|
||||
F03CalorHit() = default;
|
||||
F03CalorHit(const F03CalorHit&);
|
||||
virtual ~F03CalorHit();
|
||||
~F03CalorHit() override = default;
|
||||
|
||||
const F03CalorHit& operator=(const F03CalorHit&);
|
||||
G4bool operator==(const F03CalorHit&) const;
|
||||
@@ -55,7 +55,7 @@ class F03CalorHit : public G4VHit
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
|
||||
virtual void Print();
|
||||
void Print() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -71,14 +71,15 @@ class F03CalorHit : public G4VHit
|
||||
|
||||
private:
|
||||
|
||||
G4double fEdepAbs, fTrackLengthAbs;
|
||||
G4double fEdepGap, fTrackLengthGap;
|
||||
|
||||
G4double fEdepAbs = 0.;
|
||||
G4double fTrackLengthAbs = 0.;
|
||||
G4double fEdepGap = 0.;
|
||||
G4double fTrackLengthGap = 0.;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
typedef G4THitsCollection<F03CalorHit> F03CalorHitsCollection;
|
||||
using F03CalorHitsCollection = G4THitsCollection<F03CalorHit>;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<F03CalorHit>* F03CalorHitAllocator;
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ class F03CalorimeterSD : public G4VSensitiveDetector
|
||||
public:
|
||||
|
||||
F03CalorimeterSD(G4String, F03DetectorConstruction* );
|
||||
virtual ~F03CalorimeterSD();
|
||||
~F03CalorimeterSD() override;
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*) override;
|
||||
void EndOfEvent(G4HCofThisEvent*) override;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4Cache.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4Tubs;
|
||||
class G4LogicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
@@ -56,7 +58,7 @@ class F03DetectorConstruction : public G4VUserDetectorConstruction
|
||||
public:
|
||||
|
||||
F03DetectorConstruction();
|
||||
virtual ~F03DetectorConstruction();
|
||||
~F03DetectorConstruction() override;
|
||||
|
||||
public:
|
||||
|
||||
@@ -70,13 +72,13 @@ class F03DetectorConstruction : public G4VUserDetectorConstruction
|
||||
void SetWorldSizeZ(G4double);
|
||||
void SetWorldSizeR(G4double);
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
public:
|
||||
|
||||
void PrintCalorParameters();
|
||||
|
||||
|
||||
G4Material* GetWorldMaterial() {return fWorldMaterial;}
|
||||
G4double GetWorldSizeZ() {return fWorldSizeZ;}
|
||||
G4double GetWorldSizeR() {return fWorldSizeR;}
|
||||
@@ -88,50 +90,51 @@ class F03DetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4Material* GetAbsorberMaterial() {return fAbsorberMaterial;}
|
||||
G4double GetAbsorberThickness(){return fAbsorberThickness;}
|
||||
G4double GetAbsorberRadius() {return fAbsorberRadius;}
|
||||
|
||||
|
||||
const G4VPhysicalVolume* GetPhysiWorld() {return fPhysiWorld;}
|
||||
const G4VPhysicalVolume* GetAbsorber() {return fPhysiAbsorber;}
|
||||
G4LogicalVolume* GetLogicalAbsorber() {return fLogicAbsorber;}
|
||||
|
||||
private:
|
||||
F03DetectorMessenger* fDetectorMessenger; // pointer to the Messenger
|
||||
G4Cache<F03CalorimeterSD*> fCalorimeterSD; // pointer to the sensitive det.
|
||||
G4Cache<F03FieldSetup*> fEmFieldSetup;
|
||||
F03DetectorMessenger* fDetectorMessenger = nullptr; // pointer to the Messenger
|
||||
G4Cache<F03CalorimeterSD*> fCalorimeterSD = nullptr; // pointer to the sensitive det.
|
||||
G4Cache<F03FieldSetup*> fEmFieldSetup = nullptr;
|
||||
|
||||
G4Tubs* fSolidWorld; // pointer to the solid World
|
||||
G4LogicalVolume* fLogicWorld; // pointer to the logical World
|
||||
G4VPhysicalVolume* fPhysiWorld; // pointer to the physical World
|
||||
G4Tubs* fSolidWorld = nullptr; // pointer to the solid World
|
||||
G4LogicalVolume* fLogicWorld = nullptr; // pointer to the logical World
|
||||
G4VPhysicalVolume* fPhysiWorld = nullptr; // pointer to the physical World
|
||||
|
||||
G4Tubs* fSolidAbsorber; // pointer to the solid Absorber
|
||||
G4LogicalVolume* fLogicAbsorber; // pointer to the logical Absorber
|
||||
G4VPhysicalVolume* fPhysiAbsorber; // pointer to the physical Absorber
|
||||
G4Tubs* fSolidAbsorber = nullptr; // pointer to the solid Absorber
|
||||
G4LogicalVolume* fLogicAbsorber = nullptr; // pointer to the logical Absorber
|
||||
G4VPhysicalVolume* fPhysiAbsorber = nullptr; // pointer to the physical Absorber
|
||||
|
||||
G4Tubs* fSolidRadSlice; // pointer to the solid z-slice
|
||||
G4LogicalVolume* fLogicRadSlice; // pointer to the logical z-slide
|
||||
G4VPhysicalVolume* fPhysiRadSlice; // pointer to the physical z-slide
|
||||
G4Tubs* fSolidRadSlice = nullptr; // pointer to the solid z-slice
|
||||
G4LogicalVolume* fLogicRadSlice = nullptr; // pointer to the logical z-slide
|
||||
G4VPhysicalVolume* fPhysiRadSlice = nullptr; // pointer to the physical z-slide
|
||||
|
||||
G4Tubs* fSolidRadiator;
|
||||
G4LogicalVolume* fLogicRadiator;
|
||||
G4VPhysicalVolume* fPhysiRadiator;
|
||||
G4Tubs* fSolidRadiator = nullptr;
|
||||
G4LogicalVolume* fLogicRadiator = nullptr;
|
||||
G4VPhysicalVolume* fPhysiRadiator = nullptr;
|
||||
|
||||
G4Material* fWorldMaterial;
|
||||
G4Material* fAbsorberMaterial;
|
||||
G4Material* fRadiatorMat; // pointer to the TR radiator material
|
||||
G4Material* fWorldMaterial = nullptr;
|
||||
G4Material* fAbsorberMaterial = nullptr;
|
||||
G4Material* fRadiatorMat = nullptr; // pointer to the TR radiator material
|
||||
|
||||
G4double fWorldSizeR;
|
||||
G4double fWorldSizeZ;
|
||||
G4double fWorldSizeR = 22000. * CLHEP::mm;
|
||||
G4double fWorldSizeZ = 44000. * CLHEP::mm;
|
||||
|
||||
G4double fAbsorberThickness;
|
||||
G4double fAbsorberRadius;
|
||||
G4double fAbsorberThickness = 1. * CLHEP::mm;
|
||||
G4double fAbsorberRadius = 20000. * CLHEP::mm;
|
||||
|
||||
G4double fZAbsorber;
|
||||
G4double fZStartAbs, fZEndAbs;
|
||||
G4double fZAbsorber = 21990. * CLHEP::mm;
|
||||
G4double fZStartAbs = 0.;
|
||||
G4double fZEndAbs = 0.;
|
||||
|
||||
G4double fRadThickness;
|
||||
G4double fGasGap;
|
||||
G4double fDetGap;
|
||||
G4double fRadThickness = 100. * CLHEP::mm;
|
||||
G4double fGasGap = 100. * CLHEP::mm;
|
||||
G4double fDetGap = 1. * CLHEP::mm;
|
||||
|
||||
G4int fFoilNumber;
|
||||
G4int fFoilNumber = 2;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -52,25 +52,25 @@ class F03DetectorMessenger: public G4UImessenger
|
||||
public:
|
||||
|
||||
F03DetectorMessenger(F03DetectorConstruction* );
|
||||
virtual ~F03DetectorMessenger();
|
||||
~F03DetectorMessenger() override;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
F03DetectorConstruction* fDetector;
|
||||
F03DetectorConstruction* fDetector = nullptr;
|
||||
|
||||
G4UIdirectory* fDetDir;
|
||||
G4UIdirectory* fDetDir = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fAbsMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsRadCmd;
|
||||
G4UIcmdWithAString* fAbsMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsThickCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsRadCmd = nullptr;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fAbsZposCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fAbsZposCmd = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fWorldMaterCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldZCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldRCmd;
|
||||
G4UIcmdWithAString* fWorldMaterCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldZCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fWorldRCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,22 +50,22 @@ class F03FieldMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F03FieldMessenger(F03FieldSetup* );
|
||||
virtual ~F03FieldMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
~F03FieldMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
F03FieldSetup* fEMfieldSetup;
|
||||
F03FieldSetup* fEMfieldSetup = nullptr;
|
||||
|
||||
G4UIdirectory* fFieldDir;
|
||||
G4UIdirectory* fFieldDir = nullptr;
|
||||
|
||||
G4UIcmdWithAnInteger* fStepperCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMagFieldZCmd;
|
||||
G4UIcmdWith3VectorAndUnit* fMagFieldCmd;
|
||||
G4UIcmdWith3VectorAndUnit* fLocalMagFieldCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fMinStepCmd;
|
||||
G4UIcmdWithoutParameter* fUpdateCmd;
|
||||
G4UIcmdWithAnInteger* fStepperCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMagFieldZCmd = nullptr;
|
||||
G4UIcmdWith3VectorAndUnit* fMagFieldCmd = nullptr;
|
||||
G4UIcmdWith3VectorAndUnit* fLocalMagFieldCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fMinStepCmd = nullptr;
|
||||
G4UIcmdWithoutParameter* fUpdateCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "G4MagneticField.hh"
|
||||
#include "G4UniformMagField.hh"
|
||||
|
||||
#include "CLHEP/Units/SystemOfUnits.h"
|
||||
|
||||
class G4FieldManager;
|
||||
class G4ChordFinder;
|
||||
class G4Mag_UsualEqRhs;
|
||||
@@ -80,22 +82,22 @@ protected:
|
||||
G4FieldManager* GetGlobalFieldManager() ;
|
||||
G4ThreeVector GetConstantFieldValue(G4MagneticField* magneticField) const;
|
||||
|
||||
G4FieldManager* fFieldManager;
|
||||
G4FieldManager* fLocalFieldManager;
|
||||
G4ChordFinder* fChordFinder;
|
||||
G4ChordFinder* fLocalChordFinder;
|
||||
G4Mag_UsualEqRhs* fEquation;
|
||||
G4Mag_UsualEqRhs* fLocalEquation;
|
||||
G4MagneticField* fMagneticField;
|
||||
G4MagneticField* fLocalMagneticField;
|
||||
G4FieldManager* fFieldManager = nullptr;
|
||||
G4FieldManager* fLocalFieldManager = nullptr;
|
||||
G4ChordFinder* fChordFinder = nullptr;
|
||||
G4ChordFinder* fLocalChordFinder = nullptr;
|
||||
G4Mag_UsualEqRhs* fEquation = nullptr;
|
||||
G4Mag_UsualEqRhs* fLocalEquation = nullptr;
|
||||
G4MagneticField* fMagneticField = nullptr;
|
||||
G4MagneticField* fLocalMagneticField = nullptr;
|
||||
|
||||
G4MagIntegratorStepper* fStepper;
|
||||
G4MagIntegratorStepper* fLocalStepper;
|
||||
G4int fStepperType;
|
||||
G4MagIntegratorStepper* fStepper = nullptr;
|
||||
G4MagIntegratorStepper* fLocalStepper = nullptr;
|
||||
G4int fStepperType = 4; // ClassicalRK4 is default stepper;
|
||||
|
||||
G4double fMinStep;
|
||||
|
||||
F03FieldMessenger* fFieldMessenger;
|
||||
G4double fMinStep = 0.25 * CLHEP::mm ; // minimal step of 1 mm is default;
|
||||
|
||||
F03FieldMessenger* fFieldMessenger = nullptr;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ class F03PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
F03PrimaryGeneratorAction(F03DetectorConstruction*);
|
||||
virtual ~F03PrimaryGeneratorAction();
|
||||
~F03PrimaryGeneratorAction() override;
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
void SetRndmFlag(G4String val) { fRndmFlag = val; }
|
||||
void SetXVertex(G4double x);
|
||||
void SetYVertex(G4double y);
|
||||
@@ -62,16 +62,17 @@ class F03PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
static G4String GetPrimaryName();
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun; //pointer a to G4 service class
|
||||
F03DetectorConstruction* fDetector; //pointer to the geometry
|
||||
G4ParticleGun* fParticleGun = nullptr; //pointer a to G4 service class
|
||||
F03DetectorConstruction* fDetector = nullptr; //pointer to the geometry
|
||||
|
||||
F03PrimaryGeneratorMessenger* fGunMessenger; //messenger of this class
|
||||
G4String fRndmFlag; //flag for random impact point
|
||||
F03PrimaryGeneratorMessenger* fGunMessenger = nullptr; //messenger of this class
|
||||
G4String fRndmFlag = "off"; //flag for random impact point
|
||||
|
||||
static G4ParticleDefinition* fgPrimaryParticle;
|
||||
G4double fXVertex, fYVertex, fZVertex;
|
||||
G4bool fVertexDefined;
|
||||
|
||||
G4double fXVertex = 0.;
|
||||
G4double fYVertex = 0.;
|
||||
G4double fZVertex = 0.;
|
||||
G4bool fVertexDefined = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,16 +47,16 @@ class F03PrimaryGeneratorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
F03PrimaryGeneratorMessenger(F03PrimaryGeneratorAction*);
|
||||
virtual ~F03PrimaryGeneratorMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String);
|
||||
~F03PrimaryGeneratorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
F03PrimaryGeneratorAction* fAction;
|
||||
G4UIcmdWithAString* fRndmCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetXVertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetYVertexCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fSetZVertexCmd;
|
||||
F03PrimaryGeneratorAction* fAction = nullptr;
|
||||
G4UIcmdWithAString* fRndmCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetXVertexCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetYVertexCmd = nullptr;
|
||||
G4UIcmdWithADoubleAndUnit* fSetZVertexCmd = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,15 +55,15 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class F03SteppingVerbose : public G4SteppingVerbose
|
||||
class F03SteppingVerbose : public G4SteppingVerbose
|
||||
{
|
||||
public:
|
||||
|
||||
F03SteppingVerbose();
|
||||
virtual ~F03SteppingVerbose();
|
||||
F03SteppingVerbose() = default;
|
||||
~F03SteppingVerbose() override = default;
|
||||
|
||||
virtual void StepInfo();
|
||||
virtual void TrackingStarted();
|
||||
void StepInfo() override;
|
||||
void TrackingStarted() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,13 +37,7 @@
|
||||
|
||||
F03ActionInitialization::F03ActionInitialization
|
||||
(F03DetectorConstruction* detConstruction)
|
||||
: G4VUserActionInitialization(),
|
||||
fDetConstruction(detConstruction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F03ActionInitialization::~F03ActionInitialization()
|
||||
: fDetConstruction(detConstruction)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -34,22 +34,7 @@
|
||||
|
||||
#include "F03CalorHit.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<F03CalorHit>* F03CalorHitAllocator=0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F03CalorHit::F03CalorHit()
|
||||
: G4VHit(),
|
||||
fEdepAbs(0.),
|
||||
fTrackLengthAbs(0.),
|
||||
fEdepGap(0.),
|
||||
fTrackLengthGap(0.)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F03CalorHit::~F03CalorHit()
|
||||
{;}
|
||||
G4ThreadLocal G4Allocator<F03CalorHit>* F03CalorHitAllocator=nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -80,6 +65,6 @@ G4bool F03CalorHit::operator==(const F03CalorHit& right) const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F03CalorHit::Print()
|
||||
{;}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
F03CalorimeterSD::F03CalorimeterSD(G4String name,
|
||||
F03DetectorConstruction* det)
|
||||
: G4VSensitiveDetector(name),
|
||||
fCalCollection(0),
|
||||
fCalCollection(nullptr),
|
||||
fDetector(det),
|
||||
fHitID(new G4int[500])
|
||||
{
|
||||
@@ -82,7 +82,7 @@ G4bool F03CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
|
||||
if ((edep == 0.) && (stepl == 0.) ) return false;
|
||||
|
||||
G4TouchableHistory* theTouchable
|
||||
auto theTouchable
|
||||
= (G4TouchableHistory*)(step->GetPreStepPoint()->GetTouchable());
|
||||
|
||||
G4VPhysicalVolume* physVol = theTouchable->GetVolume();
|
||||
@@ -90,7 +90,7 @@ G4bool F03CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
G4int number = 0;
|
||||
if (fHitID[number]==-1)
|
||||
{
|
||||
F03CalorHit* calHit = new F03CalorHit();
|
||||
auto calHit = new F03CalorHit();
|
||||
if (physVol == fDetector->GetAbsorber()) calHit->AddAbs(edep,stepl);
|
||||
fHitID[number] = fCalCollection->insert(calHit) - 1;
|
||||
if (verboseLevel>0)
|
||||
@@ -101,7 +101,7 @@ G4bool F03CalorimeterSD::ProcessHits(G4Step* step, G4TouchableHistory*)
|
||||
if (physVol == fDetector->GetAbsorber())
|
||||
(*fCalCollection)[fHitID[number]]->AddAbs(edep,stepl);
|
||||
if (verboseLevel>0)
|
||||
G4cout << " Energy added to F03: " << number << G4endl;
|
||||
G4cout << " Energy added to F03: " << number << G4endl;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,32 +57,12 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F03DetectorConstruction::F03DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fDetectorMessenger(0),
|
||||
fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
|
||||
fSolidAbsorber(0), fLogicAbsorber(0), fPhysiAbsorber(0),
|
||||
fSolidRadSlice(0), fLogicRadSlice(0), fPhysiRadSlice(0),
|
||||
fSolidRadiator(0), fLogicRadiator(0), fPhysiRadiator(0),
|
||||
fWorldMaterial(0), fAbsorberMaterial(0), fRadiatorMat(0),
|
||||
// default parameter values of the calorimeter
|
||||
fWorldSizeR( 22000.*mm),
|
||||
fWorldSizeZ( 44000.*mm),
|
||||
fAbsorberThickness( 1.*mm),
|
||||
fAbsorberRadius( 20000.*mm),
|
||||
fZAbsorber( 21990.*mm),
|
||||
fZStartAbs( 0.),
|
||||
fZEndAbs( 0.),
|
||||
fRadThickness( 100.*mm),
|
||||
fGasGap( 100.*mm),
|
||||
fDetGap( 1.*mm),
|
||||
fFoilNumber(2)
|
||||
{
|
||||
fDetectorMessenger = new F03DetectorMessenger(this);
|
||||
|
||||
// create materials
|
||||
|
||||
DefineMaterials();
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -104,7 +84,7 @@ G4VPhysicalVolume* F03DetectorConstruction::Construct()
|
||||
void F03DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
//This function illustrates the possible ways to define materials
|
||||
|
||||
|
||||
G4String name, symbol; // a=mass of a mole;
|
||||
G4double a, z, density; // z=mean number of protons;
|
||||
G4int nel;
|
||||
@@ -116,19 +96,19 @@ void F03DetectorConstruction::DefineMaterials()
|
||||
//
|
||||
|
||||
a = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
auto elH = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
|
||||
|
||||
a = 12.01*g/mole;
|
||||
G4Element* elC = new G4Element(name="Carbon", symbol="C", z=6., a);
|
||||
auto elC = new G4Element(name="Carbon", symbol="C", z=6., a);
|
||||
|
||||
a = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
auto elN = new G4Element(name="Nitrogen",symbol="N" , z= 7., a);
|
||||
|
||||
a = 16.00*g/mole;
|
||||
G4Element* elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
auto elO = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
|
||||
|
||||
a = 39.948*g/mole;
|
||||
G4Element* elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
|
||||
auto elAr = new G4Element(name="Argon", symbol="Ar", z=18., a);
|
||||
|
||||
//
|
||||
// define simple materials
|
||||
@@ -137,14 +117,14 @@ void F03DetectorConstruction::DefineMaterials()
|
||||
// Mylar
|
||||
|
||||
density = 1.39*g/cm3;
|
||||
G4Material* mylar = new G4Material(name="Mylar", density, nel=3);
|
||||
auto mylar = new G4Material(name="Mylar", density, nel=3);
|
||||
mylar->AddElement(elO,2);
|
||||
mylar->AddElement(elC,5);
|
||||
mylar->AddElement(elH,4);
|
||||
|
||||
// Polypropelene
|
||||
|
||||
G4Material* CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
|
||||
auto CH2 = new G4Material ("Polypropelene" , 0.91*g/cm3, 2);
|
||||
CH2->AddElement(elH,2);
|
||||
CH2->AddElement(elC,1);
|
||||
|
||||
@@ -152,20 +132,20 @@ void F03DetectorConstruction::DefineMaterials()
|
||||
|
||||
density = 3.700*mg/cm3;
|
||||
a = 83.80*g/mole;
|
||||
G4Material* Kr = new G4Material(name="Kr",z=36., a, density );
|
||||
auto Kr = new G4Material(name="Kr",z=36., a, density );
|
||||
|
||||
// Dry air (average composition)
|
||||
|
||||
density = 1.7836*mg/cm3; // STP
|
||||
G4Material* argon = new G4Material(name="Argon" , density, ncomponents=1);
|
||||
auto argon = new G4Material(name="Argon" , density, ncomponents=1);
|
||||
argon->AddElement(elAr, 1);
|
||||
|
||||
density = 1.25053*mg/cm3; // STP
|
||||
G4Material* nitrogen = new G4Material(name="N2" , density, ncomponents=1);
|
||||
auto nitrogen = new G4Material(name="N2" , density, ncomponents=1);
|
||||
nitrogen->AddElement(elN, 2);
|
||||
|
||||
density = 1.4289*mg/cm3; // STP
|
||||
G4Material* oxygen = new G4Material(name="O2" , density, ncomponents=1);
|
||||
auto oxygen = new G4Material(name="O2" , density, ncomponents=1);
|
||||
oxygen->AddElement(elO, 2);
|
||||
|
||||
density = 1.2928*mg/cm3; // STP
|
||||
@@ -173,7 +153,7 @@ void F03DetectorConstruction::DefineMaterials()
|
||||
temperature = STP_Temperature;
|
||||
pressure = 1.0e-8*STP_Pressure;
|
||||
|
||||
G4Material* air = new G4Material(name="Air" , density, ncomponents=3,
|
||||
auto air = new G4Material(name="Air" , density, ncomponents=3,
|
||||
kStateGas,temperature,pressure);
|
||||
air->AddMaterial( nitrogen, fractionmass = 0.7557 );
|
||||
air->AddMaterial( oxygen, fractionmass = 0.2315 );
|
||||
@@ -183,26 +163,26 @@ void F03DetectorConstruction::DefineMaterials()
|
||||
|
||||
density = 5.858*mg/cm3;
|
||||
a = 131.29*g/mole;
|
||||
G4Material* Xe = new G4Material(name="Xenon",z=54., a, density );
|
||||
auto Xe = new G4Material(name="Xenon",z=54., a, density );
|
||||
|
||||
// Carbon dioxide, STP
|
||||
|
||||
density = 1.842*mg/cm3;
|
||||
G4Material* CarbonDioxide = new G4Material(name="CO2", density, nel=2);
|
||||
auto CarbonDioxide = new G4Material(name="CO2", density, nel=2);
|
||||
CarbonDioxide->AddElement(elC,1);
|
||||
CarbonDioxide->AddElement(elO,2);
|
||||
|
||||
// 80% Xe + 20% CO2, STP
|
||||
|
||||
density = 5.0818*mg/cm3;
|
||||
G4Material* Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
|
||||
auto Xe20CO2 = new G4Material(name="Xe20CO2", density, ncomponents=2);
|
||||
Xe20CO2->AddMaterial( Xe, fractionmass = 0.922 );
|
||||
Xe20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.078 );
|
||||
|
||||
// 80% Kr + 20% CO2, STP
|
||||
|
||||
density = 3.601*mg/cm3;
|
||||
G4Material* Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
|
||||
auto Kr20CO2 = new G4Material(name="Kr20CO2", density, ncomponents=2);
|
||||
Kr20CO2->AddMaterial( Kr, fractionmass = 0.89 );
|
||||
Kr20CO2->AddMaterial( CarbonDioxide, fractionmass = 0.11 );
|
||||
|
||||
@@ -211,14 +191,14 @@ void F03DetectorConstruction::DefineMaterials()
|
||||
//default materials of the calorimeter and TR radiator
|
||||
|
||||
fRadiatorMat = air; // CH2 ; // mylar;
|
||||
|
||||
|
||||
fAbsorberMaterial = air; // Kr20CO2; // XeCO2CF4;
|
||||
|
||||
fWorldMaterial = air;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
G4VPhysicalVolume* F03DetectorConstruction::ConstructCalorimeter()
|
||||
{
|
||||
// Cleanup old geometry
|
||||
@@ -245,11 +225,11 @@ G4VPhysicalVolume* F03DetectorConstruction::ConstructCalorimeter()
|
||||
fWorldMaterial, // its material
|
||||
"World"); // its name
|
||||
|
||||
fPhysiWorld = new G4PVPlacement(0, // no rotation
|
||||
fPhysiWorld = new G4PVPlacement(nullptr, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
"World", // its name
|
||||
fLogicWorld, // its logical volume
|
||||
0, // its mother volume
|
||||
nullptr, // its mother volume
|
||||
false, // no boolean op.
|
||||
0, // copy number
|
||||
checkOverlaps); // checkOverlaps
|
||||
@@ -263,15 +243,15 @@ G4VPhysicalVolume* F03DetectorConstruction::ConstructCalorimeter()
|
||||
G4cout << "fFoilNumber = " << fFoilNumber << G4endl;
|
||||
G4cout << "fRadiatorMat = " << fRadiatorMat->GetName() << G4endl;
|
||||
G4cout << "WorldMaterial = " << fWorldMaterial->GetName() << G4endl;
|
||||
|
||||
|
||||
fSolidRadiator = new G4Tubs("Radiator", 0.0, fAbsorberRadius, 0.5*radThick,
|
||||
0.0, twopi);
|
||||
|
||||
fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fWorldMaterial,
|
||||
fLogicRadiator = new G4LogicalVolume(fSolidRadiator, fWorldMaterial,
|
||||
"Radiator");
|
||||
|
||||
fPhysiRadiator = new G4PVPlacement(0, G4ThreeVector(0,0,zRad),
|
||||
"Radiator", fLogicRadiator, fPhysiWorld, false, 0,
|
||||
fPhysiRadiator = new G4PVPlacement(nullptr, G4ThreeVector(0,0,zRad),
|
||||
"Radiator", fLogicRadiator, fPhysiWorld, false, 0,
|
||||
checkOverlaps);
|
||||
|
||||
|
||||
@@ -290,7 +270,7 @@ G4VPhysicalVolume* F03DetectorConstruction::ConstructCalorimeter()
|
||||
G4double zSlice = zStart + j*radSliceThick;
|
||||
G4cout << zSlice/mm << " mm" << "\t";
|
||||
|
||||
fPhysiRadSlice = new G4PVPlacement(0,G4ThreeVector(0.,0., zSlice),
|
||||
fPhysiRadSlice = new G4PVPlacement(nullptr,G4ThreeVector(0.,0., zSlice),
|
||||
"RadSlice",fLogicRadSlice,
|
||||
fPhysiRadiator,false,j, checkOverlaps);
|
||||
}
|
||||
@@ -306,8 +286,8 @@ G4VPhysicalVolume* F03DetectorConstruction::ConstructCalorimeter()
|
||||
fLogicAbsorber = new G4LogicalVolume(fSolidAbsorber,
|
||||
fAbsorberMaterial,
|
||||
"Absorber");
|
||||
|
||||
fPhysiAbsorber = new G4PVPlacement(0,
|
||||
|
||||
fPhysiAbsorber = new G4PVPlacement(nullptr,
|
||||
G4ThreeVector(0.,0.,fZAbsorber),
|
||||
"Absorber",
|
||||
fLogicAbsorber,
|
||||
@@ -426,24 +406,24 @@ void F03DetectorConstruction::SetAbsorberZpos(G4double val)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void F03DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
{
|
||||
// Sensitive Detectors: Absorber
|
||||
|
||||
if (!fCalorimeterSD.Get()) {
|
||||
F03CalorimeterSD* calorimeterSD = new F03CalorimeterSD("CalorSD",this);
|
||||
auto calorimeterSD = new F03CalorimeterSD("CalorSD",this);
|
||||
fCalorimeterSD.Put(calorimeterSD);
|
||||
}
|
||||
}
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(fCalorimeterSD.Get());
|
||||
SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
|
||||
|
||||
// Construct the field creator - this will register the field it creates
|
||||
|
||||
if (!fEmFieldSetup.Get()) {
|
||||
F03FieldSetup* emFieldSetup = new F03FieldSetup();
|
||||
if (!fEmFieldSetup.Get()) {
|
||||
auto emFieldSetup = new F03FieldSetup();
|
||||
|
||||
fEmFieldSetup.Put(emFieldSetup);
|
||||
G4AutoDelete::Register(emFieldSetup); //Kernel will delete the messenger
|
||||
}
|
||||
}
|
||||
// Set local field manager and local field in radiator and its daughters:
|
||||
G4bool allLocal = true;
|
||||
fLogicRadiator->SetFieldManager(fEmFieldSetup.Get()->GetLocalFieldManager(),
|
||||
|
||||
@@ -42,20 +42,11 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F03DetectorMessenger::F03DetectorMessenger(F03DetectorConstruction* det)
|
||||
: G4UImessenger(),
|
||||
fDetector(det),
|
||||
fDetDir(0),
|
||||
fAbsMaterCmd(0),
|
||||
fAbsThickCmd(0),
|
||||
fAbsRadCmd(0),
|
||||
fAbsZposCmd(0),
|
||||
fWorldMaterCmd(0),
|
||||
fWorldZCmd(0),
|
||||
fWorldRCmd(0)
|
||||
: fDetector(det)
|
||||
{
|
||||
fDetDir = new G4UIdirectory("/calor/");
|
||||
fDetDir->SetGuidance("F03 detector control.");
|
||||
|
||||
|
||||
fAbsMaterCmd = new G4UIcmdWithAString("/calor/setAbsMat",this);
|
||||
fAbsMaterCmd->SetGuidance("Select Material of the Absorber.");
|
||||
fAbsMaterCmd->SetParameterName("choice",true);
|
||||
@@ -133,19 +124,19 @@ void F03DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
|
||||
if( command == fWorldMaterCmd )
|
||||
{ fDetector->SetWorldMaterial(newValue);}
|
||||
|
||||
|
||||
if( command == fAbsThickCmd )
|
||||
{fDetector->SetAbsorberThickness(fAbsThickCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
if( command == fAbsRadCmd )
|
||||
{ fDetector->SetAbsorberRadius(fAbsRadCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fAbsZposCmd )
|
||||
{ fDetector->SetAbsorberZpos(fAbsZposCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fWorldZCmd )
|
||||
{ fDetector->SetWorldSizeZ(fWorldZCmd->GetNewDoubleValue(newValue));}
|
||||
|
||||
|
||||
if( command == fWorldRCmd )
|
||||
{ fDetector->SetWorldSizeR(fWorldRCmd->GetNewDoubleValue(newValue));}
|
||||
}
|
||||
|
||||
@@ -45,15 +45,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
F03FieldMessenger::F03FieldMessenger(F03FieldSetup* fieldSetup)
|
||||
: G4UImessenger(),
|
||||
fEMfieldSetup(fieldSetup),
|
||||
fFieldDir(0),
|
||||
fStepperCmd(0),
|
||||
fMagFieldZCmd(0),
|
||||
fMagFieldCmd(0),
|
||||
fLocalMagFieldCmd(0),
|
||||
fMinStepCmd(0),
|
||||
fUpdateCmd(0)
|
||||
: fEMfieldSetup(fieldSetup)
|
||||
{
|
||||
fFieldDir = new G4UIdirectory("/field/");
|
||||
fFieldDir->SetGuidance("F03 field tracking control.");
|
||||
@@ -69,26 +61,26 @@ F03FieldMessenger::F03FieldMessenger(F03FieldSetup* fieldSetup)
|
||||
fUpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
|
||||
fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
|
||||
fUpdateCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fMagFieldZCmd = new G4UIcmdWithADoubleAndUnit("/field/setFieldZ",this);
|
||||
fMagFieldZCmd->SetGuidance("Define global magnetic field.");
|
||||
fMagFieldZCmd->SetGuidance("Global magnetic field will be in Z direction.");
|
||||
fMagFieldZCmd->SetParameterName("Bz",false,false);
|
||||
fMagFieldZCmd->SetDefaultUnit("tesla");
|
||||
fMagFieldZCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fMagFieldCmd = new G4UIcmdWith3VectorAndUnit("/field/setField",this);
|
||||
fMagFieldCmd->SetGuidance("Define global magnetic field.");
|
||||
fMagFieldCmd->SetParameterName("Bx","By","Bz",false,false);
|
||||
fMagFieldCmd->SetDefaultUnit("tesla");
|
||||
fMagFieldCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fLocalMagFieldCmd = new G4UIcmdWith3VectorAndUnit("/field/setLocalField",this);
|
||||
fLocalMagFieldCmd->SetGuidance("Define local magnetic field.");
|
||||
fLocalMagFieldCmd->SetParameterName("Blx","Bly","Blz",false,false);
|
||||
fLocalMagFieldCmd->SetDefaultUnit("tesla");
|
||||
fLocalMagFieldCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
|
||||
fMinStepCmd = new G4UIcmdWithADoubleAndUnit("/field/setMinStep",this);
|
||||
fMinStepCmd->SetGuidance("Define minimal step");
|
||||
fMinStepCmd->SetGuidance("Magnetic field will be in Z direction.");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user