Difference: HowToSimulateCosmics (1 vs. 5)

Revision 42007-02-15 - JamieBoyd

Line: 1 to 1
 
META TOPICPARENT name="JamiesWiki"

howto simulate / digitize cosmic in 12.0.31

Added:
>
>

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

Revision 32007-02-04 - JamieBoyd

Line: 1 to 1
 
META TOPICPARENT name="JamiesWiki"

howto simulate / digitize cosmic in 12.0.31

Line: 70 to 70
 

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)
Changed:
<
<
  • TRT digitization may not work if the cosmic is generated from far away in x,y plane at surface. not sure how to deal with this??

som data to run on

>
>
  • 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*
Line: 89 to 89
 
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest_rpc*_nf
Added:
>
>
  • 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:

Revision 22006-12-15 - JamieBoyd

Line: 1 to 1
 
META TOPICPARENT name="JamiesWiki"

howto simulate / digitize cosmic in 12.0.31

Changed:
<
<
>
>
 

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
Changed:
<
<
cmt co -r G4UserActions-00-00-12 Simulation/G4Utilities/G4UserActions cp /afs/cern.ch/user/j/jboyd/public/cosmic_filter/G4CosmicFilter.h 12031/Simulation/G4Utilities/G4UserActions/G4UserActions/ cp /afs/cern.ch/user/j/jboyd/public/cosmic_filter/G4CosmicFilter.cxx 12031/Simulation/G4Utilities/G4UserActions/src/
>
>
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
Added:
>
>
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/
Changed:
<
<
use G4UserActions G4UserActions-* Simulation/G4Utilities
>
>
use G4CosmicFilter G4CosmicFilter-* Simulation/G4Extensions/
 use G4AtlasAlg G4AtlasAlg-* Simulation/G4Atlas use G4Svc G4Svc-* Simulation/G4Sim use SCT_Digitization SCT_Digitization-* InnerDetector/InDetDigitization
Added:
>
>
use MuonG4SD MuonG4SD-* MuonSpectrometer
 
  • compile
Line: 28 to 32
 
  • copy job options files:
Changed:
<
<
cp /afs/cern.ch/user/j/jboyd/public/cosmic_filter/*.py 12031/Reconstruction/RecExample/RecExCommon/run
>
>
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
Changed:
<
<
athena.py -c "directory='${outputdir}';Seed='${seed}';" jobOptions.G4Cosmic.py myConfig2.py
>
>
athena -c "directory='.';Seed='012345';" jobOptions.G4Cosmic.py myCosmicConfig.py >& log &
 
Added:
>
>
  • directory is where the sim root file will show up (as sim.root) and seed is the generator seed used.
 

digitization

Line: 62 to 68
 

problems

Deleted:
<
<
  • currently the results of this wont have RPC digis in it (need a special tag which i am waiting for from: Daniela Rebuzzi )
 
  • this doesnt have the LVL1 cosmic muon on it. for this need special configuration i am waiting for instructions on this from: Francesco Conventi
Changed:
<
<
>
>
  • pixel digitization may not be right timing for signal pixels hits (you do get pixel noise)
  • TRT digitization may not work if the cosmic is generated from far away in x,y plane at surface. not sure how to deal with this??
 

som data to run on

  • there are some files on castor at:
Changed:
<
<
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest*_100m/
>
>
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest_rpc*
 
Changed:
<
<
  • (* = 1-8) each was simulating 50k events, about 500 passed filter and about 50 have SCT hits.
>
>
  • (* = 2-9) each was simulating 50k events, about 500 passed filter and about 50 have SCT hits.
 
  • sim.root is the simulated hits file
Changed:
<
<
  • dig.root / dig3.root are the digi files. (3 has pixels and TRT, other has just SCT and MDT
>
>
  • 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
Added:
>
>
* there are some files generated without magnetic field on castor at:
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest_rpc*_nf
 
Changed:
<
<

scripts for running in batch

>
>

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

 
  • for running in batch use scripts like:
Added:
>
>
  • Submit.src
 
[pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/Submit.src
#!/bin/env sh
Line: 96 to 107
 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
Changed:
<
<
>
>
* RunSim
 [pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/RunSim.sh #!/bin/env sh output=$1
Line: 108 to 121
 athena.py -c "directory='${outputdir}';Seed='${seed}';" jobOptions.G4Cosmic.py myConfig2.py ./copy-local-castor.sh $outputdir $output rm -rf $outputdir
Changed:
<
<
>
>
* SubmitDig.src
 [pcboyd] ~ > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/SubmitDig.src #!/bin/env sh if [ $# -ne 1 ]; then
Line: 120 to 135
 export STAGE_SVCCLASS=analysis mkdir log-$1 ./submit atlascatlong log-$1/dig3.log ./RunDig.sh /castor/cern.ch/user/j/jboyd/cosmic_24nov2006/$1
Changed:
<
<
>
>
* RunDig.sh
 > cat scratch0/12031/Reconstruction/RecExample/RecExCommon/run/RunDig.sh
#!/bin/env sh output=$1

Revision 12006-12-08 - JamieBoyd

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="JamiesWiki"

howto simulate / digitize cosmic in 12.0.31

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 G4UserActions-00-00-12 Simulation/G4Utilities/G4UserActions
   cp /afs/cern.ch/user/j/jboyd/public/cosmic_filter/G4CosmicFilter.h 12031/Simulation/G4Utilities/G4UserActions/G4UserActions/
   cp /afs/cern.ch/user/j/jboyd/public/cosmic_filter/G4CosmicFilter.cxx 12031/Simulation/G4Utilities/G4UserActions/src/
   cmt co -r SCT_Digitization-00-09-18 InnerDetector/InDetDigitization/SCT_Digitization
   cmt co -r RecExCommon-00-07-04-19  Reconstruction/RecExample/RecExCommon
  • add to requirements file in 12031/Reconstruction/RecExample/RecExCommon/cmt/
use G4UserActions G4UserActions-* Simulation/G4Utilities
use G4AtlasAlg G4AtlasAlg-* Simulation/G4Atlas
use G4Svc G4Svc-* Simulation/G4Sim
use SCT_Digitization SCT_Digitization-* InnerDetector/InDetDigitization
  • compile
    cmt bro cmt config
     cmt bro gmake
     cd ../run
  • copy job options files:
cp /afs/cern.ch/user/j/jboyd/public/cosmic_filter/*.py 12031/Reconstruction/RecExample/RecExCommon/run
 
  • run
athena.py -c "directory='${outputdir}';Seed='${seed}';" jobOptions.G4Cosmic.py myConfig2.py

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

  • currently the results of this wont have RPC digis in it (need a special tag which i am waiting for from: Daniela Rebuzzi )
  • this doesnt have the LVL1 cosmic muon on it. for this need special configuration i am waiting for instructions on this from: Francesco Conventi

som data to run on

  • there are some files on castor at:
/castor/cern.ch/user/j/jboyd/cosmic_24nov2006/bigtest*_100m/
  • (* = 1-8) each was simulating 50k events, about 500 passed filter and about 50 have SCT hits.
  • sim.root is the simulated hits file
  • dig.root / dig3.root are the digi files. (3 has pixels and TRT, other has just SCT and MDT
  • to get this to set env vars:
setenv RFIO_USE_CASTOR_V2 YES
setenv STAGE_HOST castoratlas
setenv STAGE_SVCCLASS analysis

scripts for running in batch

  • for running in batch use scripts like:
[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

[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

[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

> 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

 
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