1-hello | 2-mod | 3-pack | 4-pythia | 5-ATLFAST | 6-aodread | 7-sim | 8-dig | 9-rec | 10-aod |

(11)Running Digitization in Athena (2008.5.13誤り) (11)Simulating Events with Athena (2008.5.14卒業)

myDigiOptions.py with the following lines in it, with the input and output files set appropriately:
########################################################## # User Digitization Job Options PoolHitsInput = ["g4hits.pool.root"] PoolRDOOutput = "g4digi.pool.root" # Run through EvtMax events; if -1 run to end of file EvtMax = -1 # Detector description DetDescrVersion='ATLAS-CSC-02-01-00' ##########################################################
> get_files AtlasDigitization.py > athena.py myDigiOptions.py AtlasDigitization.py > athena_digi.out
-rw-r--r-- 1 kondo zp 354 May 13 18:21 myDigiOptions.py -rwxr-xr-x 1 kondo zp 2354 May 13 18:23 AtlasDigitization.py* -rw-r--r-- 1 kondo zp 0 May 13 18:24 cdb.log -rw-r--r-- 1 kondo zp 489 May 13 18:24 PoolFileCatalog.xml.BAK -rw-r--r-- 1 kondo zp 39725 May 13 18:24 athena_digi.out
しかできていない。athena走らせた時
Warning in : no dictionary for class IProxyDict is available WARNING: $POOL_CATALOG is not defined using default `xmlcatalog_file:PoolFileCatalog.xml' FATAL 2008-May-13 18:35:36 以下メモリーダンプ
が出た。athena_digi.outの中身をみるとg4hits.pool.rootがないとか言っている。 ではg4hits.pool.rootとg4digi.pool.rootを適当に作っておいておく。
Warning in : no dictionary for class IProxyDict is available WARNING: $POOL_CATALOG is not defined using default `xmlcatalog_file:PoolFileCatalog.xml' ここまで同じ Error in : error reading all requested bytes from file g4hits .pool.root, got 2 of 100 Error in : g4hits.pool.root not a ROOT file  <==g4hits.pool.rootがROOT fileでないと文句言っている。 FATAL 2008-May-14 08:55:29 以下メモリーダンプ
g4hits.pool.rootを盗んでこよう。しかしあちこち探したがない!Googleでやったら坂本の 講習がヒット。よくフォローしたらdigitizationの前にsimulationが必要だった!!! ぬかしていたのだ。恥ずかしい。教訓:絶対自分が悪いと思え。 ーーーーーーーーーーーーーーーー仕切り直しーーーーーーーーーーーーーーーーーーーー GEANT4 Simulation of the ATLAS Detector to produce GEANT4 Hits direct access to Geant4 through the python interfaceがあるので注意。 SimFlags.SimLayout.set_Value('ATLAS-CSC-02-01-00') defines the version of the Simulation Layout (also known as the Detector Description) -->Information at AtlasGeomDBTags#ATLAS_Geom_DB_Tag_contents. > get_files jobOptions.G4Atlas_Sim.py > get_files PDGTABLE.MeV (Generation時に取ってきたのでスキップ) 
Change the following lines in jobOptions.G4Atlas_Sim.py appropriately: SimFlags.SimLayout='ATLAS-CSC-02-01-00' athenaCommonFlags.PoolHitsOutput='g4hits.pool.root' Comment out the following: # - uses single particle generator #SimFlags.KinematicsMode='SingleParticle' #SimFlags.ParticlePDG='11'Fa # set energy constant to 10 GeV #SimFlags.Energy=10000 # sets the EtaPhi, VertexSpread and VertexRange checks on #SimFlags.EventFilter.set_On() Uncomment the following and modify appropriately: SimFlags.KinematicsMode='ReadGeneratedEvents' athenaCommonFlags.PoolEvgenInput=['pythia.pool.root'] Modify the following appropriately: theApp.EvtMax = 10
に従って修正した:
#============================================================== # # Job options file for Geant4 Simulations # # Atlas simulation # __version__="$Revision: 1.39.2.1 $" #============================================================== #--- Detector flags ------------------------------------------- from AthenaCommon.DetFlags import DetFlags # - Select detectors DetFlags.ID_setOn() DetFlags.Calo_setOn() DetFlags.Muon_setOn() # DetFlags.simulate.Truth_setOn() #--- AthenaCommon flags --------------------------------------- from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.PoolEvgenInput=['pythia.pool.root'] athenaCommonFlags.PoolHitsOutput='g4hits.pool.root' athenaCommonFlags.EvtMax=10 #--- Simulation flags ----------------------------------------- from G4AtlasApps.SimFlags import SimFlags # Look into SimFlags.SimLayout for other possible values SimFlags.SimLayout='ATLAS-CSC-02-01-00' # specific value SimFlags.SimLayout.set_On() # uses the default value # sets the EtaPhi, VertexSpread and VertexRange checks on SimFlags.EventFilter.set_On() # sets LArParametrization #SimFlags.LArParameterization=2 # No magnetic field #SimFlags.MagneticField.set_Off() ###SimFlags.EventFilter.set_On() # - uses single particle generator ###SimFlags.KinematicsMode='SingleParticle' ###SimFlags.ParticlePDG='11' # set energy constant to 10 GeV ###SimFlags.Energy=10000 # set your own particle generator orders here. # do this for example if you need generation at fixed pt # PDG code will be set following user instructions in the SimFlags.ParticlePDG # SimFlags.Energy will be ingored if you uncomment the following lines #SimFlags.ParticleGeneratorOrders={'vertX:' : ' constant 1.0','vertY:' :' constant 1.0', # 'vertZ:' : ' constant 0.0','t:' :' constant 0.0', # 'eta:' : ' flat -3.0 3.0', 'phi:' : ' flat 0 6.28318', # 'pt:' : ' constant 50000'} # - reads events already generated SimFlags.KinematicsMode='ReadGeneratedEvents' # (the input file name is athenaCommonFlags.PoolEvgenInput] # - uses a given generator #SimFlags.KinematicsMode='EventGenerator' #SimFlags.GeneratorPath='G4AtlasApps/Z-mumuOptions.py') #--- Output printout level ----------------------------------- #output threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #you can override this for individual modules if necessary MessageSvc = Service( "MessageSvc" ) MessageSvc.OutputLevel = 4 #============================================================== # Job configuration # ***>> Do not add flags or simulation options below this line #============================================================== from G4AtlasApps import SimKernel # enter interactive mode #theApp.initialize() #G4Command=AtlasG4Eng.G4Eng.gbl.G4Commands() #G4Command.tracking.verbose(1) # start run after the interactive mode #theApp.nextEvent( theApp.EvtMax ) #theApp.finalize() #theApp.exit() #--- End jobOptions.G4Atlas_Sim.py file ------------------------------
athenaCommonFlags.EvtMax=10のみtheApp.EvtMax = 10でなかった。 mySimulationJobMを作りバッチに出した。 > athena.py jobOptions.G4Atlas_Sim.py > athena_sim.out 2>&1 10分でできた!15分/eventはウソ?メール通知には
Exited with exit code 255. Resource usage summary: CPU time : 522.22 sec. Max Memory : 580 MB Max Swap : 914 MB Max Processes : 6 Max Threads : 8
とある。できたものは
-rw-r--r-- 1 kondo zp 0 May 14 10:23 cdb.log -rw-r--r-- 1 kondo zp 478 May 14 10:24 GeoModelStatistics -rw-r--r-- 1 kondo zp 654 May 14 10:32 PoolFileCatalog.xml.BAK -rw-r--r-- 1 kondo zp 4598 May 14 10:32 G4InitStats.out -rw-r--r-- 1 kondo zp 654 May 14 10:32 PoolFileCatalog.xml -rw-r--r-- 1 kondo zp 1090587 May 14 10:32 g4hits.pool.root -rw-r--r-- 1 kondo zp 228691 May 14 10:32 athena_sim.out drwxr-xr-x 2 kondo zp 2048 May 14 10:51 LSFJOB_1193962/
でできているぞ!!LSFJOB_1193962/というdirectoryが生成されていてSTDOUTというファイルには
@(#)CERN job starter $Date: 2008/03/04 10:22:57 $ Working directory is on Job finished at Wed May 14 10:32:17 CEST 2008 on node under linux version Scientific Linux CERN SLC release 4.6 (Beryllium) CERN statistics: This job used 0:21:18 NCU hours (1278 NCU seconds) CERN statistics: This job used 0:21:18 KSI2K hours (1278 KSI2K seconds) KSI2K = kilo-SpecInt2000 benchmark units = 1.00 NCU
またLSFJOB_1193962/LSFJOBの内容は以下の通り。何だろう?
#! /bin/sh $LSB_TRAPSIGS $LSB_RCP1 $LSB_RCP2 $LSB_RCP3 # LSBATCH: User input /usr/local/lsf/etc/job_starter 'mySimulationJob' ExitStat=$? wait # LSBATCH: End user input true exit `expr $? "|" $ExitStat`