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

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatcc CGAGeometryManager.cc r2 r1 manage 40.5 K 2008-03-14 - 12:40 AnnemarieMagnan  
Unknown file formathh CGAGeometryManager.hh r1 manage 4.6 K 2008-03-13 - 19:19 AnnemarieMagnan  
Unknown file formatcc Control.cc r1 manage 33.1 K 2008-03-13 - 19:23 AnnemarieMagnan  
Unknown file formathh Control.hh r1 manage 6.3 K 2008-03-13 - 19:21 AnnemarieMagnan  
Unknown file formatcc EncoderTBMAPS.cc r1 manage 1.3 K 2008-03-13 - 19:20 AnnemarieMagnan  
Unknown file formathh EncoderTBMAPS.hh r1 manage 0.4 K 2008-03-13 - 19:19 AnnemarieMagnan  
Unknown file formatext GNUmakefile r1 manage 0.2 K 2008-03-12 - 18:16 AnnemarieMagnan  
Unknown file formatcc PMTGeometry.cc r2 r1 manage 6.8 K 2008-03-14 - 12:22 AnnemarieMagnan  
Unknown file formathh PMTGeometry.hh r1 manage 0.5 K 2008-03-12 - 18:14 AnnemarieMagnan  
Unknown file formatcc PrimaryGeneratorAction.cc r2 r1 manage 5.6 K 2008-03-14 - 12:39 AnnemarieMagnan  
Unknown file formathh PrimaryGeneratorAction.hh r1 manage 1.2 K 2008-03-13 - 19:22 AnnemarieMagnan  
Unknown file formatcc SDMAPS.cc r1 manage 8.7 K 2008-03-12 - 18:17 AnnemarieMagnan  
Unknown file formathh SDMAPS.hh r1 manage 2.0 K 2008-03-12 - 18:15 AnnemarieMagnan  
Unknown file formatcc SourceGeometry.cc r1 manage 9.0 K 2008-03-12 - 18:17 AnnemarieMagnan  
Unknown file formathh SourceGeometry.hh r1 manage 0.5 K 2008-03-12 - 18:16 AnnemarieMagnan  
Unknown file formatcc TBGeometry.cc r3 r2 r1 manage 11.6 K 2008-03-14 - 13:10 AnnemarieMagnan  
Unknown file formathh TBGeometry.hh r1 manage 0.5 K 2008-03-12 - 18:16 AnnemarieMagnan  
Unknown file formatcc VSubDetectorDriver.cc r1 manage 8.1 K 2008-03-13 - 19:21 AnnemarieMagnan  
Unknown file formathh VSubDetectorDriver.hh r1 manage 3.6 K 2008-03-13 - 19:20 AnnemarieMagnan  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2008-03-14 - AnnemarieMagnan
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CALICE All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback