TWiki> Main Web>TWikiUsers>ShiyuanXu>Shiyuan-HGCal (revision 5)EditAttachPDF


♦A design and information of the HGCal can be found in


♦Setup CMSSW in SL6 machines: CMSSW in SL6 machines

source /uscmst1/prod/sw/cms/cshrc cvmfs

scram --arch slc6_amd64_gcc481 list CMSSW | grep CMSSW_7_1

scram --arch slc6_amd64_gcc481 project CMSSW_7_1_0_pre8

cd CMSSW_7_1_0_pre8/src/


scram b


♦We are using the repository for HGCal Geant4 standalone simulations located at, this can be obtained doing:

git init

git remote add origin

git clone -b BASELINE-TP

cd PFCal/PFCalEE/

♦To set up the environment and compile (SL6 machines), go to the PFCalEE directory and run:

cd PFCal/PFCalEE


cd userlib

mkdir lib

mkdir obj

mkdir bin

make -j 5

cd ../

make -j 5

♦In the cmslpc (SL6) is possible that the setting up of the environment doesn't work,


Analysis Code

♦The code is created to submit jobs in parallel to the batch system (using LSF), to run do:

python -options

♦In case of options conflicts it can be used also:

./ -options

♦The options for the code are:

  • -n : Number of events to generate (default 1000)
  • -g : Use particle gun
  • -d : Data or type of particle to shoot (default e-)
  • -s : Short batch queue (default 1nd)
  • -l : Long batch queue (default 2nw)
  • -t : Git tag use it
  • -r : Run stats
  • -m : Detector model
  • -v : Detector version
  • -e : eos Path to save root file
  • -o : Output directory
  • -a : Incidence angle in radians (default 0)
  • -b : Magnetic field in Tesla (default 0)
  • -f : Path to the HepMC input file
  • -S : Not submit batch job

Particle Gun

♦To run this example modify the file to set energy loops and run:

for i in seq 0 5; do python -s 1nd -q 2nd -t V00-00-00 -g -r ${i} -v 3 -m 0 -e /store/cmst3/group/hgcal/Geant4 -o ~/work/ntuples -d e- -n 2500; done

♦This example is running 2500 events of a particle gun shooting electrons to the detector model.

Geometry Visualization

♦To visualize the geometry that is used for the standalone simulation the files (~/.../PFCalEE/src) and DetectorCosntruction.hh (~/.../PFCalEE/include) contains the information of all the available geometries, e.g:

enum DetectorVersion {

  enum DetectorModel {

♦In the PFCalEE directory the file can be modified to change to use the desired detector and model, the line to change is:

int version=0; //DetectorConstruction::v_HGCAL;                                                                                                       
  //int model=DetectorConstruction::m_FULLSECTION;                                                                                                     
  int model=DetectorConstruction::m_SIMPLE_20;

♦After the file is modified to compile run:

make -j 5

♦After this, run the following command (Changing the path to one in your directory):

export G4DAWNFILE_DEST_DIR=/afs/

♦Copy the file vis.mac to the directory where the PFCalEE executable is (geant4_workdir/bin/Linux-g++).

♦To run the visualization is necessary to go to the directory where the PFCalEE executable is and run:

PFCalEE vis.mac

♦A sample and a complete geometry construction for the CALICE detector can be found in the attached files.

♦A sample and a complete geometry construction for the HGCalHe-CALICE (like) can be found in the attached files.

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formateps CALICEFULLSECTION.eps r1 manage 1307.7 K 2014-07-02 - 15:26 ShiyuanXu if model = FULLSECTION then m_minRadius=150 m_maxRadius=m_CalorSizeXY=1700
Unknown file formateps CALICESIMPLE20.eps r1 manage 162.0 K 2014-07-02 - 15:24 ShiyuanXu if model=SIMPLE20 then m_CalorSizeXY=200
Unknown file formateps HGCALFULLSECTION.eps r1 manage 3968.3 K 2014-07-02 - 15:29 ShiyuanXu  
Unknown file formateps HGCALHEFULLSECTION.eps r1 manage 1632.8 K 2014-07-02 - 15:33 ShiyuanXu  
Unknown file formateps HGCALHESIMPLE20.eps r1 manage 200.7 K 2014-07-02 - 15:34 ShiyuanXu  
Unknown file formateps HGCALHE_CALICEFULLSECTION.eps r1 manage 2003.6 K 2014-07-02 - 15:31 ShiyuanXu  
Unknown file formateps HGCALHE_CALICESIMPLE20.eps r1 manage 245.9 K 2014-07-02 - 15:31 ShiyuanXu  
Unknown file formateps HGCALHE_CALICESIMPLE50.eps r1 manage 245.8 K 2014-07-02 - 15:32 ShiyuanXu if model = SIMPLE100 then m_CalorSizeXY=500
Unknown file formateps HGCALSIMPLE20.eps r1 manage 483.0 K 2014-07-02 - 15:34 ShiyuanXu  
Unknown file formateps HGCAL_CALICESIMPLE100.eps r1 manage 246.7 K 2014-07-02 - 15:28 ShiyuanXu if model = SIMPLE100 then m_CalorSizeXY=1000
Edit | Attach | Watch | Print version | History: r18 | r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 2014-09-01 - ShiyuanXu
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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