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