def configure(self, keys=None): super(MuonCombinedReconstruction, self).configure(keys) if not self.isEnabled(): return topSequence = AlgSequence() #if jobproperties.Beam.beamType()=='collisions': # creates input collections for ID and MS candidates topSequence += getAlgorithm("MuonCombinedInDetCandidateAlg") topSequence += getAlgorithm("MuonCombinedMuonCandidateAlg") # runs ID+MS combinations (fit, staco, mugirl, ID-taggers) if muonCombinedRecFlags.doStatisticalCombination( ) or muonCombinedRecFlags.doCombinedFit(): topSequence += getAlgorithm("MuonCombinedAlg") if muonCombinedRecFlags.doMuGirl(): topSequence += getAlgorithm("MuonInsideOutRecoAlg") if muonCombinedRecFlags.doMuGirlLowBeta(): topSequence += getAlgorithm("MuGirlStauAlg") if muonCombinedRecFlags.doCaloTrkMuId(): topSequence += getAlgorithm("MuonCaloTagAlg") if muonCombinedRecFlags.doMuonSegmentTagger(): getPublicTool("MuonSegmentTagTool") topSequence += getAlgorithm("MuonSegmentTagAlg") # runs over outputs and create xAODMuon collection topSequence += getAlgorithm("MuonCreatorAlg") if muonCombinedRecFlags.doMuGirl( ) and muonCombinedRecFlags.doMuGirlLowBeta(): topSequence += getAlgorithm("StauCreatorAlg")
def generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, merger_input_property): """ Generates and returns a collection name that is also registered to the ISF CollectionMerger algorithm. :param bare_collection_name: name of the collection if no merging is taking place. :param mergeable_collection_suffix: suffix to the collection in case merging is taking place. :param merger_input_property: name of the Input* property in the CollectionMerger algorithm to add the mergeable collection to. """ if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired(): mergeable_collection = '{bare}{suffix}'.format( bare=bare_collection_name, suffix=mergeable_collection_suffix ) collection_merger = getAlgorithm('ISF_CollectionMerger') input_attribute_name = 'Input{merger_input_property}'.format( merger_input_property=merger_input_property) merger_input_collections = getattr(collection_merger, input_attribute_name) merger_input_collections.append(mergeable_collection) else: mergeable_collection = bare_collection_name return mergeable_collection
def generate_mergeable_collection_name(bare_collection_name, mergeable_collection_suffix, merger_input_property, region): """ Generates and returns a collection name that is also registered to the ISF CollectionMerger algorithm. :param bare_collection_name: name of the collection if no merging is taking place. :param mergeable_collection_suffix: suffix to the collection in case merging is taking place. :param merger_input_property: name of the Input* property in the CollectionMerger algorithm to add the mergeable collection to. """ hardscatterSG = "OriginalEvent_SG+" if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired.get_Value().get( region, True): mergeable_collection = '{bare}{suffix}'.format( bare=bare_collection_name, suffix=mergeable_collection_suffix) collection_merger = getAlgorithm('ISF_CollectionMerger') input_attribute_name = 'Input{merger_input_property}'.format( merger_input_property=merger_input_property) merger_input_collections = getattr(collection_merger, input_attribute_name) merger_input_collections.append(mergeable_collection) elif athenaCommonFlags.DoFullChain() and DetFlags.pileup.any_on(): mergeable_collection = hardscatterSG + bare_collection_name else: mergeable_collection = bare_collection_name return mergeable_collection
def __init__(self): """ Describes the geometry. """ self.point1 = PyG4Atlas.DetFacility("GeoDetector", "CavernInfra:CavernInfra") self.world = PyG4Atlas.DetFacility("ResizeableBox", "World") bedrockDX = 302700 bedrockDZ = 301000 from G4AtlasApps.SimFlags import simFlags if not (hasattr(simFlags, 'CavernBG') and simFlags.CavernBG.statusOn): ## Be ready to resize bedrock if the cosmic generator needs more space if simFlags.ISFRun: from AthenaCommon.CfgGetter import getAlgorithm if simFlags.ReadTR.statusOn: cg = getAlgorithm('TrackRecordCosmicGenerator') else: cg = getAlgorithm('EvgenCosmicGenerator') # for ISF cosmics simulation, set world volume to biggest possible case bedrockDX = 1000. * 3000 # 3 km bedrockDZ = 1000. * 3000 # 3 km else: from CosmicGenerator.CosmicGeneratorConf import CosmicGenerator cg = CosmicGenerator() if (cg.xvert_hig - cg.xvert_low) / 2.0 > bedrockDX: bedrockDX = (cg.xvert_hig - cg.xvert_low) / 2.0 if (cg.zvert_hig - cg.zvert_low) / 2.0 > bedrockDZ: bedrockDZ = (cg.zvert_hig - cg.zvert_low) / 2.0 else: self.world.add_MaxStepInVolumes('World', 20000.000) self.world.df.SetDx(bedrockDX) self.world.df.SetDz(bedrockDZ) self.world.df.SetDy(57300 + 41000 + 1000) # 1 extra meter to help voxelization... self.world.df.DefineSubtractionBox('BelowCavern') BelowCavernDim = AtlasG4Eng.G4Eng.gbl.CLHEP.Hep3Vector( bedrockDX, 41000, bedrockDZ) BelowCavernPos = AtlasG4Eng.G4Eng.gbl.CLHEP.Hep3Vector(0, -58300, 0) self.world.df.SetSubtractionBoxDimensions('BelowCavern', BelowCavernDim) self.world.df.SetSubtractionBoxPosition('BelowCavern', BelowCavernPos)
def getFastHitConvAlgFastCaloSimSvc(name="ISF_FastHitConvAlgFastCaloSimSvc",**kwargs): kwargs.setdefault("CaloCellMakerTools_release", [ #getPublicTool('ISF_AddNoiseCellBuilderTool'), getPublicTool('ISF_CaloCellContainerFinalizerTool') ] ) # setup FastCaloSim hit converter and add it to the alg sequence: # -> creates HITS from reco cells from AthenaCommon.AlgSequence import AlgSequence topSequence=AlgSequence() topSequence+=getAlgorithm('ISF_FastHitConvAlg') return getNativeFastCaloSimSvc(name,**kwargs)
def test_isISFRunAndNoHITSMergingRequiredWithEmptyCollectionMergerAlgorithm_expectCollectionMergerAlgorithmUntouched( self): simFlags.ISFRun.set_Value(True) ISF_Flags.HITSMergingRequired.set_Value(False) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' actual_collection_name = generate_mergeable_collection_name( bare_collection_name, collection_suffix, merger_input_property) collection_merger = getAlgorithm('ISF_CollectionMerger') actual_collection_merger_input = collection_merger.InputPixelHits expected_collection_merger_input = list() self.assertEqual(expected_collection_merger_input, actual_collection_merger_input)
def test_isISFRunAndNoHITSMergingRequiredWithEmptyCollectionMergerAlgorithm_expectCollectionMergerAlgorithmUntouched(self): simFlags.ISFRun.set_Value(True) mergeDict = {'ID':False, 'CALO':True, 'MUON':False} ISF_Flags.HITSMergingRequired.get_Value().update(mergeDict) bare_collection_name = 'aTestCollection' collection_suffix = '_TESTSUFFIX' merger_input_property = 'PixelHits' region = 'ID' actual_collection_name = generate_mergeable_collection_name(bare_collection_name, collection_suffix, merger_input_property, region) collection_merger = getAlgorithm('ISF_CollectionMerger') actual_collection_merger_input = collection_merger.InputPixelHits expected_collection_merger_input = list() self.assertEqual(expected_collection_merger_input, actual_collection_merger_input)
############################################################### # # TRT Digitization # #============================================================== from Digitization.DigitizationFlags import jobproperties from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from AthenaCommon.CfgGetter import getAlgorithm job += getAlgorithm("TRTFastDigitization/TRTFastDigitization", tryDefaultConfigurable=True)
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # MagFieldServices #-------------------------------------------------------------- from AthenaCommon.Logging import logging logging.getLogger().info("Importing %s", __name__) from AthenaCommon.AthenaCommonFlags import athenaCommonFlags # initialise required conditions DB folders from IOVDbSvc.CondDB import conddb conddb.addFolderSplitMC('GLOBAL', '/GLOBAL/BField/Maps <noover/>', '/GLOBAL/BField/Maps <noover/>', className="CondAttrListCollection") if not athenaCommonFlags.isOnline(): conddb.addFolder('DCS_OFL', '/EXT/DCS/MAGNETS/SENSORDATA', className="CondAttrListCollection") # import the field service and conditions algs (service is 'to be removed') # (it is MagFieldServices.MagFieldServicesConfig which takes care of configuration) from AthenaCommon.CfgGetter import getService, getAlgorithm getService('AtlasFieldSvc') from AthenaCommon.AlgSequence import AthSequencer condSequence = AthSequencer("AthCondSeq") condSequence += getAlgorithm("AtlasFieldMapCondAlg") condSequence += getAlgorithm("AtlasFieldCacheCondAlg")
from AthenaCommon.CfgGetter import getAlgorithm, getPublicTool cnvalg = getAlgorithm('TrigMuonEFInfoToMuonCnvAlgTMEF') #cnvalg.OutputLevel=DEBUG topSequence += cnvalg #getPublicTool('TrigMuonEFInfoToMuonCnvToolNoIDTrkLinks').OutputLevel=DEBUG topSequence += getAlgorithm('TrigMuonEFInfoToMuonCnvAlgTMG') topSequence += getAlgorithm('TrigMuonEFInfoCnvTestAlgTMEF') topSequence.TrigMuonEFInfoCnvTestAlgTMEF.OutputLevel=VERBOSE
""" ## Configuring the Athena application for a 'generator' job from G4AtlasApps.SimFlags import simFlags simFlags.load_cosmics_flags() assert hasattr(simFlags, "ReadTR") ## Set up standard algorithms and random seeds from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from AthenaCommon.CfgGetter import getAlgorithm if simFlags.ReadTR.statusOn: try: cosmicGen = topSequence.TrackRecordCosmicGenerator except: cosmicGen = getAlgorithm("TrackRecordCosmicGenerator") else: try: cosmicGen = topSequence.EvgenCosmicGenerator except: cosmicGen = getAlgorithm("EvgenCosmicGenerator") ## Adding the McEventCollection dumper to the list of algs #from TruthExamples.TruthExamplesConf import DumpMC #topSequence += DumpMC() print cosmicGen #FIXME temporary hacks to ensure that BeamEffectsAlg runs after the Cosmic Generators def moveAlgInSequence(alg, seq, newpos): l = seq.getChildren()
""" from AthenaServices.AthenaServicesConf import AtRanluxGenSvc if not hasattr(ServiceMgr, 'AtRanluxGenSvc' ) : ServiceMgr += AtRanluxGenSvc() seed = "SINGLE "+str(randint(1,294967296))+" "+str(randint(1,294967296)) ServiceMgr.AtRanluxGenSvc.Seeds += [seed] """ # get service manager from AthenaCommon.AppMgr import ServiceMgr from LArG4FastSimSvc.LArG4FastSimSvcInit import LArG4FastSimSvcInit LArG4FastSimSvcInit() ServiceMgr.LArG4EMBFastSimSvc.GeneratedStartingPointsFile = "EMB." + options.output ServiceMgr.LArG4EMBFastSimSvc.GeneratedStartingPointsRatio = options.spratio ServiceMgr.LArG4EMECFastSimSvc.GeneratedStartingPointsFile = "EMEC." + options.output ServiceMgr.LArG4EMECFastSimSvc.GeneratedStartingPointsRatio = options.spratio ServiceMgr.LArG4FCALFastSimSvc.GeneratedStartingPointsFile = "FCAL1." + options.output ServiceMgr.LArG4FCALFastSimSvc.GeneratedStartingPointsRatio = options.spratio ServiceMgr.LArG4FCAL2FastSimSvc.GeneratedStartingPointsFile = "FCAL2." + options.output ServiceMgr.LArG4FCAL2FastSimSvc.GeneratedStartingPointsRatio = options.spratio include("G4AtlasApps/G4Atlas.flat.configuration.py") ## Populate alg sequence from AthenaCommon.CfgGetter import getAlgorithm topSequence += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True)
# on the flags<br> # <code>DetFlags.makeRIO.MDT_on(), RPC_on(), TGC_on() and CSC_on()</code><br> # See also @ref MuonRecExampleConverters "the section on configuring the converters" include.block("MuonRecExample/MuonRDO_to_PRD_jobOptions.py") from AthenaCommon.AppMgr import ToolSvc from AthenaCommon.BeamFlags import jobproperties beamFlags = jobproperties.Beam from AthenaCommon.CfgGetter import getAlgorithm if muonRecFlags.doCSCs() and DetFlags.makeRIO.CSC_on() and ( DetFlags.haveRDO.CSC_on() or DetFlags.digitize.CSC_on()): topSequence += getAlgorithm("CscRdoToCscPrepData") if muonRecFlags.doMDTs() and DetFlags.makeRIO.MDT_on() and ( DetFlags.haveRDO.MDT_on() or DetFlags.digitize.MDT_on()): topSequence += getAlgorithm("MdtRdoToMdtPrepData", tryDefaultConfigurable=True) if muonRecFlags.doRPCs() and DetFlags.makeRIO.RPC_on() and ( DetFlags.haveRDO.RPC_on() or DetFlags.digitize.RPC_on()): topSequence += getAlgorithm("RpcRdoToRpcPrepData", tryDefaultConfigurable=True) if muonRecFlags.doTGCs() and DetFlags.makeRIO.TGC_on() and ( DetFlags.haveRDO.TGC_on() or DetFlags.digitize.TGC_on()): topSequence += getAlgorithm("TgcRdoToTgcPrepData", tryDefaultConfigurable=True)
pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(), randomStream="SINGLE") pg.sampler.pid = PG.CyclicSeqSampler([-11, 11]) pg.sampler.mom = PG.PtEtaMPhiSampler(pt=10000, eta=[-3, 3]) job += pg include("G4AtlasApps/fragment.SimCopyWeights.py") ## Release GeoModel memory once sim is configured simFlags.ReleaseGeoModel = False include("G4AtlasApps/G4Atlas.flat.configuration.py") ## Add the G4 sim to the alg sequence after the generator from AthenaCommon.CfgGetter import getAlgorithm job += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True) ## User algorithms from AthenaCommon.AppMgr import ServiceMgr from GaudiSvc.GaudiSvcConf import THistSvc ServiceMgr += THistSvc("THistSvc") #ServiceMgr.THistSvc.Output = ["atlasTest DATAFILE='atlasTest.muons.histo.root' OPT='RECREATE'"]; ServiceMgr.THistSvc.Output = ["truth DATAFILE='truth.root' OPT='RECREATE'"] from AthenaCommon.AlgSequence import AlgSequence job = AlgSequence() from G4AtlasTests.G4AtlasTestsConf import G4TestAlg job += G4TestAlg() from AthenaCommon import CfgGetter job.G4TestAlg.SimTestTools += [
def setUp(self): # keep same algorithm instance around for the duration of each test self.collection_merger = getAlgorithm('ISF_CollectionMerger')
from AthenaCommon.CfgGetter import getAlgorithm, getPublicTool cnvalg = getAlgorithm('MuonFeatureCnvAlgL2SA') topSequence += cnvalg topSequence += getAlgorithm('MuonFeatureCnvTestAlgL2SA') topSequence.MuonFeatureCnvTestAlgL2SA.OutputLevel=VERBOSE
# theApp.AuditAlgorithms = True theApp.AuditServices = True # # --- Display detailed size and timing statistics for writing and reading ServiceMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True #-------------------------------------------------------------- # ISF input #-------------------------------------------------------------- # Note: automatically adds generator to TopSequence if applicable from AthenaCommon.BeamFlags import jobproperties # if an input sting identifier was given, use ISF input definitions if ISF_Flags.Input() != "NONE": getAlgorithm('ISF_Input_' + ISF_Flags.Input()) # cosmics input elif jobproperties.Beam.beamType.get_Value() == 'cosmics': from G4AtlasApps.SimFlags import simFlags simFlags.load_cosmics_flags() if simFlags.ReadTR.statusOn: getAlgorithm('TrackRecordCosmicGenerator') else: getAlgorithm('EvgenCosmicGenerator') # non of the above elif not athenaCommonFlags.PoolEvgenInput.statusOn: printfunc( "ISF Input Configuration: PoolEvgenInput off, likely running with a particle gun preInclude" ) # non of the above -> input via ISF_Flags
# Debug outputs of user actions #CfgGetter.getPublicTool('G4UA::AthenaTrackingActionTool').OutputLevel = DEBUG include("G4AtlasApps/G4Atlas.flat.configuration.py") # Setup the algorithm sequence from AthenaCommon.AlgSequence import AlgSequence topSeq = AlgSequence() from AthenaCommon import CfgMgr CfgMgr.SGInputLoader().Load += [('McEventCollection', 'StoreGateSvc+GEN_EVENT')] # Add the beam effects algorithm from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) # Add the (python) G4 simulation service. # This will kickstart a lot of simulation setup. topSeq += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True) # Explicitly specify the data-flow dependencies of G4AtlasAlg and StreamHITS. # This is done like this because currently our VarHandles do not live in the # algorithm but rather in Geant4 components. topSeq.G4AtlasAlg.ExtraInputs = [('McEventCollection','StoreGateSvc+BeamTruthEvent')] topSeq.G4AtlasAlg.ExtraOutputs = [('SiHitCollection','StoreGateSvc+SCT_Hits')] topSeq.StreamHITS.ExtraInputs += topSeq.G4AtlasAlg.ExtraOutputs # Increase verbosity of the output stream #topSeq.StreamHITS.OutputLevel = DEBUG
# # @brief jobOptions for data conversion from bytestream to RDO for offline (i.e. decode full event) # # Used when reading raw date file (bytestream format). # Adds the algorithms that convert the full muon bytestream data in RDO collections. # The actual conversion tools and services used by the algorithms are configured in python/MuonRecTools.py. # There is one algorithm per detector technology and a specific algorithm is added or not depending on the flags<br> # <code>DetFlags.readRODBS.MDT_on(), RPC_on(), TGC_on() and CSC_on()</code><br> include.block("MuonCnvExample/MuonReadBS_jobOptions.py") from AthenaCommon.DetFlags import DetFlags from AthenaCommon.CfgGetter import getAlgorithm from MuonRecExample.MuonRecFlags import muonRecFlags # ================= MDT =========================== if DetFlags.readRDOBS.MDT_on() and muonRecFlags.makePRDs(): topSequence += getAlgorithm("MuonMdtRawDataProvider") # ================= RPC =========================== if DetFlags.readRDOBS.RPC_on() and muonRecFlags.makePRDs(): topSequence += getAlgorithm("MuonRpcRawDataProvider") # ================= TGC =========================== if DetFlags.readRDOBS.TGC_on() and muonRecFlags.makePRDs(): topSequence += getAlgorithm("MuonTgcRawDataProvider") # ================= CSC =========================== if DetFlags.readRDOBS.CSC_on() and muonRecFlags.makePRDs(): topSequence += getAlgorithm("MuonCscRawDataProvider")
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.EvtMax = options.nevents athenaCommonFlags.SkipEvents = options.skipevents athenaCommonFlags.PoolHitsOutput.set_Off() athenaCommonFlags.PoolEvgenInput=options.inputevt ## Set the LAr parameterization simFlags.LArParameterization = 0 # get service manager from AthenaCommon.AppMgr import ServiceMgr include("G4AtlasApps/G4Atlas.flat.configuration.py") ## Populate alg sequence from random import randint simFlags.RandomSeedOffset = randint(1,443921180) #add G4 function from G4AtlasApps.SimFlags import simFlags simFlags.OptionalUserActionList.addAction('G4UA::TestActionShowerLibTool',['Event','Run','Step']) from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("G4AtlasAlg",tryDefaultConfigurable=True) from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("LArG4GenShowerLib") topSeq.LArG4GenShowerLib.LibStructFiles = options.inputstruct
DetFlags.readRIOPool.all_setOff() DetFlags.writeRIOPool.all_setOff() import AtlasGeoModel.SetGeometryVersion import AtlasGeoModel.GeoModelInit #-------------------------------------------------------------- # Load CondAlg, Tool and TestAlg #-------------------------------------------------------------- from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") condAlgName = "SCT_CablingCondAlgFromCoraCool" if not hasattr(condSeq, condAlgName): from AthenaCommon.CfgGetter import getAlgorithm SCT_CablingCondAlgFromCoraCool = getAlgorithm(condAlgName) condSeq += SCT_CablingCondAlgFromCoraCool from AthenaCommon.CfgGetter import getPrivateTool SCT_CablingTool = getPrivateTool("SCT_CablingTool") SCT_CablingTool.DataSource = "COOLVECTOR" SCT_CablingTool.OutputLevel = INFO from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from SCT_Cabling.SCT_CablingConf import SCT_TestCablingAlg topSequence += SCT_TestCablingAlg( SCT_CablingTool=SCT_CablingTool,
# run the muon Digit -> RDO for the signal in the MC Store # and, in the case where the background is MC generated, # also for the background in the temporary background store # if the background is real data, we do not do Digit -> RDO # in the temporary background store because of MDT Cabling problem # for CSC, Digit -> RDO was already done during overlay and # should not be repeated here from AthenaCommon.DetFlags import DetFlags theApp.Dlls += ["MuonByteStreamCnvTest"] theApp.Dlls += ["TrigT1RPChardware"] theApp.Dlls += ["TrigT1RPCsteering"] theApp.Dlls += ["TrigT1RPCmonitoring"] from AthenaCommon.CfgGetter import getAlgorithm if DetFlags.overlay.MDT_on(): job += getAlgorithm("SigMdtDigitToMdtRDO") #ACH if readBS==False: #ACH job += MdtDigitToMdtRDO( "BkgMdtDigitToMdtRDO" ) #ACH job.BkgMdtDigitToMdtRDO.Store = job.MdtOverlay.TempBkgStore if DetFlags.overlay.RPC_on(): job += getAlgorithm("SigRpcDigitToRpcRDO") #ACH if readBS==False: #ACH job += RpcDigitToRpcRDO( "BkgRpcDigitToRpcRDO" ) #ACH job.BkgRpcDigitToRpcRDO.Store = job.RpcOverlay.TempBkgStore if DetFlags.overlay.TGC_on(): job += getAlgorithm("SigTgcDigitToTgcRDO") #ACH if readBS==False: #ACH job += TgcDigitToTgcRDO( "BkgTgcDigitToTgcRDO" ) #ACH job.BkgTgcDigitToTgcRDO.Store = job.TgcOverlay.TempBkgStore
if DetFlags.detdescr.pixel_on() and not 'PixelCabling' in dir(): from PixelCabling.PixelCablingConf import PixelCablingSvc PixelCablingSvc = PixelCablingSvc() ServiceMgr += PixelCablingSvc if (InDetFlags.doPrintConfigurables()): printfunc(PixelCablingSvc) # # --- SCT cabling # if DetFlags.detdescr.SCT_on(): from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "SCT_CablingCondAlgFromCoraCool"): from AthenaCommon.CfgGetter import getAlgorithm SCT_CablingCondAlgFromCoraCool = getAlgorithm( "SCT_CablingCondAlgFromCoraCool") condSeq += SCT_CablingCondAlgFromCoraCool if (InDetFlags.doPrintConfigurables()): printfunc(SCT_CablingCondAlgFromCoraCool) # # --- TRT cabling # if DetFlags.detdescr.TRT_on() and not 'TRT_Cabling' in dir(): # if bytestream comes from real data from TRT_Cabling.TRT_CablingConf import TRT_FillCablingData_DC3 TRT_Cabling = TRT_FillCablingData_DC3() if not (globalflags.DataSource() == 'geant4'): # TRT needs the hack in "the other direction" TRT_Cabling.RealData = True ToolSvc += TRT_Cabling
ServiceMgr += myAtRndmGenSvc ## add the material step recording action SimFlags.OptionalUserActionList.addAction('G4UA::MaterialStepRecorderTool', ['Run', 'Event', 'Step']) ############### The Material hit collection ################## from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream # --- check dictionary ServiceMgr.AthenaSealSvc.CheckDictionary = True # --- commit interval (test) ServiceMgr.AthenaPoolCnvSvc.OutputLevel = DEBUG ServiceMgr.AthenaPoolCnvSvc.CommitInterval = 10 MaterialStream = AthenaPoolOutputStream('MaterialStream') MaterialStream.OutputFile = "MaterialStepFile.root" MaterialStream.ItemList += ['Trk::MaterialStepCollection#*'] ############################################################## include("G4AtlasApps/G4Atlas.flat.configuration.py") # Add the beam effects algorithm from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) ## Populate alg sequence topSeq += getAlgorithm("G4AtlasAlg", tryDefaultConfigurable=True) #--- End jobOptions.GeantinoMapping.py file ------------------------------
pg.sampler.mom = PG.EEtaMPhiSampler(energy=E, eta=0, phi=0) topSeq += pg try: include("G4AtlasApps/fragment.SimCopyWeights.py") except: try: from GeneratorModules.GeneratorModulesConf import CopyEventWeight topSeq += CopyEventWeight(TruthCollKey="GEN_EVENT") except: from EvgenProdTools.EvgenProdToolsConf import CopyEventWeight topSeq += CopyEventWeight() from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("BeamEffectsAlg") #--- Geant4 flags --------------------------------------------- ## Select G4 physics list or use the default one # PHYSICSLIST will be replaced by the physics lists that loop over in sub_jobs.sh. #simFlags.PhysicsList.set_Value('QGSP_BERT') #simFlags.PhysicsList.set_Value('QGSP_BIC') #simFlags.PhysicsList.set_Value('FTFP_BERT') simFlags.PhysicsList.set_Value('PHYSICSLIST') ## Use verbose G4 tracking if 'VerboseTracking' in dir(): def use_verbose_tracking(): from G4AtlasApps import AtlasG4Eng