Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/optical/OpNovice2/README.md is written in an unsupported language. File is not indexed.

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