How we simulate cosmic in release 13

Setting up

My requirements file looks like: (for release 13.0.40)
set   CMTSITE  CERN
set   SITEROOT /afs/cern.ch
macro ATLAS_DIST_AREA ${SITEROOT}/atlas/software/dist
macro ATLAS_TEST_AREA /afs/cern.ch/user/l/lytken/scratch0/rel_13.0.40
use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)
apply_tag oneTest
and I set up using (the first time):
source /afs/cern.ch/sw/contrib/CMT/v1r20p20070208/mgr/setup.sh
cmt config
source setup.sh -tag=13.0.40,runtime   <-- always

Simulation with cosmic simulation transform

These steps work:
With a requirements file as above (change ATLAS_TEST_AREA to real work area)

source /afs/cern.ch/sw/contrib/CMT/v1r20p20070524/mgr/setup.sh
cmt config
source setup.sh -tag=13.0.40.3,releases,AtlasProduction,32,gcc323,runtime

You can now run with

csc_cosmics_sim_trf.py <name of outputfile> <N events>  <random number/run number> <geometry> <if filtervolume!=inner detector, specify here> jobConfig=Cosmics.py 
For instance:
csc_cosmics_sim_trf.py sim.root 1000 12345 ATLAS-Comm-02-00-00 CosmicFilterVolume=TRT_Barrel jobConfig=Cosmics.py 
This produces a lot of files as output - including logfile: csc_cosmics_sim.log - so you might want to do this in a separate run directory ... If no events pass the filter volume the transform will crash.
To digitize, follow the steps below.

Simulation standalone

You need the following packages, unless you work in 13.0.40.3 or higher:
cmt co -r CosmicGenerator-00-00-24 Generators/CosmicGenerator
cmt co -r G4AtlasApps-00-02-15 Simulation/G4Atlas/G4AtlasApps
cmt co -r LArG4HitManagement-00-00-25 LArCalorimeter/LArG4/LArG4HitManagement
cmt co -r G4CosmicFilter-00-00-07 Simulation/G4Extensions/G4CosmicFilter
Same method as in release 12, only new jobOption file. This + submission scripts can be found at /afs/cern.ch/user/l/lytken/public/rel_13_cosmics/

For simulation we use SubmitAll.src and jobOptions.G4Cosmic_WriteTTR.py

./SubmitAll.src <directory name> <firstjob> <lastjob>
will submit lastjob-firstjob jobs, with seeds/run numbers firstjob+100 to lastjob+100. To run locally:
athena -c "directory='<directory>';Seed='12345';" jobOptions.G4Cosmic_WriteTTR.py

Simulation layout and the filtering options are defined in jobOptions.G4Cosmic_WriteTTR.py, and G4CosmicFilter/G4CosmicFilter.py. myConfig.py sets the CosmicGenerator parameters. The myConfig.py in /afs/cern.ch/user/l/lytken/public/rel_13_cosmics/ shows our default setting for TRTBarrel simulation.

Filtering on the overlap between 2 volumes

This version is still being improved upon and is not tagged yet. The first volume is always taken to be the TRTBarrel volume at the moment.
  • Copy the G4CosmicFilter/ package from /afs/cern.ch/user/j/jboyd/scratch0/13.0.10/Simulation/G4Extensions/G4CosmicFilter/ and replace G4CosmicAndFilter.cxx with the one in /afs/cern.ch/user/l/lytken/public/rel_13_cosmics/.
  • Recompile and add the other volume in the jO file(s). Example for TRTBarrel + Pixel can be found in the jobOptions files. If it works you should see this line in the log file:
G4CosmicAndFilter: using collectionName TRTBarrelEntryLayer and PixelEntryLayer

Digitization

Same method as in release 12, jobOptions and submission scripts in the same place as for simulation. The submission file is SubmitDig.src, and the jO file prodDigitTRG.py. Examples can be found in /afs/cern.ch/user/l/lytken/public/rel_13_cosmics/ Note that calorimeter noise is set to off in this digitization jobOptions. Change DoCaloNoise to True if you wish to have it included.

To run the digitization you need to have AtlasDigitization.py in your working directory, and copy some xml files locally.

13.0.10: /afs/cern.ch/user/j/jboyd/scratch0/13.0.10/InstallArea/XML/*

13.0.20: xml files above should be copied to TrigConfigSvc directory in running directory

>=13.0.30: this time the directory has to be called TriggerMenuXML/ ...

In 13.0.20 and up the names of the xml files have small variations - just rename to whatever athena wants. As an example of what is needed in 13.0.40, look in /afs/cern.ch/user/l/lytken/scratch0/rel_13.0.40/run/TriggerMenuXML

Local running:

athena -c "directory='dir';" prodDigitTRG.py
and submission:
./SubmitDig.src <directoryname as in simulation>  <seed of sim job>
The batch submission scripts have a few things (like output dir and #files per job) hard-coded.

-- ElseLytken - 06 Aug 2007

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2008-04-25 - ElseLytken
 
    • 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