#============================================================== # # Job options file for GEANT4 Simulation, using # Geo2G4 for the InnerDetector and the MuonSystem # # - reads Generator objects from the AthenaPool file # - converts them to transient objects # - performs GEANT4 simulation # - writes output (SimHits) via AthenaPool #============================================================== #-------------------------------------------------------------- # Load POOL support #-------------------------------------------------------------- include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" ) #-------------------------------------------------------------- # Get Configuration flags #-------------------------------------------------------------- include( "AthenaCommon/AthenaCommonFlags.py" ) #-------------------------------------------------------------- # Options for reading from POOL (use POOL implicit collection) #-------------------------------------------------------------- EventSelector = Service( "EventSelector" ) EventSelector.InputCollections = PoolEvgenInput #-------------------------------------------------------------- # Options for writing to POOL #-------------------------------------------------------------- theApp.OutStream = [ "Stream1" ] theApp.OutStreamType = "AthenaOutputStream" Stream1 = Algorithm( "Stream1" ) Stream1.EvtConversionSvc = "AthenaPoolCnvSvc" Stream1.OutputFile = PoolHitsOutput # Write geometry tag info include( "EventInfoMgt/EventInfoMgt_jobOptions.py" ) TagInfoMgr.AddIOVDbTags = False #-------------------------------------------------------------- # Define output stream items #-------------------------------------------------------------- # Full list Stream1.ItemList += [ "EventInfo#*", "McEventCollection#TruthEvent", "TrackRecordCollection#*", "SiHitCollection#*", "TRTUncompressedHitCollection#*", "TileHitVector#*", "LArHitContainer#*", "CaloCalibrationHitContainer#*", "RPCSimHitCollection#*", "TGCSimHitCollection#*", "CSCSimHitCollection#*", "MDTSimHitCollection#*" ] # Event/hit AthenaPool converters include( "EventAthenaPool/EventAthenaPool_joboptions.py" ) include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" ) include( "InDetEventAthenaPool/InDetEventAthenaPool_joboptions.py" ) include( "LArAthenaPool/LArAthenaPool_joboptions.py" ) include( "TileEventAthenaPool/TileEventAthenaPool_joboptions.py" ) include( "MuonEventAthenaPool/MuonEventAthenaPool_joboptions.py" ) theApp.Dlls += [ "GeneratorObjectsAthenaPoolPoolCnv" ] #-------------------------------------------------------------- # Check if Calibration hits in the calorimeters are needed #-------------------------------------------------------------- if (not "doCalibrationHits" in dir()): doCalibrationHits=False if (doCalibrationHits): Stream1.ItemList += [ "CaloCalibrationHitContainer#*" ] print "Calibration Hits will be produced and written" #-------------------------------------------------------------- # Setting up and running GEANT4 #-------------------------------------------------------------- theApp.setup( MONTECARLO ) include( "PartPropSvc/PartPropSvc.py" ) include( "G4Svc/jobOptions.G4Svc.py" ) # GeoModel stuff #-------------------------------------------------------------- include ("AtlasGeoModel/SetGeometryVersion.py") include ("AtlasGeoModel/GeoModelInit.py") theApp.Dlls += [ "Geo2G4"] theApp.ExtSvc += [ "Geo2G4Svc" ] # Setup Geant4 theApp.Dlls += [ "G4SimAlg" ] theApp.TopAlg += [ "G4SimAlg" ] # G4Svc options #-------------------------------------------------------------- G4Svc = Service( "G4Svc" ) G4Svc.PhysicsList = "none" G4Svc.SaveHits = False G4Svc.Visualize = False G4Svc.RunVerbosity = 0 G4Svc.EventVerbosity = 0 G4Svc.TrackingVerbosity = 0 G4Svc.Listener = False G4Svc.InteractiveG4 = False if (doCalibrationHits) : G4Svc.FADSMacro = "RomeGeometryCalHits.mac:RomeEtaPhiFilter.mac:PhysicsList.mac:TimingActions.mac:TrackRecord.mac:RomeMCTruth.mac" else : G4Svc.FADSMacro = "RomeGeometry.mac:RomeEtaPhiFilter.mac:PhysicsList.mac:TimingActions.mac:TrackRecord.mac:RomeMCTruth.mac" # G4SimAlg options #-------------------------------------------------------------- G4SimAlg = Algorithm( "G4SimAlg" ) G4SimAlg.Dll = "G4PhysicsLists:G4UserActions" #-------------------------------------------------------------- # Event-related parameters #-------------------------------------------------------------- # Number of output events to be processed theApp.EvtMax = EvtMax # Number of input events to be skipped EventSelector.SkipEvents = SkipEvents #-------------------------------------------------------------- # OUTPUT PRINTOUT LEVEL # Set output level 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 = INFO Stream1.OutputLevel = 5 Stream1.AcceptAlgs = [ "G4SimAlg" ] theApp.OutputLevel = 5 AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" ) AthenaPoolCnvSvc.OutputLevel = 5 #==============================================================