def _loadReadMcAscii(): import AthenaCommon.AtlasUnixStandardJob from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.Logging import logging msg = logging.getLogger('loadReadMcAscii') msg.debug("Loading services for 'ReadMcAscii'...") ## needed dlls if not hasattr(svcMgr, 'PartPropSvc'): from PartPropSvc.PartPropSvcConf import PartPropSvc svcMgr += PartPropSvc() ## from AthenaCommon import CfgMgr svcMgr += CfgMgr.McAsciiCnvSvc() svcMgr += CfgMgr.McAsciiEventSelector("EventSelector") theApp.EvtSel = svcMgr.EventSelector.getFullName() # Persistency services svcMgr.EventPersistencySvc.CnvServices += ["McAsciiCnvSvc"] return
# # The Generator is under the development - to include varios users applications # Following functions are already available: # Generation of B events bb->X # Generation of B->any exlusive decay channel selected by User # Repeated hadronization can be activated to speed-up b-production # The only selection of the events is a b-quark selection # No LVL1 LVL2 OFFLINE selections in this releas - under prepartion #============================================================== #-------------------------------------------------------------- # General Application Configuration options #-------------------------------------------------------------- import AthenaCommon.AtlasUnixGeneratorJob from PartPropSvc.PartPropSvcConf import PartPropSvc svcMgr += PartPropSvc() #-------------------------------------------------------------- # Private Application Configuration options #-------------------------------------------------------------- svcMgr.AuditorSvc.Auditors = [ "ChronoAuditor" ] #-------------------------------------------------------------- # Algorithms #-------------------------------------------------------------- from AthenaCommon.AlgSequence import AlgSequence topAlg=AlgSequence() from PythiaB.PythiaBConf import PythiaB topAlg += PythiaB() PythiaB = topAlg.PythiaB
# # Job options file for Pyquench_i # # Brian Cole, Nathan Grau, Mikhail Leltchouk, Nevis, April 2006 #============================================================== # General Application Configuration options #-------------------------------------------------------------- import AthenaCommon.AtlasUnixGeneratorJob from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr # make sure we are loading the ParticleProperty service from PartPropSvc.PartPropSvcConf import PartPropSvc ServiceMgr += PartPropSvc() #-------------------------------------------------------------- # Private Application Configuration options #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) ServiceMgr.MessageSvc.OutputLevel = FATAL #-------------------------------------------------------------- # Event related parameters #-------------------------------------------------------------- # Set run number (default 0 causes problems) #EventSelector = Service("EventSelector") ServiceMgr.EventSelector.RunNumber = 1040
def getInput_GenericCosmicGenerator(name="GenericCosmicGenerator", **kwargs): ## Configuring the Athena application for a 'generator' job from G4AtlasApps.SimFlags import simFlags simFlags.load_cosmics_flags() ## Set up standard algorithms and random seeds from AthenaCommon.AppMgr import ServiceMgr from PartPropSvc.PartPropSvcConf import PartPropSvc ServiceMgr += PartPropSvc() if not simFlags.RandomSeedList.checkForExistingSeed("COSMICS"): simFlags.RandomSeedList.addSeed("COSMICS", 2040160768, 443921183) kwargs.setdefault('AtRndmGenSvc', simFlags.RandomSvc.get_Value()) from CosmicGenerator.CosmicGeneratorConfig import CavernPropertyCalculator theCavern = CavernPropertyCalculator() ##-------------------------------------------------------------- ## CosmicGenerator parameters ##-------------------------------------------------------------- ## ## Note that in this coordinate frame the y-axis points upward ## such that the cosmics arrive from upward to downward in y. ## The production vertex of cosmics is randomly distributed (flat) ## in the x-z plane with boundaries given below. ## The energy range is given as well. ## ## The following settings are tuned to scintillators of dimensions ## 140 x 0.5 x 100 cm^3 placed at +-115.0 cm kwargs.setdefault('emin', theCavern.CosmicEmin()) kwargs.setdefault('emax', theCavern.CosmicEmax()) #kwargs.setdefault('emin', 10000) # default =10000 #10 GeV #kwargs.setdefault('emax', 5000*1000) # 2 TeV - FIXME?! kwargs.setdefault('xvert_low', theCavern.CosmicLowVertex_X()) kwargs.setdefault('xvert_hig', theCavern.CosmicHighVertex_X()) kwargs.setdefault('zvert_low', theCavern.CosmicLowVertex_Z()) kwargs.setdefault('zvert_hig', theCavern.CosmicHighVertex_Z()) kwargs.setdefault('Radius', theCavern.CosmicRadius()) kwargs.setdefault('yvert_val', 57300. + 41000.) kwargs.setdefault('ctcut', 0.) kwargs.setdefault('OptimizeForCavern', True) kwargs.setdefault('IPx', 0.) kwargs.setdefault('IPy', 0.) kwargs.setdefault('IPz', 0.) if simFlags.CosmicFilterVolumeName.statusOn: print('Using %s Volume setup of Cosmic Generator...' % simFlags.CosmicFilterVolumeName.get_Value()) #special settings from Juerg Beringer if simFlags.CosmicFilterVolumeName == "Pixel" or simFlags.CosmicFilterVolumeName2 == "Pixel": kwargs.setdefault( 'doPathLengthCut', True) # Optimization based on box cut in pixel detector plane kwargs.setdefault( 'energyCutThreshold', 100.) # - margin of error for energy loss calculation (in MeV) kwargs.setdefault( 'doAimedAtPixelsCut', True) # Optimization based on box cut in pixel detector plane kwargs.setdefault('pixelplane_maxx', 1150.) # - require |x| < value in mm kwargs.setdefault('pixelplane_maxz', 1650.) # - require |y| < value in mm kwargs.setdefault( 'doReweighting', True) # Whether to use reweighting for cosmic ray generation kwargs.setdefault( 'rvert_max', 300000.) # - radius in mm for generating primary vertex if simFlags.CosmicPtSlice.statusOn and simFlags.CosmicPtSlice( ) is not 'NONE': print("Configuring cosmic pT slice: %s" % simFlags.CosmicPtSlice.get_Value()) theCavern.reconfigureCavernGeometry() from AthenaCommon import CfgMgr algorithm = CfgMgr.CosmicGenerator(**kwargs) from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() if not hasattr(topSequence, 'CosmicGenerator'): topSequence += algorithm return algorithm
# Prevent crashes from partially-initialized tools. from TrkEventCnvTools import TrkEventCnvToolsConf EventCnvSuperTool = \ TrkEventCnvToolsConf.Trk__EventCnvSuperTool('EventCnvSuperTool') EventCnvSuperTool.DoMuons = False EventCnvSuperTool.DoID = False ToolSvc += EventCnvSuperTool from AthenaServices.AthenaServicesConf import FPEControlSvc svcMgr += FPEControlSvc() theApp.CreateSvc += [ svcMgr.FPEControlSvc.getFullJobOptName() ] # Work around borked PPS --- it can't find its input file with the # default setting. from PartPropSvc.PartPropSvcConf import PartPropSvc svcMgr += PartPropSvc(InputFile='PDGTABLE.MeV=PDG') import xAODJetCnv.ParticleJetCompatibility if not globals().get('input_file'): input_file = 'AOD.pool.root' import AthenaPoolCnvSvc.ReadAthenaPool ServiceMgr.EventSelector.InputCollections = [ input_file ] #ServiceMgr.EventSelector.InputCollections = [ "AOD-13.0.30.3/AOD-13.0.30.3-full.pool.root" ] #ServiceMgr.EventSelector.InputCollections = [ "AOD-dev/AOD-dev-full.pool.root" ] #svcMgr.PoolSvc.AttemptCatalogPatch = True #include ("PyAnalysisCore/InitPyAnalysisCore.py")