Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/CaTS/README.md is written in an unsupported language. File is not indexed.

0001 ![alt text](https://github.com/hanswenzel/CaTS/blob/master/images/CaTS.png)
0002 # CaTS: Calorimeter and Tracker Simulation
0003 
0004 CaTS is a flexible and extend-able framework (based on geant4 and ROOT)
0005 for the simulation of calorimeter and tracking detectors. 
0006 It also serves as an Example that demonstrates how to use opticks
0007 from within Geant4 for the creation and propagation of optical photons.
0008 https://bitbucket.org/simoncblyth/opticks.git.
0009 
0010 The components of CaTS are:
0011 
0012 
0013 Detector Description:      described in gdml input file (e.g. crystalcal.gdml)
0014 (Geometry, Materials,
0015  optical properties,
0016  sensitive detector)
0017 
0018 Input modules:                
0019 
0020     GPS
0021     Particle Gun
0022     HEPMC (Pythia)
0023 
0024 
0025 Physics Lists:                  choice of all Reference Physics Lists
0026                                           optical physics processes (Cerenkov, Rayleigh,
0027                                           Scintillation etc.) are added (talk to)  
0028                 
0029 Sensitive Detectors:        (+ corresponding Hit classes)        
0030 
0031     TrackerSD(Hit)  registers the step points of charged particles.
0032     CalorimeterSD(Hit) registering energy deposit
0033     DRCalorimeterSD(Hit) besides registering energy deposit counts produced Cerenkov photons
0034     MsCSD(Hit) used to study multiple scattering on a thin layer
0035     PhotonSD(Hit) sensitive detector that registers optical photons.
0036     lArTPCSD(Hit) sensitive detector that registers ionization and collects Gensteps (Scintillation and Cerenkov) to be processed by Opticks.
0037 
0038 
0039 
0040     RadiatorSD no Hits just collection of Gensteps  (Scintillation and Cerenkov) to be processed by Opticks.
0041 
0042 
0043 
0044 This requires the opticks environment to be set up properly (see  https://github.com/hanswenzel/CaTS/blob/master/Instructions.md)
0045 
0046 To get started : 
0047 
0048 ```bash
0049 git clone https://github.com/hanswenzel/CaTS.git
0050 cd CaTS/
0051 
0052 # to setup the opticks environment source the setup_opticks.sh file described in:
0053 # https://github.com/hanswenzel/CaTS/blob/master/Instructions.md
0054 
0055 
0056 source (path to opticks WORK_DIR)/setup_opticks.sh 
0057 cd ../
0058 mkdir CaTS-build
0059 cd CaTS-build
0060 
0061 cmake -DCMAKE_BUILD_TYPE=Debug \
0062   -DWITH_G4OPTICKS=ON \
0063   -DCMAKE_PREFIX_PATH="${LOCAL_BASE}/opticks/externals;${LOCAL_BASE}/opticks" \
0064   -DOPTICKS_PREFIX=${LOCAL_BASE}/opticks \
0065   -DCMAKE_MODULE_PATH=${OPTICKS_HOME}/cmake/Modules \
0066   -DCMAKE_INSTALL_PREFIX=../CaTS-install \
0067   ../CaTS
0068 
0069 make install
0070 cd ../CaTS-install/bin
0071 time ./CaTS -g  simpleLArTPC.gdml -pl 'FTFP_BERT+OPTICAL+STEPLIMIT'  -m time.mac
0072 
0073 Only the -g command line variable is mandatory! If you don't specify the macro file interactive mode is assumed:
0074 
0075 ./CaTS -g simpleLArTPC.gdml -pl 'FTFP_BERT+OPTICAL+STEPLIMIT'
0076 
0077 ```
0078 
0079 to compile CaTS without Opticks do:
0080 
0081 ```bash
0082 cmake -DCMAKE_BUILD_TYPE=Debug   -DWITH_G4OPTICKS=OFF      -DCMAKE_MODULE_PATH="../CaTS/cmake/Modules"   -DCMAKE_INSTALL_PREFIX=../CaTS-install   ../CaTS
0083 ```
0084 if you don't provide the -pl argument the default physics list configuration:
0085 'FTFP_BERT+OPTICAL+STEPLIMIT'
0086 is used
0087 
0088 
0089 ![alt text](https://github.com/hanswenzel/CaTS/blob/master/images/display.png)
0090 to look at the hit collection and make a few histograms:
0091 
0092     ./readPhotonHits NewHits_point_Run0.root PhotonHistos.root Det
0093 
0094 The 3 arguments here are: name of input file (hits), name of output file for the histograms and the logical Volume that sensitive detector (PhotonSD)is attached to.
0095 One can then use root to look at the plots:
0096 
0097 ```bash
0098 root histos.root
0099    ------------------------------------------------------------------
0100   | Welcome to ROOT 6.22/06                        https://root.cern |
0101   | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
0102   | Built for linuxx8664gcc on Dec 13 2020, 13:28:00                 |
0103   | From tags/v6-22-06@v6-22-06                                      |
0104   | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
0105    ------------------------------------------------------------------
0106 
0107 root [0] 
0108 Attaching file histos.root as _file0...
0109 (TFile *) 0x559578f76f60
0110 root [1] TBrowser b
0111 (TBrowser &) Name: Browser Title: ROOT Object Browser
0112 ```
0113 
0114 ![alt text](https://github.com/hanswenzel/CaTS/blob/master/images/position.png)
0115 
0116 For comparison one might want to disable Opticks and use Geant4 to generate and propagate optical photons:
0117     
0118     time ./CaTS -g  simpleLArTPC.gdml -pl 'FTFP_BERT+OPTICAL+STEPLIMIT'  -m time_G4.mac