Simulation of testbeam setup in Mokka
Anne-Marie's hacking solution...
The following has been done starting from Mokka-06-04-p03.
PLEASE TEST IT AND REPORT THE PROBLEMS YOU HAVE!
Geometry files:
You need to create a Mokka/source/Geometry/tbmaps directory, in which you will have an include/ and src/ directory, and the attached
GNUmakefile. It will contain the following geometry files that you can modify according to your needs:
- You can see an example of geometry file for the single-layer setup here :
SourceGeometry.hh: include file
SourceGeometry.cc: source file
- Or for a 4-layer setup here, with 3 plates of W:
TBGeometry.hh: include file
TBGeometry.cc: source file
See
ParametersChosen for more details on the simulated setup.
- Or for the PMTs here, adapted to the TB setup:
PMTGeometry.hh: include file
PMTGeometry.cc: source file
You can create and add as many of these as you want on the model given. They will be linked together thanks to the geometry manager described below.
The last important files
you shouldn't need to modify concern the definition of one-layer sensitive detector, also used for the 4-layer case:
SDMAPS.hh: include file
SDMAPS.cc: source file
using a modified version of the
encoding for the cellIDs, to put in Mokka/source/Geometry/CGA/
EncoderTBMAPS.hh: include file
EncoderTBMAPS.cc: source file
The geometry is hardcoded, but it makes us independent from the heavy Mokka database.....
In order for Mokka to compile this new package, you will have to add the following line to the Mokka/source/Kernel/GNUmakefile:
EXTRALIBS += -L$(
G4WORKDIR)/tmp/$(
G4SYSTEM)/tbmaps -ltbmaps
Geometry manager
In order to work on a hard-coded geometry, you will have to use the following version for the Geometry manager, in
Mokka/source/Geometry/CGA/:
CGAGeometryManager.hh: include file
CGAGeometryManager.cc: source file
It is based on
- the variable Control::useDB added in the files Mokka/source/Kernel/
Control.hh: include file
Control.cc: source file
This is the method you need to change whether you want to use a single layer/4 layers/with or without PMTs or your own geometry class...
It is currently by default for a TB setup+PMTs
- The world dimensions are hardcoded at 1*1*1 m^3 , and it is filled with Air in the method CGAGeometryManager::BuildWorldVolume().
- A method has been added in Mokka/source/Geometry/CGA/
VSubDetectorDriver.hh: include file
VSubDetectorDriver.cc: source file
to allow the construction of the geometry without access to the database: an other constructor for the method virtual G4bool
VSubDetectorDriver::basic_construct(...)
Generation of events:
For the source setup, you need a modified version of the Mokka/source/Kernel/
PrimaryGeneratorAction.hh: include file
PrimaryGeneratorAction.cc: source file
to generate a particular spectrum for the energy. Modify this file accordingly to your needs, and recompile.
The current setup is 6
GeV beam, 1 cm2 size, 3.5 m away from the front face of the front PMT, and no momentum spread.
If you just want a single particle beam and use the commands /gun... as usually, then you have to set the variable Control::doBetaSourceGenerator to false in the file Mokka/source/Kernel/src/Control.cc, and recompile.
Steering and macro parameters :
no specific parameters are needed: macrofile will reduce to "/run/beamOn " command if you use the Control::doBetaSourceGenerator=true parameter.
--
AnnemarieMagnan - 12 Mar 2008