Project

General

Profile

LArG4 » History » Version 1

Katherine Lato, 11/11/2015 07:10 PM

1 1 Katherine Lato
{{toc}}
2 1 Katherine Lato
3 1 Katherine Lato
h1. LArG4
4 1 Katherine Lato
5 1 Katherine Lato
The maintainer of this package is Brian Rebel (brebel@fnal.gov).
6 1 Katherine Lato
7 1 Katherine Lato
The purpose of this package is to model the detector response to a primary event using the "Geant4":http://geant4.web.cern.ch/geant4/ toolkit. The main module within this package is also called LArG4.
8 1 Katherine Lato
9 1 Katherine Lato
There's documentation within the README file inside the package, but here's the basic command:
10 1 Katherine Lato
11 1 Katherine Lato
12 1 Katherine Lato
lar -c job/larg4.fcl
13 1 Katherine Lato
14 1 Katherine Lato
There need not be larg4.fcl; in fact, you'll probably want to copy and edit that file if you're developing a simulation/analysis chain. The prod*.fcl files described in the [[EventGenerator]] documentation already include the statements to run LArG4 simulation after the events are generated.
15 1 Katherine Lato
16 1 Katherine Lato
The $SRT_PUBLIC_CONTEXT/LArG4/mac/LArG4.mac controls various aspects of the interaction with Geant4.
17 1 Katherine Lato
18 1 Katherine Lato
If you want to change the output of the simulation, start with these files and read the comments. You can copy these files into your own area to edit the parameters; e.g.,
19 1 Katherine Lato
20 1 Katherine Lato
% cp $SRT_PUBLIC_CONTEXT/job/prodgenie.fcl <my-working-directory>
21 1 Katherine Lato
22 1 Katherine Lato
h2. Using Custom Physics Modules:
23 1 Katherine Lato
24 1 Katherine Lato
LArG4 now contains a configurable physics list which allows the user to enable or disable physical processes used in the GEANT4 simulation. To control which G4PhysicsConstructors are loaded, set the following two parameters for the LArG4Parameters service, eg:
25 1 Katherine Lato
26 1 Katherine Lato
    UseCustomPhysics         = larg4.bool(False),
27 1 Katherine Lato
28 1 Katherine Lato
    EnabledPhysics           = larg4.vstring( 'Em' 'Optical' 'SynchotronAndGN' 'Ion' 'Hadron' 'Decay' 'HadronElastic' 'Stopping' 'NeutronTrackingCut')
29 1 Katherine Lato
30 1 Katherine Lato
31 1 Katherine Lato
The default list of physics processes, as included in the QGSP_BERT physics list (the previous default before the list was configurable), are:
32 1 Katherine Lato
33 1 Katherine Lato
 "Em" "SynchotronAndGN" "Decay" "Hadron" "HadronElastic" "Stopping" "Ion" "NeutronTrackingCut" 
34 1 Katherine Lato
35 1 Katherine Lato
To create a new physics constructor, create a class which inherits from G4VPhysicsConstructor, providing the necessary ConstructParticle and ConstructProcess methods (see a pre-existing GEANT4 physics constructor for an example). Then register the object in the physics list at compile time by including the following line at the top of the .cxx file for the object:
36 1 Katherine Lato
37 1 Katherine Lato
 CustomPhysicsFactory<Object> arbitrary_factory_name("ObjectName"); 
38 1 Katherine Lato
39 1 Katherine Lato
Where Object is the name of the object inherriting from G4VPhysicsConstructor, arbitrary_factory_name is an irrelevant label for the object which registers the new physics constructor and ObjectName is the string which will be used in the job control file to enable the physics processes.
40 1 Katherine Lato
41 1 Katherine Lato
The default constructors loaded in the QGSP_BERT physics list are all registered in the CustomPhysicsBuiltIns.hh and CustomPhysicsBuiltIns.cxx files. Under no circumstances should new modules be registered this way - this file just provides wrappers for the default GEANT4 objects. To register a new physics constructor, use the method described above. 
42 1 Katherine Lato
43 1 Katherine Lato
h2. Optical Physics in LArG4
44 1 Katherine Lato
45 1 Katherine Lato
A PMT Sensitive detector will be associated with any volume in the geometry which has logical volume named "PMTSensitive". This volume name (or any volume name with this as a substring) should not be used for any volume which does not represent the sensitive lens of a photomultiplier tube.  
46 1 Katherine Lato
47 1 Katherine Lato
Photons stepping into a volume with this name will be stopped and killed, and their positions and momenta will be used to fill PMTHits which will be stored in the event. One physical volume generates one PMTHit - this corresponds to one hit per PMT lens per event.  Subsequent modules in the simulation will use these PMTHits to generate a PMT response signal.
48 1 Katherine Lato
49 1 Katherine Lato
The PMTHit object, the PMTPhoton objects which it is filled with and the PMTHitCollection are all part of the simulation package, and headers for all of the above can be found in the file Simulation/PMTHit.h