Warning, /geant4/examples/extended/optical/OpNovice2/README is written in an unsupported language. File is not indexed.
0001 -------------------------------------------------------------------
0002
0003 ==================================================
0004 Geant4 - an Object-Oriented Toolkit for Simulation
0005 ==================================================
0006
0007 OpNovice2
0008 ---------
0009
0010 Investigate optical properties and parameters. Details of optical
0011 photon boundary interactions on a surface are recorded. Details
0012 of optical photon generation and transport are recorded. Group velocity
0013 may be examined.
0014
0015
0016 1- GEOMETRY DEFINITION
0017
0018 The geometry consists of a cube "box" with a side of 2 m inside
0019 the world cube of side 20 m. Optical properties of the box, the world,
0020 and the surface may be set interactively via the commands defined
0021 in the DetectorMessenger class.
0022
0023 Material properties may be added using the macro commands:
0024 # for the box:
0025 /opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
0026 /opnovice2/boxConstProperty NAME VALUE
0027 # for the world:
0028 /opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
0029 /opnovice2/worldConstProperty NAME VALUE
0030 # for the surface:
0031 /opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
0032
0033 Multiple energy and value pairs may be specified for the energy-dependent
0034 properties.
0035
0036 Values are in Geant4 internal units. Energy is in MeV.
0037
0038 Example:
0039 /opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
0040 sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
0041 1.34 at 8 eV.
0042
0043 2- PHYSICS LIST
0044
0045 The FTFP_BERT physics list is used, with electromagnetic option
0046 EMZ (option4) and G4OpticalPhysics for the optical physics.
0047
0048 3- AN EVENT : THE PRIMARY GENERATOR
0049
0050 The primary kinematic consists of a single particle. The type of
0051 the particle, its energy, position, and direction, are set
0052 in the PrimaryGeneratorAction class, and can be changed via the G4
0053 build-in commands of G4ParticleGun class (see the macros provided with
0054 this example).
0055
0056 4- VISUALIZATION
0057
0058 The Visualization Manager is set in the main().
0059 The initialisation of the drawing is done via the commands
0060 /vis/... in the macro vis.mac. To get visualisation:
0061 > /control/execute vis.mac
0062 or run the program with no command line arguments:
0063 $ ./OpNovice2
0064
0065 5- HOW TO START ?
0066
0067 - Execute OpNovice2 in 'batch' mode from macro files
0068 % OpNovice2 electron.mac
0069
0070 - Execute OpNovice2 in 'interactive mode' with visualization
0071 % OpNovice2
0072 ....
0073 Idle> type your commands
0074 ....
0075 Idle> exit
0076
0077 6- RESULTS
0078
0079 A table of optical photon events is printed at the end of the run.
0080 Group velocity is printed with /tracking/verbose 1 or higher.
0081
0082 7- HISTOGRAMS
0083
0084 OpNovice2 has several predefined 1D histograms :
0085 1 : Cerenkov spectrum
0086 2 : scintillation spectrum
0087 3 : scintillation time (global time)
0088 4 : WLS absorption spectrum
0089 5 : WLS emission spectrum
0090 6 : WLS emission time
0091 7 : WLS2 absorption spectrum
0092 8 : WLS2 emission spectrum
0093 9 : WLS2 emission time
0094 10 : boundary process status
0095 11 : X momentum dir of scattered photons with px < 0
0096 12 : Y momentum dir of scattered photons with px < 0
0097 13 : Z momentum dir of scattered photons with px < 0
0098 14 : X momentum dir of scattered photons with px >= 0
0099 15 : Y momentum dir of scattered photons with px >= 0
0100 16 : Z momentum dir of scattered photons with px >= 0
0101 17 : X momentum dir of Fresnel-refracted photons
0102 18 : Y momentum dir of Fresnel-refracted photons
0103 19 : Z momentum dir of Fresnel-refracted photons
0104 20 : fraction of photons refracted (i.e. Fresnel transmission)
0105 21 : fraction of photons Fresnel-reflected
0106 22 : fraction of photons total internal reflected (TIR)
0107 23 : fraction of photons reflected (Fresnel reflection plus TIR)
0108 24 : fraction of photons absorbed at surface
0109 25 : fraction of photons "transmitted" (i.e. TRANSMITTANCE material property)
0110 26 : fraction of photons spike-reflected
0111
0112 Histograms 11-26 are recorded for photons scattered from the +X
0113 surface of the cube. Only the first interaction is recorded.
0114
0115 The histograms are managed by G4Analysis classes.
0116 The histos can be individually activated with the command:
0117 /analysis/h1/set id nbBins valMin valMax
0118 The unit is hardcoded to be eV for energy and ns for time.
0119
0120 One can control the name of the histograms file with the command:
0121 /analysis/setFileName name (default opnovice2)
0122
0123 It is possible to choose the format of the histogram file : root (default),
0124 hdf5, xml, csv, by changing the default file type in HistoManager.cc
0125
0126 It is also possible to print selected histograms on an ascii file:
0127 /analysis/h1/setAscii id
0128 All selected histos will be written on a file name.ascii (default opnovice2)
0129
0130 8- MACROS
0131
0132 Several macros are included.
0133 - boundary.mac: Set the surface to the various types and configurations of
0134 model, type, etc., shoot optical photons, and record statistics.
0135 This macro uses the command
0136 /opnovice2/stepping/killOnSecondSurface,
0137 which kills photon tracks incident on a second surface. This can
0138 be useful for visualizing surface scattering.
0139 - coated.mac: To show reflection/refraction from thin film coating
0140 - electron.mac: Shoot electrons and observe Cerenkov and scintillation radiation
0141 - fresnel.mac: Shoot optical photons of fixed polarization and random direction
0142 at a surface, and plot reflectance/transmittance vs incident
0143 angle.
0144 - complexRindex.mac: Use a dielectric-metal surface with a complex index of
0145 refraction.
0146 - OpNovice2.mac: Shoot an optical photon inside a box.
0147 - scint_by_particle.mac: Configure scintillation to have particle-specific
0148 yields, yield ratios, and time constants. Shoot different types
0149 of particles.
0150 - vis.mac: Configure visualization. The macro command
0151 /opnovice2/stepping/killOnSecondSurface, which kills photon
0152 tracks incident on a second surface, may be useful for
0153 visualizing surface scattering.
0154 - wls.mac: Configure two wavelength-shifting processes, and shoot optical
0155 photons.