Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -1,35 +0,0 @@
|
||||
|
||||
///\file "optical/.README.txt"
|
||||
///\brief Examples optical README page
|
||||
|
||||
/*! \page Examples_optical Category "optical"
|
||||
|
||||
This directory includes examples demonstrating the use of optical processes
|
||||
in the simulation.
|
||||
|
||||
\link ExampleOpNovice OpNovice \endlink
|
||||
|
||||
Simulation of optical photons generation and transport.
|
||||
Defines optical surfaces and exercises optical physics processes
|
||||
(Cerenkov, Scintillation, Absorption, Rayleigh, ...). Uses stacking
|
||||
mechanism to count the secondary particles generated.
|
||||
|
||||
\link ExampleOpNovice2 OpNovice2 \endlink
|
||||
|
||||
Investigate optical properties and parameters. Details of optical
|
||||
photon boundary interactions on a surface are recorded. Details
|
||||
of optical photon generation and transport are recorded.
|
||||
|
||||
\link ExampleLXe LXe \endlink
|
||||
|
||||
Multi-purpose detector setup implementing:
|
||||
-# scintillation inside a bulk scintillator with PMTs
|
||||
-# large wall of small PMTs opposite a Cerenkov slab to show the cone
|
||||
-# plastic scintillator with wave-length-shifting fiber readout.
|
||||
|
||||
\link Examplewls wls \endlink
|
||||
|
||||
This application simulates the propagation of photons inside a Wave Length
|
||||
Shifting (WLS) fiber.
|
||||
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
#---Adding all optical examples subdirectories explicitly
|
||||
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
|
||||
add_subdirectory(OpNovice)
|
||||
add_subdirectory(OpNovice2)
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
|
||||
///\file "optical/LXe/.README.txt"
|
||||
///\brief Example LXe README page
|
||||
|
||||
/*! \page ExampleLXe Example LXe
|
||||
|
||||
\section LXe_s1 Introduction
|
||||
|
||||
This example demonstrates usage of optical physics.
|
||||
|
||||
\section LXe_s2 Geometry and primary particle
|
||||
|
||||
The main volume is a box of LXe. PMTs are placed around the outside. There
|
||||
may be a reflective sphere placed inside the box, and a wavelength shifting
|
||||
slab and fibers.
|
||||
|
||||
The geometry implementation is different from many of the other examples.
|
||||
See the discussion below.
|
||||
|
||||
G4ParticleGun creates the primary particle. The type of particle is selectable
|
||||
by the user.
|
||||
|
||||
\section LXe_s3 Physics
|
||||
|
||||
The physics list is FTFP_BERT, with G4EmStandard_option4 electromagnetic
|
||||
physics and G4OpticalPhysics.
|
||||
|
||||
\section LXe_s4 Physics Macro files
|
||||
|
||||
cerenkov.mac disables scintillation, so the optical photons that are produced
|
||||
are Cerenkov photons.
|
||||
|
||||
wls.mac implements a scintillating slab and wavelength shifting fibers.
|
||||
|
||||
\section LXe_s5 List of built-in histograms
|
||||
|
||||
1 "hits per event"
|
||||
2 "hits per event above threshold"
|
||||
3 "scintillation photons per event"
|
||||
4 "Cerenkov photons per event"
|
||||
5 "absorbed photons per event"
|
||||
6 "photons absorbed at boundary per event"
|
||||
7 "energy deposition in scintillator per event"
|
||||
|
||||
\section LXe_s6 How to start?
|
||||
|
||||
- execute LXe in 'batch' mode from macro files, e.g.
|
||||
$ ./LXe cerenkov.mac
|
||||
|
||||
- execute LXe in 'interactive' mode with visualization, e.g.
|
||||
$ ./LXe
|
||||
Then type commands, for instance
|
||||
Session: /run/beamOn 1
|
||||
|
||||
\section LXe_s7 Macros included
|
||||
|
||||
Several macros are include in the distribution:
|
||||
|
||||
cerenkov.mac: Shoot a 200 MeV mu+ and only allow it to take one step. The
|
||||
Cerenkov cone and PMTs hit are visible. (Reduce the number
|
||||
of particles for visualization.)
|
||||
LXe.mac: Shoot a 511 keV gamma with the default geometry.
|
||||
photon.mac: Primary beam is an optical photon, with the default geometry.
|
||||
wls.mac: Geometry includes 15 WLS fibers. A 511 keV electron is the
|
||||
primary.
|
||||
|
||||
-
|
||||
|
||||
\section LXe_s8 Detailed Explanation of Geometry Implementation
|
||||
|
||||
The way the geometry is constructed is an experiment for a new, more object
|
||||
oriented, way to construct geometry. It separates the concept of how a volume
|
||||
is built from where it is placed. Each major volume in the geometry is defined
|
||||
as a class derived from G4PVPlacement. In this example, just the main LXe
|
||||
volume, the WLS scintillator slab, and the WLS fibers were chosen. To place
|
||||
one of these volumes, simply create an instance of it with the appropriate
|
||||
rotation, translation, and mother volumes.
|
||||
|
||||
\verbatim
|
||||
LXeMainVolume(G4RotationMatrix *pRot,
|
||||
const G4ThreeVector &tlate,
|
||||
G4LogicalVolume *pMotherLogical,
|
||||
G4bool pMany,
|
||||
G4int pCopyNo,
|
||||
LXeDetectorConstruction* c);
|
||||
\endverbatim
|
||||
|
||||
Also necessary are the pMany and pCopyNo variables with the same usage as in
|
||||
G4PVPlacement. Additionally, the detector construction must be passed to the
|
||||
main volume as a way to communicate the many parameters to the volume and its
|
||||
sub-volumes. The communication is done from the CopyValues() function which
|
||||
retrieves the information from the detector constructor.
|
||||
|
||||
Notably, the name and logical volume parameters are no longer part of the
|
||||
constructor. This is because they are both to be decided by the volume itself.
|
||||
The volume must specify its own name and a temporary logical volume. The
|
||||
constructor will then procede to define its logical volume in the normal way.
|
||||
Once complete, the logical volume can be assigned to the physical volume using
|
||||
the SetLogicalVolume() function.
|
||||
|
||||
To handle instances of the same type of volume, a new logical volume should not
|
||||
be defined for each one. Instead, the logical volume is kept as a static member
|
||||
and defined only once.
|
||||
|
||||
\verbatim
|
||||
if (!housing_log || updated) {
|
||||
//...
|
||||
//Define logical volume
|
||||
//...
|
||||
}
|
||||
SetLogicalVolume(housing_log);
|
||||
\endverbatim
|
||||
|
||||
The updated variable is to signal that the volume needs to be updated and a new
|
||||
logical volume made.
|
||||
|
||||
\section LXe_s9 Modifying the geometry at runtime
|
||||
|
||||
This example allows the user to modify the geometry definition at runtime. This
|
||||
is accomplished through LXeDetectorMessenger, a derived class of G4UImessenger.
|
||||
The commands it adds change variables stored in LXeDetectorConstructor that
|
||||
are used when constructing the geometry.
|
||||
|
||||
\verbatim
|
||||
void LXeDetectorConstruction::UpdateGeometry(){
|
||||
// clean-up previous geometry
|
||||
G4SolidStore::GetInstance()->Clean();
|
||||
G4LogicalVolumeStore::GetInstance()->Clean();
|
||||
G4PhysicalVolumeStore::GetInstance()->Clean();
|
||||
|
||||
//define new one
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructDetector());
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
\section LXe_s10 PMT sensitive detector
|
||||
|
||||
The PMT sensitive detector cannot be triggered like a normal sensitive detector
|
||||
because the sensitive volume does not allow photons to pass through it. Rather,
|
||||
it detects them in the OpBoundary process based on an efficiency set on the
|
||||
skin of the volume.
|
||||
|
||||
\verbatim
|
||||
G4OpticalSurface* photocath_opsurf=
|
||||
new G4OpticalSurface("photocath_opsurf",glisur,polished,
|
||||
dielectric_metal);
|
||||
G4double photocath_EFF[num]={1.,1.};
|
||||
G4double photocath_REFL[num]={0.,0.};
|
||||
G4MaterialPropertiesTable* photocath_mt = new G4MaterialPropertiesTable();
|
||||
photocath_mt->AddProperty("EFFICIENCY",Ephoton,photocath_EFF,num);
|
||||
photocath_mt->AddProperty("REFLECTIVITY",Ephoton,photocath_REFL,num);
|
||||
photocath_opsurf->SetMaterialPropertiesTable(photocath_mt);
|
||||
new G4LogicalSkinSurface("photocath_surf",photocath_log,photocath_opsurf);
|
||||
\endverbatim
|
||||
|
||||
A normal sensitive detector would have its ProcessHits
|
||||
function called for each step by a particle inside the volume. So, to record
|
||||
these hits with a sensitive detector we watched the status of the OpBoundary
|
||||
process from the stepping manager whenever a photon hit the sensitive volume
|
||||
of the pmt. If the status was 'Detection', we retrieve the sensitive detector
|
||||
from G4SDManager and call its ProcessHits function.
|
||||
|
||||
\verbatim
|
||||
boundaryStatus=boundary->GetStatus();
|
||||
//Check to see if the particle was actually at a boundary
|
||||
//Otherwise the boundary status may not be valid
|
||||
//Prior to Geant4.6.0-p1 this would not have been enough to check
|
||||
if(thePostPoint->GetStepStatus()==fGeomBoundary){
|
||||
switch(boundaryStatus){
|
||||
//...
|
||||
case Detection: //Note, this assumes that the volume causing detection
|
||||
//is the photocathode because it is the only one with
|
||||
//non-zero efficiency
|
||||
{
|
||||
//Trigger sensitive detector manually since photon is
|
||||
//absorbed but status was Detection
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
G4String sdName="/LXeDet/pmtSD";
|
||||
LXePMTSD* pmtSD = (LXePMTSD*)SDman
|
||||
->FindSensitiveDetector(sdName);
|
||||
if(pmtSD)
|
||||
pmtSD->ProcessHits_constStep(theStep,NULL);
|
||||
break;
|
||||
}
|
||||
//...
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
\section LXe_s11 Selectively drawing trajectories or highlighting volumes
|
||||
|
||||
In a simulation such as this one, where an average of 6000 trajectories are
|
||||
generated in a small space, there is little use in drawing all of them. There
|
||||
are two ways to select which ones to draw. The first of which is to decide
|
||||
while looping through the trajectory container which ones to draw and only call
|
||||
DrawTrajectory on the important ones. However, trajectories only contain a
|
||||
small portion of the information from the track it represents. This may not
|
||||
be enough to decide if a trajectory is worth drawing.
|
||||
|
||||
The alternative is to define your own trajectory class to store additional
|
||||
information to help decide if it should be drawn. To use your custom trajectory
|
||||
you must create it in the PreUserTrackingAction:
|
||||
|
||||
\verbatim
|
||||
fpTrackingManager->SetTrajectory(new LXeTrajectory(aTrack));
|
||||
\endverbatim
|
||||
|
||||
Then at any point you can get access to the trajectory you can update the extra
|
||||
information within it. When it comes to drawing, you can then use this to
|
||||
decide if you want to call DrawTrajectory. Or you can call DrawTrajectory for
|
||||
all trajectories and have the logic decide how and if a trajectory should
|
||||
be drawn inside the DrawTrajectory function itself.
|
||||
|
||||
Selectively highlighting volumes is useful to show which volumes were hit. To
|
||||
do this, you simply need a pointer to the physical volume. With that, you can
|
||||
modify its vis attributes and instruct the vis manager to redraw the volume
|
||||
with the new vis attributes.
|
||||
|
||||
\verbatim
|
||||
G4VisAttributes attribs(G4Colour(1.,0.,0.));
|
||||
attribs.SetForceSolid(true);
|
||||
G4RotationMatrix rot;
|
||||
if(physVol->GetRotation())//If a rotation is defined use it
|
||||
rot=*(physVol->GetRotation());
|
||||
G4Transform3D trans(rot,physVol->GetTranslation());//Create transform
|
||||
pVVisManager->Draw(*physVol,attribs,trans);//Draw it
|
||||
\endverbatim
|
||||
|
||||
In this case, it is done in Draw function of a PMT hit but it can be placed
|
||||
anywhere. The logic to decide if it should be drawn or not may be similar to
|
||||
the logic used in choosing which trajectories to draw.
|
||||
|
||||
See /LXe/detector/volumes/sphere in "UI commands" below for info on what
|
||||
trajectories are drawn in this simulation.
|
||||
|
||||
\section LXe_s12 Saving random engine seeds
|
||||
|
||||
At times it may be necessary to review a particular event of interest. To do
|
||||
this without redoing an entire run, which may take a long time, you must store
|
||||
the random engine seed from the beginning of the event. The run manager
|
||||
has some functions that help in this task.
|
||||
|
||||
\verbatim
|
||||
G4RunManager::SetRandomNumberStore(G4bool)
|
||||
\endverbatim
|
||||
|
||||
When set to true, this causes the run manager to write the seed for the
|
||||
beginning of the current run to CurrentRun.rndm and the current event to
|
||||
CurrentEvent.rndm. However, at the beginning of each event this file will be
|
||||
overwritten with the new event. To keep a copy for a particular event there is
|
||||
a function to copy this file to "run###evt###.rndm".
|
||||
|
||||
\verbatim
|
||||
G4RunManager::rndmSaveThisEvent()
|
||||
\endverbatim
|
||||
|
||||
This can be done for every event so you can review any event you like but this
|
||||
may be awkward for runs with very large numbers of events. Instead, implement
|
||||
some form of logic in EndOfEventAction to decide if the event is worth saving.
|
||||
If it is, then call rndmSaveThisEvent(). By default, these files are stored in
|
||||
the current working directory. There is a function to change this as well.
|
||||
Typically you would call that at the same time SetRandomNumberStore. The
|
||||
directory to save in must exist first. GEANT4 will not create it for you.
|
||||
|
||||
\verbatim
|
||||
G4RunManager::SetRandomNumberStoreDir(G4String)
|
||||
\endverbatim
|
||||
|
||||
\section LXe_s13 UI commands
|
||||
|
||||
Directories:
|
||||
\verbatim
|
||||
/LXe/ - All custom commands belong below this directory
|
||||
/LXe/detector/ - Geometry related commands
|
||||
/LXe/detector/volumes/ - Commands to enable/disable volumes in the geometry
|
||||
\endverbatim
|
||||
|
||||
Commands:
|
||||
\verbatim
|
||||
/LXe/saveThreshold <int, default = 4500>
|
||||
\endverbatim
|
||||
-Specifies a threshold for saving the random seed for an event. If the number
|
||||
of photons generated in an event is below this number then the random seed is
|
||||
saved to "./random/run###evt###.rndm". See "Saving random engine seeds".
|
||||
|
||||
\verbatim
|
||||
/LXe/eventVerbose <int, default = 1>
|
||||
\endverbatim
|
||||
-Enables end of event verbose data to be printed. This includes information
|
||||
counted and calculated by the user action classes.
|
||||
|
||||
\verbatim
|
||||
/LXe/pmtThreshold <int, default = 1>
|
||||
\endverbatim
|
||||
-Sets the PMT threshold in # of photons being detected by the PMT. PMTs below
|
||||
with fewer hits than the threshold will not count as being hit and will also
|
||||
not be highlighted at the end of the event.
|
||||
|
||||
\verbatim
|
||||
/LXe/oneStepPrimaries <bool>
|
||||
\endverbatim
|
||||
-This causes primary particles to be killed after going only one step inside
|
||||
the scintillator volume. This is useful to view the photons generated during
|
||||
the initial conversion of the primary particle.
|
||||
|
||||
\verbatim
|
||||
/LXe/forceDrawPhotons <bool>
|
||||
\endverbatim
|
||||
-Forces all optical photon trajectories to be drawn at the end of the event
|
||||
regardless of the scheme mentioned in /LXe/detector/volumes/sphere below.
|
||||
|
||||
\verbatim
|
||||
/LXe/forceDrawNoPhotons <bool>
|
||||
\endverbatim
|
||||
-Forces all optical photon trajectories to NOT be drawn at the end of the
|
||||
event regardless of the scheme mentioned in /LXe/detector/volumes/sphere below.
|
||||
-If /LXe/forceDrawPhotons is set to true, this has no effect.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/dimensions <double x y z> <unit, default = cm>
|
||||
\endverbatim
|
||||
-Sets the dimensions of the main scintillator volume.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/housingThickness <double>
|
||||
\endverbatim
|
||||
-Sets the thickness of the housing surrounding the main detector volume.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/pmtRadius <double> <unit, default = cm>
|
||||
\endverbatim
|
||||
-Sets the radius of the PMTs
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/nx
|
||||
/LXe/detector/ny
|
||||
/LXe/detector/nz
|
||||
\endverbatim
|
||||
-Sets the number of PMTs placed in a row along each axis.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/reflectivity <double>
|
||||
\endverbatim
|
||||
-Sets the reflectivity of the inside of the aluminum housing. The geometry
|
||||
uses a default value of 1.00 for a fully reflective surface.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/nfibers <int>
|
||||
\endverbatim
|
||||
-Sets the number of WLS fibers placed in the WLS scintillator slab. The
|
||||
geometry uses a default value of 15 fibers.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/scintYieldFactor <double>
|
||||
\endverbatim
|
||||
-Sets the yield factor for the scintillation process. This is cumulative with
|
||||
the yield factor set on individual materials. Set to 0 to produce no
|
||||
scintillation photons.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/defaults
|
||||
\endverbatim
|
||||
-Resets all detector values customizable with commands above to their defaults.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/volumes/sphere <bool>
|
||||
\endverbatim
|
||||
-Enables/disables the sphere placed inside the main scintillator volume. When
|
||||
the sphere is enabled, only photons that hit the sphere and hit a PMT are
|
||||
drawn. If it is disabled, then all photons that hit PMTs are drawn.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/volumes/wls <bool>
|
||||
\endverbatim
|
||||
-Enables/disables the WLS scintillator slab containing WLS fibers. By default
|
||||
this is not part of the geometry. Enabling it will place it behind the LXe
|
||||
scintillator volume.
|
||||
|
||||
\verbatim
|
||||
/LXe/detector/volumes/lxe <bool>
|
||||
\endverbatim
|
||||
-Enables/disables the main LXe scintillator volume. By default this is part of
|
||||
the geometry.
|
||||
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
project(LXe)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -14,6 +14,15 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
October 06, 2021 I. Hrivnacova (LXe-V10-07-03)
|
||||
- Migration to new G4AnalysisManager.hh header;
|
||||
define the default output file type (root).
|
||||
|
||||
July 19, 2021 I. Hrivnacova (LXe-V10-07-02)
|
||||
- Updated for changes in the analysis category:
|
||||
removed deleting of the analysis manager,
|
||||
as this is now done by the Geant4 kernel.
|
||||
|
||||
May 13, 2021 D. Sawkey (LXe-V10-07-01)
|
||||
- Get some refractive indices from new G4OpticalMaterialParameters file
|
||||
|
||||
|
||||
+1182
-1617
File diff suppressed because it is too large
Load Diff
@@ -1,356 +0,0 @@
|
||||
|
||||
LXe Example
|
||||
-----------
|
||||
|
||||
------------
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This example demonstrates usage of optical physics.
|
||||
|
||||
-----------------------------
|
||||
Geometry and primary particle
|
||||
-----------------------------
|
||||
|
||||
The main volume is a box of LXe. PMTs are placed around the outside. There
|
||||
may be a reflective sphere placed inside the box, and a wavelength shifting
|
||||
slab and fibers.
|
||||
|
||||
The geometry implementation is different from many of the other examples.
|
||||
See the discussion below.
|
||||
|
||||
G4ParticleGun creates the primary particle. The type of particle is selectable
|
||||
by the user.
|
||||
|
||||
-------
|
||||
Physics
|
||||
-------
|
||||
|
||||
The physics list is FTFP_BERT, with G4EmStandard_option4 electromagnetic
|
||||
physics and G4OpticalPhysics.
|
||||
|
||||
-----------
|
||||
Macro files
|
||||
-----------
|
||||
|
||||
cerenkov.mac disables scintillation, so the optical photons that are produced
|
||||
are Cerenkov photons.
|
||||
|
||||
wls.mac implements a scintillating slab and wavelength shifting fibers.
|
||||
|
||||
|
||||
---------------------------
|
||||
List of built-in histograms
|
||||
---------------------------
|
||||
|
||||
1 "hits per event"
|
||||
2 "hits per event above threshold"
|
||||
3 "scintillation photons per event"
|
||||
4 "Cerenkov photons per event"
|
||||
5 "absorbed photons per event"
|
||||
6 "photons absorbed at boundary per event"
|
||||
7 "energy deposition in scintillator per event"
|
||||
|
||||
|
||||
-------------
|
||||
How to start?
|
||||
-------------
|
||||
|
||||
- execute LXe in 'batch' mode from macro files, e.g.
|
||||
$ ./LXe cerenkov.mac
|
||||
|
||||
- execute LXe in 'interactive' mode with visualization, e.g.
|
||||
$ ./LXe
|
||||
Then type commands, for instance
|
||||
Session: /run/beamOn 1
|
||||
|
||||
---------------
|
||||
Macros included
|
||||
---------------
|
||||
|
||||
Several macros are include in the distribution:
|
||||
|
||||
cerenkov.mac: Shoot a 200 MeV mu+ and only allow it to take one step. The
|
||||
Cerenkov cone and PMTs hit are visible. (Reduce the number
|
||||
of particles for visualization.)
|
||||
LXe.mac: Shoot a 511 keV gamma with the default geometry.
|
||||
photon.mac: Primary beam is an optical photon, with the default geometry.
|
||||
wls.mac: Geometry includes 15 WLS fibers. A 511 keV electron is the
|
||||
primary.
|
||||
|
||||
-----------------------------------------------
|
||||
Detailed Explanation of Geometry Implementation
|
||||
-----------------------------------------------
|
||||
|
||||
The way the geometry is constructed is an experiment for a new, more object
|
||||
oriented, way to construct geometry. It separates the concept of how a volume
|
||||
is built from where it is placed. Each major volume in the geometry is defined
|
||||
as a class derived from G4PVPlacement. In this example, just the main LXe
|
||||
volume, the WLS scintillator slab, and the WLS fibers were chosen. To place
|
||||
one of these volumes, simply create an instance of it with the appropriate
|
||||
rotation, translation, and mother volumes.
|
||||
|
||||
LXeMainVolume(G4RotationMatrix *pRot,
|
||||
const G4ThreeVector &tlate,
|
||||
G4LogicalVolume *pMotherLogical,
|
||||
G4bool pMany,
|
||||
G4int pCopyNo,
|
||||
LXeDetectorConstruction* c);
|
||||
|
||||
Also necessary are the pMany and pCopyNo variables with the same usage as in
|
||||
G4PVPlacement. Additionally, the detector construction must be passed to the
|
||||
main volume as a way to communicate the many parameters to the volume and its
|
||||
sub-volumes. The communication is done from the CopyValues() function which
|
||||
retrieves the information from the detector constructor.
|
||||
|
||||
Notably, the name and logical volume parameters are no longer part of the
|
||||
constructor. This is because they are both to be decided by the volume itself.
|
||||
The volume must specify its own name and a temporary logical volume. The
|
||||
constructor will then procede to define its logical volume in the normal way.
|
||||
Once complete, the logical volume can be assigned to the physical volume using
|
||||
the SetLogicalVolume() function.
|
||||
|
||||
To handle instances of the same type of volume, a new logical volume should not
|
||||
be defined for each one. Instead, the logical volume is kept as a static member
|
||||
and defined only once.
|
||||
|
||||
if (!housing_log || updated) {
|
||||
//...
|
||||
//Define logical volume
|
||||
//...
|
||||
}
|
||||
SetLogicalVolume(housing_log);
|
||||
|
||||
The updated variable is to signal that the volume needs to be updated and a new
|
||||
logical volume made.
|
||||
|
||||
---------------------------------
|
||||
Modifying the geometry at runtime
|
||||
---------------------------------
|
||||
|
||||
This example allows the user to modify the geometry definition at runtime. This
|
||||
is accomplished through LXeDetectorMessenger, a derived class of G4UImessenger.
|
||||
The commands it adds change variables stored in LXeDetectorConstructor that
|
||||
are used when constructing the geometry.
|
||||
|
||||
void LXeDetectorConstruction::UpdateGeometry(){
|
||||
// clean-up previous geometry
|
||||
G4SolidStore::GetInstance()->Clean();
|
||||
G4LogicalVolumeStore::GetInstance()->Clean();
|
||||
G4PhysicalVolumeStore::GetInstance()->Clean();
|
||||
|
||||
//define new one
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume(ConstructDetector());
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
}
|
||||
|
||||
----------------------
|
||||
PMT sensitive detector
|
||||
----------------------
|
||||
|
||||
The PMT sensitive detector cannot be triggered like a normal sensitive detector
|
||||
because the sensitive volume does not allow photons to pass through it. Rather,
|
||||
it detects them in the OpBoundary process based on an efficiency set on the
|
||||
skin of the volume.
|
||||
|
||||
|
||||
G4OpticalSurface* photocath_opsurf=
|
||||
new G4OpticalSurface("photocath_opsurf",glisur,polished,
|
||||
dielectric_metal);
|
||||
G4double photocath_EFF[num]={1.,1.};
|
||||
G4double photocath_REFL[num]={0.,0.};
|
||||
G4MaterialPropertiesTable* photocath_mt = new G4MaterialPropertiesTable();
|
||||
photocath_mt->AddProperty("EFFICIENCY",Ephoton,photocath_EFF,num);
|
||||
photocath_mt->AddProperty("REFLECTIVITY",Ephoton,photocath_REFL,num);
|
||||
photocath_opsurf->SetMaterialPropertiesTable(photocath_mt);
|
||||
new G4LogicalSkinSurface("photocath_surf",photocath_log,photocath_opsurf);
|
||||
|
||||
|
||||
A normal sensitive detector would have its ProcessHits
|
||||
function called for each step by a particle inside the volume. So, to record
|
||||
these hits with a sensitive detector we watched the status of the OpBoundary
|
||||
process from the stepping manager whenever a photon hit the sensitive volume
|
||||
of the pmt. If the status was 'Detection', we retrieve the sensitive detector
|
||||
from G4SDManager and call its ProcessHits function.
|
||||
|
||||
|
||||
boundaryStatus=boundary->GetStatus();
|
||||
//Check to see if the particle was actually at a boundary
|
||||
//Otherwise the boundary status may not be valid
|
||||
//Prior to Geant4.6.0-p1 this would not have been enough to check
|
||||
if(thePostPoint->GetStepStatus()==fGeomBoundary){
|
||||
switch(boundaryStatus){
|
||||
//...
|
||||
case Detection: //Note, this assumes that the volume causing detection
|
||||
//is the photocathode because it is the only one with
|
||||
//non-zero efficiency
|
||||
{
|
||||
//Trigger sensitive detector manually since photon is
|
||||
//absorbed but status was Detection
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
G4String sdName="/LXeDet/pmtSD";
|
||||
LXePMTSD* pmtSD = (LXePMTSD*)SDman
|
||||
->FindSensitiveDetector(sdName);
|
||||
if(pmtSD)
|
||||
pmtSD->ProcessHits_constStep(theStep,NULL);
|
||||
break;
|
||||
}
|
||||
//...
|
||||
}
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
Selectively drawing trajectories or highlighting volumes
|
||||
--------------------------------------------------------
|
||||
|
||||
In a simulation such as this one, where an average of 6000 trajectories are
|
||||
generated in a small space, there is little use in drawing all of them. There
|
||||
are two ways to select which ones to draw. The first of which is to decide
|
||||
while looping through the trajectory container which ones to draw and only call
|
||||
DrawTrajectory on the important ones. However, trajectories only contain a
|
||||
small portion of the information from the track it represents. This may not
|
||||
be enough to decide if a trajectory is worth drawing.
|
||||
|
||||
The alternative is to define your own trajectory class to store additional
|
||||
information to help decide if it should be drawn. To use your custom trajectory
|
||||
you must create it in the PreUserTrackingAction:
|
||||
|
||||
fpTrackingManager->SetTrajectory(new LXeTrajectory(aTrack));
|
||||
|
||||
Then at any point you can get access to the trajectory you can update the extra
|
||||
information within it. When it comes to drawing, you can then use this to
|
||||
decide if you want to call DrawTrajectory. Or you can call DrawTrajectory for
|
||||
all trajectories and have the logic decide how and if a trajectory should
|
||||
be drawn inside the DrawTrajectory function itself.
|
||||
|
||||
Selectively highlighting volumes is useful to show which volumes were hit. To
|
||||
do this, you simply need a pointer to the physical volume. With that, you can
|
||||
modify its vis attributes and instruct the vis manager to redraw the volume
|
||||
with the new vis attributes.
|
||||
|
||||
G4VisAttributes attribs(G4Colour(1.,0.,0.));
|
||||
attribs.SetForceSolid(true);
|
||||
G4RotationMatrix rot;
|
||||
if(physVol->GetRotation())//If a rotation is defined use it
|
||||
rot=*(physVol->GetRotation());
|
||||
G4Transform3D trans(rot,physVol->GetTranslation());//Create transform
|
||||
pVVisManager->Draw(*physVol,attribs,trans);//Draw it
|
||||
|
||||
In this case, it is done in Draw function of a PMT hit but it can be placed
|
||||
anywhere. The logic to decide if it should be drawn or not may be similar to
|
||||
the logic used in choosing which trajectories to draw.
|
||||
|
||||
See /LXe/detector/volumes/sphere in "UI commands" below for info on what
|
||||
trajectories are drawn in this simulation.
|
||||
|
||||
--------------------------
|
||||
Saving random engine seeds
|
||||
--------------------------
|
||||
|
||||
At times it may be necessary to review a particular event of interest. To do
|
||||
this without redoing an entire run, which may take a long time, you must store
|
||||
the random engine seed from the beginning of the event. The run manager
|
||||
has some functions that help in this task.
|
||||
|
||||
G4RunManager::SetRandomNumberStore(G4bool)
|
||||
|
||||
When set to true, this causes the run manager to write the seed for the
|
||||
beginning of the current run to CurrentRun.rndm and the current event to
|
||||
CurrentEvent.rndm. However, at the beginning of each event this file will be
|
||||
overwritten with the new event. To keep a copy for a particular event there is
|
||||
a function to copy this file to run###evt###.rndm.
|
||||
|
||||
G4RunManager::rndmSaveThisEvent()
|
||||
|
||||
This can be done for every event so you can review any event you like but this
|
||||
may be awkward for runs with very large numbers of events. Instead, implement
|
||||
some form of logic in EndOfEventAction to decide if the event is worth saving.
|
||||
If it is, then call rndmSaveThisEvent(). By default, these files are stored in
|
||||
the current working directory. There is a function to change this as well.
|
||||
Typically you would call that at the same time SetRandomNumberStore. The
|
||||
directory to save in must exist first. GEANT4 will not create it for you.
|
||||
|
||||
G4RunManager::SetRandomNumberStoreDir(G4String)
|
||||
|
||||
-----------
|
||||
UI commands
|
||||
-----------
|
||||
|
||||
Directories:
|
||||
/LXe/ - All custom commands belong below this directory
|
||||
/LXe/detector/ - Geometry related commands
|
||||
/LXe/detector/volumes/ - Commands to enable/disable volumes in the geometry
|
||||
|
||||
Commands:
|
||||
/LXe/saveThreshold <int, default = 4500>
|
||||
-Specifies a threshold for saving the random seed for an event. If the number
|
||||
of photons generated in an event is below this number then the random seed is
|
||||
saved to ./random/run###evt###.rndm. See "Saving random engine seeds".
|
||||
|
||||
/LXe/eventVerbose <int, default = 1>
|
||||
-Enables end of event verbose data to be printed. This includes information
|
||||
counted and calculated by the user action classes.
|
||||
|
||||
/LXe/pmtThreshold <int, default = 1>
|
||||
-Sets the PMT threshold in # of photons being detected by the PMT. PMTs below
|
||||
with fewer hits than the threshold will not count as being hit and will also
|
||||
not be highlighted at the end of the event.
|
||||
|
||||
/LXe/oneStepPrimaries <bool>
|
||||
-This causes primary particles to be killed after going only one step inside
|
||||
the scintillator volume. This is useful to view the photons generated during
|
||||
the initial conversion of the primary particle.
|
||||
|
||||
/LXe/forceDrawPhotons <bool>
|
||||
-Forces all optical photon trajectories to be drawn at the end of the event
|
||||
regardless of the scheme mentioned in /LXe/detector/volumes/sphere below.
|
||||
|
||||
/LXe/forceDrawNoPhotons <bool>
|
||||
-Forces all optical photon trajectories to NOT be drawn at the end of the
|
||||
event regardless of the scheme mentioned in /LXe/detector/volumes/sphere below.
|
||||
-If /LXe/forceDrawPhotons is set to true, this has no effect.
|
||||
|
||||
/LXe/detector/dimensions <double x y z> <unit, default = cm>
|
||||
-Sets the dimensions of the main scintillator volume.
|
||||
|
||||
/LXe/detector/housingThickness <double>
|
||||
-Sets the thickness of the housing surrounding the main detector volume.
|
||||
|
||||
/LXe/detector/pmtRadius <double> <unit, default = cm>
|
||||
-Sets the radius of the PMTs
|
||||
|
||||
/LXe/detector/nx
|
||||
/LXe/detector/ny
|
||||
/LXe/detector/nz
|
||||
-Sets the number of PMTs placed in a row along each axis.
|
||||
|
||||
/LXe/detector/reflectivity <double>
|
||||
-Sets the reflectivity of the inside of the aluminum housing. The geometry
|
||||
uses a default value of 1.00 for a fully reflective surface.
|
||||
|
||||
/LXe/detector/nfibers <int>
|
||||
-Sets the number of WLS fibers placed in the WLS scintillator slab. The
|
||||
geometry uses a default value of 15 fibers.
|
||||
|
||||
/LXe/detector/scintYieldFactor <double>
|
||||
-Sets the yield factor for the scintillation process. This is cumulative with
|
||||
the yield factor set on individual materials. Set to 0 to produce no
|
||||
scintillation photons.
|
||||
|
||||
/LXe/detector/defaults
|
||||
-Resets all detector values customizable with commands above to their defaults.
|
||||
|
||||
/LXe/detector/volumes/sphere <bool>
|
||||
-Enables/disables the sphere placed inside the main scintillator volume. When
|
||||
the sphere is enabled, only photons that hit the sphere and hit a PMT are
|
||||
drawn. If it is disabled, then all photons that hit PMTs are drawn.
|
||||
|
||||
/LXe/detector/volumes/wls <bool>
|
||||
-Enables/disables the WLS scintillator slab containing WLS fibers. By default
|
||||
this is not part of the geometry. Enabling it will place it behind the LXe
|
||||
scintillator volume.
|
||||
|
||||
/LXe/detector/volumes/lxe <bool>
|
||||
-Enables/disables the main LXe scintillator volume. By default this is part of
|
||||
the geometry.
|
||||
|
||||
@@ -35,10 +35,7 @@
|
||||
#define LXeHistoManager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4xml.hh"
|
||||
//#include "g4csv.hh"
|
||||
#include "G4AnalysisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -43,16 +43,15 @@ LXeHistoManager::LXeHistoManager()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
LXeHistoManager::~LXeHistoManager() { delete G4AnalysisManager::Instance(); }
|
||||
LXeHistoManager::~LXeHistoManager() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void LXeHistoManager::Book()
|
||||
{
|
||||
// Create or get analysis manager
|
||||
// The choice of analysis technology is done via selection of a namespace
|
||||
// in LXeHistoManager.hh
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
analysisManager->SetDefaultFileType("root");
|
||||
analysisManager->SetFileName(fFileName);
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
analysisManager->SetActivation(true); // enable inactivation of histograms
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
|
||||
///\file "optical/OpNovice/.README.txt"
|
||||
///\brief Example OpNovice README page
|
||||
|
||||
/*! \page ExampleOpNovice Example OpNovice
|
||||
|
||||
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
|
||||
|
||||
\section ExampleOpNovice_s1 main()
|
||||
|
||||
Define Random Number generator initial seed
|
||||
|
||||
\section ExampleOpNovice_s2 G4OpticalPhysics
|
||||
|
||||
The G4OpticalPhysics physics class is used. The messenger is the
|
||||
G4OpticalParametersMessenger class.
|
||||
|
||||
- Define particles; including - *** G4OpticalPhoton ***
|
||||
- Define processes; including
|
||||
- *** G4Cerenkov ***
|
||||
- *** G4Scintillation ***
|
||||
- *** G4OpAbsorption ***
|
||||
- *** G4OpRayleigh ***
|
||||
- *** G4OpBoundaryProcess ***
|
||||
|
||||
A messenger command allows to define interactively the
|
||||
verbose level and the maximum number of Cerenkov photons per step
|
||||
(see for instance OpNovice.in)
|
||||
|
||||
\section ExampleOpNovice_s3 G4VUserDetectorConstruction
|
||||
|
||||
- Define material: Air and Water
|
||||
- Define simple G4box geometry
|
||||
- *** add G4MaterialPropertiesTable to G4Material ***
|
||||
- *** define G4LogicalSurface(s) ***
|
||||
- *** define G4OpticalSurface ***
|
||||
- *** add G4MaterialPropertiesTable to G4OpticalSurface ***
|
||||
|
||||
alternatively the Configuration can be read from a gdml file.
|
||||
The provided gdml file NoviceExample.gdml corresponds to the detector
|
||||
defined in OpNoviceDetectorConstruction.
|
||||
|
||||
|
||||
\section ExampleOpNovice_s4 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)
|
||||
|
||||
\section ExampleOpNovice_s5 G4UserRunAction and G4Run
|
||||
|
||||
- Used to accumulate statistics.
|
||||
|
||||
\section ExampleOpNovice_s6 G4UserStackingAction and G4UserEventAction
|
||||
|
||||
Show how to count the number of secondary particles in an event
|
||||
|
||||
\section ExampleOpNovice_s7 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.
|
||||
|
||||
\section ExampleOpNovice_s8 How to start
|
||||
|
||||
- compile and link to generate an executable
|
||||
|
||||
This example handles the program arguments in a new way.
|
||||
It can be run with the following optional arguments:
|
||||
\verbatim
|
||||
$ OpNovice [-g gdmlfile] [-m macro ] [-u UIsession] [-t nThreads]
|
||||
\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 OpNovice in 'batch' mode from macro files
|
||||
\verbatim
|
||||
$ OpNovice -m OpNovice.in
|
||||
\endverbatim
|
||||
|
||||
- execute OpNovice in 'batch' mode from macro files using a gdml file
|
||||
to define the geometry
|
||||
$ OpNovice -g NoviceExample.gdml -m OpNovice.in
|
||||
|
||||
- execute OpNovice in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
$ OpNovice
|
||||
....
|
||||
Idle> type your commands. For instance:
|
||||
Idle> /control/execute optPhoton.mac
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
Macros
|
||||
------
|
||||
|
||||
The following macros are provided:
|
||||
|
||||
optPhoton.mac: Shoot optical photons with energy 3 eV
|
||||
OpNovice.in: Shoot positrons with energy 500 keV.
|
||||
gui.mac: Configure the graphical user interface.
|
||||
vis.mac: Configure visualization.
|
||||
|
||||
|
||||
|
||||
gdml files
|
||||
----------
|
||||
NoviceExample.gdml: example gdml file corresponding to
|
||||
OpNoviceDetectorConstruction
|
||||
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
project(OpNovice)
|
||||
#add_definitions(-DGEANT4_USE_GDML)
|
||||
add_compile_definitions(GEANT4_USE_GDML)
|
||||
|
||||
@@ -13,6 +13,20 @@ track of all tags.
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
October 15, 2021 D. Sawkey (OpNovice-V10-07-06)
|
||||
- remove OpNoviceGDMLDetectorMessenger: use OpNoviceDetectorMessenger instead
|
||||
- rename class variables to start with f
|
||||
- test user-defined material properties with exceptions instead of assert
|
||||
|
||||
October 7, 2021 D. Sawkey (OpNovice-V10-07-05)
|
||||
- OpNoviceDetectorConstruction - add tests of user-defined material
|
||||
properties; add one material property using C-style arrays (as a test)
|
||||
|
||||
July 19, 2021 V. Ivanchenko (OpNovice-V10-07-04)
|
||||
- OpNoviceDetectorConstruction - use modified interface to
|
||||
G4MaterialPropertiesTable with spline flag
|
||||
|
||||
June 9, 2021 H. Wenzel (OpNovice-V10-07-03)
|
||||
- add option to define detector via a gdml file
|
||||
- add outer world volume to avoid surfaces including world volume.
|
||||
|
||||
@@ -41,9 +41,10 @@
|
||||
// Author: Juliet Armstrong
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "OpNoviceDetectorConstruction.hh"
|
||||
#ifdef GEANT4_USE_GDML
|
||||
#include "OpNoviceGDMLDetectorConstruction.hh"
|
||||
# include "OpNoviceGDMLDetectorConstruction.hh"
|
||||
#endif
|
||||
#include "OpNoviceActionInitialization.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
@@ -56,122 +57,133 @@
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
namespace {
|
||||
|
||||
void PrintUsage() {
|
||||
G4cerr << " Usage: " << G4endl;
|
||||
namespace
|
||||
{
|
||||
void PrintUsage()
|
||||
{
|
||||
G4cerr << " Usage: " << G4endl;
|
||||
#ifdef GEANT4_USE_GDML
|
||||
G4cerr << " OpNovice [-g gdmlfile] [-m macro ] [-u UIsession] [-t nThreads] [-r seed] "
|
||||
<< G4endl;
|
||||
#else
|
||||
G4cerr << " OpNovice [-m macro ] [-u UIsession] [-t nThreads] [-r seed] "
|
||||
<< G4endl;
|
||||
G4cerr << " OpNovice [-g gdmlfile] [-m macro ] [-u UIsession] [-t "
|
||||
"nThreads] [-r seed] "
|
||||
<< G4endl;
|
||||
#else
|
||||
G4cerr << " OpNovice [-m macro ] [-u UIsession] [-t nThreads] [-r seed] "
|
||||
<< G4endl;
|
||||
#endif
|
||||
G4cerr << " note: -t option is available only for multi-threaded mode."
|
||||
<< G4endl;
|
||||
}
|
||||
} // namespace
|
||||
G4cerr << " note: -t option is available only for multi-threaded mode."
|
||||
<< G4endl;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
// Evaluate arguments
|
||||
//
|
||||
if (argc > 9) {
|
||||
PrintUsage();
|
||||
return 1;
|
||||
}
|
||||
#ifdef GEANT4_USE_GDML
|
||||
G4String gdmlfile = "";
|
||||
#endif
|
||||
G4String macro;
|
||||
G4String session;
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Evaluate arguments
|
||||
//
|
||||
if(argc > 9)
|
||||
{
|
||||
PrintUsage();
|
||||
return 1;
|
||||
}
|
||||
G4String gdmlfile = "";
|
||||
G4String macro;
|
||||
G4String session;
|
||||
#ifdef G4MULTITHREADED
|
||||
G4int nThreads = 0;
|
||||
G4int nThreads = 0;
|
||||
#endif
|
||||
|
||||
G4long myseed = 345354;
|
||||
for (G4int i = 1; i < argc; i = i + 2) {
|
||||
#ifdef GEANT4_USE_GDML
|
||||
if (G4String(argv[i]) == "-g") gdmlfile = argv[i + 1];
|
||||
else if (G4String(argv[i]) == "-m") macro = argv[i + 1];
|
||||
else if (G4String(argv[i]) == "-u") session = argv[i + 1];
|
||||
else if (G4String(argv[i]) == "-r") myseed = atoi(argv[i + 1]);
|
||||
#else
|
||||
if (G4String(argv[i]) == "-m") macro = argv[i + 1];
|
||||
else if (G4String(argv[i]) == "-u") session = argv[i + 1];
|
||||
else if (G4String(argv[i]) == "-r") myseed = atoi(argv[i + 1]);
|
||||
#endif
|
||||
G4long myseed = 345354;
|
||||
for(G4int i = 1; i < argc; i = i + 2)
|
||||
{
|
||||
if(G4String(argv[i]) == "-g")
|
||||
gdmlfile = argv[i + 1];
|
||||
else if(G4String(argv[i]) == "-m")
|
||||
macro = argv[i + 1];
|
||||
else if(G4String(argv[i]) == "-u")
|
||||
session = argv[i + 1];
|
||||
else if(G4String(argv[i]) == "-r")
|
||||
myseed = atoi(argv[i + 1]);
|
||||
#ifdef G4MULTITHREADED
|
||||
else if (G4String(argv[i]) == "-t") {
|
||||
nThreads = G4UIcommand::ConvertToInt(argv[i + 1]);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
PrintUsage();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Instantiate G4UIExecutive if interactive mode
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if (macro.size() == 0) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Construct the default run manager
|
||||
auto runManager = G4RunManagerFactory::CreateRunManager();
|
||||
#ifdef G4MULTITHREADED
|
||||
if (nThreads > 0)
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
#endif
|
||||
|
||||
// Seed the random number generator manually
|
||||
G4Random::setTheSeed(myseed);
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
// Detector construction
|
||||
#ifdef GEANT4_USE_GDML
|
||||
if (gdmlfile == "") {
|
||||
G4cout << "no gdml file specified" << G4endl;
|
||||
runManager->SetUserInitialization(new OpNoviceDetectorConstruction());
|
||||
} else {
|
||||
runManager->SetUserInitialization(new OpNoviceGDMLDetectorConstruction(gdmlfile));
|
||||
}
|
||||
#else
|
||||
runManager->SetUserInitialization(new OpNoviceDetectorConstruction());
|
||||
#endif
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->ReplacePhysics(new G4EmStandardPhysics_option4());
|
||||
G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
|
||||
physicsList->RegisterPhysics(opticalPhysics);
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
runManager->SetUserInitialization(new OpNoviceActionInitialization());
|
||||
|
||||
G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (macro.size()) {
|
||||
G4String command = "/control/execute ";
|
||||
UImanager->ApplyCommand(command + macro);
|
||||
} else // Define UI session for interactive mode
|
||||
else if(G4String(argv[i]) == "-t")
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
if (ui->IsGUI())
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
nThreads = G4UIcommand::ConvertToInt(argv[i + 1]);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
PrintUsage();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
// Instantiate G4UIExecutive if interactive mode
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if(macro.size() == 0)
|
||||
{
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
return 0;
|
||||
// Construct the default run manager
|
||||
auto runManager = G4RunManagerFactory::CreateRunManager();
|
||||
#ifdef G4MULTITHREADED
|
||||
if(nThreads > 0)
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
#endif
|
||||
|
||||
// Seed the random number generator manually
|
||||
G4Random::setTheSeed(myseed);
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
// Detector construction
|
||||
if(gdmlfile != "")
|
||||
{
|
||||
#ifdef GEANT4_USE_GDML
|
||||
runManager->SetUserInitialization(
|
||||
new OpNoviceGDMLDetectorConstruction(gdmlfile));
|
||||
#else
|
||||
G4cout << "Error! Input gdml file specified, but Geant4 wasn't" << G4endl
|
||||
<< "built with gdml support." << G4endl;
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
runManager->SetUserInitialization(new OpNoviceDetectorConstruction());
|
||||
}
|
||||
// Physics list
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->ReplacePhysics(new G4EmStandardPhysics_option4());
|
||||
G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
|
||||
physicsList->RegisterPhysics(opticalPhysics);
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
runManager->SetUserInitialization(new OpNoviceActionInitialization());
|
||||
|
||||
G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if(macro.size())
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
UImanager->ApplyCommand(command + macro);
|
||||
}
|
||||
else // Define UI session for interactive mode
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
if(ui->IsGUI())
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
/run/verbose 1
|
||||
/control/cout/ignoreThreadsExcept 0
|
||||
#
|
||||
/OpNovice/DetectorConstruction/enable_verbose false
|
||||
/OpNovice/DetectorConstruction/dumpgdml false
|
||||
/OpNovice/DetectorConstruction/enableVerbose true
|
||||
/OpNovice/DetectorConstruction/dumpGdml false
|
||||
/run/initialize
|
||||
#
|
||||
/gun/particle e+
|
||||
|
||||
+11012
-11042
File diff suppressed because it is too large
Load Diff
@@ -1,124 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
OpNovice
|
||||
--------
|
||||
|
||||
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 generator initial seed
|
||||
|
||||
G4Optical Physics
|
||||
-----------------
|
||||
|
||||
The G4OpticalPhysics physics class is used. The messenger is the
|
||||
G4OpticalParametersMessenger class.
|
||||
|
||||
==> define particles; including *** G4OpticalPhoton ***
|
||||
define processes; including *** G4Cerenkov ***
|
||||
*** G4Scintillation ***
|
||||
*** G4OpAbsorption ***
|
||||
*** G4OpRayleigh ***
|
||||
*** G4OpBoundaryProcess ***
|
||||
|
||||
==> A messenger command allows to define interactively the
|
||||
verbose level and the maximum number of Cerenkov photons per step
|
||||
(see for instance OpNovice.in)
|
||||
|
||||
G4VUserDetectorConstruction
|
||||
---------------------------
|
||||
|
||||
==> define material: Air and Water
|
||||
define simple G4box geometry
|
||||
*** add G4MaterialPropertiesTable to G4Material ***
|
||||
*** define G4LogicalSurface(s) ***
|
||||
*** define G4OpticalSurface ***
|
||||
*** add G4MaterialPropertiesTable to G4OpticalSurface ***
|
||||
|
||||
alternatively the Configuration can be read from a gdml file.
|
||||
The provided gdml file NoviceExample.gdml corresponds to the detector
|
||||
defined in OpNoviceDetectorConstruction.
|
||||
|
||||
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)
|
||||
|
||||
G4UserRunAction and G4Run
|
||||
-------------------------
|
||||
|
||||
Used to accumulate statistics.
|
||||
|
||||
G4UserStackingAction and G4UserEventAction
|
||||
------------------------------------------
|
||||
|
||||
==> show how to count the number of secondary particles in an event
|
||||
|
||||
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
|
||||
|
||||
This example handles the program arguments in a new way.
|
||||
It can be run with the following optional optionaarguments:
|
||||
$ OpNovice [-g gdmlfile] [-m macro ] [-u UIsession] [-t nThreads]
|
||||
|
||||
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 OpNovice in 'batch' mode from macro files
|
||||
$ OpNovice -m OpNovice.in
|
||||
|
||||
- execute OpNovice in 'batch' mode from macro files using a gdml file
|
||||
to define the geometry
|
||||
$ OpNovice -g NoviceExample.gdml -m OpNovice.in
|
||||
|
||||
- execute OpNovice in 'interactive mode' with visualization
|
||||
$ OpNovice
|
||||
....
|
||||
Idle> type your commands. For instance:
|
||||
Idle> /control/execute optPhoton.mac
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
Macros
|
||||
------
|
||||
|
||||
The following macros are provided:
|
||||
|
||||
optPhoton.mac: Shoot optical photons with energy 3 eV
|
||||
OpNovice.in: Shoot positrons with energy 500 keV.
|
||||
gui.mac: Configure the graphical user interface.
|
||||
vis.mac: Configure visualization.ls
|
||||
|
||||
|
||||
gdml files
|
||||
----------
|
||||
NoviceExample.gdml: example gdml file corresponding to
|
||||
OpNoviceDetectorConstruction
|
||||
@@ -26,9 +26,6 @@
|
||||
/// \file OpNovice/include/OpNoviceDetectorConstruction.hh
|
||||
/// \brief Definition of the OpNoviceDetectorConstruction class
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef OpNoviceDetectorConstruction_h
|
||||
@@ -38,25 +35,33 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
class OpNoviceDetectorConstructionMessenger;
|
||||
|
||||
class OpNoviceDetectorMessenger;
|
||||
|
||||
class OpNoviceDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
OpNoviceDetectorConstruction();
|
||||
~OpNoviceDetectorConstruction();
|
||||
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void SetDumpgdml(G4bool dumpgdml);
|
||||
G4bool IsDumpgdml() const;
|
||||
void SetDumpGdml(G4bool);
|
||||
G4bool IsDumpGdml() const;
|
||||
void SetVerbose(G4bool verbose);
|
||||
G4bool IsVerbose() const;
|
||||
void SetDumpgdmlFile(G4String DumpgdmlFile);
|
||||
G4String GetDumpgdmlFile() const;
|
||||
|
||||
private:
|
||||
void SetDumpGdmlFile(G4String);
|
||||
G4String GetDumpGdmlFile() const;
|
||||
|
||||
private:
|
||||
void PrintError(G4String);
|
||||
|
||||
OpNoviceDetectorMessenger* fDetectorMessenger;
|
||||
G4String fDumpGdmlFileName;
|
||||
|
||||
G4double fWorld_x;
|
||||
G4double fWorld_y;
|
||||
G4double fWorld_z;
|
||||
|
||||
|
||||
G4double fExpHall_x;
|
||||
G4double fExpHall_y;
|
||||
G4double fExpHall_z;
|
||||
@@ -69,11 +74,8 @@ class OpNoviceDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4double fBubble_y;
|
||||
G4double fBubble_z;
|
||||
|
||||
G4String DumpgdmlFile;
|
||||
G4bool verbose;
|
||||
G4bool dumpgdml;
|
||||
|
||||
OpNoviceDetectorConstructionMessenger* fDetectorMessenger;
|
||||
G4bool fVerbose;
|
||||
G4bool fDumpGdml;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
+13
-15
@@ -23,39 +23,37 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file OpNovice/include/OpNoviceDetectorConstructionMessenger.hh
|
||||
/// \brief Definition of the OpNoviceDetectorConstructionMessenger class
|
||||
/// \file OpNovice/include/OpNoviceDetectorMessenger.hh
|
||||
/// \brief Definition of the OpNoviceDetectorMessenger class
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef OpNoviceDetectorConstructionMessenger_h
|
||||
#define OpNoviceDetectorConstructionMessenger_h 1
|
||||
#ifndef OpNoviceDetectorMessenger_h
|
||||
#define OpNoviceDetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class OpNoviceDetectorConstruction;
|
||||
class G4VUserDetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class OpNoviceDetectorConstructionMessenger : public G4UImessenger {
|
||||
class OpNoviceDetectorMessenger : public G4UImessenger {
|
||||
public:
|
||||
OpNoviceDetectorConstructionMessenger(OpNoviceDetectorConstruction*);
|
||||
~OpNoviceDetectorConstructionMessenger();
|
||||
OpNoviceDetectorMessenger(G4VUserDetectorConstruction*);
|
||||
~OpNoviceDetectorMessenger();
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
OpNoviceDetectorConstruction* fOpNoviceDetCon;
|
||||
G4VUserDetectorConstruction* fOpNoviceDetCon;
|
||||
G4UIdirectory* fDetConDir;
|
||||
G4UIcmdWithABool* fverboseCmd;
|
||||
G4UIcmdWithABool* fdumpGdmlCmd;
|
||||
G4UIcmdWithAString* fdumpGdmlFileNameCmd;
|
||||
G4UIcmdWithABool* fVerboseCmd;
|
||||
G4UIcmdWithABool* fDumpGdmlCmd;
|
||||
G4UIcmdWithAString* fDumpGdmlFileNameCmd;
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#endif
|
||||
@@ -25,37 +25,42 @@
|
||||
//
|
||||
#ifndef OpNoviceGDMLDetectorConstruction_h
|
||||
#define OpNoviceGDMLDetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
class G4GDMLParser;
|
||||
class OpNoviceGDMLDetectorConstructionMessenger;
|
||||
class OpNoviceDetectorMessenger;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class OpNoviceGDMLDetectorConstruction : public G4VUserDetectorConstruction {
|
||||
public:
|
||||
OpNoviceGDMLDetectorConstruction(G4String fname);
|
||||
virtual ~OpNoviceGDMLDetectorConstruction();
|
||||
void ReadGDML();
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
void UpdateGeometry();
|
||||
void SetDumpgdml(G4bool fdumpgdml);
|
||||
G4bool IsDumpgdml() const;
|
||||
void SetVerbose(G4bool fverbose);
|
||||
G4bool IsVerbose() const;
|
||||
void SetDumpgdmlFile(G4String fDumpgdmlFile);
|
||||
G4String GetDumpgdmlFile() const;
|
||||
class OpNoviceGDMLDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
OpNoviceGDMLDetectorConstruction(G4String fname);
|
||||
virtual ~OpNoviceGDMLDetectorConstruction();
|
||||
|
||||
private:
|
||||
OpNoviceGDMLDetectorConstruction & operator=(const OpNoviceGDMLDetectorConstruction &right);
|
||||
OpNoviceGDMLDetectorConstruction(const OpNoviceGDMLDetectorConstruction&);
|
||||
G4GDMLParser *parser;
|
||||
G4String gdmlFile;
|
||||
//
|
||||
G4String fDumpgdmlFile;
|
||||
G4bool fverbose;
|
||||
G4bool fdumpgdml;
|
||||
OpNoviceGDMLDetectorConstructionMessenger* fDetectorMessenger;
|
||||
void ReadGDML();
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
void UpdateGeometry();
|
||||
void SetDumpGdml(G4bool);
|
||||
G4bool IsDumpGdml() const;
|
||||
void SetVerbose(G4bool fverbose);
|
||||
G4bool IsVerbose() const;
|
||||
void SetDumpGdmlFile(G4String fDumpGdmlFile);
|
||||
G4String GetDumpGdmlFileName() const;
|
||||
|
||||
private:
|
||||
OpNoviceGDMLDetectorConstruction& operator=(
|
||||
const OpNoviceGDMLDetectorConstruction& right);
|
||||
OpNoviceGDMLDetectorConstruction(const OpNoviceGDMLDetectorConstruction&);
|
||||
OpNoviceDetectorMessenger* fDetectorMessenger;
|
||||
G4GDMLParser* fParser;
|
||||
|
||||
G4String fGdmlFile;
|
||||
G4String fDumpGdmlFileName;
|
||||
G4bool fVerbose;
|
||||
G4bool fDumpGdml;
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
#endif
|
||||
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file OpNovice/include/OpNoviceGDMLDetectorConstructionMessenger.hh
|
||||
/// \brief Definition of the OpNoviceGDMLDetectorConstructionMessenger class
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#ifndef OpNoviceGDMLDetectorConstructionMessenger_h
|
||||
#define OpNoviceGDMLDetectorConstructionMessenger_h 1
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
class OpNoviceGDMLDetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithAString;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
class OpNoviceGDMLDetectorConstructionMessenger : public G4UImessenger {
|
||||
public:
|
||||
OpNoviceGDMLDetectorConstructionMessenger(OpNoviceGDMLDetectorConstruction*);
|
||||
~OpNoviceGDMLDetectorConstructionMessenger();
|
||||
virtual void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
OpNoviceGDMLDetectorConstruction* fOpNoviceDetCon;
|
||||
G4UIdirectory* fDetConDir;
|
||||
G4UIcmdWithABool* verboseCmd;
|
||||
G4UIcmdWithABool* dumpGdmlCmd;
|
||||
G4UIcmdWithAString* dumpGdmlFileNameCmd;
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#endif
|
||||
@@ -83,6 +83,8 @@ class OpNoviceRun : public G4Run
|
||||
void EndOfRun();
|
||||
|
||||
private:
|
||||
G4ParticleDefinition* fParticle;
|
||||
|
||||
G4double fCerenkovCounter;
|
||||
G4double fCerenkov2;
|
||||
G4double fScintillationCounter;
|
||||
@@ -95,8 +97,6 @@ class OpNoviceRun : public G4Run
|
||||
G4double fMie2;
|
||||
G4double fBoundaryCounter;
|
||||
G4double fBoundary2;
|
||||
|
||||
G4ParticleDefinition* fParticle;
|
||||
G4double fEnergy;
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
/// \file OpNovice/src/OpNoviceDetectorConstruction.cc
|
||||
/// \brief Implementation of the OpNoviceDetectorConstruction class
|
||||
//
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "OpNoviceDetectorConstruction.hh"
|
||||
#include "OpNoviceDetectorConstructionMessenger.hh"
|
||||
#include "OpNoviceDetectorMessenger.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4GDMLParser.hh"
|
||||
#include "G4LogicalBorderSurface.hh"
|
||||
#include "G4LogicalSkinSurface.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
@@ -42,17 +42,16 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4GDMLParser.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
OpNoviceDetectorConstruction::OpNoviceDetectorConstruction()
|
||||
: G4VUserDetectorConstruction()
|
||||
{
|
||||
DumpgdmlFile = "OpNovice_dump.gdml";
|
||||
verbose = false;
|
||||
dumpgdml = false;
|
||||
fDumpGdmlFileName = "OpNovice_dump.gdml";
|
||||
fVerbose = false;
|
||||
fDumpGdml = false;
|
||||
// create a messenger for this class
|
||||
fDetectorMessenger = new OpNoviceDetectorConstructionMessenger(this);
|
||||
fDetectorMessenger = new OpNoviceDetectorMessenger(this);
|
||||
fWorld_x = fWorld_y = fWorld_z = 15.0 * m;
|
||||
fExpHall_x = fExpHall_y = fExpHall_z = 10.0 * m;
|
||||
fTank_x = fTank_y = fTank_z = 5.0 * m;
|
||||
@@ -60,7 +59,10 @@ OpNoviceDetectorConstruction::OpNoviceDetectorConstruction()
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
OpNoviceDetectorConstruction::~OpNoviceDetectorConstruction() {}
|
||||
OpNoviceDetectorConstruction::~OpNoviceDetectorConstruction()
|
||||
{
|
||||
delete fDetectorMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
@@ -69,21 +71,22 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
// ------------- Materials -------------
|
||||
G4double a, z, density;
|
||||
G4int nelements;
|
||||
|
||||
// Air
|
||||
//
|
||||
G4Element* N = new G4Element("Nitrogen", "N", z = 7, a = 14.01 * g / mole);
|
||||
G4Element* O = new G4Element("Oxygen", "O", z = 8, a = 16.00 * g / mole);
|
||||
G4Material* air =
|
||||
new G4Material("Air", density = 1.29 * mg / cm3, nelements = 2);
|
||||
air->AddElement(N, 70. * perCent);
|
||||
air->AddElement(O, 30. * perCent);
|
||||
// Water
|
||||
//
|
||||
// Water
|
||||
G4Element* H = new G4Element("Hydrogen", "H", z = 1, a = 1.01 * g / mole);
|
||||
G4Material* water =
|
||||
new G4Material("Water", density = 1.0 * g / cm3, nelements = 2);
|
||||
water->AddElement(H, 2);
|
||||
water->AddElement(O, 1);
|
||||
|
||||
// ------------ Generate & Add Material Properties Table ------------
|
||||
//
|
||||
std::vector<G4double> photonEnergy = {
|
||||
@@ -94,8 +97,8 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
3.353 * eV, 3.446 * eV, 3.545 * eV, 3.649 * eV, 3.760 * eV, 3.877 * eV,
|
||||
4.002 * eV, 4.136 * eV
|
||||
};
|
||||
|
||||
// Water
|
||||
//
|
||||
std::vector<G4double> refractiveIndex1 = {
|
||||
1.3435, 1.344, 1.3445, 1.345, 1.3455, 1.346, 1.3465, 1.347,
|
||||
1.3475, 1.348, 1.3485, 1.3492, 1.35, 1.3505, 1.351, 1.3518,
|
||||
@@ -110,21 +113,25 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
30.000 * m, 28.500 * m, 27.000 * m, 24.500 * m, 22.000 * m, 19.500 * m,
|
||||
17.500 * m, 14.500 * m
|
||||
};
|
||||
std::vector<G4double> scintilFast = {
|
||||
1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00
|
||||
};
|
||||
|
||||
// Material properties can be added as arrays. However, in this case it is
|
||||
// up to the user to make sure both arrays have the same number of elements.
|
||||
G4double scintilFastArray[]{ 1.0, 1.0 };
|
||||
G4double energyArray[]{ 2.034 * eV, 4.136 * eV };
|
||||
G4int lenArray = 2;
|
||||
|
||||
std::vector<G4double> scintilSlow = {
|
||||
0.01, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00, 8.00, 9.00, 8.00,
|
||||
7.00, 6.00, 4.00, 3.00, 2.00, 1.00, 0.01, 1.00, 2.00, 3.00, 4.00,
|
||||
5.00, 6.00, 7.00, 8.00, 9.00, 8.00, 7.00, 6.00, 5.00, 4.00
|
||||
};
|
||||
|
||||
G4MaterialPropertiesTable* myMPT1 = new G4MaterialPropertiesTable();
|
||||
|
||||
// Values can be added to the material property table individually.
|
||||
// Check that group velocity is calculated from RINDEX
|
||||
myMPT1->AddProperty("RINDEX", &photonEnergy[0], &refractiveIndex1[0], 1)
|
||||
->SetSpline(true);
|
||||
myMPT1->AddProperty("RINDEX", &photonEnergy[0], &refractiveIndex1[0], true,
|
||||
true);
|
||||
for(size_t i = 1; i < photonEnergy.size(); ++i)
|
||||
{
|
||||
myMPT1->AddEntry("RINDEX", photonEnergy[i], refractiveIndex1[i]);
|
||||
@@ -138,11 +145,13 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
G4Exception("OpNovice::OpNoviceDetectorConstruction", "OpNovice001",
|
||||
FatalException, ed);
|
||||
}
|
||||
myMPT1->AddProperty("ABSLENGTH", photonEnergy, absorption)->SetSpline(true);
|
||||
myMPT1->AddProperty("SCINTILLATIONCOMPONENT1", photonEnergy, scintilFast)
|
||||
->SetSpline(true);
|
||||
myMPT1->AddProperty("SCINTILLATIONCOMPONENT2", photonEnergy, scintilSlow)
|
||||
->SetSpline(true);
|
||||
|
||||
myMPT1->AddProperty("ABSLENGTH", photonEnergy, absorption, false, true);
|
||||
// adding property with a C-style array
|
||||
myMPT1->AddProperty("SCINTILLATIONCOMPONENT1", energyArray, scintilFastArray,
|
||||
lenArray, false, true);
|
||||
myMPT1->AddProperty("SCINTILLATIONCOMPONENT2", photonEnergy, scintilSlow,
|
||||
false, true);
|
||||
myMPT1->AddConstProperty("SCINTILLATIONYIELD", 50. / MeV);
|
||||
myMPT1->AddConstProperty("RESOLUTIONSCALE", 1.0);
|
||||
myMPT1->AddConstProperty("SCINTILLATIONTIMECONSTANT1", 1. * ns);
|
||||
@@ -184,7 +193,7 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
// gforward, gbackward, forward backward ratio
|
||||
G4double mie_water_const[3] = { 0.99, 0.99, 0.8 };
|
||||
|
||||
myMPT1->AddProperty("MIEHG", energy_water, mie_water)->SetSpline(true);
|
||||
myMPT1->AddProperty("MIEHG", energy_water, mie_water, false, true);
|
||||
myMPT1->AddConstProperty("MIEHG_FORWARD", mie_water_const[0]);
|
||||
myMPT1->AddConstProperty("MIEHG_BACKWARD", mie_water_const[1]);
|
||||
myMPT1->AddConstProperty("MIEHG_FORWARD_RATIO", mie_water_const[2]);
|
||||
@@ -198,12 +207,11 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
water->GetIonisation()->SetBirksConstant(0.126 * mm / MeV);
|
||||
|
||||
// Air
|
||||
//
|
||||
std::vector<G4double> refractiveIndex2 = {
|
||||
1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
|
||||
1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00
|
||||
};
|
||||
std::vector<G4double> refractiveIndex2 = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
||||
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
||||
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
||||
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
|
||||
1.0, 1.0, 1.0, 1.0 };
|
||||
|
||||
G4MaterialPropertiesTable* myMPT2 = new G4MaterialPropertiesTable();
|
||||
myMPT2->AddProperty("RINDEX", photonEnergy, refractiveIndex2);
|
||||
@@ -221,30 +229,31 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
new G4LogicalVolume(world_box, air, "World", 0, 0, 0);
|
||||
G4VPhysicalVolume* world_phys = new G4PVPlacement(
|
||||
0, G4ThreeVector(), world_log, "world", 0, false, 0, checkOverlaps);
|
||||
|
||||
// The experimental Hall
|
||||
//
|
||||
G4Box* expHall_box = new G4Box("expHall", fExpHall_x, fExpHall_y, fExpHall_z);
|
||||
G4LogicalVolume* expHall_log =
|
||||
new G4LogicalVolume(expHall_box, air, "expHall", 0, 0, 0);
|
||||
G4VPhysicalVolume* expHall_phys = new G4PVPlacement(
|
||||
0, G4ThreeVector(), expHall_log, "expHall", world_log, false, 0);
|
||||
|
||||
// The Water Tank
|
||||
//
|
||||
G4Box* waterTank_box = new G4Box("Tank", fTank_x, fTank_y, fTank_z);
|
||||
G4LogicalVolume* waterTank_log =
|
||||
new G4LogicalVolume(waterTank_box, water, "Tank", 0, 0, 0);
|
||||
G4VPhysicalVolume* waterTank_phys = new G4PVPlacement(
|
||||
0, G4ThreeVector(), waterTank_log, "Tank", expHall_log, false, 0);
|
||||
|
||||
// The Air Bubble
|
||||
//
|
||||
G4Box* bubbleAir_box = new G4Box("Bubble", fBubble_x, fBubble_y, fBubble_z);
|
||||
G4LogicalVolume* bubbleAir_log =
|
||||
new G4LogicalVolume(bubbleAir_box, air, "Bubble", 0, 0, 0);
|
||||
new G4PVPlacement(0, G4ThreeVector(0, 2.5 * m, 0), bubbleAir_log, "Bubble",
|
||||
waterTank_log, false, 0);
|
||||
|
||||
// ------------- Surfaces --------------
|
||||
|
||||
// Water Tank
|
||||
//
|
||||
G4OpticalSurface* opWaterSurface = new G4OpticalSurface("WaterSurface");
|
||||
opWaterSurface->SetType(dielectric_LUTDAVIS);
|
||||
opWaterSurface->SetFinish(Rough_LUT);
|
||||
@@ -260,7 +269,6 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
opticalSurface->DumpInfo();
|
||||
|
||||
// Air Bubble
|
||||
//
|
||||
G4OpticalSurface* opAirSurface = new G4OpticalSurface("AirSurface");
|
||||
opAirSurface->SetType(dielectric_dielectric);
|
||||
opAirSurface->SetFinish(polished);
|
||||
@@ -286,43 +294,113 @@ G4VPhysicalVolume* OpNoviceDetectorConstruction::Construct()
|
||||
|
||||
myST2->AddProperty("REFLECTIVITY", ephoton, reflectivity);
|
||||
myST2->AddProperty("EFFICIENCY", ephoton, efficiency);
|
||||
if(verbose)
|
||||
if(fVerbose)
|
||||
{
|
||||
G4cout << "Air Surface G4MaterialPropertiesTable:" << G4endl;
|
||||
myST2->DumpTable();
|
||||
}
|
||||
opAirSurface->SetMaterialPropertiesTable(myST2);
|
||||
|
||||
if(dumpgdml)
|
||||
if(fDumpGdml)
|
||||
{
|
||||
G4GDMLParser* parser = new G4GDMLParser();
|
||||
parser->Write(DumpgdmlFile, world_phys);
|
||||
parser->Write(fDumpGdmlFileName, world_phys);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// test user-defined properties
|
||||
G4String ed;
|
||||
if(myMPT1->GetProperty("USERDEFINED") != nullptr)
|
||||
{
|
||||
ed = "USERDEFINED != nullptr";
|
||||
PrintError(ed);
|
||||
}
|
||||
myMPT1->AddProperty("USERDEFINED", energy_water, mie_water, true, true);
|
||||
if(myMPT1->GetProperty("USERDEFINED") == nullptr)
|
||||
{
|
||||
ed = "USERDEFINED == nullptr";
|
||||
PrintError(ed);
|
||||
}
|
||||
[[maybe_unused]] G4int index_userdefined = -1;
|
||||
if(myMPT1->GetProperty("USERDEFINED") != nullptr)
|
||||
{
|
||||
index_userdefined = myMPT1->GetPropertyIndex("USERDEFINED");
|
||||
}
|
||||
if(!(index_userdefined >= 0 &&
|
||||
index_userdefined <
|
||||
(G4int) myMPT1->GetMaterialPropertyNames().size()))
|
||||
{
|
||||
ed = "USERDEFINED index out of range";
|
||||
PrintError(ed);
|
||||
}
|
||||
myMPT1->RemoveProperty("USERDEFINED");
|
||||
if(myMPT1->GetProperty("USERDEFINED") != nullptr)
|
||||
{
|
||||
ed = "USERDEFINED != nullptr at end";
|
||||
PrintError(ed);
|
||||
}
|
||||
|
||||
if(myMPT1->ConstPropertyExists("USERDEFINEDCONST") == true)
|
||||
{
|
||||
ed = "ConstProperty USERDEFINEDCONST already exists.";
|
||||
PrintError(ed);
|
||||
}
|
||||
myMPT1->AddConstProperty("USERDEFINEDCONST", 3.14, true);
|
||||
if(myMPT1->ConstPropertyExists("USERDEFINEDCONST") == false)
|
||||
{
|
||||
ed = "ConstProperty USERDEFINEDCONST doesn't exist.";
|
||||
PrintError(ed);
|
||||
}
|
||||
[[maybe_unused]] G4int index_pi = -1;
|
||||
if(myMPT1->ConstPropertyExists("USERDEFINEDCONST") == true)
|
||||
{
|
||||
index_pi = myMPT1->GetConstPropertyIndex("USERDEFINEDCONST");
|
||||
}
|
||||
if (!(index_pi >= 0 &&
|
||||
index_pi < (G4int) myMPT1->GetMaterialConstPropertyNames().size()))
|
||||
{
|
||||
ed = "ConstProperty USERDEFINEDCONST index out of range.";
|
||||
PrintError(ed);
|
||||
}
|
||||
myMPT1->RemoveConstProperty("USERDEFINEDCONST");
|
||||
if (myMPT1->ConstPropertyExists("USERDEFINEDCONST") == true)
|
||||
{
|
||||
ed = "ConstProperty USERDEFINEDCONST still exists.";
|
||||
PrintError(ed);
|
||||
}
|
||||
// done testing user-defined properties
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
return world_phys;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceDetectorConstruction::SetDumpGdml(G4bool val) { fDumpGdml = val; }
|
||||
|
||||
void OpNoviceDetectorConstruction::SetDumpgdml(G4bool dumpgdml1)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4bool OpNoviceDetectorConstruction::IsDumpGdml() const { return fDumpGdml; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceDetectorConstruction::SetVerbose(G4bool val) { fVerbose = val; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4bool OpNoviceDetectorConstruction::IsVerbose() const { return fVerbose; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceDetectorConstruction::SetDumpGdmlFile(G4String filename)
|
||||
{
|
||||
this->dumpgdml = dumpgdml1;
|
||||
fDumpGdmlFileName = filename;
|
||||
}
|
||||
|
||||
G4bool OpNoviceDetectorConstruction::IsDumpgdml() const { return dumpgdml; }
|
||||
|
||||
void OpNoviceDetectorConstruction::SetVerbose(G4bool verbose1)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4String OpNoviceDetectorConstruction::GetDumpGdmlFile() const
|
||||
{
|
||||
this->verbose = verbose1;
|
||||
return fDumpGdmlFileName;
|
||||
}
|
||||
|
||||
G4bool OpNoviceDetectorConstruction::IsVerbose() const { return verbose; }
|
||||
|
||||
void OpNoviceDetectorConstruction::SetDumpgdmlFile(G4String DumpgdmlFile1)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceDetectorConstruction::PrintError(G4String ed)
|
||||
{
|
||||
this->DumpgdmlFile = DumpgdmlFile1;
|
||||
}
|
||||
|
||||
G4String OpNoviceDetectorConstruction::GetDumpgdmlFile() const
|
||||
{
|
||||
return DumpgdmlFile;
|
||||
G4Exception("OpNoviceDetectorConstruction:MaterialProperty test", "op001",
|
||||
FatalException, ed);
|
||||
}
|
||||
|
||||
+51
-37
@@ -23,66 +23,80 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Geant4 headers
|
||||
|
||||
#include "OpNoviceDetectorMessenger.hh"
|
||||
#include "OpNoviceDetectorConstruction.hh"
|
||||
#include "OpNoviceGDMLDetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
// project headers
|
||||
#include "OpNoviceDetectorConstructionMessenger.hh"
|
||||
#include "OpNoviceDetectorConstruction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
OpNoviceDetectorConstructionMessenger::OpNoviceDetectorConstructionMessenger(
|
||||
OpNoviceDetectorConstruction* detcon)
|
||||
OpNoviceDetectorMessenger::OpNoviceDetectorMessenger(
|
||||
G4VUserDetectorConstruction* detcon)
|
||||
: G4UImessenger()
|
||||
, fOpNoviceDetCon(detcon)
|
||||
{
|
||||
fDetConDir = new G4UIdirectory("/OpNovice/DetectorConstruction/");
|
||||
fDetConDir->SetGuidance("Configuring Detector Construction");
|
||||
//
|
||||
fverboseCmd =
|
||||
new G4UIcmdWithABool("/OpNovice/DetectorConstruction/enable_verbose", this);
|
||||
fverboseCmd->SetGuidance("Set flag for enabling verbose diagnostic printout");
|
||||
fverboseCmd->SetParameterName("enable_verbose", false);
|
||||
fverboseCmd->SetDefaultValue(false);
|
||||
fverboseCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fdumpGdmlCmd =
|
||||
new G4UIcmdWithABool("/OpNovice/DetectorConstruction/dumpgdml", this);
|
||||
fdumpGdmlCmd->SetGuidance(
|
||||
fVerboseCmd =
|
||||
new G4UIcmdWithABool("/OpNovice/DetectorConstruction/enableVerbose", this);
|
||||
fVerboseCmd->SetGuidance("Set flag for enabling verbose diagnostic printout");
|
||||
fVerboseCmd->SetDefaultValue(false);
|
||||
fVerboseCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fDumpGdmlCmd =
|
||||
new G4UIcmdWithABool("/OpNovice/DetectorConstruction/dumpGdml", this);
|
||||
fDumpGdmlCmd->SetGuidance(
|
||||
"Set flag for enabling dumping the detector to a gdml file");
|
||||
fdumpGdmlCmd->SetParameterName("dumpgdml", false);
|
||||
fdumpGdmlCmd->SetDefaultValue(false);
|
||||
fdumpGdmlCmd->AvailableForStates(G4State_PreInit);
|
||||
fDumpGdmlCmd->SetDefaultValue(false);
|
||||
fDumpGdmlCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
fdumpGdmlFileNameCmd = new G4UIcmdWithAString(
|
||||
"/OpNovice/DetectorConstruction/DumpGDMLFileName", this);
|
||||
fdumpGdmlFileNameCmd->SetGuidance("Enter file name to dump gdml file ");
|
||||
fdumpGdmlFileNameCmd->SetParameterName("GDMLFileName", true);
|
||||
fdumpGdmlFileNameCmd->SetDefaultValue("OpNovice_dump.gdml");
|
||||
fdumpGdmlFileNameCmd->AvailableForStates(G4State_PreInit);
|
||||
fDumpGdmlFileNameCmd = new G4UIcmdWithAString(
|
||||
"/OpNovice/DetectorConstruction/dumpGdmlFileName", this);
|
||||
fDumpGdmlFileNameCmd->SetGuidance("Enter file name to dump gdml file ");
|
||||
fDumpGdmlFileNameCmd->SetDefaultValue("OpNovice_dump.gdml");
|
||||
fDumpGdmlFileNameCmd->AvailableForStates(G4State_PreInit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
OpNoviceDetectorConstructionMessenger::~OpNoviceDetectorConstructionMessenger()
|
||||
OpNoviceDetectorMessenger::~OpNoviceDetectorMessenger()
|
||||
{
|
||||
delete fDetConDir;
|
||||
delete fverboseCmd;
|
||||
delete fdumpGdmlCmd;
|
||||
delete fdumpGdmlFileNameCmd;
|
||||
delete fVerboseCmd;
|
||||
delete fDumpGdmlCmd;
|
||||
delete fDumpGdmlFileNameCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void OpNoviceDetectorConstructionMessenger::SetNewValue(G4UIcommand* command,
|
||||
G4String newValue)
|
||||
void OpNoviceDetectorMessenger::SetNewValue(G4UIcommand* command,
|
||||
G4String newValue)
|
||||
{
|
||||
if(command == fverboseCmd)
|
||||
fOpNoviceDetCon->SetVerbose(fverboseCmd->GetNewBoolValue(newValue));
|
||||
if(command == fdumpGdmlCmd)
|
||||
fOpNoviceDetCon->SetDumpgdml(fdumpGdmlCmd->GetNewBoolValue(newValue));
|
||||
if(command == fdumpGdmlFileNameCmd)
|
||||
fOpNoviceDetCon->SetDumpgdmlFile(newValue);
|
||||
OpNoviceDetectorConstruction* dc1 =
|
||||
dynamic_cast<OpNoviceDetectorConstruction*>(fOpNoviceDetCon);
|
||||
if(dc1 != nullptr)
|
||||
{
|
||||
if(command == fVerboseCmd)
|
||||
dc1->SetVerbose(fVerboseCmd->GetNewBoolValue(newValue));
|
||||
if(command == fDumpGdmlCmd)
|
||||
dc1->SetDumpGdml(fDumpGdmlCmd->GetNewBoolValue(newValue));
|
||||
if(command == fDumpGdmlFileNameCmd)
|
||||
dc1->SetDumpGdmlFile(newValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
OpNoviceGDMLDetectorConstruction* dc2 =
|
||||
dynamic_cast<OpNoviceGDMLDetectorConstruction*>(fOpNoviceDetCon);
|
||||
if(command == fVerboseCmd)
|
||||
dc2->SetVerbose(fVerboseCmd->GetNewBoolValue(newValue));
|
||||
if(command == fDumpGdmlCmd)
|
||||
dc2->SetDumpGdml(fDumpGdmlCmd->GetNewBoolValue(newValue));
|
||||
if(command == fDumpGdmlFileNameCmd)
|
||||
dc2->SetDumpGdmlFile(newValue);
|
||||
}
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -22,96 +22,118 @@
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Geant4 headers
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4PhysicalVolumeStore.hh"
|
||||
#include "G4LogicalVolumeStore.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4NistManager.hh"
|
||||
//
|
||||
|
||||
#include "OpNoviceGDMLDetectorConstruction.hh"
|
||||
#include "OpNoviceDetectorMessenger.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4GDMLParser.hh"
|
||||
// project headers
|
||||
#include "OpNoviceGDMLDetectorConstruction.hh"
|
||||
#include "OpNoviceGDMLDetectorConstructionMessenger.hh"
|
||||
#include "G4LogicalVolumeStore.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4PhysicalVolumeStore.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
OpNoviceGDMLDetectorConstruction::OpNoviceGDMLDetectorConstruction(G4String fname)
|
||||
: G4VUserDetectorConstruction() {
|
||||
fDumpgdmlFile = "OpNovice_dump.gdml";
|
||||
fverbose = false;
|
||||
fdumpgdml = false;
|
||||
gdmlFile = fname;
|
||||
// create a messenger for this class
|
||||
fDetectorMessenger = new OpNoviceGDMLDetectorConstructionMessenger(this);
|
||||
OpNoviceGDMLDetectorConstruction::OpNoviceGDMLDetectorConstruction(
|
||||
G4String fname)
|
||||
: G4VUserDetectorConstruction()
|
||||
{
|
||||
fDumpGdmlFileName = "OpNovice_dump.gdml";
|
||||
fVerbose = false;
|
||||
fDumpGdml = false;
|
||||
fGdmlFile = fname;
|
||||
// create a messenger for this class
|
||||
fDetectorMessenger = new OpNoviceDetectorMessenger(this);
|
||||
|
||||
G4cout << "Building detector from GDML file: " << fname << G4endl << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
OpNoviceGDMLDetectorConstruction::~OpNoviceGDMLDetectorConstruction() {
|
||||
delete fDetectorMessenger;
|
||||
OpNoviceGDMLDetectorConstruction::~OpNoviceGDMLDetectorConstruction()
|
||||
{
|
||||
delete fDetectorMessenger;
|
||||
delete fParser;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume *OpNoviceGDMLDetectorConstruction::Construct() {
|
||||
ReadGDML();
|
||||
G4VPhysicalVolume *worldPhysVol = parser->GetWorldVolume();
|
||||
if (fdumpgdml) parser->Write(fDumpgdmlFile, worldPhysVol);
|
||||
return worldPhysVol;
|
||||
G4VPhysicalVolume* OpNoviceGDMLDetectorConstruction::Construct()
|
||||
{
|
||||
ReadGDML();
|
||||
G4VPhysicalVolume* worldPhysVol = fParser->GetWorldVolume();
|
||||
if(fDumpGdml)
|
||||
fParser->Write(fDumpGdmlFileName, worldPhysVol);
|
||||
return worldPhysVol;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::ConstructSDandField() {
|
||||
void OpNoviceGDMLDetectorConstruction::ConstructSDandField() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::ReadGDML()
|
||||
{
|
||||
fParser = new G4GDMLParser();
|
||||
fParser->Read(fGdmlFile, false);
|
||||
G4VPhysicalVolume* world = fParser->GetWorldVolume();
|
||||
// GDML parser makes world invisible. make it visible again.
|
||||
G4LogicalVolume* pworldLogical = world->GetLogicalVolume();
|
||||
pworldLogical->SetVisAttributes(0);
|
||||
G4cout << world->GetTranslation() << G4endl << G4endl;
|
||||
if(fVerbose)
|
||||
{
|
||||
G4cout << "Found world: " << world->GetName() << G4endl;
|
||||
G4cout << "world LV: " << world->GetLogicalVolume()->GetName() << G4endl;
|
||||
}
|
||||
G4LogicalVolumeStore* pLVStore = G4LogicalVolumeStore::GetInstance();
|
||||
if(fVerbose)
|
||||
{
|
||||
G4cout << "Found " << pLVStore->size() << " logical volumes." << G4endl
|
||||
<< G4endl;
|
||||
}
|
||||
G4PhysicalVolumeStore* pPVStore = G4PhysicalVolumeStore::GetInstance();
|
||||
if(fVerbose)
|
||||
{
|
||||
G4cout << "Found " << pPVStore->size() << " physical volumes." << G4endl
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::ReadGDML() {
|
||||
parser = new G4GDMLParser();
|
||||
parser->Read(gdmlFile, false);
|
||||
G4VPhysicalVolume *world = parser->GetWorldVolume();
|
||||
//----- GDML parser makes world invisible, this is a hack to make it
|
||||
//visible again...
|
||||
G4LogicalVolume *pworldLogical = world->GetLogicalVolume();
|
||||
pworldLogical->SetVisAttributes(0);
|
||||
G4cout << world->GetTranslation() << G4endl << G4endl;
|
||||
if (fverbose) {
|
||||
G4cout << "Found world: " << world-> GetName() << G4endl;
|
||||
G4cout << "world LV: " << world->GetLogicalVolume()->GetName() << G4endl;
|
||||
}
|
||||
G4LogicalVolumeStore *pLVStore = G4LogicalVolumeStore::GetInstance();
|
||||
if (fverbose) {
|
||||
G4cout << "Found " << pLVStore->size()
|
||||
<< " logical volumes."
|
||||
<< G4endl << G4endl;
|
||||
}
|
||||
G4PhysicalVolumeStore *pPVStore = G4PhysicalVolumeStore::GetInstance();
|
||||
if (fverbose) {
|
||||
G4cout << "Found " << pPVStore->size()
|
||||
<< " physical volumes."
|
||||
<< G4endl << G4endl;
|
||||
}
|
||||
void OpNoviceGDMLDetectorConstruction::UpdateGeometry()
|
||||
{
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::UpdateGeometry() {
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
|
||||
void OpNoviceGDMLDetectorConstruction::SetDumpGdml(G4bool val)
|
||||
{
|
||||
fDumpGdml = val;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::SetDumpgdml(G4bool fdumpgdml1) {
|
||||
this->fdumpgdml = fdumpgdml1;
|
||||
G4bool OpNoviceGDMLDetectorConstruction::IsDumpGdml() const
|
||||
{
|
||||
return fDumpGdml;
|
||||
}
|
||||
G4bool OpNoviceGDMLDetectorConstruction::IsDumpgdml() const {
|
||||
return fdumpgdml;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::SetVerbose(G4bool val)
|
||||
{
|
||||
fVerbose = val;
|
||||
}
|
||||
void OpNoviceGDMLDetectorConstruction::SetVerbose(G4bool fverbose1) {
|
||||
this->fverbose = fverbose1;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4bool OpNoviceGDMLDetectorConstruction::IsVerbose() const { return fVerbose; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstruction::SetDumpGdmlFile(G4String val)
|
||||
{
|
||||
fDumpGdmlFileName = val;
|
||||
}
|
||||
G4bool OpNoviceGDMLDetectorConstruction::IsVerbose() const {
|
||||
return fverbose;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4String OpNoviceGDMLDetectorConstruction::GetDumpGdmlFileName() const
|
||||
{
|
||||
return fDumpGdmlFileName;
|
||||
}
|
||||
void OpNoviceGDMLDetectorConstruction::SetDumpgdmlFile(G4String fDumpgdmlFile1) {
|
||||
this->fDumpgdmlFile = fDumpgdmlFile1;
|
||||
}
|
||||
G4String OpNoviceGDMLDetectorConstruction::GetDumpgdmlFile() const {
|
||||
return fDumpgdmlFile;
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Geant4 headers
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
// project headers
|
||||
#include "OpNoviceGDMLDetectorConstructionMessenger.hh"
|
||||
#include "OpNoviceGDMLDetectorConstruction.hh"
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
OpNoviceGDMLDetectorConstructionMessenger::
|
||||
OpNoviceGDMLDetectorConstructionMessenger(
|
||||
OpNoviceGDMLDetectorConstruction* detcon)
|
||||
: G4UImessenger()
|
||||
, fOpNoviceDetCon(detcon)
|
||||
{
|
||||
fDetConDir = new G4UIdirectory("/OpNovice/DetectorConstruction/");
|
||||
fDetConDir->SetGuidance("Configuring Detector Construction");
|
||||
//
|
||||
verboseCmd =
|
||||
new G4UIcmdWithABool("/OpNovice/DetectorConstruction/enable_verbose", this);
|
||||
verboseCmd->SetGuidance("Set flag for enabling verbose diagnostic printout");
|
||||
verboseCmd->SetParameterName("enable_verbose", false);
|
||||
verboseCmd->SetDefaultValue(false);
|
||||
verboseCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
dumpGdmlCmd =
|
||||
new G4UIcmdWithABool("/OpNovice/DetectorConstruction/dumpgdml", this);
|
||||
dumpGdmlCmd->SetGuidance(
|
||||
"Set flag for enabling dumping the detector to a gdml file");
|
||||
dumpGdmlCmd->SetParameterName("dumpgdml", false);
|
||||
dumpGdmlCmd->SetDefaultValue(false);
|
||||
dumpGdmlCmd->AvailableForStates(G4State_PreInit);
|
||||
|
||||
dumpGdmlFileNameCmd = new G4UIcmdWithAString(
|
||||
"/OpNovice/DetectorConstruction/DumpGDMLFileName", this);
|
||||
dumpGdmlFileNameCmd->SetGuidance("Enter file name to dump gdml file ");
|
||||
dumpGdmlFileNameCmd->SetParameterName("GDMLFileName", true);
|
||||
dumpGdmlFileNameCmd->SetDefaultValue("OpNovice_dump.gdml");
|
||||
dumpGdmlFileNameCmd->AvailableForStates(G4State_PreInit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
OpNoviceGDMLDetectorConstructionMessenger::
|
||||
~OpNoviceGDMLDetectorConstructionMessenger()
|
||||
{
|
||||
delete fDetConDir;
|
||||
delete verboseCmd;
|
||||
delete dumpGdmlCmd;
|
||||
delete dumpGdmlFileNameCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void OpNoviceGDMLDetectorConstructionMessenger::SetNewValue(
|
||||
G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if(command == verboseCmd)
|
||||
fOpNoviceDetCon->SetVerbose(verboseCmd->GetNewBoolValue(newValue));
|
||||
if(command == dumpGdmlCmd)
|
||||
fOpNoviceDetCon->SetDumpgdml(dumpGdmlCmd->GetNewBoolValue(newValue));
|
||||
if(command == dumpGdmlFileNameCmd)
|
||||
fOpNoviceDetCon->SetDumpgdmlFile(newValue);
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -33,8 +33,7 @@
|
||||
#include "OpNoviceStackingAction.hh"
|
||||
#include "OpNoviceRun.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4OpticalPhoton.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
|
||||
///\file "optical/OpNovice2/.README.txt"
|
||||
///\brief Example AnaEx01 README page
|
||||
|
||||
/*! \page ExampleOpNovice2 Example OpNovice2
|
||||
|
||||
Investigate optical properties and parameters. Details of optical
|
||||
photon boundary interactions on a surface are recorded. Details
|
||||
of optical photon generation and transport are recorded.
|
||||
|
||||
|
||||
\section OpNovice2_s1 GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a cube "box" with a side of 2 m inside
|
||||
the world cube of side 20 m. Optical properties of the box, the world,
|
||||
and the surface may be set interactively via the commands defined
|
||||
in the DetectorMessenger class.
|
||||
|
||||
Material properties may be added using the macro commands:
|
||||
- for the box:
|
||||
\verbatim
|
||||
/opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
|
||||
/opnovice2/boxConstProperty NAME VALUE
|
||||
\endverbatim
|
||||
- for the world:
|
||||
\verbatim
|
||||
/opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
|
||||
/opnovice2/worldConstProperty NAME VALUE
|
||||
\endverbatim
|
||||
- for the surface:
|
||||
\verbatim
|
||||
/opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
|
||||
\endverbatim
|
||||
|
||||
Multiple energy and value pairs may be specified for the energy-dependent
|
||||
properties.
|
||||
|
||||
Values are in Geant4 internal units. Energy is in MeV.
|
||||
|
||||
Example:
|
||||
\verbatim
|
||||
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
|
||||
\endverbatim
|
||||
sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
|
||||
1.34 at 8 eV.
|
||||
|
||||
\section OpNovice2_s2 PHYSICS LIST
|
||||
|
||||
The FTFP_BERT physics list is used, with electromagnetic option
|
||||
EMZ (option4) and G4OpticalPhysics for the optical physics.
|
||||
|
||||
\section OpNovice2_s3 AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle. The type of
|
||||
the particle, its energy, position, and direction, are set
|
||||
in the PrimaryGeneratorAction class, and can be changed via the G4
|
||||
build-in commands of G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
\section OpNovice2_s4 VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialisation of the drawing is done via the commands
|
||||
/vis/... in the macro vis.mac. To get visualisation:
|
||||
\verbatim
|
||||
> /control/execute vis.mac
|
||||
\endverbatim
|
||||
or run the program with no command line arguments:
|
||||
\verbatim
|
||||
$ ./OpNovice2
|
||||
\endverbatim
|
||||
|
||||
\section OpNovice2_s5 HOW TO START ?
|
||||
|
||||
- Execute OpNovice2 in 'batch' mode from macro files
|
||||
\verbatim
|
||||
% OpNovice2 electron.mac
|
||||
\endverbatim
|
||||
|
||||
- Execute OpNovice2 in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% OpNovice2
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
\section OpNovice2_s6 RESULTS
|
||||
|
||||
A table of optical photon events is printed at the end of the run.
|
||||
|
||||
\section OpNovice2_s7 HISTOGRAMS
|
||||
|
||||
OpNovice2 has several predefined 1D histograms :
|
||||
- 1 : Cerenkov spectrum
|
||||
- 2 : scintillation spectrum
|
||||
- 3 : scintillation time (global time)
|
||||
- 4 : WLS absorption spectrum
|
||||
- 5 : WLS emission spectrum
|
||||
- 6 : WLS emission time
|
||||
- 7 : WLS2 absorption spectrum
|
||||
- 8 : WLS2 emission spectrum
|
||||
- 9 : WLS2 emission time
|
||||
- 10 : boundary process status
|
||||
- 11 : X momentum dir of scattered photons with px < 0
|
||||
- 12 : Y momentum dir of scattered photons with px < 0
|
||||
- 13 : Z momentum dir of scattered photons with px < 0
|
||||
- 14 : X momentum dir of scattered photons with px >= 0
|
||||
- 15 : Y momentum dir of scattered photons with px >= 0
|
||||
- 16 : Z momentum dir of scattered photons with px >= 0
|
||||
- 17 : X momentum dir of Fresnel-refracted photons
|
||||
- 18 : Y momentum dir of Fresnel-refracted photons
|
||||
- 19 : Z momentum dir of Fresnel-refracted photons
|
||||
- 20 : fraction of photons transmitted at surface
|
||||
- 21 : fraction of photons reflected at surface
|
||||
|
||||
Histograms 11-19 are recorded for photons scattered from the +X
|
||||
surface of the cube. Only the first interaction is recorded.
|
||||
|
||||
The histograms are managed by G4Analysis classes.
|
||||
The histos can be individually activated with the command :
|
||||
\verbatim
|
||||
/analysis/h1/set id nbBins valMin valMax
|
||||
\endverbatim
|
||||
The unit is hardcoded to be eV for energy and ns for time.
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
\verbatim
|
||||
/analysis/setFileName name (default opnovice2)
|
||||
\endverbatim
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
\verbatim
|
||||
/analysis/h1/setAscii id
|
||||
\endverbatim
|
||||
All selected histos will be written on a file name.ascii (default opnovice2)
|
||||
|
||||
\section OpNovice2_s8 MACROS
|
||||
|
||||
Several macros are included.
|
||||
boundary.mac: Set the surface to the various types and configurations of
|
||||
model, type, etc., shoot optical photons, and record statistics
|
||||
electron.mac: Shoot electrons and observe Cerenkov and scintillation radiation
|
||||
fresnel.mac: Shoot optical photons of fixed polarization and random direction
|
||||
at a surface, and plot reflectance/transmittance vs incident
|
||||
angle.
|
||||
OpNovice2.mac: Shoot an optical photon inside a box.
|
||||
scint_by_particle.mac: Configure scintillation to have particle-specific
|
||||
yields and yield ratios. Shoot different types of particles.
|
||||
vis.mac: Configure visualization.
|
||||
wls.mac: Configure two wavelength-shifting processes, and shoot optical
|
||||
photons.
|
||||
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
project(OpNovice2)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -13,6 +13,16 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
October 06, 2021 I. Hrivnacova (OpNovice2-V10-07-02)
|
||||
- Migration to new G4AnalysisManager.hh header;
|
||||
define the default output file type (root),
|
||||
use auto for histograms get via GetH1()
|
||||
|
||||
July 19, 2021 I. Hrivnacova (OpNovice2-V10-07-01)
|
||||
- Updated for changes in the analysis category:
|
||||
removed deleting of the analysis manager,
|
||||
as this is now done by the Geant4 kernel.
|
||||
|
||||
February 24, 2021 D.Sawkey (OpNovice2-V10-07-00)
|
||||
- replace deprecated optical commands and parameters with new ones
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,137 +0,0 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
==================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation
|
||||
==================================================
|
||||
|
||||
OpNovice2
|
||||
---------
|
||||
|
||||
Investigate optical properties and parameters. Details of optical
|
||||
photon boundary interactions on a surface are recorded. Details
|
||||
of optical photon generation and transport are recorded.
|
||||
|
||||
|
||||
1- GEOMETRY DEFINITION
|
||||
|
||||
The geometry consists of a cube "box" with a side of 2 m inside
|
||||
the world cube of side 20 m. Optical properties of the box, the world,
|
||||
and the surface may be set interactively via the commands defined
|
||||
in the DetectorMessenger class.
|
||||
|
||||
Material properties may be added using the macro commands:
|
||||
# for the box:
|
||||
/opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
|
||||
/opnovice2/boxConstProperty NAME VALUE
|
||||
# for the world:
|
||||
/opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
|
||||
/opnovice2/worldConstProperty NAME VALUE
|
||||
# for the surface:
|
||||
/opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
|
||||
|
||||
Multiple energy and value pairs may be specified for the energy-dependent
|
||||
properties.
|
||||
|
||||
Values are in Geant4 internal units. Energy is in MeV.
|
||||
|
||||
Example:
|
||||
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
|
||||
sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
|
||||
1.34 at 8 eV.
|
||||
|
||||
2- PHYSICS LIST
|
||||
|
||||
The FTFP_BERT physics list is used, with electromagnetic option
|
||||
EMZ (option4) and G4OpticalPhysics for the optical physics.
|
||||
|
||||
3- AN EVENT : THE PRIMARY GENERATOR
|
||||
|
||||
The primary kinematic consists of a single particle. The type of
|
||||
the particle, its energy, position, and direction, are set
|
||||
in the PrimaryGeneratorAction class, and can be changed via the G4
|
||||
build-in commands of G4ParticleGun class (see the macros provided with
|
||||
this example).
|
||||
|
||||
4- VISUALIZATION
|
||||
|
||||
The Visualization Manager is set in the main().
|
||||
The initialisation of the drawing is done via the commands
|
||||
/vis/... in the macro vis.mac. To get visualisation:
|
||||
> /control/execute vis.mac
|
||||
or run the program with no command line arguments:
|
||||
$ ./OpNovice2
|
||||
|
||||
5- HOW TO START ?
|
||||
|
||||
- Execute OpNovice2 in 'batch' mode from macro files
|
||||
% OpNovice2 electron.mac
|
||||
|
||||
- Execute OpNovice2 in 'interactive mode' with visualization
|
||||
% OpNovice2
|
||||
....
|
||||
Idle> type your commands
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
6- RESULTS
|
||||
|
||||
A table of optical photon events is printed at the end of the run.
|
||||
|
||||
7- HISTOGRAMS
|
||||
|
||||
OpNovice2 has several predefined 1D histograms :
|
||||
1 : Cerenkov spectrum
|
||||
2 : scintillation spectrum
|
||||
3 : scintillation time (global time)
|
||||
4 : WLS absorption spectrum
|
||||
5 : WLS emission spectrum
|
||||
6 : WLS emission time
|
||||
7 : WLS2 absorption spectrum
|
||||
8 : WLS2 emission spectrum
|
||||
9 : WLS2 emission time
|
||||
10 : boundary process status
|
||||
11 : X momentum dir of scattered photons with px < 0
|
||||
12 : Y momentum dir of scattered photons with px < 0
|
||||
13 : Z momentum dir of scattered photons with px < 0
|
||||
14 : X momentum dir of scattered photons with px >= 0
|
||||
15 : Y momentum dir of scattered photons with px >= 0
|
||||
16 : Z momentum dir of scattered photons with px >= 0
|
||||
17 : X momentum dir of Fresnel-refracted photons
|
||||
18 : Y momentum dir of Fresnel-refracted photons
|
||||
19 : Z momentum dir of Fresnel-refracted photons
|
||||
20 : fraction of photons transmitted at surface
|
||||
21 : fraction of photons reflected at surface
|
||||
|
||||
Histograms 11-19 are recorded for photons scattered from the +X
|
||||
surface of the cube. Only the first interaction is recorded.
|
||||
|
||||
The histograms are managed by G4Analysis classes.
|
||||
The histos can be individually activated with the command:
|
||||
/analysis/h1/set id nbBins valMin valMax
|
||||
The unit is hardcoded to be eV for energy and ns for time.
|
||||
|
||||
One can control the name of the histograms file with the command:
|
||||
/analysis/setFileName name (default opnovice2)
|
||||
|
||||
It is possible to choose the format of the histogram file : root (default),
|
||||
hbook, xml, csv, by using namespace in HistoManager.hh
|
||||
|
||||
It is also possible to print selected histograms on an ascii file:
|
||||
/analysis/h1/setAscii id
|
||||
All selected histos will be written on a file name.ascii (default opnovice2)
|
||||
|
||||
8- MACROS
|
||||
|
||||
Several macros are included.
|
||||
boundary.mac: Set the surface to the various types and configurations of
|
||||
model, type, etc., shoot optical photons, and record statistics
|
||||
electron.mac: Shoot electrons and observe Cerenkov and scintillation radiation
|
||||
fresnel.mac: Shoot optical photons of fixed polarization and random direction
|
||||
at a surface, and plot reflectance/transmittance vs incident
|
||||
angle.
|
||||
OpNovice2.mac: Shoot an optical photon inside a box.
|
||||
scint_by_particle.mac: Configure scintillation to have particle-specific
|
||||
yields and yield ratios. Shoot different types of particles.
|
||||
vis.mac: Configure visualization.
|
||||
wls.mac: Configure two wavelength-shifting processes, and shoot optical
|
||||
photons.
|
||||
@@ -35,10 +35,7 @@
|
||||
#define HistoManager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "g4root.hh"
|
||||
//#include "g4xml.hh"
|
||||
//#include "g4csv.hh"
|
||||
#include "G4AnalysisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -45,16 +45,15 @@ HistoManager::HistoManager()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
HistoManager::~HistoManager() { delete G4AnalysisManager::Instance(); }
|
||||
HistoManager::~HistoManager() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void HistoManager::Book()
|
||||
{
|
||||
// Create or get analysis manager
|
||||
// The choice of analysis technology is done via selection of a namespace
|
||||
// in HistoManager.hh
|
||||
G4AnalysisManager* analysisMan = G4AnalysisManager::Instance();
|
||||
analysisMan->SetDefaultFileType("root");
|
||||
analysisMan->SetFileName(fFileName);
|
||||
analysisMan->SetVerboseLevel(1);
|
||||
analysisMan->SetActivation(true); // enable inactivation of histograms
|
||||
|
||||
@@ -535,8 +535,8 @@ void Run::EndOfRun()
|
||||
->GetProperty(kRINDEX)
|
||||
->Value(fEkin);
|
||||
|
||||
G4H1* histo_trans = analysisMan->GetH1(histo_id_trans);
|
||||
G4H1* histo_refl = analysisMan->GetH1(histo_id_refl);
|
||||
auto histo_trans = analysisMan->GetH1(histo_id_trans);
|
||||
auto histo_refl = analysisMan->GetH1(histo_id_refl);
|
||||
std::vector<G4double> trans;
|
||||
std::vector<G4double> refl;
|
||||
std::vector<G4double> tot;
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
Optical processes
|
||||
-----------------
|
||||
|
||||
This directory includes examples demonstrating the use of optical processes
|
||||
in the simulation.
|
||||
|
||||
OpNovice
|
||||
--------
|
||||
Simulation of optical photons generation and transport.
|
||||
Defines optical surfaces and exercises optical physics processes
|
||||
(Cerenkov, Scintillation, Absorption, Rayleigh, ...). Uses stacking
|
||||
mechanism to count the secondary particles generated.
|
||||
Via the command line one can select an option to define the detector via a
|
||||
gdml file. An example gdml file is provided that corresponds
|
||||
to the detector configuration defined in OpNoviceDetectorConstruction.cc.
|
||||
|
||||
OpNovice2
|
||||
--------
|
||||
Investigate optical properties and parameters. Details of optical
|
||||
photon boundary interactions on a surface are recorded. Details
|
||||
of optical photon generation and transport are recorded.
|
||||
|
||||
LXe
|
||||
----
|
||||
Multi-purpose detector setup implementing:
|
||||
(1) scintillation inside a bulk scintillator with PMTs
|
||||
(2) large wall of small PMTs opposite a Cerenkov slab to show the cone
|
||||
(3) plastic scintillator with wave-length-shifting fiber readout.
|
||||
|
||||
WLS
|
||||
----
|
||||
This application simulates the propagation of photons inside a Wave Length
|
||||
Shifting (WLS) fiber.
|
||||
@@ -1,103 +0,0 @@
|
||||
|
||||
///\file "optical/wls/.README.txt"
|
||||
///\brief Example wls README page
|
||||
|
||||
/*! \page Examplewls Example wls
|
||||
|
||||
This application simulates the propagation of photons inside a Wave Length
|
||||
Shifting (WLS) fiber.
|
||||
|
||||
|
||||
\section Examplewls_s1 Geometry Definition
|
||||
|
||||
The default geometry is as follow:
|
||||
|
||||
- A perfect, bare, PMMA fiber: 0.5mm radius, 2m length at center(0,0,0)
|
||||
of the World.
|
||||
- A circular MPPC with 0.5mm radius at the +z end of the fiber
|
||||
- World and coupling materials are G4_AIR
|
||||
- Photons will always refracted out to coupling material before
|
||||
reaching MPPC
|
||||
- There are many flexible parameters that the user could specify.
|
||||
They are under the /WLS directory of help.
|
||||
|
||||
|
||||
\section Examplewls_s2 Material Choices
|
||||
|
||||
There are several materials that the user can use for the fiber core,
|
||||
world and coupling.
|
||||
|
||||
They are:
|
||||
|
||||
- Vacuum (G4_Galactic)
|
||||
- Air (G4_AIR)
|
||||
- PMMA, n = 1.60
|
||||
- Pethylene, n = 1.49
|
||||
- FPethylene, n = 1.42
|
||||
- Polystyrene, n = 1.60
|
||||
- Silicone, n = 1.46
|
||||
|
||||
|
||||
\section Examplewls_s3 Photon Source
|
||||
|
||||
This program uses the General Particle Source (G4GeneralParticleSource)
|
||||
provided by GEANT4 for
|
||||
generating photons. The energy of the photon must be within 2.00 eV
|
||||
to 3.47 eV. For detail instruction on how to use the General Particle
|
||||
Source, please visit their home page at:
|
||||
http://reat.space.qinetiq.com/gps/
|
||||
|
||||
|
||||
\section Examplewls_s4 Hit
|
||||
|
||||
A hit is registered when the photon is absorbed on the MPPC surface.
|
||||
Information stored in hit includes the local coordinate of the location
|
||||
the photon is absorbed on the MPPC, the global coordinate where the
|
||||
photon left the fiber and the transit time of the photon.
|
||||
|
||||
|
||||
\section Examplewls_s5 Stepping Action
|
||||
|
||||
The stepping action keeps track of the number of bounces a photon has
|
||||
gone through. In order to prevent infinite loop and extremely skewed
|
||||
rays taking up computing time, there is a limit of the number of
|
||||
bounces that a photon can go through before it is artificially killed.
|
||||
The default limit is 100,000. The user can set his/her own limit using
|
||||
the /stepping/setBounceLimit command. A value of 0 will turn off the
|
||||
limit. All photons artificially killed will have murderee flag turned
|
||||
on in their UserTrackInformation.
|
||||
|
||||
|
||||
\section Examplewls_s6 Visualization
|
||||
|
||||
To visualize a photon's trajectory, simply use vis.mac macro in
|
||||
interactive mode or in your own macro.
|
||||
|
||||
|
||||
\section Examplewls_s7 main ()
|
||||
|
||||
- Execute wls in 'batch' mode from macro files; \n
|
||||
you can enter an optional integer seed for batch mode
|
||||
\verbatim
|
||||
% wls wls.in (optional: enter an integer seed here)
|
||||
\endverbatim
|
||||
|
||||
- wls in 'interactive mode' with visualization
|
||||
\verbatim
|
||||
% wls
|
||||
....
|
||||
Idle> /control/execute vis.mac
|
||||
Idle> /run/beamOn 1
|
||||
....
|
||||
Idle> exit
|
||||
\endverbatim
|
||||
|
||||
\section Examplewls_s8 Macros provided
|
||||
|
||||
- wls.in: sets up the default geometry and provides the commands to change it.
|
||||
Primary particle is an optical photon with energy 2.1 eV.
|
||||
- Sr90.mac: Default geometry is used. Primary particle is a strontium ion.
|
||||
- vis.mac: macro for visualization; called automatically when no macro is
|
||||
given on command line.
|
||||
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 3.12...3.20)
|
||||
cmake_minimum_required(VERSION 3.16...3.21)
|
||||
project(wls)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -40,11 +40,9 @@ target_link_libraries(wls ${Geant4_LIBRARIES} )
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(wls_SCRIPTS
|
||||
wls.out
|
||||
wls.in
|
||||
gui.mac
|
||||
Sr90.mac
|
||||
vis.mac
|
||||
electron.mac
|
||||
)
|
||||
|
||||
foreach(_script ${wls_SCRIPTS})
|
||||
|
||||
@@ -15,6 +15,24 @@ track of all tags.
|
||||
|
||||
----------------------------------------------------------
|
||||
|
||||
Oct 25, 2021 B. Morgan (WLS-V10-07-04)
|
||||
- Use G4StrUtil functions replacing deprecated G4String member functions
|
||||
|
||||
Oct 6, 2021 I. Hrivnacova (WLS-V10-07-03)
|
||||
- Migration to new G4AnalysisManager.hh header;
|
||||
define the default output file type (root),
|
||||
removed WLSAnalysis.hh
|
||||
|
||||
Sept 7, 2021 D. Sawkey (WLS-V10-07-02)
|
||||
- add visualisation attributes
|
||||
- fix bug preventing cladding being built
|
||||
- fix counting detector hits
|
||||
- add histograms
|
||||
- use G4OpBoundaryProcess::invokeSD rather than ProcessHits_boundary call
|
||||
in SteppingAction
|
||||
- remove StringToRotation
|
||||
- remove Sr90.mac; add electron.mac
|
||||
|
||||
May 21, 2021 D. Sawkey (WLS-V10-07-01)
|
||||
- WLSMaterials: use correct material property names
|
||||
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
WLS
|
||||
----------
|
||||
|
||||
This application simulates the propagation of photons inside a Wave Length
|
||||
Shifting (WLS) fiber.
|
||||
|
||||
|
||||
1- Geometry Definition
|
||||
|
||||
The default geometry is as follow:
|
||||
|
||||
- A perfect, bare, PMMA fiber: 0.5mm radius, 2m length at center(0,0,0)
|
||||
of the World.
|
||||
- A circular MPPC with 0.5mm radius at the +z end of the fiber
|
||||
- World and coupling materials are G4_AIR
|
||||
- Photons will always refracted out to coupling material before
|
||||
reaching MPPC
|
||||
- There are many flexible parameters that the user could specify.
|
||||
They are under the /WLS directory of help.
|
||||
|
||||
|
||||
2- Material Choices
|
||||
|
||||
There are several materials that the user can use for the fiber core,
|
||||
world and coupling.
|
||||
|
||||
They are:
|
||||
|
||||
- Vacuum (G4_Galactic)
|
||||
- Air (G4_AIR)
|
||||
- PMMA, n = 1.60
|
||||
- Pethylene, n = 1.49
|
||||
- FPethylene, n = 1.42
|
||||
- Polystyrene, n = 1.60
|
||||
- Silicone, n = 1.46
|
||||
|
||||
|
||||
3- Photon Source
|
||||
|
||||
This program uses the General Particle Source (G4GeneralParticleSource)
|
||||
provided by GEANT4 for
|
||||
generating photons. The energy of the photon must be within 2.00 eV
|
||||
to 3.47 eV. For detail instruction on how to use the General Particle
|
||||
Source, please visit their home page at:
|
||||
|
||||
http://reat.space.qinetiq.com/gps/
|
||||
|
||||
|
||||
4- Hit
|
||||
|
||||
A hit is registered when the photon is absorbed on the MPPC surface.
|
||||
Information stored in hit includes the local coordinate of the location
|
||||
the photon is absorbed on the MPPC, the global coordinate where the
|
||||
photon left the fiber and the transit time of the photon.
|
||||
|
||||
|
||||
5- Stepping Action
|
||||
|
||||
The stepping action keeps track of the number of bounces a photon has
|
||||
gone through. In order to prevent infinite loop and extremely skewed
|
||||
rays taking up computing time, there is a limit of the number of
|
||||
bounces that a photon can go through before it is artificially killed.
|
||||
The default limit is 100,000. The user can set his/her own limit using
|
||||
the /stepping/setBounceLimit command. A value of 0 will turn off the
|
||||
limit. All photons artificially killed will have murderee flag turned
|
||||
on in their UserTrackInformation.
|
||||
|
||||
|
||||
6- Visualization
|
||||
|
||||
To visualize a photon's trajectory, simply use vis.mac macro in
|
||||
interactive mode or in your own macro.
|
||||
|
||||
|
||||
7- main()
|
||||
|
||||
- execute wls in 'batch' mode from macro files
|
||||
- you can enter an optional integer seed for batch mode
|
||||
% wls wls.in (optional: enter an integer seed here)
|
||||
|
||||
- wls in 'interactive mode' with visualization
|
||||
% wls
|
||||
....
|
||||
Idle> /control/execute
|
||||
Idle> /run/beamOn 1
|
||||
....
|
||||
Idle> exit
|
||||
|
||||
8- Macros provided
|
||||
|
||||
- wls.in: sets up the default geometry and provides the commands to change it.
|
||||
Primary particle is an optical photon with energy 2.1 eV.
|
||||
- Sr90.mac: Default geometry is used. Primary particle is a strontium ion.
|
||||
- vis.mac: macro for visualization; called automatically when no macro is
|
||||
given on command line.
|
||||
@@ -1,27 +0,0 @@
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 1
|
||||
/tracking/verbose 0
|
||||
/process/optical/verbose 1
|
||||
|
||||
/run/initialize
|
||||
|
||||
|
||||
/gps/particle ion
|
||||
/gps/ion 38 90 0 0
|
||||
|
||||
/gps/energy 0 keV
|
||||
|
||||
/gps/pos/type Plane
|
||||
/gps/pos/shape Circle
|
||||
/gps/pos/radius 0.5 mm
|
||||
|
||||
/gps/pos/centre 1.0 0.0 0.0 cm
|
||||
/gps/pos/rot1 0 1 0
|
||||
/gps/pos/rot2 0 0 1
|
||||
|
||||
/gps/ang/type iso
|
||||
/gps/ang/mintheta 0.0 deg
|
||||
/gps/ang/maxtheta 90.0 deg
|
||||
|
||||
/run/beamOn 10
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/tracking/verbose 0
|
||||
/event/verbose 0
|
||||
|
||||
|
||||
/WLS/setPhotonDetGeometry Circle
|
||||
/WLS/setNumOfLayers 2
|
||||
/WLS/setSurfaceRoughness 0.999
|
||||
/WLS/setXYRatio 0.8
|
||||
/WLS/setWLSLength 1. m
|
||||
/WLS/setWLSRadius 0.5 mm
|
||||
/WLS/setClad1Radius 0.3 mm
|
||||
/WLS/setClad2Radius 0.1 mm
|
||||
#
|
||||
/WLS/setPhotonDetHalfLength 0.6 mm
|
||||
/WLS/setGap 0.15 mm
|
||||
/WLS/setAlignment 0.1 deg
|
||||
/WLS/setMirror true
|
||||
|
||||
/WLS/setBarLength 1.1 m
|
||||
/WLS/setBarBase 9.5 mm
|
||||
/WLS/setHoleRadius 0.9 mm
|
||||
/WLS/setCoatingThickness 0.3 mm
|
||||
/WLS/setCoatingRadius 1.775 mm
|
||||
|
||||
|
||||
/run/initialize
|
||||
|
||||
/hits/verbose 2
|
||||
/process/optical/verbose 1
|
||||
|
||||
/gps/particle e-
|
||||
/gps/energy 10 MeV
|
||||
|
||||
/gps/pos/type Plane
|
||||
/gps/pos/shape Circle
|
||||
/gps/pos/radius 0.5 mm
|
||||
|
||||
/gps/pos/centre 0.0 0.0 0.0 cm
|
||||
/gps/pos/rot1 0 1 0
|
||||
/gps/pos/rot2 0 0 1
|
||||
|
||||
/gps/ang/type iso
|
||||
/gps/ang/mintheta 0.0 deg
|
||||
/gps/ang/maxtheta 90.0 deg
|
||||
|
||||
/run/printProgress 1
|
||||
/run/beamOn 10
|
||||
@@ -19,21 +19,17 @@
|
||||
#
|
||||
# Gun menu :
|
||||
/gui/addMenu gun Gun
|
||||
/gui/addButton gun "50 MeV" "/gun/energy 50 MeV"
|
||||
/gui/addButton gun "1 GeV" "/gun/energy 1 GeV"
|
||||
/gui/addButton gun "10 GeV" "/gun/energy 10 GeV"
|
||||
/gui/addButton gun "e-" "/gun/particle e-"
|
||||
/gui/addButton gun "pi0" "/gun/particle pi0"
|
||||
/gui/addButton gun "pi+" "/gun/particle pi+"
|
||||
/gui/addButton gun "neutron" "/gun/particle neutron"
|
||||
/gui/addButton gun "proton" "/gun/particle proton"
|
||||
#
|
||||
# Field menu :
|
||||
#/gui/addMenu field Field
|
||||
#/gui/addButton field "off" "/B2/det/setField 0.2 tesla"
|
||||
#/gui/addButton field "0.2 tesla" "/B2/det/setField 0.2 tesla"
|
||||
#/gui/addButton field "2.0 tesla" "/B2/det/setField 2.0 tesla"
|
||||
/gui/addButton gun "500 keV" "/gps/energy 500 keV"
|
||||
/gui/addButton gun "1 MeV" "/gps/energy 1 MeV"
|
||||
/gui/addButton gun "10 MeV" "/gps/energy 10 MeV"
|
||||
/gui/addButton gun "100 MeV" "/gps/energy 100 MeV"
|
||||
/gui/addButton gun "e-" "/gps/particle e-"
|
||||
/gui/addButton gun "pi0" "/gps/particle pi0"
|
||||
/gui/addButton gun "pi+" "/gps/particle pi+"
|
||||
/gui/addButton gun "neutron" "/gps/particle neutron"
|
||||
/gui/addButton gun "proton" "/gps/particle proton"
|
||||
#
|
||||
|
||||
# Viewer menu :
|
||||
/gui/addMenu viewer Viewer
|
||||
/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
|
||||
|
||||
@@ -48,6 +48,7 @@ class G4EllipticalTube;
|
||||
class G4LogicalVolume;
|
||||
class G4Material;
|
||||
class G4Tubs;
|
||||
class G4VisAttributes;
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
class WLSDetectorConstruction : public G4VUserDetectorConstruction
|
||||
@@ -112,20 +113,11 @@ class WLSDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4double GetCoatingThickness();
|
||||
G4double GetCoatingRadius();
|
||||
|
||||
// StringToRotationMatrix() converts a string "X90,Y45" into a
|
||||
// G4RotationMatrix.
|
||||
// This is an active rotation, in that the object is first rotated
|
||||
// around the parent's X axis by 90 degrees, then the object is
|
||||
// further rotated around the parent's Y axis by 45 degrees.
|
||||
// The return value points to a G4RotationMatrix on the heap, so
|
||||
// it is persistent. Angles are in degrees, can have decimals,
|
||||
// and can be negative. Axes are X, Y, Z.
|
||||
|
||||
static G4RotationMatrix StringToRotationMatrix(G4String rotation);
|
||||
|
||||
G4Material* FindMaterial(G4String);
|
||||
|
||||
private:
|
||||
std::vector<G4VisAttributes*> fVisAttributes;
|
||||
|
||||
WLSMaterials* fMaterials;
|
||||
|
||||
G4LogicalVolume* fLogicHole;
|
||||
@@ -191,8 +183,6 @@ class WLSDetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4double fCoatingThickness;
|
||||
G4double fCoatingRadius;
|
||||
|
||||
void ConstructFiber();
|
||||
|
||||
void UpdateGeometryParameters();
|
||||
|
||||
WLSDetectorMessenger* fDetectorMessenger;
|
||||
|
||||
@@ -60,7 +60,6 @@ class WLSEventAction : public G4UserEventAction
|
||||
void AddClad1Bounce() { fClad1Bounce += 1; };
|
||||
void AddClad2Bounce() { fClad2Bounce += 1; };
|
||||
void AddReflected() { fReflected += 1; };
|
||||
void AddDetected() { fDetected += 1; };
|
||||
void AddEscaped() { fEscaped += 1; };
|
||||
void AddMirror() { fMirror += 1; };
|
||||
|
||||
@@ -80,7 +79,6 @@ class WLSEventAction : public G4UserEventAction
|
||||
G4int fClad1Bounce;
|
||||
G4int fClad2Bounce;
|
||||
G4int fReflected;
|
||||
G4int fDetected;
|
||||
G4int fEscaped;
|
||||
G4int fMirror;
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ class WLSPhotonDetHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
WLSPhotonDetHit();
|
||||
WLSPhotonDetHit(G4ThreeVector pExit, G4ThreeVector pArrive, G4double pTime);
|
||||
WLSPhotonDetHit(G4ThreeVector pExit, G4ThreeVector pArrive, G4double pTime, G4double pEnergy);
|
||||
~WLSPhotonDetHit();
|
||||
|
||||
WLSPhotonDetHit(const WLSPhotonDetHit& right);
|
||||
@@ -65,6 +65,11 @@ class WLSPhotonDetHit : public G4VHit
|
||||
inline void SetArrivalTime(G4double t) { fArrivalTime = t; }
|
||||
inline G4double GetArrivalTime() { return fArrivalTime; }
|
||||
|
||||
inline void SetEnergy(G4double en) { fEnergy = en; }
|
||||
inline G4double GetEnergy() { return fEnergy; }
|
||||
|
||||
void Print();
|
||||
|
||||
private:
|
||||
// the arrival time of the photon
|
||||
G4double fArrivalTime;
|
||||
@@ -72,6 +77,8 @@ class WLSPhotonDetHit : public G4VHit
|
||||
G4ThreeVector fPosArrive;
|
||||
// where the photon exited the fiber (world's coordinate)
|
||||
G4ThreeVector fPosExit;
|
||||
// energy of photon
|
||||
G4double fEnergy;
|
||||
};
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@@ -50,8 +50,8 @@ class WLSPhotonDetSD : public G4VSensitiveDetector
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
|
||||
G4bool ProcessHits(G4Step*, G4TouchableHistory*) override;
|
||||
// A version of processHits, not called automatically by sensitive detector
|
||||
G4bool ProcessHits_boundary(const G4Step*, G4TouchableHistory*);
|
||||
|
||||
void EndOfEvent(G4HCofThisEvent*) override;
|
||||
|
||||
private:
|
||||
WLSPhotonDetHitsCollection* fPhotonDetHitCollection;
|
||||
|
||||
@@ -96,12 +96,6 @@ class WLSRun : public G4Run
|
||||
fReflected += nd;
|
||||
fReflected2 += nd * nd;
|
||||
};
|
||||
void AddDetected(G4int n)
|
||||
{
|
||||
G4double nd(n);
|
||||
fDetected += nd;
|
||||
fDetected2 += nd * nd;
|
||||
};
|
||||
void AddEscaped(G4int n)
|
||||
{
|
||||
G4double nd(n);
|
||||
@@ -143,8 +137,6 @@ class WLSRun : public G4Run
|
||||
G4double fClad2Bounce2;
|
||||
G4double fReflected;
|
||||
G4double fReflected2;
|
||||
G4double fDetected;
|
||||
G4double fDetected2;
|
||||
G4double fEscaped;
|
||||
G4double fEscaped2;
|
||||
G4double fMirror;
|
||||
|
||||
@@ -57,10 +57,14 @@
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSDetectorConstruction::WLSDetectorConstruction()
|
||||
: fMaterials(nullptr)
|
||||
: fVisAttributes()
|
||||
, fMaterials(nullptr)
|
||||
, fLogicHole(nullptr)
|
||||
, fLogicWorld(nullptr)
|
||||
, fPhysiWorld(nullptr)
|
||||
@@ -113,6 +117,10 @@ WLSDetectorConstruction::~WLSDetectorConstruction()
|
||||
delete fDetectorMessenger;
|
||||
if(fMaterials)
|
||||
delete fMaterials;
|
||||
for (auto visAttributes: fVisAttributes)
|
||||
{
|
||||
delete visAttributes;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -139,6 +147,11 @@ G4VPhysicalVolume* WLSDetectorConstruction::Construct()
|
||||
|
||||
G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
{
|
||||
|
||||
auto air = FindMaterial("G4_AIR");
|
||||
//G4cout << "\nMaterial Properties Table for G4_AIR:" << G4endl;
|
||||
//air->GetMaterialPropertiesTable()->DumpTable();
|
||||
|
||||
//--------------------------------------------------
|
||||
// World
|
||||
//--------------------------------------------------
|
||||
@@ -147,7 +160,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4Box("World", fWorldSizeX, fWorldSizeY, fWorldSizeZ);
|
||||
|
||||
fLogicWorld =
|
||||
new G4LogicalVolume(solidWorld, FindMaterial("G4_AIR"), "World");
|
||||
new G4LogicalVolume(solidWorld, air, "World");
|
||||
|
||||
fPhysiWorld =
|
||||
new G4PVPlacement(0, G4ThreeVector(), fLogicWorld, "World", 0, false, 0);
|
||||
@@ -156,11 +169,13 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
// Extrusion
|
||||
//--------------------------------------------------
|
||||
|
||||
auto coating = FindMaterial("Coating");
|
||||
|
||||
G4VSolid* solidExtrusion = new G4Box("Extrusion", GetBarBase() / 2.,
|
||||
GetBarBase() / 2., GetBarLength() / 2.);
|
||||
|
||||
G4LogicalVolume* logicExtrusion =
|
||||
new G4LogicalVolume(solidExtrusion, FindMaterial("Coating"), "Extrusion");
|
||||
new G4LogicalVolume(solidExtrusion, coating, "Extrusion");
|
||||
|
||||
G4OpticalSurface* TiO2Surface = new G4OpticalSurface(
|
||||
"TiO2Surface", glisur, ground, dielectric_metal, fExtrusionPolish);
|
||||
@@ -188,6 +203,10 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
// Scintillator
|
||||
//--------------------------------------------------
|
||||
|
||||
auto polystyrene = FindMaterial("Polystyrene");
|
||||
//G4cout << "\nMaterial Properties Table for Polystyrene:" << G4endl;
|
||||
//polystyrene->GetMaterialPropertiesTable()->DumpTable();
|
||||
|
||||
G4VSolid* solidScintillator =
|
||||
new G4Box("Scintillator",
|
||||
GetBarBase() / 2. - GetCoatingThickness() - GetCoatingRadius(),
|
||||
@@ -195,11 +214,13 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
GetBarLength() / 2.);
|
||||
|
||||
G4LogicalVolume* logicScintillator = new G4LogicalVolume(
|
||||
solidScintillator, FindMaterial("Polystyrene"), "Scintillator");
|
||||
solidScintillator, polystyrene, "Scintillator");
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(), logicScintillator, "Scintillator",
|
||||
logicExtrusion, false, 0);
|
||||
|
||||
|
||||
G4LogicalVolume* logicScintSide = nullptr;
|
||||
G4LogicalVolume* logicScintCrnr = nullptr;
|
||||
if(GetCoatingRadius() > 0.)
|
||||
{
|
||||
G4VSolid* solidScintside =
|
||||
@@ -211,11 +232,11 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4Tubs("CrnrOfBar", 0.0 * cm, GetCoatingRadius(), GetBarLength() / 2.,
|
||||
0. * deg, 90. * deg);
|
||||
|
||||
G4LogicalVolume* logicScintSide = new G4LogicalVolume(
|
||||
solidScintside, FindMaterial("Polystyrene"), "SideOfBar");
|
||||
logicScintSide = new G4LogicalVolume(
|
||||
solidScintside, polystyrene, "SideOfBar");
|
||||
|
||||
G4LogicalVolume* logicScintCrnr = new G4LogicalVolume(
|
||||
solidScintcrnr, FindMaterial("Polystyrene"), "CrnrOfBar");
|
||||
logicScintCrnr = new G4LogicalVolume(
|
||||
solidScintcrnr, polystyrene, "CrnrOfBar");
|
||||
|
||||
G4double pos =
|
||||
GetBarBase() / 2. - GetCoatingThickness() - GetCoatingRadius() / 2.;
|
||||
@@ -227,12 +248,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
"SideOfBar", logicExtrusion, false, 1);
|
||||
|
||||
G4RotationMatrix* rot1 = new G4RotationMatrix();
|
||||
*rot1 = StringToRotationMatrix("Z90");
|
||||
*rot1 = rot1->inverse();
|
||||
if(*rot1 == G4RotationMatrix())
|
||||
{
|
||||
rot1 = nullptr;
|
||||
}
|
||||
rot1->rotateZ(-90.*deg);
|
||||
|
||||
new G4PVPlacement(rot1, G4ThreeVector(pos, 0., 0.), logicScintSide,
|
||||
"SideOfBar", logicExtrusion, false, 2);
|
||||
@@ -249,23 +265,13 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
"CrnrOfBar", logicExtrusion, false, 1);
|
||||
|
||||
G4RotationMatrix* rot2 = new G4RotationMatrix();
|
||||
*rot2 = StringToRotationMatrix("Z180");
|
||||
*rot2 = rot2->inverse();
|
||||
if(*rot2 == G4RotationMatrix())
|
||||
{
|
||||
rot2 = nullptr;
|
||||
}
|
||||
rot2->rotateZ(-180.*deg);
|
||||
|
||||
new G4PVPlacement(rot2, G4ThreeVector(-pos, -pos, 0.), logicScintCrnr,
|
||||
"CrnrOfBar", logicExtrusion, false, 2);
|
||||
|
||||
G4RotationMatrix* rot3 = new G4RotationMatrix();
|
||||
*rot3 = StringToRotationMatrix("Z270");
|
||||
*rot3 = rot3->inverse();
|
||||
if(*rot3 == G4RotationMatrix())
|
||||
{
|
||||
rot3 = nullptr;
|
||||
}
|
||||
rot3->rotateZ(-270.*deg);
|
||||
|
||||
new G4PVPlacement(rot3, G4ThreeVector(pos, -pos, 0.), logicScintCrnr,
|
||||
"CrnrOfBar", logicExtrusion, false, 3);
|
||||
@@ -276,7 +282,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
G4VSolid* solidHole = new G4Tubs(
|
||||
"Hole", 0., GetHoleRadius(), GetHoleLength() / 2., 0. * deg, 360. * deg);
|
||||
|
||||
fLogicHole = new G4LogicalVolume(solidHole, FindMaterial("G4_AIR"), "Hole");
|
||||
fLogicHole = new G4LogicalVolume(solidHole, air, "Hole");
|
||||
|
||||
fPhysiHole = new G4PVPlacement(0, G4ThreeVector(), fLogicHole, "Hole",
|
||||
logicScintillator, false, 0);
|
||||
@@ -286,21 +292,11 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
// Fiber
|
||||
//--------------------------------------------------
|
||||
|
||||
ConstructFiber();
|
||||
|
||||
return fPhysiWorld;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSDetectorConstruction::ConstructFiber()
|
||||
{
|
||||
if(!(fLogicHole) || !(fPhysiHole))
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "The Fiber Hole has not been constructed";
|
||||
G4Exception("WLSDetectorConstruction::ConstructFiber", "", FatalException,
|
||||
ed);
|
||||
G4Exception("WLSDetectorConstruction", "wls001", FatalException, ed);
|
||||
}
|
||||
|
||||
// Pointers to the most recently constructed volume
|
||||
@@ -317,11 +313,16 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
if(fSurfaceRoughness < 1.)
|
||||
opSurface = new G4OpticalSurface("RoughSurface", glisur, ground,
|
||||
dielectric_dielectric, fSurfaceRoughness);
|
||||
|
||||
G4LogicalVolume* logicWLSfiber = nullptr;
|
||||
G4LogicalVolume* logicClad1 = nullptr;
|
||||
G4LogicalVolume* logicClad2 = nullptr;
|
||||
G4VPhysicalVolume* physiClad1 = nullptr;
|
||||
G4VPhysicalVolume* physiClad2 = nullptr;
|
||||
|
||||
G4LogicalVolume* logicClad1 = nullptr;
|
||||
G4LogicalVolume* logicClad2 = nullptr;
|
||||
G4VPhysicalVolume* physiClad1 = nullptr;
|
||||
G4VPhysicalVolume* physiClad2 = nullptr;
|
||||
auto fpethylene = FindMaterial("FPethylene");
|
||||
auto pethylene = FindMaterial("Pethylene");
|
||||
auto pmma = FindMaterial("PMMA");
|
||||
|
||||
// Determine the number of cladding layers to be built
|
||||
switch(fNumOfCladLayers)
|
||||
@@ -332,6 +333,9 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
// Cladding 2
|
||||
//--------------------------------------------------
|
||||
|
||||
//G4cout << "\nMaterial Properties Table for fPethylene:" << G4endl;
|
||||
//fpethylene->GetMaterialPropertiesTable()->DumpTable();
|
||||
|
||||
G4VSolid* solidClad2;
|
||||
|
||||
if(fXYRatio == 1.)
|
||||
@@ -340,7 +344,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
solidClad2 = new G4EllipticalTube("Clad2", fClad2RX, fClad2RY, fClad2Z);
|
||||
|
||||
logicClad2 =
|
||||
new G4LogicalVolume(solidClad2, FindMaterial("FPethylene"), "Clad2");
|
||||
new G4LogicalVolume(solidClad2, fpethylene, "Clad2");
|
||||
|
||||
physiClad2 =
|
||||
new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, fWLSfiberOrigin),
|
||||
@@ -357,7 +361,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
|
||||
logicPlacement = logicClad2;
|
||||
physiPlacement = physiClad2;
|
||||
break;
|
||||
[[fallthrough]];
|
||||
|
||||
case 1:
|
||||
|
||||
@@ -365,6 +369,9 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
// Cladding 1
|
||||
//--------------------------------------------------
|
||||
|
||||
//G4cout << "\nMaterial Properties Table for Pethylene:" << G4endl;
|
||||
//pethylene->GetMaterialPropertiesTable()->DumpTable();
|
||||
|
||||
G4VSolid* solidClad1;
|
||||
|
||||
if(fXYRatio == 1.)
|
||||
@@ -373,7 +380,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
solidClad1 = new G4EllipticalTube("Clad1", fClad1RX, fClad1RY, fClad1Z);
|
||||
|
||||
logicClad1 =
|
||||
new G4LogicalVolume(solidClad1, FindMaterial("Pethylene"), "Clad1");
|
||||
new G4LogicalVolume(solidClad1, pethylene, "Clad1");
|
||||
|
||||
physiClad1 =
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., fWLSfiberOrigin), logicClad1,
|
||||
@@ -391,7 +398,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
|
||||
logicPlacement = logicClad1;
|
||||
physiPlacement = physiClad1;
|
||||
break;
|
||||
[[fallthrough]];
|
||||
|
||||
default:
|
||||
|
||||
@@ -399,6 +406,9 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
// WLS Fiber
|
||||
//--------------------------------------------------
|
||||
|
||||
//G4cout << "\nMaterial Properties Table for PMMA:" << G4endl;
|
||||
//pmma->GetMaterialPropertiesTable()->DumpTable();
|
||||
|
||||
G4VSolid* solidWLSfiber;
|
||||
|
||||
if(fXYRatio == 1.)
|
||||
@@ -412,8 +422,8 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
fWLSfiberRY, fWLSfiberZ);
|
||||
}
|
||||
|
||||
G4LogicalVolume* logicWLSfiber =
|
||||
new G4LogicalVolume(solidWLSfiber, FindMaterial("PMMA"), "WLSFiber");
|
||||
logicWLSfiber =
|
||||
new G4LogicalVolume(solidWLSfiber, pmma, "WLSFiber");
|
||||
|
||||
logicWLSfiber->SetUserLimits(
|
||||
new G4UserLimits(DBL_MAX, DBL_MAX, 10. * ms));
|
||||
@@ -438,13 +448,17 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
//--------------------------------------------------
|
||||
|
||||
// Place the mirror only if the user wants the mirror
|
||||
G4LogicalVolume* logicMirror = nullptr;
|
||||
|
||||
auto aluminum = FindMaterial("G4_Al");
|
||||
|
||||
if(fMirrorToggle)
|
||||
{
|
||||
G4VSolid* solidMirror =
|
||||
new G4Box("Mirror", fMirrorRmax, fMirrorRmax, fMirrorZ);
|
||||
|
||||
G4LogicalVolume* logicMirror =
|
||||
new G4LogicalVolume(solidMirror, FindMaterial("G4_Al"), "Mirror");
|
||||
logicMirror =
|
||||
new G4LogicalVolume(solidMirror, aluminum, "Mirror");
|
||||
|
||||
G4OpticalSurface* mirrorSurface = new G4OpticalSurface(
|
||||
"MirrorSurface", glisur, ground, dielectric_metal, fMirrorPolish);
|
||||
@@ -476,7 +490,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
G4VSolid* solidCouple = new G4Box("Couple", fCoupleRX, fCoupleRY, fCoupleZ);
|
||||
|
||||
G4LogicalVolume* logicCouple =
|
||||
new G4LogicalVolume(solidCouple, FindMaterial("G4_AIR"), "Couple");
|
||||
new G4LogicalVolume(solidCouple, air, "Couple");
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., fCoupleOrigin), logicCouple,
|
||||
"Couple", fLogicWorld, false, 0);
|
||||
@@ -493,7 +507,9 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
fMPPCTheta = 0.;
|
||||
fMPPCOriginX = std::sin(fMPPCTheta) * (fMPPCDist + fClrfiberZ);
|
||||
fMPPCOriginZ = -fCoupleZ + std::cos(fMPPCTheta) * (fMPPCDist + fClrfiberZ);
|
||||
G4cerr << "Invalid alignment. Alignment Reset to 0" << G4endl;
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Invalid alignment. Alignment reset to 0.";
|
||||
G4Exception("WLSDetectorConstruction", "wls002", JustWarning, ed);
|
||||
}
|
||||
|
||||
// Clear Fiber (Coupling Layer)
|
||||
@@ -511,7 +527,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
}
|
||||
|
||||
G4LogicalVolume* logicClrfiber =
|
||||
new G4LogicalVolume(solidClrfiber, FindMaterial("G4_AIR"), "ClearFiber");
|
||||
new G4LogicalVolume(solidClrfiber, air, "ClearFiber");
|
||||
|
||||
new G4PVPlacement(new G4RotationMatrix(CLHEP::HepRotationY(-fMPPCTheta)),
|
||||
G4ThreeVector(fMPPCOriginX, 0.0, fMPPCOriginZ),
|
||||
@@ -530,7 +546,7 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
solidPhotonDet = new G4Tubs("PhotonDet", 0., fMPPCHalfL, fMPPCZ, 0., twopi);
|
||||
|
||||
G4LogicalVolume* logicPhotonDet =
|
||||
new G4LogicalVolume(solidPhotonDet, FindMaterial("G4_Al"), "PhotonDet_LV");
|
||||
new G4LogicalVolume(solidPhotonDet, aluminum, "PhotonDet_LV");
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicPhotonDet, "PhotonDet",
|
||||
logicClrfiber, false, 0);
|
||||
@@ -553,8 +569,88 @@ void WLSDetectorConstruction::ConstructFiber()
|
||||
|
||||
new G4LogicalSkinSurface("PhotonDetSurface", logicPhotonDet,
|
||||
photonDetSurface);
|
||||
|
||||
// visualization attributes -------------------------------------------------
|
||||
|
||||
auto visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
visAttributes->SetVisibility(false);
|
||||
fLogicWorld->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.2,0.2,0.2,0.5));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicExtrusion->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.0,1.0,0.9));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicScintillator->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.8,0.2,0.2));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicScintSide->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.8,0.2,0.2));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicScintCrnr->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.4,0.0,0.0,0.5));
|
||||
visAttributes->SetVisibility(true);
|
||||
fLogicHole->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
if(logicClad1 != nullptr)
|
||||
{
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.8,0.5,0.5));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicClad1->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
}
|
||||
|
||||
if(logicClad2 != nullptr)
|
||||
{
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.5,0.8,0.5));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicClad2->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
}
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.8,0.8,1.0));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicWLSfiber->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
if(fMirrorToggle == true)
|
||||
{
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.3,0.3,1.0,0.3));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicMirror->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
}
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.0,0.0,0.5,0.5));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicCouple->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(0.3,0.3,0.3,0.5));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicClrfiber->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
visAttributes = new G4VisAttributes(G4Colour(1.0,1.0,1.0,0.8));
|
||||
visAttributes->SetVisibility(true);
|
||||
logicPhotonDet->SetVisAttributes(visAttributes);
|
||||
fVisAttributes.push_back(visAttributes);
|
||||
|
||||
return fPhysiWorld;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSDetectorConstruction::ConstructSDandField()
|
||||
@@ -603,72 +699,13 @@ void WLSDetectorConstruction::UpdateGeometryParameters()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4RotationMatrix WLSDetectorConstruction::StringToRotationMatrix(
|
||||
G4String rotation)
|
||||
{
|
||||
// We apply successive rotations OF THE OBJECT around the FIXED
|
||||
// axes of the parent's local coordinates; rotations are applied
|
||||
// left-to-right (rotation="r1,r2,r3" => r1 then r2 then r3).
|
||||
|
||||
G4RotationMatrix rot;
|
||||
|
||||
unsigned int place = 0;
|
||||
|
||||
while(place < rotation.size())
|
||||
{
|
||||
G4double angle;
|
||||
char* p;
|
||||
|
||||
const G4String tmpstring = rotation.substr(place + 1);
|
||||
angle = strtod(tmpstring.c_str(), &p) * deg;
|
||||
|
||||
if(!p || (*p != (char) ',' && *p != (char) '\0'))
|
||||
{
|
||||
G4cerr << "Invalid rotation specification: " << rotation.c_str()
|
||||
<< G4endl;
|
||||
return rot;
|
||||
}
|
||||
|
||||
G4RotationMatrix thisRotation;
|
||||
|
||||
switch(rotation.substr(place, 1).c_str()[0])
|
||||
{
|
||||
case 'X':
|
||||
case 'x':
|
||||
thisRotation = G4RotationMatrix(CLHEP::HepRotationX(angle));
|
||||
break;
|
||||
case 'Y':
|
||||
case 'y':
|
||||
thisRotation = G4RotationMatrix(CLHEP::HepRotationY(angle));
|
||||
break;
|
||||
case 'Z':
|
||||
case 'z':
|
||||
thisRotation = G4RotationMatrix(CLHEP::HepRotationZ(angle));
|
||||
break;
|
||||
default:
|
||||
G4cerr << " Invalid rotation specification: " << rotation << G4endl;
|
||||
return rot;
|
||||
}
|
||||
|
||||
rot = thisRotation * rot;
|
||||
place = rotation.find(',', place);
|
||||
if(place > rotation.size())
|
||||
break;
|
||||
++place;
|
||||
}
|
||||
|
||||
return rot;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSDetectorConstruction::SetPhotonDetGeometry(G4String shape)
|
||||
// Set the Geometry of the PhotonDet detector
|
||||
// Pre: shape must be either "Circle" and "Square"
|
||||
{
|
||||
if(shape == "Circle" || shape == "Square")
|
||||
fMPPCShape = shape;
|
||||
G4RunManager::GetRunManager()->ReinitializeGeometry();
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include "WLSPhotonDetHit.hh"
|
||||
#include "WLSRun.hh"
|
||||
#include "WLSRunAction.hh"
|
||||
#include "WLSTrajectory.hh"
|
||||
|
||||
#include "G4AnalysisManager.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
@@ -75,7 +75,6 @@ void WLSEventAction::BeginOfEventAction(const G4Event*)
|
||||
fClad1Bounce = 0;
|
||||
fClad2Bounce = 0;
|
||||
fReflected = 0;
|
||||
fDetected = 0;
|
||||
fEscaped = 0;
|
||||
fMirror = 0;
|
||||
}
|
||||
@@ -108,6 +107,14 @@ void WLSEventAction::EndOfEventAction(const G4Event* evt)
|
||||
n_hit = mppcHC->entries();
|
||||
}
|
||||
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
analysisManager->FillH1(2, mppcHC->entries());
|
||||
for (size_t i = 0; i < mppcHC->entries(); ++i) {
|
||||
auto pdHit = (*mppcHC)[i];
|
||||
analysisManager->FillH1(0, pdHit->GetEnergy());
|
||||
analysisManager->FillH1(1, pdHit->GetArrivalTime());
|
||||
}
|
||||
|
||||
if(fVerboseLevel > 1)
|
||||
{
|
||||
G4cout << "-------------------------------------" << G4endl
|
||||
@@ -121,7 +128,6 @@ void WLSEventAction::EndOfEventAction(const G4Event* evt)
|
||||
<< " Clad1 Bounce: " << fClad1Bounce << G4endl
|
||||
<< " Clad2 Bounce: " << fClad2Bounce << G4endl
|
||||
<< " Reflected: " << fReflected << G4endl
|
||||
<< " Detected: " << fDetected << G4endl
|
||||
<< " Escaped: " << fEscaped << G4endl
|
||||
<< " Mirror: " << fMirror << G4endl
|
||||
<< " Detector hit: " << n_hit << G4endl;
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
//
|
||||
#include "WLSPhotonDetHit.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<WLSPhotonDetHit>* WLSPhotonDetHitAllocator = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -37,6 +39,7 @@ G4ThreadLocal G4Allocator<WLSPhotonDetHit>* WLSPhotonDetHitAllocator = nullptr;
|
||||
WLSPhotonDetHit::WLSPhotonDetHit()
|
||||
{
|
||||
fArrivalTime = 0.;
|
||||
fEnergy = 0.;
|
||||
fPosArrive = G4ThreeVector(0., 0., 0.);
|
||||
fPosExit = G4ThreeVector(0., 0., 0.);
|
||||
}
|
||||
@@ -44,11 +47,12 @@ WLSPhotonDetHit::WLSPhotonDetHit()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSPhotonDetHit::WLSPhotonDetHit(G4ThreeVector pExit, G4ThreeVector pArrive,
|
||||
G4double pTime)
|
||||
G4double pTime, G4double pEnergy)
|
||||
{
|
||||
fPosExit = pExit;
|
||||
fPosArrive = pArrive;
|
||||
fArrivalTime = pTime;
|
||||
fEnergy = pEnergy;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -70,6 +74,7 @@ const WLSPhotonDetHit& WLSPhotonDetHit::operator=(const WLSPhotonDetHit& right)
|
||||
fPosExit = right.fPosExit;
|
||||
fPosArrive = right.fPosArrive;
|
||||
fArrivalTime = right.fArrivalTime;
|
||||
fEnergy = right.fEnergy;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -79,5 +84,21 @@ const WLSPhotonDetHit& WLSPhotonDetHit::operator=(const WLSPhotonDetHit& right)
|
||||
G4bool WLSPhotonDetHit::operator==(const WLSPhotonDetHit& right) const
|
||||
{
|
||||
return fPosExit == right.fPosExit && fPosArrive == right.fPosArrive &&
|
||||
fArrivalTime == right.fArrivalTime;
|
||||
fArrivalTime == right.fArrivalTime && fEnergy == right.fEnergy;
|
||||
}
|
||||
|
||||
void WLSPhotonDetHit::Print()
|
||||
{
|
||||
G4cout
|
||||
<< "Arrival time: "
|
||||
<< std::setw(7) << G4BestUnit(fArrivalTime, "Time")
|
||||
<< "Arrival position: ("
|
||||
<< std::setw(7) << G4BestUnit(fPosArrive.x(), "Length") << ", "
|
||||
<< std::setw(7) << G4BestUnit(fPosArrive.y(), "Length") << "); "
|
||||
<< "Exit position: ("
|
||||
<< std::setw(7) << G4BestUnit(fPosExit.x(), "Length") << ", "
|
||||
<< std::setw(7) << G4BestUnit(fPosExit.y(), "Length") << "); "
|
||||
<< "Energy: "
|
||||
<< std::setw(7) << G4BestUnit(fEnergy, "Energy")
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
@@ -72,17 +72,7 @@ void WLSPhotonDetSD::Initialize(G4HCofThisEvent* HCE)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool WLSPhotonDetSD::ProcessHits(G4Step*, G4TouchableHistory*)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool WLSPhotonDetSD::ProcessHits_boundary(const G4Step* aStep,
|
||||
G4TouchableHistory*)
|
||||
// Generates a hit and uses the postStepPoint; PostStepPoint because the hit
|
||||
// is generated manually when the photon hits the detector
|
||||
G4bool WLSPhotonDetSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
||||
{
|
||||
if(!aStep)
|
||||
return false;
|
||||
@@ -106,6 +96,7 @@ G4bool WLSPhotonDetSD::ProcessHits_boundary(const G4Step* aStep,
|
||||
G4ThreeVector photonExit = trackInformation->GetExitPosition();
|
||||
G4ThreeVector photonArrive = thePostPoint->GetPosition();
|
||||
G4double arrivalTime = theTrack->GetGlobalTime();
|
||||
G4double energy = theTrack->GetTotalEnergy();
|
||||
|
||||
// Convert the global coordinate for arriving photons into
|
||||
// the local coordinate of the detector
|
||||
@@ -114,7 +105,19 @@ G4bool WLSPhotonDetSD::ProcessHits_boundary(const G4Step* aStep,
|
||||
|
||||
// Creating the hit and add it to the collection
|
||||
fPhotonDetHitCollection->insert(
|
||||
new WLSPhotonDetHit(photonExit, photonArrive, arrivalTime));
|
||||
new WLSPhotonDetHit(photonExit, photonArrive, arrivalTime, energy));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WLSPhotonDetSD::EndOfEvent(G4HCofThisEvent*)
|
||||
{
|
||||
if ( verboseLevel>1 ) {
|
||||
G4int nofHits = fPhotonDetHitCollection->entries();
|
||||
G4cout << G4endl
|
||||
<< "-------->Hits Collection: in this event there are " << nofHits
|
||||
<< " hits in the photon detector: " << G4endl;
|
||||
for ( G4int i=0; i<nofHits; i++ ) (*fPhotonDetHitCollection)[i]->Print();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ void WLSPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
}
|
||||
|
||||
// this does not work.
|
||||
G4String cmd = "/gun/energy " + G4String(sampledEnergy / eV) + " eV";
|
||||
G4String cmd = "/gun/energy " + G4UIcommand::ConvertToString(sampledEnergy / eV) + " eV";
|
||||
G4UImanager::GetUIpointer()->ApplyCommand(cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@ WLSRun::WLSRun()
|
||||
fClad2Bounce2 = 0.;
|
||||
fReflected = 0.;
|
||||
fReflected2 = 0.;
|
||||
fDetected = 0.;
|
||||
fDetected2 = 0.;
|
||||
fEscaped = 0.;
|
||||
fEscaped2 = 0.;
|
||||
fMirror = 0.;
|
||||
@@ -92,8 +90,6 @@ void WLSRun::Merge(const G4Run* run)
|
||||
fClad2Bounce2 += localRun->fClad2Bounce2;
|
||||
fReflected += localRun->fReflected;
|
||||
fReflected2 += localRun->fReflected2;
|
||||
fDetected += localRun->fDetected;
|
||||
fDetected2 += localRun->fDetected2;
|
||||
fEscaped += localRun->fEscaped;
|
||||
fEscaped2 += localRun->fEscaped2;
|
||||
fMirror += localRun->fMirror;
|
||||
@@ -184,14 +180,6 @@ void WLSRun::EndOfRun()
|
||||
else
|
||||
rmsReflected = 0.;
|
||||
|
||||
fDetected = fDetected / TotNbofEvents;
|
||||
fDetected2 = fDetected2 / TotNbofEvents;
|
||||
G4double rmsDetected = fDetected2 - fDetected * fDetected;
|
||||
if(rmsDetected > 0.)
|
||||
rmsDetected = std::sqrt(rmsDetected);
|
||||
else
|
||||
rmsDetected = 0.;
|
||||
|
||||
fEscaped = fEscaped / TotNbofEvents;
|
||||
fEscaped2 = fEscaped2 / TotNbofEvents;
|
||||
G4double rmsEscaped = fEscaped2 - fEscaped * fEscaped;
|
||||
@@ -229,7 +217,6 @@ void WLSRun::EndOfRun()
|
||||
<< " +- " << rmsClad1Bounce << G4endl
|
||||
<< " Clad2 Bounce: " << fClad2Bounce << " +- " << rmsClad2Bounce
|
||||
<< G4endl << " Reflected: " << fReflected << " +- " << rmsReflected
|
||||
<< G4endl << " Detected: " << fDetected << " +- " << rmsDetected
|
||||
<< G4endl << " Escaped: " << fEscaped << " +- " << rmsEscaped
|
||||
<< G4endl << " Mirror: " << fMirror << " +- " << rmsMirror
|
||||
<< G4endl << " Detector hit: " << fDetectorHits << " +- "
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "WLSRun.hh"
|
||||
#include "WLSSteppingAction.hh"
|
||||
|
||||
#include "G4AnalysisManager.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "Randomize.hh"
|
||||
@@ -43,7 +44,20 @@
|
||||
|
||||
WLSRunAction::WLSRunAction()
|
||||
: fRun(nullptr)
|
||||
{}
|
||||
{
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
analysisManager->SetDefaultFileType("root");
|
||||
analysisManager->SetVerboseLevel(1);
|
||||
G4cout << "Using " << analysisManager->GetType() << G4endl;
|
||||
|
||||
analysisManager->CreateH1("Energy", "Energy of optical photon", 100,
|
||||
2.*CLHEP::eV, 3.2*CLHEP::eV);
|
||||
analysisManager->CreateH1("Time", "Arrival time", 100, 0., 100.*CLHEP::ns);
|
||||
analysisManager->CreateH1("Number of photons", "Number of photons", 100, 0., 100.);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -57,12 +71,37 @@ G4Run* WLSRunAction::GenerateRun()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSRunAction::BeginOfRunAction(const G4Run*) {}
|
||||
void WLSRunAction::BeginOfRunAction(const G4Run*)
|
||||
{
|
||||
G4AnalysisManager::Instance()->OpenFile("wls");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSRunAction::EndOfRunAction(const G4Run*)
|
||||
{
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
if (analysisManager->GetH1(0)) {
|
||||
G4cout << G4endl << " ----> print histograms statistics ";
|
||||
if(isMaster)
|
||||
{
|
||||
G4cout << "for the entire run " << G4endl << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << "for the local thread " << G4endl << G4endl;
|
||||
}
|
||||
|
||||
G4cout << " Mean number of photons detected/event: "
|
||||
<< analysisManager->GetH1(2)->mean()
|
||||
<< " rms = "
|
||||
<< analysisManager->GetH1(2)->rms() << G4endl;
|
||||
|
||||
}
|
||||
|
||||
analysisManager->Write();
|
||||
analysisManager->CloseFile();
|
||||
|
||||
|
||||
if(isMaster)
|
||||
fRun->EndOfRun();
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
|
||||
// Record Photons that missed the photon detector but escaped from readout
|
||||
if(!thePostPV && trackInformation->IsStatus(EscapedFromReadOut))
|
||||
{
|
||||
G4cout << "SteppingAction: status = EscapedFromReadOut" << G4endl;
|
||||
//G4cout << "SteppingAction: status = EscapedFromReadOut" << G4endl;
|
||||
fEventAction->AddEscaped();
|
||||
// UpdateHistogramSuccess(thePostPoint,theTrack);
|
||||
ResetCounters();
|
||||
@@ -308,7 +308,7 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
|
||||
}
|
||||
return;
|
||||
|
||||
// Reflection of the mirror
|
||||
// Reflection off the mirror
|
||||
case LambertianReflection:
|
||||
case LobeReflection:
|
||||
case SpikeReflection:
|
||||
@@ -324,30 +324,12 @@ void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
|
||||
|
||||
// Detected by a detector
|
||||
case Detection:
|
||||
// Detected automatically with G4OpBoundaryProcess->InvokeSD set true
|
||||
|
||||
// Check if the photon hits the detector and process the hit if it does
|
||||
if(thePostPVname == "PhotonDet")
|
||||
{
|
||||
// G4cout << "Detection" << G4endl;
|
||||
fEventAction->AddDetected();
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
G4String SDname = "WLS/PhotonDet";
|
||||
WLSPhotonDetSD* mppcSD =
|
||||
(WLSPhotonDetSD*) SDman->FindSensitiveDetector(SDname);
|
||||
|
||||
if(mppcSD)
|
||||
mppcSD->ProcessHits_boundary(theStep, nullptr);
|
||||
|
||||
// Record Photons that escaped at the end
|
||||
// if (trackInformation->IsStatus(EscapedFromReadOut))
|
||||
// UpdateHistogramSuccess(thePostPoint,theTrack);
|
||||
|
||||
// Stop Tracking when it hits the detector's surface
|
||||
ResetCounters();
|
||||
theTrack->SetTrackStatus(fStopAndKill);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
// Stop Tracking when it hits the detector's surface
|
||||
ResetCounters();
|
||||
theTrack->SetTrackStatus(fStopAndKill);
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "G4Step.hh"
|
||||
#include "G4StepStatus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VProcess.hh"
|
||||
|
||||
@@ -136,7 +137,7 @@ std::vector<G4AttValue>* WLSTrajectoryPoint::CreateAttValues() const
|
||||
values->push_back(G4AttValue("Time", G4BestUnit(fTime, "Time"), ""));
|
||||
values->push_back(
|
||||
G4AttValue("Momentum", G4BestUnit(fMomentum, "Momentum"), ""));
|
||||
values->push_back(G4AttValue("StepStatus", fStepStatus, ""));
|
||||
values->push_back(G4AttValue("StepStatus", G4UIcommand::ConvertToString(fStepStatus), ""));
|
||||
values->push_back(G4AttValue("VolumeName", fVolumeName, ""));
|
||||
|
||||
return values;
|
||||
|
||||
@@ -5,6 +5,28 @@
|
||||
#
|
||||
/control/verbose 2
|
||||
/run/verbose 2
|
||||
|
||||
/WLS/setPhotonDetGeometry Circle
|
||||
/WLS/setNumOfLayers 2
|
||||
/WLS/setSurfaceRoughness 0.999
|
||||
/WLS/setXYRatio 0.8
|
||||
/WLS/setWLSLength 1. m
|
||||
/WLS/setWLSRadius 0.5 mm
|
||||
/WLS/setClad1Radius 0.3 mm
|
||||
/WLS/setClad2Radius 0.1 mm
|
||||
#
|
||||
/WLS/setPhotonDetHalfLength 0.6 mm
|
||||
/WLS/setGap 0.15 mm
|
||||
/WLS/setAlignment 0.1 deg
|
||||
/WLS/setMirror true
|
||||
|
||||
/WLS/setBarLength 1.1 m
|
||||
/WLS/setBarBase 9.5 mm
|
||||
/WLS/setHoleRadius 0.9 mm
|
||||
/WLS/setCoatingThickness 0.3 mm
|
||||
/WLS/setCoatingRadius 1.775 mm
|
||||
|
||||
|
||||
/run/initialize
|
||||
#
|
||||
# Use this open statement to create an OpenGL view:
|
||||
@@ -34,10 +56,10 @@
|
||||
#/vis/viewer/set/viewpointThetaPhi 90. 0.
|
||||
#
|
||||
# Specify zoom value:
|
||||
/vis/viewer/zoom 1.4
|
||||
/vis/viewer/zoom 20
|
||||
#
|
||||
# Specify style (surface or wireframe):
|
||||
#/vis/viewer/set/style wireframe
|
||||
/vis/viewer/set/style surface
|
||||
#
|
||||
# Draw coordinate axes:
|
||||
#/vis/scene/add/axes 0 0 0 1 m
|
||||
@@ -75,3 +97,19 @@
|
||||
#
|
||||
# For file-based drivers, use this to create an empty detector view:
|
||||
#/vis/viewer/flush
|
||||
|
||||
/gps/particle e-
|
||||
|
||||
/gps/energy 10 MeV
|
||||
|
||||
/gps/pos/type Plane
|
||||
/gps/pos/shape Circle
|
||||
/gps/pos/radius 0.5 mm
|
||||
|
||||
/gps/pos/centre 0.0 0.0 0.0 cm
|
||||
/gps/pos/rot1 0 1 0
|
||||
/gps/pos/rot2 0 0 1
|
||||
|
||||
/gps/ang/type iso
|
||||
/gps/ang/mintheta 0.0 deg
|
||||
/gps/ang/maxtheta 90.0 deg
|
||||
|
||||
@@ -69,6 +69,10 @@ int main(int argc, char** argv)
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->ReplacePhysics(new G4EmStandardPhysics_option4());
|
||||
G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics();
|
||||
|
||||
auto opticalParams = G4OpticalParameters::Instance();
|
||||
opticalParams->SetBoundaryInvokeSD(true);
|
||||
|
||||
physicsList->RegisterPhysics(opticalPhysics);
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-07-ref-06 (25-June-2021)
|
||||
Geant4 version Name: geant4-10-07-ref-07 (31-August-2021)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -33,7 +33,6 @@ Registered graphics systems are:
|
||||
G4HepRep (HepRepXML)
|
||||
G4HepRepFile (HepRepFile)
|
||||
RayTracer (RayTracer)
|
||||
VRML1FILE (VRML1FILE)
|
||||
VRML2FILE (VRML2FILE)
|
||||
gMocrenFile (gMocrenFile)
|
||||
OpenGLImmediateQt (OGLIQt, OGLI)
|
||||
@@ -202,29 +201,29 @@ has been modified since last Run.
|
||||
phot: for gamma SubType=12 BuildTable=0
|
||||
LambdaPrime table from 200 keV to 100 TeV in 174 bins
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LivermorePhElectric : Emin= 0 meV Emax= 100 TeV SauterGavrila Fluo
|
||||
LivermorePhElectric : Emin= 0 Emax= 100 TeV SauterGavrila Fluo
|
||||
|
||||
compt: for gamma SubType=13 BuildTable=1
|
||||
Lambda table from 100 eV to 1 MeV, 20 bins/decade, spline: 1
|
||||
LambdaPrime table from 1 MeV to 100 TeV in 160 bins
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LowEPComptonModel : Emin= 0 meV Emax= 20 MeV Fluo
|
||||
LowEPComptonModel : Emin= 0 Emax= 20 MeV Fluo
|
||||
KleinNishina : Emin= 20 MeV Emax= 100 TeV Fluo
|
||||
|
||||
conv: for gamma SubType=14 BuildTable=1
|
||||
Lambda table from 1.022 MeV to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BetheHeitler5D : Emin= 0 meV Emax= 100 TeV ModifiedTsai
|
||||
BetheHeitler5D : Emin= 0 Emax= 100 TeV ModifiedTsai
|
||||
|
||||
Rayl: for gamma SubType=11 BuildTable=1
|
||||
Lambda table from 100 eV to 100 keV, 20 bins/decade, spline: 0
|
||||
LambdaPrime table from 100 keV to 100 TeV in 180 bins
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LivermoreRayleigh : Emin= 0 meV Emax= 100 TeV CullenGenerator
|
||||
LivermoreRayleigh : Emin= 0 Emax= 100 TeV CullenGenerator
|
||||
|
||||
msc: for e- SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
GoudsmitSaunderson : Emin= 0 meV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
|
||||
GoudsmitSaunderson : Emin= 0 Emax= 100 MeV Nbins=120 100 eV - 100 MeV
|
||||
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
|
||||
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
@@ -234,7 +233,7 @@ eIoni: for e- XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.01 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
LowEnergyIoni : Emin= 0 meV Emax= 100 keV deltaVI
|
||||
LowEnergyIoni : Emin= 0 Emax= 100 keV deltaVI
|
||||
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
|
||||
|
||||
eBrem: for e- XStype:4 SubType=3
|
||||
@@ -242,7 +241,7 @@ eBrem: for e- XStype:4 SubType=3
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eBremSB : Emin= 0 meV Emax= 1 GeV AngularGen2BS
|
||||
eBremSB : Emin= 0 Emax= 1 GeV AngularGen2BS
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
|
||||
|
||||
ePairProd: for e- XStype:1 SubType=4
|
||||
@@ -250,7 +249,7 @@ ePairProd: for e- XStype:1 SubType=4
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 25x1001 from 0.1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ePairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
ePairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for e- XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 1
|
||||
@@ -260,7 +259,7 @@ CoulombScat: for e- XStype:3 SubType=1 BuildTable=1
|
||||
|
||||
msc: for e+ SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
GoudsmitSaunderson : Emin= 0 meV Emax= 100 MeV Nbins=120 100 eV - 100 MeV
|
||||
GoudsmitSaunderson : Emin= 0 Emax= 100 MeV Nbins=120 100 eV - 100 MeV
|
||||
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
WentzelVIUni : Emin= 100 MeV Emax= 100 TeV Nbins=120 100 MeV - 100 TeV
|
||||
StepLim=SafetyPlus Rfact=0.08 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
@@ -270,7 +269,7 @@ eIoni: for e+ XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.2, 0.01 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
PenIoni : Emin= 0 meV Emax= 100 keV
|
||||
PenIoni : Emin= 0 Emax= 100 keV
|
||||
MollerBhabha : Emin= 100 keV Emax= 100 TeV deltaVI
|
||||
|
||||
eBrem: for e+ XStype:4 SubType=3
|
||||
@@ -278,7 +277,7 @@ eBrem: for e+ XStype:4 SubType=3
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
LPM flag: 1 for E > 1 GeV, VertexHighEnergyTh(GeV)= 100000
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eBremSB : Emin= 0 meV Emax= 1 GeV AngularGen2BS
|
||||
eBremSB : Emin= 0 Emax= 1 GeV AngularGen2BS
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV AngularGen2BS
|
||||
|
||||
ePairProd: for e+ XStype:1 SubType=4
|
||||
@@ -286,11 +285,11 @@ ePairProd: for e+ XStype:1 SubType=4
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 25x1001 from 0.1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ePairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
ePairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 meV Emax= 100 TeV
|
||||
eplus2gg : Emin= 0 Emax= 100 TeV
|
||||
|
||||
CoulombScat: for e+ XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from 100 MeV to 100 TeV, 20 bins/decade, spline: 1
|
||||
@@ -300,7 +299,7 @@ CoulombScat: for e+ XStype:3 SubType=1 BuildTable=1
|
||||
|
||||
msc: for proton SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
hIoni: for proton XStype:1 SubType=2
|
||||
@@ -308,35 +307,35 @@ hIoni: for proton XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 meV Emax= 2 MeV deltaVI
|
||||
Bragg : Emin= 0 Emax= 2 MeV deltaVI
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
|
||||
|
||||
hBrems: for proton XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
hPairProd: for proton XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for proton XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
nuclearStopping: for proton SubType=8 BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU49NucStopping : Emin= 0 meV Emax= 1 MeV
|
||||
ICRU49NucStopping : Emin= 0 Emax= 1 MeV
|
||||
|
||||
msc: for GenericIon SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 meV Emax= 100 TeV
|
||||
UrbanMsc : Emin= 0 Emax= 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
ionIoni: for GenericIon XStype:1 SubType=2
|
||||
@@ -344,15 +343,15 @@ ionIoni: for GenericIon XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ParamICRU73 : Emin= 0 meV Emax= 100 TeV deltaVI
|
||||
ParamICRU73 : Emin= 0 Emax= 100 TeV deltaVI
|
||||
|
||||
nuclearStopping: for GenericIon SubType=8 BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU49NucStopping : Emin= 0 meV Emax= 1 MeV
|
||||
ICRU49NucStopping : Emin= 0 Emax= 1 MeV
|
||||
|
||||
msc: for alpha SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
UrbanMsc : Emin= 0 meV Emax= 100 TeV
|
||||
UrbanMsc : Emin= 0 Emax= 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
ionIoni: for alpha XStype:1 SubType=2
|
||||
@@ -360,16 +359,16 @@ ionIoni: for alpha XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.02 mm), integ: 1, fluct: 1, linLossLim= 0.02
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
BraggIon : Emin= 0 meV Emax=7.9452 MeV deltaVI
|
||||
BraggIon : Emin= 0 Emax=7.9452 MeV deltaVI
|
||||
BetheBloch : Emin=7.9452 MeV Emax= 100 TeV deltaVI
|
||||
|
||||
nuclearStopping: for alpha SubType=8 BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU49NucStopping : Emin= 0 meV Emax= 1 MeV
|
||||
ICRU49NucStopping : Emin= 0 Emax= 1 MeV
|
||||
|
||||
msc: for anti_proton SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
hIoni: for anti_proton XStype:1 SubType=2
|
||||
@@ -377,31 +376,31 @@ hIoni: for anti_proton XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 meV Emax= 2 MeV deltaVI
|
||||
ICRU73QO : Emin= 0 Emax= 2 MeV deltaVI
|
||||
BetheBloch : Emin= 2 MeV Emax= 100 TeV deltaVI
|
||||
|
||||
hBrems: for anti_proton XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
hPairProd: for anti_proton XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 17x1001 from 7.50618 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for anti_proton XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
msc: for kaon+ SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
hIoni: for kaon+ XStype:1 SubType=2
|
||||
@@ -409,31 +408,31 @@ hIoni: for kaon+ XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 meV Emax=1.05231 MeV deltaVI
|
||||
Bragg : Emin= 0 Emax=1.05231 MeV deltaVI
|
||||
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
|
||||
|
||||
hBrems: for kaon+ XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
hPairProd: for kaon+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for kaon+ XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
msc: for kaon- SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
hIoni: for kaon- XStype:1 SubType=2
|
||||
@@ -441,31 +440,31 @@ hIoni: for kaon- XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 meV Emax=1.05231 MeV deltaVI
|
||||
ICRU73QO : Emin= 0 Emax=1.05231 MeV deltaVI
|
||||
BetheBloch : Emin=1.05231 MeV Emax= 100 TeV deltaVI
|
||||
|
||||
hBrems: for kaon- XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
hPairProd: for kaon- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 18x1001 from 3.94942 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for kaon- XStype:3 SubType=1 BuildTable=1
|
||||
Used Lambda table of kaon+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
msc: for mu+ SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
muIoni: for mu+ XStype:1 SubType=2
|
||||
@@ -473,7 +472,7 @@ muIoni: for mu+ XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 meV Emax= 200 keV deltaVI
|
||||
Bragg : Emin= 0 Emax= 200 keV deltaVI
|
||||
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
|
||||
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
|
||||
|
||||
@@ -481,24 +480,24 @@ muBrems: for mu+ XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
MuBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
MuBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
muPairProd: for mu+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 21x1001 from 1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
muPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for mu+ XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
msc: for mu- SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
muIoni: for mu- XStype:1 SubType=2
|
||||
@@ -506,7 +505,7 @@ muIoni: for mu- XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 meV Emax= 200 keV deltaVI
|
||||
ICRU73QO : Emin= 0 Emax= 200 keV deltaVI
|
||||
BetheBloch : Emin= 200 keV Emax= 1 GeV deltaVI
|
||||
MuBetheBloch : Emin= 1 GeV Emax= 100 TeV
|
||||
|
||||
@@ -514,24 +513,24 @@ muBrems: for mu- XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
MuBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
MuBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
muPairProd: for mu- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 21x1001 from 1 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
muPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
muPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for mu- XStype:3 SubType=1 BuildTable=1
|
||||
Used Lambda table of mu+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
msc: for pi+ SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
hIoni: for pi+ XStype:1 SubType=2
|
||||
@@ -539,31 +538,31 @@ hIoni: for pi+ XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
Bragg : Emin= 0 meV Emax=297.505 keV deltaVI
|
||||
Bragg : Emin= 0 Emax=297.505 keV deltaVI
|
||||
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
|
||||
|
||||
hBrems: for pi+ XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
hPairProd: for pi+ XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for pi+ XStype:3 SubType=1 BuildTable=1
|
||||
Lambda table from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
msc: for pi- SubType= 10
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
WentzelVIUni : Emin= 0 meV Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
WentzelVIUni : Emin= 0 Emax= 100 TeV Nbins=240 100 eV - 100 TeV
|
||||
StepLim=Minimal Rfact=0.2 Gfact=2.5 Sfact=0.6 DispFlag:1 Skin=3 Llim=1 mm
|
||||
|
||||
hIoni: for pi- XStype:1 SubType=2
|
||||
@@ -571,27 +570,27 @@ hIoni: for pi- XStype:1 SubType=2
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
StepFunction=(0.1, 0.05 mm), integ: 1, fluct: 1, linLossLim= 0.01
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
ICRU73QO : Emin= 0 meV Emax=297.505 keV deltaVI
|
||||
ICRU73QO : Emin= 0 Emax=297.505 keV deltaVI
|
||||
BetheBloch : Emin=297.505 keV Emax= 100 TeV deltaVI
|
||||
|
||||
hBrems: for pi- XStype:1 SubType=3
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hBrem : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hBrem : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
hPairProd: for pi- XStype:1 SubType=4
|
||||
dE/dx and range tables from 100 eV to 100 TeV in 240 bins
|
||||
Lambda tables from threshold to 100 TeV, 20 bins/decade, spline: 1
|
||||
Sampling table 20x1001 from 1.11656 GeV to 100 TeV
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
hPairProd : Emin= 0 meV Emax= 100 TeV ModifiedMephi
|
||||
hPairProd : Emin= 0 Emax= 100 TeV ModifiedMephi
|
||||
|
||||
CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Used Lambda table of pi+
|
||||
ThetaMin(p) < Theta(degree) < 180 pLimit(GeV^1)= 0.139531
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eCoulombScattering : Emin= 0 meV Emax= 100 TeV
|
||||
eCoulombScattering : Emin= 0 Emax= 100 TeV
|
||||
|
||||
====================================================================
|
||||
HADRONIC PROCESSES SUMMARY (verbose level 1)
|
||||
@@ -600,17 +599,17 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for neutron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticCHIPS: 0 meV ---> 100 TeV
|
||||
Cr_sctns: G4NeutronElasticXS: 0 meV ---> 100 TeV
|
||||
Model: hElasticCHIPS: 0 ---> 100 TeV
|
||||
Cr_sctns: G4NeutronElasticXS: 0 ---> 100 TeV
|
||||
|
||||
Process: neutronInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: G4NeutronInelasticXS: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: G4NeutronInelasticXS: 0 ---> 100 TeV
|
||||
|
||||
Process: nCapture
|
||||
Model: nRadCapture: 0 meV ---> 100 TeV
|
||||
Cr_sctns: G4NeutronCaptureXS: 0 meV ---> 100 TeV
|
||||
Model: nRadCapture: 0 ---> 100 TeV
|
||||
Cr_sctns: G4NeutronCaptureXS: 0 ---> 100 TeV
|
||||
|
||||
Process: nKiller
|
||||
|
||||
@@ -618,67 +617,67 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for B-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: B-Inelastic
|
||||
Model: FTFP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: FTFP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for D-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: D-Inelastic
|
||||
Model: FTFP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: FTFP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for GenericIon
|
||||
|
||||
Process: ionInelastic
|
||||
Model: Binary Light Ion Cascade: 0 meV/n ---> 6 GeV/n
|
||||
Model: Binary Light Ion Cascade: 0 /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for He3
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Model: hElasticLHEP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
Process: He3Inelastic
|
||||
Model: Binary Light Ion Cascade: 0 meV/n ---> 6 GeV/n
|
||||
Model: Binary Light Ion Cascade: 0 /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for alpha
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Model: hElasticLHEP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
Process: alphaInelastic
|
||||
Model: Binary Light Ion Cascade: 0 meV/n ---> 6 GeV/n
|
||||
Model: Binary Light Ion Cascade: 0 /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for anti_He3
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100.1 MeV/n
|
||||
Model: hElasticLHEP: 0 /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: anti_He3Inelastic
|
||||
Model: FTFP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Model: FTFP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -686,13 +685,13 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for anti_alpha
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100.1 MeV/n
|
||||
Model: hElasticLHEP: 0 /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: anti_alphaInelastic
|
||||
Model: FTFP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Model: FTFP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -700,13 +699,13 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for anti_deuteron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100.1 MeV/n
|
||||
Model: hElasticLHEP: 0 /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: anti_deuteronInelastic
|
||||
Model: FTFP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Model: FTFP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -714,12 +713,12 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for anti_lambda
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: anti_lambdaInelastic
|
||||
Model: FTFP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: FTFP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -727,13 +726,13 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for anti_neutron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100.1 MeV
|
||||
Model: hElasticLHEP: 0 ---> 100.1 MeV
|
||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: anti_neutronInelastic
|
||||
Model: FTFP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Model: FTFP: 0 ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -741,13 +740,13 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for anti_proton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100.1 MeV
|
||||
Model: hElasticLHEP: 0 ---> 100.1 MeV
|
||||
Model: AntiAElastic: 100 MeV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: anti_protonInelastic
|
||||
Model: FTFP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Model: FTFP: 0 ---> 100 TeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -755,13 +754,13 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for anti_triton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100.1 MeV/n
|
||||
Model: hElasticLHEP: 0 /n ---> 100.1 MeV/n
|
||||
Model: AntiAElastic: 100 MeV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: anti_tritonInelastic
|
||||
Model: FTFP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 meV ---> 25.6 PeV
|
||||
Model: FTFP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: AntiAGlauber: 0 ---> 25.6 PeV
|
||||
|
||||
Process: hFritiofCaptureAtRest
|
||||
|
||||
@@ -769,60 +768,60 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for deuteron
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Model: hElasticLHEP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
Process: dInelastic
|
||||
Model: Binary Light Ion Cascade: 0 meV/n ---> 6 GeV/n
|
||||
Model: Binary Light Ion Cascade: 0 /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for e+
|
||||
|
||||
Process: electronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 meV ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 meV ---> 100 TeV
|
||||
Process: positronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for e-
|
||||
|
||||
Process: electronNuclear
|
||||
Model: G4ElectroVDNuclearModel: 0 meV ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 meV ---> 100 TeV
|
||||
Model: G4ElectroVDNuclearModel: 0 ---> 1 PeV
|
||||
Cr_sctns: ElectroNuclearXS: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for gamma
|
||||
|
||||
Process: photonNuclear
|
||||
Model: GammaNPreco: 0 meV ---> 200 MeV
|
||||
Model: GammaNPreco: 0 ---> 200 MeV
|
||||
Model: BertiniCascade: 199 MeV ---> 6 GeV
|
||||
Model: TheoFSGenerator: 3 GeV ---> 100 TeV
|
||||
Cr_sctns: PhotoNuclearXS: 0 meV ---> 100 TeV
|
||||
Cr_sctns: GammaNuclearXS: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for kaon+
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: kaon+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for kaon-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: kaon-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
@@ -830,27 +829,27 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for lambda
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: lambdaInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for mu+
|
||||
|
||||
Process: muonNuclear
|
||||
Model: G4MuonVDNuclearModel: 0 meV ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 meV ---> 100 TeV
|
||||
Model: G4MuonVDNuclearModel: 0 ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for mu-
|
||||
|
||||
Process: muonNuclear
|
||||
Model: G4MuonVDNuclearModel: 0 meV ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 meV ---> 100 TeV
|
||||
Model: G4MuonVDNuclearModel: 0 ---> 1 PeV
|
||||
Cr_sctns: KokoulinMuonNuclearXS: 0 ---> 100 TeV
|
||||
|
||||
Process: muMinusCaptureAtRest
|
||||
|
||||
@@ -858,25 +857,25 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for pi+
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticGlauber: 0 meV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticGlauber: 0 ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 ---> 100 TeV
|
||||
|
||||
Process: pi+Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for pi-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticGlauber: 0 meV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticGlauber: 0 ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 ---> 100 TeV
|
||||
|
||||
Process: pi-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 ---> 100 TeV
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
@@ -884,25 +883,25 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for proton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticCHIPS: 0 meV ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticCHIPS: 0 ---> 100 TeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 ---> 100 TeV
|
||||
|
||||
Process: protonInelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: BarashenkovGlauberGribov: 0 ---> 100 TeV
|
||||
|
||||
---------------------------------------------------
|
||||
Hadronic Processes for sigma-
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: hElasticLHEP: 0 ---> 100 TeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: sigma-Inelastic
|
||||
Model: FTFP: 3 GeV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 meV ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 meV ---> 100 TeV
|
||||
Model: BertiniCascade: 0 ---> 6 GeV
|
||||
Cr_sctns: Glauber-Gribov: 0 ---> 100 TeV
|
||||
|
||||
Process: hBertiniCaptureAtRest
|
||||
|
||||
@@ -910,13 +909,13 @@ CoulombScat: for pi- XStype:3 SubType=1 BuildTable=1
|
||||
Hadronic Processes for triton
|
||||
|
||||
Process: hadElastic
|
||||
Model: hElasticLHEP: 0 meV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Model: hElasticLHEP: 0 /n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
Process: tInelastic
|
||||
Model: Binary Light Ion Cascade: 0 meV/n ---> 6 GeV/n
|
||||
Model: Binary Light Ion Cascade: 0 /n ---> 6 GeV/n
|
||||
Model: FTFP: 3 GeV/n ---> 100 TeV/n
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 meV ---> 25.6 PeV
|
||||
Cr_sctns: Glauber-Gribov Nucl-nucl: 0 ---> 25.6 PeV
|
||||
|
||||
================================================================
|
||||
=======================================================================
|
||||
@@ -939,7 +938,6 @@ Time limit for long lived isomeres (ns) 1
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
Store e- internal conversion data 0
|
||||
Electron internal conversion ID 3
|
||||
Correlated gamma emission flag 0
|
||||
Max 2J for sampling of angular correlations 10
|
||||
=======================================================================
|
||||
@@ -1149,7 +1147,7 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=0.020000s Real=0.013587s Sys=0.000000s
|
||||
User=0.020000s Real=0.013951s Sys=0.000000s
|
||||
|
||||
======================== run summary =====================
|
||||
Average number per event:
|
||||
@@ -1231,7 +1229,7 @@ SteppingAction: status = EscapedFromReadOut
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=16.500000s Real=17.202119s Sys=0.030000s
|
||||
User=17.800000s Real=18.160260s Sys=0.050000s
|
||||
|
||||
======================== run summary =====================
|
||||
Average number per event:
|
||||
|
||||
Reference in New Issue
Block a user