Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zdcLG
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chad Lantz
zdcLG
Commits
62682f70
Commit
62682f70
authored
5 years ago
by
clantz
Browse files
Options
Downloads
Patches
Plain Diff
Set good values in run1.mac. Updated README to reflect the way the MC is currently
parent
f44ab157
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.README.txt
+73
-49
73 additions, 49 deletions
.README.txt
README
+72
-41
72 additions, 41 deletions
README
run1.mac
+3
-3
3 additions, 3 deletions
run1.mac
with
148 additions
and
93 deletions
.README.txt
+
73
−
49
View file @
62682f70
///\file "
optical/OpNovice
/.README.txt"
///\brief
Example OpNovic
e README page
///\file "
zdclg
/.README.txt"
///\brief
LightGuid
e README page
/*! \page Example
OpNovice
Example
OpNovice
This simulation is based on
OpNovice
and
OpNovice
2
This example presently illustrates the following basic concepts, and in
particular (indicated with ***), how to use G4 for optical photon
generation and transport. Other extended example of what is possible
in Geant4 with optical photons can be found at
examples/extended/optical/LXe and wls
Build requirements
Geant4 compiled with GDML and additional datasets
ROOT
-CADMesh is required to read CAD models (i.e. stl, step), but is optional for compiling
\section
ExampleOpNovic
e_s1 main()
\section
lightGuid
e_s1 main()
D
efine Random Number Engine
and
initial seed
d
efine Random Number Engine
,
initial seed
, CAD input and GDML output
\section
ExampleOpNovic
e_s2 G4VUserPhysicsList
\section
lightGuid
e_s2 G4VUserPhysicsList
- Define particles; including - *** G4OpticalPhoton ***
- Define processes; including
- Define processes; including
- *** G4Cerenkov ***
- *** G4Scintillation ***
- *** G4OpAbsorption ***
- *** G4OpRayleigh ***
- *** G4OpBoundaryProcess ***
A messenger command allows to define interactivly the
verbose level and the maximum number of Cerenkov photons per step
(see for instance OpNovice.in)
\section lightGuide_s3 Materials
\section ExampleOpNovice_s3 G4VUserDetectorConstruction
defines many materials for potential use
For our purposes the G4OpticalSurface AlSurface and the G4Material Al and Air
will be given optical properties and used for construction.
- Define material: Air and Water
- Define simple G4box geometry
- *** add G4MaterialPropertiesTable to G4Material ***
- *** define G4LogicalSurface(s) ***
- *** define G4OpticalSurface ***
- *** add G4MaterialPropertiesTable to G4OpticalSurface ***
\section lightGuide_s4 G4VUserDetectorConstruction
\section ExampleOpNovice_s4 G4VUserPrimaryGeneratorAction
A light guide is made either by simple G4trd or by importing a model
via CADMesh.
define G4LogicalBorderSurface between the light guide and world volume
defines a PMT window sensitive detector at the top of the light guide
AlSurface properties can be modified via DetectorMessenger via the following commands
/lightGuide/surfaceModel
/lightGuide/surfaceType
/lightGuide/surfaceFinish
/lightGuide/surfaceSigmaAlpha
/lightGuide/surfaceProperty
Use G4ParticleGun to shoot a charge particle into a Cerenkov radiator
A messenger command allows to define interactivly the polarization of an
primary optical photon (see for instance optPhoton.mac)
\section ExampleOpNovice_s5 G4UserRunAction
examples can be found in run1.mac
- Define G4Timer (start/stop)
- Set verbose levels
\section lightGuide_s5 G4VUserPrimaryGeneratorAction
\section ExampleOpNovice_s6 G4UserStackingAction
Use G4GeneralParticleSource to shoot an optical photon into the light guide
Particle type and distribution is set in run1.mac
\section lightGuide_s6 G4UserRunAction
define G4Timer (start/stop)
define G4AnalysisManager (output .root file)
set verbose levels
\section lightGuide_s7 PMTHit
stores G4int trackID,
G4ThreeVector pos; // Origin position of the photon
G4ThreeVector hit; // Location where the photon hit the PMT window
G4double energy; // Energy of the photon
G4ThreeVector momentum; // Momentum of the photon (direction)
G4double time; // Time of arrival of the photon
for each hit on the PMT sensitive detector
\section lightGuide_s8 PMTSD
Records a PMTHit if the photon strikes the PMT window
\section lightGuide_s9 G4UserEventAction
Show how to count the number of secondary particles in an event
\section
ExampleOpNovic
e_s
7
Visualisation
\section
lightGuid
e_s
10
Visualisation
The Visualization Manager is set in the main().
The initialisation of the drawing is done via a set of /vis/ commands
in the macro vis.mac. This macro is automatically read from
in the macro vis.mac. This macro is automatically read from
the main in case of interactive running mode.
The detector has a default view which is a longitudinal view of the tank.
The tracks are drawn at the end of event, and erased at the end of run.
\section ExampleOpNovice_s8 How to start
\section lightGuide_s11 How to start
- compile and link to generate an executable
\verbatim
% cd OpNovice
% gmake
% mkdir zdclg-build zdclg-install
% cd zdclg-build
% cmake -DCMAKE_INSTALL_PREFIX=../zdclg-install /path/to/zdclg
\endverbatim
This example handles the program arguments in a new way.
It can be run with the following optional arguments:
\verbatim
% OpNovice [-m macro ] [-u UIsession] [-t nThreads]
% ./lightGuide [-m macro ]
[-u UIsession]
[-t nThreads]
[-r seed]
[-o outputFileName]
[-c CADmodelName filetype]
[-co GDMLoutFileName]
\endverbatim
The -t option is available only in multi-threading mode
and it allows the user to override the Geant4 default number of
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
environment variable which has the top priority.
- execute
OpNovic
e in 'batch' mode from macro files
- execute
lightGuid
e in 'batch' mode from macro files
\verbatim
%
OpNovice -m OpNovice.in
%
./lightGuide -m run1.mac
\endverbatim
- execute
OpNovic
e in 'interactive mode' with visualization
- execute
lightGuid
e in 'interactive mode' with visualization
\verbatim
%
OpNovic
e
%
lightGuid
e
....
Idle> type your commands. For instance:
Idle> /control/execute
optPhoton
.mac
Idle> /control/execute
run1
.mac
....
Idle> exit
\endverbatim
...
...
This diff is collapsed.
Click to expand it.
README
+
72
−
41
View file @
62682f70
...
...
@@ -4,19 +4,18 @@
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
OpNovice
--------
This simulation is based on OpNovice and OpNovice2
Build requirements
Geant4 compiled with GDML and additional datasets
ROOT
-CADMesh is required to read CAD models (i.e. stl, step), but is optional for compiling
This example presently illustrates the following basic concepts, and in
particular (indicated with ***), how to use G4 for optical photon
generation and transport. Other extended example of what is possible
in Geant4 with optical photons can be found at
examples/extended/optical/LXe and wls.
main()
------
==> define Random Number Engine
and
initial seed
==> define Random Number Engine
,
initial seed
, CAD input and GDML output
G4VUserPhysicsList
------------------
...
...
@@ -28,74 +27,106 @@ G4VUserPhysicsList
*** G4OpRayleigh ***
*** G4OpBoundaryProcess ***
==> A messenger command allows to define interactivly the
verbose level and the maximum number of Cerenkov photons per step
(see for instance OpNovice.in)
Materials
---------
==> defines many materials for potential use
For our purposes the G4OpticalSurface AlSurface and the G4Material Al and Air
will be given optical properties and used for construction.
G4VUserDetectorConstruction
---------------------------
==> define material: Air and Water
define simple G4box geometry
*** add G4MaterialPropertiesTable to G4Material ***
*** define G4LogicalSurface(s) ***
*** define G4OpticalSurface ***
*** add G4MaterialPropertiesTable to G4OpticalSurface ***
==> A light guide is made either by simple G4trd or by importing a model
via CADMesh.
define G4LogicalBorderSurface between the light guide and world volume
defines a PMT window sensitive detector at the top of the light guide
AlSurface properties can be modified via DetectorMessenger via the following commands
/lightGuide/surfaceModel
/lightGuide/surfaceType
/lightGuide/surfaceFinish
/lightGuide/surfaceSigmaAlpha
/lightGuide/surfaceProperty
examples can be found in run1.mac
G4VUserPrimaryGeneratorAction
-----------------------------
==> Use G4ParticleGun to shoot a charge particle into a Cerenkov radiator
==> A messenger command allows to define interactively the polarization of an
primary optical photon (see for instance optPhoton.mac)
==> Use G4GeneralParticleSource to shoot an optical photon into the light guide
Particle type and distribution is set in run1.mac
G4UserRunAction
---------------
==> define G4Timer (start/stop)
define G4AnalysisManager (output .root file)
set verbose levels
G4UserStackingAction
--------------------
==> show how to count the number of secondary particles in an event
PMTHit
------
==> stores G4int trackID,
G4ThreeVector pos; // Origin position of the photon
G4ThreeVector hit; // Location where the photon hit the PMT window
G4double energy; // Energy of the photon
G4ThreeVector momentum; // Momentum of the photon (direction)
G4double time; // Time of arrival of the photon
for each hit on the PMT sensitive detector
PMTSD
------
==> Records a PMTHit if the photon strikes the PMT window
G4UserEventAction
---------------
==> Adds data from a PMTHit to the output root file
Visualisation
-------------
The Visualization Manager is set in the main().
The initialisation of the drawing is done via a set of /vis/ commands
in the macro vis.mac. This macro is automatically read from
the main in case of interactive running mode.
The detector has a default view which is a longitudinal view of the tank.
The tracks are drawn at the end of event, and erased at the end of run.
HOW TO START
------------
- compile and link to generate an executable
% cd OpNovice
% gmake
% mkdir zdclg-build zdclg-install
% cd zdclg-build
% cmake -DCMAKE_INSTALL_PREFIX=../zdclg-install /path/to/zdclg
This example handles the program arguments in a new way.
It can be run with the following optional arguments:
% OpNovice [-m macro ] [-u UIsession] [-t nThreads]
% ./lightGuide [-m macro ]
[-u UIsession]
[-t nThreads]
[-r seed]
[-o outputFileName]
[-c CADmodelName filetype]
[-co GDMLoutFileName]
The -t option is available only in multi-threading mode
and it allows the user to override the Geant4 default number of
threads. The number of threads can be also set via G4FORCENUMBEROFTHREADS
environment variable which has the top priority.
- execute
OpNovic
e in 'batch' mode from macro files
%
OpNovice -m OpNovice.in
- execute
OpNovic
e in 'interactive mode' with visualization
%
OpNovic
e
- execute
lightGuid
e in 'batch' mode from macro files
%
./lightGuide -m run1.mac
- execute
lightGuid
e in 'interactive mode' with visualization
%
./lightGuid
e
....
Idle> type your commands. For instance:
Idle> /control/execute
optPhoton
.mac
Idle> /control/execute
run1
.mac
....
Idle> exit
This diff is collapsed.
Click to expand it.
run1.mac
+
3
−
3
View file @
62682f70
...
...
@@ -21,9 +21,9 @@
/lightGuide/surfaceModel unified
/lightGuide/surfaceType dielectric_metal
/lightGuide/surfaceFinish ground
/lightGuide/surfaceSigmaAlpha .
0
1
/lightGuide/surfaceSigmaAlpha .1
/lightGuide/surfaceProperty SPECULARLOBECONSTANT 0.000002 1.0 0.000008 1.0
/lightGuide/surfaceProperty SPECULARSPIKECONSTANT 0.000002 0.
99
0.000008 0.
99
/lightGuide/surfaceProperty SPECULARSPIKECONSTANT 0.000002 0.
3
0.000008 0.
3
/lightGuide/surfaceProperty BACKSCATTERCONSTANT 0.000002 .05 0.000008 .05
/lightGuide/surfaceProperty REFLECTIVITY 0.000002 .99 0.000008 .99
...
...
@@ -69,6 +69,6 @@
##############################################################
##############################################################
# number of events
/run/beamOn 5
000000
/run/beamOn 5
##############################################################
##############################################################
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment