howto simulate / digitize cosmic in 12.0.31

I am now trying to move this stuff forward in terms of release so have setup a new wiki HowToSimulateCosmicIn1250 which is a work in progress at the moment


  • make a release of 12.0.31
   cmt co -r G4Svc-00-02-53 Simulation/G4Sim/G4Svc 
   cmt co -r G4AtlasAlg-00-00-10 Simulation/G4Atlas/G4AtlasAlg
   cmt co -r G4CosmicFilter-00-00-04 Simulation/G4Extensions/G4CosmicFilter 
   cmt co -r SCT_Digitization-00-09-18 InnerDetector/InDetDigitization/SCT_Digitization
   cmt co -r RecExCommon-00-07-04-19  Reconstruction/RecExample/RecExCommon
   mkdir MuonSpectrometer
   cp /afs/ MuonSpectrometer/
   cd MuonSpectrometer
   tar -zxf MuonG4SD.tar.gz
   cd ..
  • add to requirements file in 12031/Reconstruction/RecExample/RecExCommon/cmt/
use G4CosmicFilter G4CosmicFilter-* Simulation/G4Extensions/
use G4AtlasAlg G4AtlasAlg-* Simulation/G4Atlas
use G4Svc G4Svc-* Simulation/G4Sim
use SCT_Digitization SCT_Digitization-* InnerDetector/InDetDigitization
use MuonG4SD MuonG4SD-*  MuonSpectrometer
  • compile
    cmt bro cmt config
     cmt bro gmake
     cd ../run
  • copy job options files:
cp /afs/ .
cp /afs/ .
  • run
 athena -c "directory='.';Seed='012345';" >& log &
  • directory is where the sim root file will show up (as sim.root) and seed is the generator seed used.


  • get standard digitzation JO file:
  • add the lines (to the bottom):
#SCT_Digitization.Noise = 1800.0
TRTDigitization.PrintOverrideableSettings = True
TRTDigitization.PrintDigSettings = True
  • write a driving JO file for digitization (called which looks like:
PoolHitsInput = ["test_atlas_MyOutputFile.root"]
PoolRDOOutput = "dig.root"
EvtMax = -1
  • run like:


  • this doesnt have the LVL1 cosmic muon on it. for this need special configuration i am waiting for instructions on this from: Francesco Conventi
  • pixel digitization may not be right timing for signal pixels hits (you do get pixel noise)
  • TRT digitization will not work if the cosmic is generated from far away in x,y plane at surface. not sure how to deal with this - have contacted the trt digitization people.

some data to run on

  • there are some files on castor at:
  • (* = 2-9) each was simulating 50k events, about 500 passed filter and about 50 have SCT hits.
  • sim.root is the simulated hits file
  • dig3.root are the digi files.
  • to get this to set env vars:
setenv STAGE_HOST castoratlas
setenv STAGE_SVCCLASS analysis
* there are some files generated without magnetic field on castor at:
  • the above are generated over a 20m x 20m square in x,z plane on the surface and the generated 4-vectors are required to be pointing within a sphere of radius 8m of the IP.
  • i have recently made a new set of some data which relaxes these requirements. this is generated on a 600m x 600m square on the surface, and the generated 4-vectors are required to point at a sphere of radius 20m centred on the IP. this data can be found at:

scripts for running in batch (this is for me only really)

  • for running in batch use scripts like:
  • Submit.src
[pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/Submit.src
#!/bin/env sh
if [ $# -ne 2 ]; then
    echo  Usage: $0 version seedAdd
     exit 127
export STAGE_HOST=castoratlas
export STAGE_SVCCLASS=analysis
nsmkdir /castor/$1
rfchmod 775 /castor/$1
mkdir   log-$1
./submit atlascatlong log-$1/sim.log ./ /castor/$1 $2
* RunSim
[pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/
#!/bin/env sh
mkdir -p $outputdir
export STAGE_SVCCLASS=analysis
echo $outputdir -c "directory='${outputdir}';Seed='${seed}';"
./ $outputdir $output
rm -rf $outputdir
* SubmitDig.src
[pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/SubmitDig.src
#!/bin/env sh
if [ $# -ne 1 ]; then
    echo  Usage: $0 version
     exit 127
export STAGE_HOST=castoratlas
export STAGE_SVCCLASS=analysis
mkdir   log-$1
./submit atlascatlong log-$1/dig3.log ./ /castor/$1
> cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/
#!/bin/env sh
mkdir -p $outputdir
export STAGE_SVCCLASS=analysis
echo $outputdir
rfcp $output/sim.root $outputdir -c "directory='${outputdir}';"
rm $outputdir/sim.root
rfcp $outputdir/dig3.root $output
#./ $outputdir $output
rm -rf $outputdir

-- JamieBoyd - 08 Dec 2006

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2007-02-26 - JamieBoyd
    • 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-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback