Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -10,11 +10,11 @@ This example illustrates how to use the leading particle biasing option.
|
||||
|
||||
It uses the G4BOptnLeadingParticle biasing operation located in:
|
||||
|
||||
source/processes/biasing/generic ,
|
||||
source/processes/biasing/generic ,
|
||||
|
||||
and defines the following biasing operation to handle it:
|
||||
|
||||
GB07OptrLeadingParticle.
|
||||
GB07OptrLeadingParticle.
|
||||
|
||||
As a reminder, the generic biasing scheme consists of a G4VBiasingOperator
|
||||
that takes decisions on what sort of biasing technique to be applied. The
|
||||
@@ -27,60 +27,62 @@ constructor is used. In this example, several processes -to which the technique
|
||||
is applied- are wrapped by this process to control their final state production
|
||||
for applying the biasing technique.
|
||||
|
||||
|
||||
\section ExampleGB07_s2 Geometry
|
||||
|
||||
The geometry is simply :
|
||||
- a volume in which the biasing occurs and to which an instance of
|
||||
GB07OptrLeadingParticle is attached,
|
||||
- a thin volume placed after the above volume, that is used to tally the
|
||||
particles exiting biasing volume.
|
||||
- a sensitive detector is attached to the thin volume to simply print the
|
||||
particles entering here. In particular the statistical weight is printed,
|
||||
this one is obtained by:
|
||||
The geometry is simply :
|
||||
- a volume in which the biasing occurs and to which an instance of
|
||||
GB07OptrLeadingParticle is attached,
|
||||
- a thin volume placed after the above volume, that is used to tally the
|
||||
particles exiting biasing volume.
|
||||
- a sensitive detector is attached to the thin volume to simply print the
|
||||
particles entering here. In particular the statistical weight is printed,
|
||||
this one is obtained by:
|
||||
|
||||
\verbatim
|
||||
w = track->GetWeight() ;
|
||||
\endverbatim
|
||||
|
||||
|
||||
\section ExampleGB07_s3 Biasing configuration
|
||||
|
||||
The particle types and processes under the leading particle biasing are
|
||||
The particle types and processes under the leading particle biasing are
|
||||
visible in the main program exampleGB07.cc, these are:
|
||||
|
||||
pi+ and pi-, inelastic process,
|
||||
proton and anti-proton, inelastic process,
|
||||
neutron, inelastic and capture processes,
|
||||
anti-neutron, inelastic process,
|
||||
pi+ and pi-, inelastic process,
|
||||
proton and anti-proton, inelastic process,
|
||||
neutron, inelastic and capture processes,
|
||||
anti-neutron, inelastic process,
|
||||
gamma, conversion and photonNuclear processes,
|
||||
electron, electronNuclear process,
|
||||
positron, annihilation and positronNuceal processes,
|
||||
pi0, decay process.
|
||||
|
||||
gamma, conversion and photonNuclear processes,
|
||||
electron, electronNuclear process,
|
||||
positron, annihilation and positronNuceal processes,
|
||||
|
||||
pi0, decay process.
|
||||
|
||||
For the inelastic and lepto/gamma-nuclear processes, leading particle is applied in a rather
|
||||
For the inelastic and lepto/gamma-nuclear processes, leading particle is applied in a rather
|
||||
classical way:
|
||||
- keep the leading particle,
|
||||
- keep one particle of each species (particles and anti-particles are considered a one
|
||||
- keep the leading particle,
|
||||
- keep one particle of each species (particles and anti-particles are considered a one
|
||||
species, and all hadrons with Z>=2 are counted as one species too).
|
||||
For e+, e-, gamma and pi0 processes (which means in practice main conversion, annihililation
|
||||
|
||||
For e+, e-, gamma and pi0 processes (which means in practice main conversion, annihililation
|
||||
and pi0 decay processes), the leading particle is kept, and the companion track(s) is(are) randomly
|
||||
kept/killed under a Russian roulette, with a 2/3 killing probabilty. See
|
||||
GB07BOptrLeadingParticle::StartTracking( ... ) for this killing probability setting.
|
||||
|
||||
|
||||
\section ExampleGB07_s4 Running the program:
|
||||
|
||||
The program can be run in batch or interactive mode and has the following options:
|
||||
The program can be run in batch or interactive mode and has the following options:
|
||||
|
||||
batch mode:
|
||||
./exampleGB07 [-m macro ] [-b biasing {'on' = default,'off'}]
|
||||
or
|
||||
./exampleGB07 [macro.mac]
|
||||
interactive mode:
|
||||
./exampleGB07 [-b biasing {'on' = default,'off'}]
|
||||
- batch mode:
|
||||
\verbatim
|
||||
./exampleGB07 [-m macro ] [-b biasing {'on' = default,'off'}]
|
||||
\endverbatim
|
||||
or
|
||||
\verbatim
|
||||
./exampleGB07 [macro.mac]
|
||||
\endverbatim
|
||||
|
||||
- interactive mode:
|
||||
\verbatim
|
||||
./exampleGB07 [-b biasing {'on' = default,'off'}]
|
||||
\endverbatim
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.8...3.18)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
endif()
|
||||
project(GB07project)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -16,6 +16,12 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
November 10th, 2020 Ben Morgan - biasingGB07-V10-06-01
|
||||
- Migration to G4RunManagerFactory.
|
||||
|
||||
Nov 6, 2020 I. Hrivnacova - biasingGB07-V10-06-00
|
||||
- Fixed doxygen documentation
|
||||
|
||||
Nov 15, 2019 M. Verderi - biasingGB07-V10-05-00
|
||||
- Creation
|
||||
|
||||
|
||||
@@ -30,11 +30,7 @@
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "GB07ActionInitialization.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
@@ -97,15 +93,8 @@ int main(int argc,char** argv)
|
||||
}
|
||||
|
||||
// -- Construct the run manager : MT or sequential one
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
G4cout << " ********** Run Manager constructed in MT mode ************ " << G4endl;
|
||||
// -- Choose 4 threads:
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
runManager->SetNumberOfThreads(4);
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
G4cout << " ********** Run Manager constructed in sequential mode ************ " << G4endl;
|
||||
#endif
|
||||
|
||||
// -- Set mandatory initialization classes
|
||||
GB07DetectorConstruction* detector = new GB07DetectorConstruction();
|
||||
|
||||
Reference in New Issue
Block a user