| 1 | $Id: README,v 1.5 2004/05/31 18:13:04 gum Exp $
|
|---|
| 2 | -------------------------------------------------------------------
|
|---|
| 3 |
|
|---|
| 4 | =========================================================
|
|---|
| 5 | Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
|---|
| 6 | =========================================================
|
|---|
| 7 |
|
|---|
| 8 | ExampleN06
|
|---|
| 9 | ----------
|
|---|
| 10 |
|
|---|
| 11 | This example presently illustrates the following basic concepts, and in
|
|---|
| 12 | particular (indicated with ***), how to use G4 for optical photon
|
|---|
| 13 | generation and transport. An extended example of what is possible
|
|---|
| 14 | in Geant4 with optical photons can be found at
|
|---|
| 15 | examples/extended/optical/LXe.
|
|---|
| 16 |
|
|---|
| 17 | main()
|
|---|
| 18 | ------
|
|---|
| 19 |
|
|---|
| 20 | ==> define Random Number Engine and initial seed
|
|---|
| 21 |
|
|---|
| 22 | G4VUserPhysicsList
|
|---|
| 23 | ------------------
|
|---|
| 24 |
|
|---|
| 25 | ==> define particles; including *** G4OpticalPhoton ***
|
|---|
| 26 | define processes; including *** G4Cerenkov ***
|
|---|
| 27 | *** G4Scintillation ***
|
|---|
| 28 | *** G4OpAbsorption ***
|
|---|
| 29 | *** G4OpRayleigh ***
|
|---|
| 30 | *** G4OpBoundaryProcess ***
|
|---|
| 31 |
|
|---|
| 32 | G4VUserDetectorConstruction
|
|---|
| 33 | ---------------------------
|
|---|
| 34 |
|
|---|
| 35 | ==> define material: Air and Water
|
|---|
| 36 | define simple G4box geometry
|
|---|
| 37 | *** add G4MaterialPropertiesTable to G4Material ***
|
|---|
| 38 | *** define G4LogicalSurface(s) ***
|
|---|
| 39 | *** define G4OpticalSurface ***
|
|---|
| 40 | *** add G4MaterialPropertiesTable to G4OpticalSurface ***
|
|---|
| 41 |
|
|---|
| 42 | G4VUserPrimaryGeneratorAction
|
|---|
| 43 | -----------------------------
|
|---|
| 44 |
|
|---|
| 45 | ==> Use G4ParticleGun to shoot a charge particle into a Cerenkov radiator
|
|---|
| 46 |
|
|---|
| 47 | ==> A messenger command allows to define interactivly the polarization of an
|
|---|
| 48 | primary optical photon (see for instance optPhoton.mac)
|
|---|
| 49 |
|
|---|
| 50 | G4UserRunAction
|
|---|
| 51 | ---------------
|
|---|
| 52 |
|
|---|
| 53 | ==> define G4Timer (start/stop)
|
|---|
| 54 | set verbose levels
|
|---|
| 55 |
|
|---|
| 56 | G4UserStackingAction
|
|---|
| 57 | --------------------
|
|---|
| 58 |
|
|---|
| 59 | ==> show how to count the number of secondary particles in an event
|
|---|
| 60 |
|
|---|
| 61 | Visualisation
|
|---|
| 62 | -------------
|
|---|
| 63 |
|
|---|
| 64 | The Visualization Manager is set in the main().
|
|---|
| 65 | The initialisation of the drawing is done via a set of /vis/ commands
|
|---|
| 66 | in the macro vis.mac. This macro is automatically read from
|
|---|
| 67 | the main in case of interactive running mode.
|
|---|
| 68 |
|
|---|
| 69 | The detector has a default view which is a longitudinal view of the tank.
|
|---|
| 70 | The tracks are drawn at the end of event, and erased at the end of run.
|
|---|
| 71 |
|
|---|
| 72 | How to start
|
|---|
| 73 | ------------
|
|---|
| 74 |
|
|---|
| 75 | - compile and link to generate an executable
|
|---|
| 76 | % cd N06
|
|---|
| 77 | % gmake
|
|---|
| 78 |
|
|---|
| 79 | - execute N06 in 'batch' mode from macro files
|
|---|
| 80 | % exampleN06 exampleN06.in
|
|---|
| 81 |
|
|---|
| 82 | - execute N06 in 'interactive mode' with visualization
|
|---|
| 83 | % exampleN06
|
|---|
| 84 | ....
|
|---|
| 85 | Idle> type your commands. For instance:
|
|---|
| 86 | Idle> /control/execute optPhoton.mac
|
|---|
| 87 | ....
|
|---|
| 88 | Idle> exit
|
|---|
| 89 |
|
|---|