You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Requirements

The enviroment must be set up according to the guide

OpenCMT Castor Simulator: building the code

The source code for the Image Builder is stored in Baltig

Since the source code of the Image Builder can be downloaded only by the authorized developers, credentials for Baltig are necessary.

The simplest way is using RSA keys, the public key must be uploaded into Baltig and the private key must be saved into ${HOME}/.ssh/id_rsa

Once git client has been correctly configured the commands are:

git clone git@baltig.infn.it:muontomography/castor-simulator.git
cd castor-simulator

These are the steps required for building the Image Builder and install it in the system:

cmake3 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPACKAGE_INSTALL_LIB_DIR=/usr/lib64 ..
make
sudo make install

The libraries and header files are installed in the standard locations for the CentOS 7 system, so there's no need to further configurations.

OpenCMT Castor Simulator: testing the application

The simulator requires two different configuration files:

  • muCastor.ini is the main configuration file, it contains the basic definitions:

    #muCastor initialization file
    #Store tracks in root file (store_tracks = 0, do not store, store_tracks = 1, do store)
    store_tracks 1
    #Store dE/dx in root file in points of tracks (store_dedx = 0, do not store, 1 store)
    store_dedx 0
    #Geometry (flags: 1 -> insert, 0 -> do not insert)
    castor 1
    vSlab 0
    muDets 1
    module 1
    holes 0
    #Primary beam generator
    gen_mode 0        // Generation flag (0 = Muon Generator, 1 = Single Muon Generator)
    momentum .3      // Muon momentum in GeV/c if gen_mode 1
    genverbose 0      // 0-no gene info, 1-vtx and momentum printed

    All the lines starting with the character # define a section for a group of parameters.

  • g4config.in is the GEANT4 configuration fie, it contains the simulation parameters:

    ######### RANDOM GENERATOR ##############
    /mcControl/useRootRandom true
    ######### VERBOSE OPTIONS ##############
    /mcVerbose/all 0
    /mcVerbose/geometryManager 1
    /mcVerbose/opGeometryManager 1
    /mcVerbose/geometryManager 1
    ######### TRACKING OPTIONS ##############
    /tracking/verbose 0
    /mcTracking/loopVerbose 0
    ######## RANGE CUTS (GEANT4 CUTS) ##########
    /mcPhysics/rangeCuts 1. mm
    /mcPhysics/rangeCutForGamma 1.e6 mm
    /mcPhysics/rangeCutForElectron 1.e6 mm
    /mcPhysics/rangeCutForPositron 1.e6 mm
    ############ VMC CUTS INFO #################
    /mcRegions/print true

The configuration files must be located in the working directory. The application stores all the files in the directory output created in the working directory.

A simple test is:

simulate_muCastor -run 1 -events 100000
  • No labels