Пример #1
0
    def __init__(self, name):
        super(TriggerTowerMakerBase, self).__init__(name)
        from AthenaCommon.DetFlags import DetFlags
        from AthenaCommon.Constants import WARNING
        if DetFlags.digitize.LVL1_on():
            from Digitization.DigitizationFlags import jobproperties
            self.RndmSvc = jobproperties.Digitization.rndmSvc.get_Value()
            self.PedEngine = "%s_Pedestal" % name
            self.DigiEngine = "%s_Digitization" % name
            jobproperties.Digitization.rndmSeedList.addSeed(
                str(self.PedEngine), 8594832, 5736213)
            jobproperties.Digitization.rndmSeedList.addSeed(
                str(self.DigiEngine), 8631309, 4492432)
        else:
            self.RndmSvc = 'AtRanluxGenSvc'
            self.PedEngine = "%s_Pedestal" % name
            self.DigiEngine = "%s_Digitization" % name

            from AthenaCommon.AppMgr import ServiceMgr
            if not hasattr(ServiceMgr, 'AtRanluxGenSvc'):
                from AthenaServices.AthenaServicesConf import AtRanluxGenSvc
                ServiceMgr += AtRanluxGenSvc()

            # init random number seeds
            ServiceMgr.AtRanluxGenSvc.Seeds += [
                str(self.PedEngine) + " 8594832 5736213"
            ]
            ServiceMgr.AtRanluxGenSvc.Seeds += [
                str(self.DigiEngine) + " 8631309 4492432"
            ]
            ServiceMgr.AtRanluxGenSvc.OutputLevel = WARNING  # suppress 1 per event INFO messages.
Пример #2
0
    def __init__(self, name, seed=1857585203, luxury=None):
        super(RandomScaler, self).__init__(name)

        self._seed = seed
        self._luxury = luxury

        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
        if not hasattr(svcMgr, 'AtRanluxGenSvc'):
            from AthenaServices.AthenaServicesConf import AtRanluxGenSvc
            svcMgr += AtRanluxGenSvc()
Пример #3
0
def setupCostExtras(config=''):

    log = logging.getLogger('setupCostExtras')

    from AthenaCommon.AppMgr import theApp
    from AthenaCommon.AppMgr import ServiceMgr as svcMgr

    if not hasattr(svcMgr, "AthenaEventLoopMgr"):
        from AthenaServices.AthenaServicesConf import AthenaEventLoopMgr
        svcMgr += AthenaEventLoopMgr()

    svcMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100
    log.info('Set AthenaEventLoopMgr.EventPrintoutInterval = 100')

    if not hasattr(svcMgr, "AtRndmGenSvc"):
        from AthenaServices.AthenaServicesConf import AtRndmGenSvc
        svcMgr += AtRndmGenSvc()

    svcMgr.AtRndmGenSvc.OutputLevel = 4
    log.info('Set AtRndmGenSvc.OutputLevel = 4')

    if not hasattr(svcMgr, "AtRanluxGenSvc"):
        from AthenaServices.AthenaServicesConf import AtRanluxGenSvc
        svcMgr += AtRanluxGenSvc()

    svcMgr.AtRanluxGenSvc.OutputLevel = 4
    log.info('Set AtRanluxGenSvc.OutputLevel = 4')

    if config.count('TIME') > 0:
        log.info('Configure TrigTimerSvc...')
        from TrigTimeAlgs.TrigTimeAlgsConf import TrigTimerSvc

        if not hasattr(svcMgr, 'TrigTimerSvc'):
            svcMgr += TrigTimerSvc()

        svcMgr.TrigTimerSvc.IncludeName = ".+"
        svcMgr.TrigTimerSvc.ExcludeName = "()"
        svcMgr.TrigTimerSvc.OutputLevel = 4

        log.info('Setup detailed timing:')
        print svcMgr.TrigTimerSvc
Пример #4
0
## Run ParticleGenerator
import AthenaCommon.AtlasUnixGeneratorJob
spgorders = ['pdgcode: constant 13',
             'vertX: constant 0.0',
             'vertY: constant 0.0',
             'vertZ: constant 0.0',
             't: constant 0.0',
             'eta: flat -3.0 3.0',
             'phi: flat  0 6.283186',
             'e: constant 10000']
from ParticleGenerator.ParticleGeneratorConf import ParticleGenerator
topSeq += ParticleGenerator()
topSeq.ParticleGenerator.orders = sorted(spgorders)
from AthenaServices.AthenaServicesConf import AtRanluxGenSvc
ServiceMgr += AtRanluxGenSvc()
ServiceMgr.AtRanluxGenSvc.Seeds = ["SINGLE 2040160768 443921183"]


include("G4AtlasApps/G4Atlas.flat.configuration.py")

## Add G4 sim framework alg sequence
from AthenaCommon.CfgGetter import getAlgorithm
topSeq += getAlgorithm("G4AtlasAlg",tryDefaultConfigurable=True)
topSeq.G4AtlasAlg.InputTruthCollection = "GEN_EVENT"

#---  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 = 3
Пример #5
0
# @brief test SetSeedRunEventSvc
# @author Paolo Calafiura
# $Id: TestSeedRunEvent.py 535391 2013-01-30 12:04:52Z binet $
#==============================================================
from AthenaCommon.AppMgr import ServiceMgr
from AthenaServices.AthenaServicesConf import AtDSFMTGenSvc, AtRanluxGenSvc, AtRndmGenSvc, TestRandomSeqAlg

atMars = AtDSFMTGenSvc()
atMars.OutputLevel = VERBOSE
atMars.EventReseeding = True
atMars.Seeds = [
    "MARS 1 2", "MARSOFF OFFSET 73 1 2", "MARS_INIT 3 4", "TEST 5 6"
]
ServiceMgr += atMars

atLux = AtRanluxGenSvc()
atLux.OutputLevel = VERBOSE
atLux.UseOldBrokenSeeding = False
atLux.EventReseeding = True
atLux.Seeds = [
    "LUX 1 2", "LUXOFF OFFSET 73 1 2", "LUX_INIT LUXURY 0 3 4", "TEST 5 6"
]
ServiceMgr += atLux

atRnd = AtRndmGenSvc()
atRnd.OutputLevel = VERBOSE
atRnd.UseOldBrokenSeeding = False
atRnd.EventReseeding = True
atRnd.ReseedStreamNames = ["TEST", "RNDM", "RNDMOFF"]
atRnd.Seeds = [
    "RNDM 11 12", "RNDMOFF OFFSET 73 11 12", "RNDM_INIT 13 14", "TEST 15 16"
Пример #6
0
## Configure standard Athena services
##==============================================================

## Special setup for event generation
include("AthenaCommon/Atlas_Gen.UnixStandardJob.py")
include("PartPropSvc/PartPropSvc.py")

## Run performance monitoring (memory logging)
from PerfMonComps.PerfMonFlags import jobproperties as perfmonjp
perfmonjp.PerfMonFlags.doMonitoring = True
perfmonjp.PerfMonFlags.doSemiDetailedMonitoring = True

## Random number services
from AthenaServices.AthenaServicesConf import AtRndmGenSvc, AtRanluxGenSvc
svcMgr += AtRndmGenSvc()
svcMgr += AtRanluxGenSvc()

## Jobs should stop if an include fails.
jobproperties.AthenaCommonFlags.AllowIgnoreConfigError = False

## Compatibility with jets
from RecExConfig.RecConfFlags import jobproperties
jobproperties.RecConfFlags.AllowBackNavigation = True

## Set up a standard logger
from AthenaCommon.Logging import logging
evgenLog = logging.getLogger('Generate')


##==============================================================
## Run arg handling
Пример #7
0
##@file TestSetSeedRunEvent.py
# @brief test SetSeedRunEventSvc
# @author Paolo Calafiura
# $Id: TestSeedRunEvent.py 535391 2013-01-30 12:04:52Z binet $
#==============================================================
from AthenaCommon.AppMgr import ServiceMgr
from AthenaServices.AthenaServicesConf import AtDSFMTGenSvc, AtRanluxGenSvc, AtRndmGenSvc, TestRandomSeqAlg

atMars = AtDSFMTGenSvc()
atMars.OutputLevel=VERBOSE
atMars.EventReseeding=True
atMars.Seeds = [ "MARS 1 2", "MARSOFF OFFSET 73 1 2", "MARS_INIT 3 4", "TEST 5 6"];
ServiceMgr += atMars

atLux = AtRanluxGenSvc()
atLux.OutputLevel=VERBOSE
atLux.UseOldBrokenSeeding=False
atLux.EventReseeding=True
atLux.Seeds = [ "LUX 1 2", "LUXOFF OFFSET 73 1 2", "LUX_INIT LUXURY 0 3 4", "TEST 5 6"];
ServiceMgr += atLux

atRnd = AtRndmGenSvc()
atRnd.OutputLevel=VERBOSE
atRnd.UseOldBrokenSeeding=False
atRnd.EventReseeding=True
atRnd.ReseedStreamNames = [ "TEST", "RNDM", "RNDMOFF" ]
atRnd.Seeds = [ "RNDM 11 12", "RNDMOFF OFFSET 73 11 12", "RNDM_INIT 13 14", "TEST 15 16"];
ServiceMgr += atRnd

atLuxNN = AtRanluxGenSvc("LuxOld")
atLuxNN.OutputLevel=VERBOSE
Пример #8
0

#########
## DPD ##
#########
if rec.doDPD() and (rec.DPDMakerScripts()!=[] or rec.doDPD.passThroughMode):
    from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
    #from PrimaryDPDMaker.PrimaryDPDFlags import primDPD

    # Get an instance of the random number generator
    # The actual seeds are dummies since event reseeding is used
    from AthenaServices.AthenaServicesConf import AtRanluxGenSvc
    if not hasattr(svcMgr,'DPDAtRanluxGenSvc'):
        svcMgr += AtRanluxGenSvc( "DPDAtRanluxGenSvc",
                                  OutputLevel    = ERROR,
                                  Seeds          = [ "DPDRANDOMNUMBERSTREAM 2 3" ],
                                  SaveToFile     = False,
                                  EventReseeding = True
                                  )
        pass

    # Schedule the AODSelect setup
    #if rec.doAODSelect():
    #    try:
    #        include("AODSelect/AODSelect_setupOptions.py")
    #    except Exception:
    #        treatException("Could not load AODSelect/AODSelect_setupOptions.py !")
    #        rec.doAODSelect = False
    #        pass
    #    pass

    #This block may not be needed... something to check if somebody has time!
Пример #9
0
    'openThresholdRPCCabling',
    #special streaming setup
    'enable7BitL1TTStreaming'
]

modifierList = []
import TriggerRelease.Modifiers
try:  # Temporary backwards compatible hack
    from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData
    meta = TrigConfMetaData()
except:
    log.warning("TrigConfigSvc.TrigConfMetaData not available in this release")
    meta = None

from AthenaServices.AthenaServicesConf import AtRanluxGenSvc
atlux = AtRanluxGenSvc()
atlux.Seeds = [
    'TriggerTowerMaker_Pedestal 8594832 5736213',
    'TriggerTowerMaker_Digitization 8631309 4492432',
    'CTPSimulation 1979283043 1924452189',
    'ToolSvc.HLT::RandomScaler 1857585203 1857585203',
    'TrigSteer_L2.OPIScaler 1857585203 1857585203',
    'TrigSteer_L2.TrigCostExecL2.TrigCostScaler 1857585203 1857585203',
    'TrigSteer_L2.TrigCostAthenaL2.TrigCostScaler 1857585203 1857585203',
    'TrigSteer_EF.OPIScaler 1857585203 1857585203',
    'TrigSteer_EF.TrigCostExecEF.TrigCostScaler 1857585203 1857585203',
    'TrigSteer_EF.TrigCostAthenaEF.TrigCostScaler 1857585203 1857585203'
]
ServiceMgr += atlux

for i in svcMgr.getAllChildren():