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

simulation

  • 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/cern.ch/user/j/jboyd/scratch0/12031/MuonG4SD.tar.gz 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/cern.ch/user/j/jboyd/public/cosmic_sim/jobOptions.G4Cosmic.py .
cp /afs/cern.ch/user/j/jboyd/public/cosmic_sim/myCosmicConfig.py .
 
  • run
 athena -c "directory='.';Seed='012345';" jobOptions.G4Cosmic.py myCosmicConfig.py >& log &
  • directory is where the sim root file will show up (as sim.root) and seed is the generator seed used.

digitization

  • get standard digitzation JO file:
get_files AtlasDigitization.py
  • add the lines (to the bottom):
SCT_Digitization.FixedTime=10
#SCT_Digitization.Noise = 1800.0
TRTDigitization.Override_timeOffsetCalcVertexY=100000.0
TRTDigitization.PrintOverrideableSettings = True
TRTDigitization.PrintDigSettings = True
  • write a driving JO file for digitization (called myDig.py) which looks like:
PoolHitsInput = ["test_atlas_MyOutputFile.root"]
PoolRDOOutput = "dig.root"
EvtMax = -1
DetDescrVersion='ATLAS-CSC-00-00-00'
  • run like:
athena.py myDig.py AtlasDigitization.py

problems

  • 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:
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest_rpc*
  • (* = 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 RFIO_USE_CASTOR_V2 YES
setenv STAGE_HOST castoratlas
setenv STAGE_SVCCLASS analysis
* there are some files generated without magnetic field on castor at:
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest_rpc*_nf
  • 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:
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/1feb07_test*

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
fi
export RFIO_USE_CASTOR_V2=YES
export STAGE_HOST=castoratlas
export STAGE_SVCCLASS=analysis
nsmkdir /castor/cern.ch/user/j/jboyd/cosmic_24nov2006/$1
rfchmod 775 /castor/cern.ch/user/j/jboyd/cosmic_24nov2006/$1
mkdir   log-$1
./submit atlascatlong log-$1/sim.log ./RunSim.sh /castor/cern.ch/user/j/jboyd/cosmic_24nov2006/$1 $2
* RunSim
[pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/RunSim.sh
#!/bin/env sh
output=$1
seed=$2
outputdir=$WORKDIR/tmp
mkdir -p $outputdir
export STAGE_SVCCLASS=analysis
echo $outputdir
athena.py -c "directory='${outputdir}';Seed='${seed}';" jobOptions.G4Cosmic.py myConfig2.py
./copy-local-castor.sh $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
fi
export RFIO_USE_CASTOR_V2=YES
export STAGE_HOST=castoratlas
export STAGE_SVCCLASS=analysis
mkdir   log-$1
./submit atlascatlong log-$1/dig3.log ./RunDig.sh /castor/cern.ch/user/j/jboyd/cosmic_24nov2006/$1
* RunDig.sh
> cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/RunDig.sh
#!/bin/env sh
output=$1
outputdir=$WORKDIR/tmp
mkdir -p $outputdir
export STAGE_SVCCLASS=analysis
echo $outputdir
rfcp $output/sim.root $outputdir
athena.py -c "directory='${outputdir}';" AtlasDigitization.py
rm $outputdir/sim.root
rfcp $outputdir/dig3.root $output
#./copy-local-castor.sh $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-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