Warning, /geant4/examples/extended/electromagnetic/TestEm16/README is written in an unsupported language. File is not indexed.
0001 -------------------------------------------------------------------
0002
0003 =========================================================
0004 Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005 =========================================================
0006
0007 TestEm16
0008 --------
0009 Simulate synchrotron radiation
0010
0011 1- GEOMETRY DEFINITION
0012
0013 The geometry consists of a single block of a homogenous material.
0014
0015 Two parameters define the geometry :
0016 - the material of the box,
0017 - the (full) size of the box.
0018 The default is 500 m of vacuum.
0019
0020 A transverse uniform magnetic field can be applied.
0021
0022 The default geometry is constructed in DetectorConstruction class,
0023 but all of the above parameters can be changed interactively via
0024 the commands defined in the DetectorMessenger class.
0025
0026 2- PHYSICS LIST
0027
0028 The particle list include EM processes for gamma, e+, e-, mu+, mu-,
0029 and protons, for the rest of particles only transportation.
0030 Synchrotron radiation is added to all charged particles.
0031 To make the synchrotron radiation easily visible, a very low
0032 pressure "vaccuum" and a magnetic field of by default 1 Tesla
0033 in z-direction is used.
0034
0035 3- AN EVENT : THE PRIMARY GENERATOR
0036
0037 The primary kinematic consists of a single particle which hits the
0038 block perpendicular to the input face. The type of the particle
0039 and its energy are set in the PrimaryGeneratorAction class, and can
0040 changed via the G4 build-in commands of ParticleGun class (see
0041 the macros provided with this example).
0042 The default is an positron of 10 GeV.
0043
0044 In addition one can choose randomly the impact point of the incident
0045 particle. The corresponding interactive command is built in
0046 PrimaryGeneratorMessenger class.
0047
0048 A RUN is a set of events.
0049
0050
0051 4- VISUALIZATION
0052
0053 The Visualization Manager is set in the main().
0054 The initialisation of the drawing is done via the command
0055 > /control/execute vis.mac
0056 > /run/beamOn 1
0057
0058 The detector has a default view which is a longitudinal view of the box.
0059
0060 The tracks are drawn at the end of event, and erased at the end of run.
0061 Optionaly one can choose to draw all particles, only the charged one,
0062 or none. This command is defined in EventActionMessenger class.
0063
0064 5- PHYSICS DEMO
0065
0066 The particle's type and the physic processes which will be available
0067 in this example are set in PhysicsList class.
0068
0069 In addition a build-in interactive command (/process/inactivate proname)
0070 allows to activate/inactivate the processes one by one.
0071
0072 The threshold for producing secondaries can be changed.
0073 eg: /run/setCut 100 micrometer
0074 /run/initialize
0075
0076 To visualize the Synchrotron radiation :
0077 /control/execute vis.mac
0078
0079 6- HOW TO START ?
0080
0081 - execute Test in 'batch' mode from macro files
0082 % TestEm16 run01.mac
0083
0084 - execute Test in 'interactive mode' with visualization
0085 % TestEm16
0086 ....
0087 Idle> type your commands
0088 ....
0089 Idle> exit
0090
0091 other Macros provided in this example:
0092 - run01_prot.mac
0093 Synchrotron radiation of 50 TeV protons in 20 T field
0094 relevant for FCC-hh
0095 - run02.mac
0096 weak field long distance example
0097 relevant for space applications
0098 - TestReflection.mac
0099 specular reflection of X-ray gammas on a block of
0100 copper defined by Box_1m_Cu.gdml
0101
0102 7 - TRACKING : stepMax and setMaxStepLength
0103
0104 In order to control the accuracy of the deposition, the user can limit
0105 'by hand' the maximum step size stepMax of charged particles.
0106
0107 The maximum tracking step length for computing of magnetic field lines
0108 is by default set to 1 km.
0109 Synchrotron radiation in very weak magnetic fields of the order of 1 Gauss
0110 may require longer pathlength.
0111 This can be achieved with using setMaxStepLength like
0112 /testem/tracking/setMaxStepLength 100 km
0113
0114 8- HISTOGRAMS
0115
0116 TestEm16 produces 3 histograms which illustrate synchrotron radiation.
0117 The photon energy spectrum (photons / energy bin) and the power spectrum
0118 (photon spectrum weighted with the photon energy) and a histogram
0119 of the path length between photon radiation is produced.
0120
0121 The histograms are managed by G4AnalysisManager and its Messenger.
0122
0123 The histos can be activated individually with the command :
0124 /analysis/h1/set id nbBins valMin valMax unit
0125 where 'unit' is the desired unit for the histo (MeV or KeV, cm or mm, etc..)
0126
0127 One can control the name of the histograms file with the command:
0128 /analysis/setFileName name (default testem16)
0129
0130 It is possible to choose the format of the histogram file : root (default),
0131 xml, csv, by using namespace in HistoManager.hh
0132
0133 It is also possible to print selected histograms on an ascii file:
0134 /analysis/h1/setAscii id
0135 All selected histos will be written on a file name.ascii (default testem16)