示例#1
0
def addSimulationSubstep(executorSet, overlayTransform=False):
    TRExe = athenaExecutor(
        name='TRtoHITS',
        skeletonFile='SimuJobTransforms/skeleton.EVGENtoHIT_ISF.py',
        substep='simTRIn',
        tryDropAndReload=False,
        perfMonFile='ntuple.pmon.gz',
        inData=['EVNT_TR'],
        outData=['HITS', 'NULL'])
    executorSet.add(TRExe)
    SimExe = athenaExecutor(
        name='EVNTtoHITS',
        skeletonFile='SimuJobTransforms/skeleton.EVGENtoHIT_ISF.py',
        substep='sim',
        tryDropAndReload=False,
        perfMonFile='ntuple.pmon.gz',
        inData=['NULL', 'EVNT'],
        outData=['EVNT_TR', 'HITS', 'NULL'])
    if overlayTransform:
        from PyJobTransforms.trfUtils import releaseIsOlderThan
        if releaseIsOlderThan(20, 3):
            SimExe.inData = [('EVNT', 'BS_SKIM')]
        else:
            SimExe.inData = [('EVNT', 'TXT_EVENTID')]
        SimExe.outData = ['HITS']
        SimExe.inputDataTypeCountCheck = ['EVNT']
    executorSet.add(SimExe)
示例#2
0
        exec(cmd)

## Pre-include
if hasattr(runArgs, "preInclude"):
    for fragment in runArgs.preInclude:
        include(fragment)

#--------------------------------------------------------------
# Load POOL support
#--------------------------------------------------------------
from AthenaCommon.AppMgr import ServiceMgr
from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
ServiceMgr += AthenaPoolCnvSvc()

from PyJobTransforms.trfUtils import releaseIsOlderThan
if releaseIsOlderThan(17, 6):
    ServiceMgr.AthenaPoolCnvSvc.PoolAttributes = [
        "DEFAULT_BUFFERSIZE = '2048'"
    ]

import AthenaPoolCnvSvc.ReadAthenaPool

from CLIDComps.CLIDCompsConf import ClassIDSvc
ServiceMgr += ClassIDSvc()
include("PartPropSvc/PartPropSvc.py")

# load all possible converters for EventCheck
GeoModelSvc = Service("GeoModelSvc")
GeoModelSvc.IgnoreTagDifference = True

# set up all detector description stuff
示例#3
0
from AthenaCommon.AppMgr import theApp
outStream = theApp.getOutputStream("StreamRDO")

from AthenaCommon.AppMgr import ToolSvc
from AthenaCommon.CfgGetter import getService, getPublicTool
if DetFlags.digitize.pixel_on():
    outStream.ItemList += ["SiHitCollection#PixelHits"]
    #disable some Pixel stuff
    from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
    pixelTool = PixelDetectorTool()
    pixelTool.Alignable = False
    from Digitization.DigitizationFlags import digitizationFlags
    pixeldigi = None
    from PyJobTransforms.trfUtils import releaseIsOlderThan
    if releaseIsOlderThan(19, 2):
        if not digitizationFlags.doXingByXingPileUp() and hasattr(
                job, 'PixelDigitization'):
            if hasattr(job.PixelDigitization, 'DigitizationTool'):
                pixeldigi = job.PixelDigitization.DigitizationTool
            else:
                pixeldigi = job.PixelDigitization
        elif hasattr(ToolSvc, 'PixelDigitizationTool'):
            pixeldigi = ToolSvc.PixelDigitizationTool
        else:
            for alg in job:
                if hasattr(alg, 'PileUpTools'):
                    pixeldigi = alg.PileUpTools["PixelDigitizationTool"]
                    break
                pass
    else:
        pixeldigi = getPublicTool("PixelDigitizationTool")
示例#4
0
def getHITSStreamItemList():
    hitsItemList=[]
    ## EventInfo & TruthEvent always written by default
    hitsItemList = ["EventInfo#*",
                    "McEventCollection#TruthEvent",
                    "JetCollection#*"]
    from G4AtlasApps.SimFlags import simFlags
    if simFlags.SimulationFlavour() is not None and 'ongLived' in simFlags.SimulationFlavour(): # to catch LongLived and longLived
        hitsItemList += ["McEventCollection#GEN_EVENT"]
    from PyJobTransforms.trfUtils import releaseIsOlderThan
    if releaseIsOlderThan(20,0):
        #Hack to maintain compatibility of G4AtlasApps trunk with
        #19.2.X.Y after EDM changes in release 20.0.0.
        hitsItemList += ["xAOD::JetContainer_v1#*",
                         "xAOD::JetAuxContainer_v1#*"]
    else:
        hitsItemList += ["xAOD::JetContainer#*",
                           "xAOD::JetAuxContainer#*"]
    ## Detectors
    from AthenaCommon.DetFlags import DetFlags
    ## Inner Detector
    if DetFlags.ID_on():
        hitsItemList += ["SiHitCollection#*",
                         "TRTUncompressedHitCollection#*",
                         "TrackRecordCollection#CaloEntryLayer"]
    ## Calo
    if DetFlags.Calo_on():
        hitsItemList += ["CaloCalibrationHitContainer#*",
                         "LArHitContainer#*",
                         "TileHitVector#*",
                         #"SimpleScintillatorHitCollection#*",
                         "TrackRecordCollection#MuonEntryLayer"]
    ## Muon
    if DetFlags.Muon_on():
        hitsItemList += ["RPCSimHitCollection#*",
                         "TGCSimHitCollection#*",
                         "CSCSimHitCollection#*",
                         "MDTSimHitCollection#*",
                         "TrackRecordCollection#MuonExitLayer"]
    ## FwdRegion
    if DetFlags.FwdRegion_on():
        hitsItemList += ["SimulationHitCollection#*"]

    ## Lucid
    if DetFlags.Lucid_on():
        hitsItemList += ["LUCID_SimHitCollection#*"]

    ## ZDC
    if DetFlags.ZDC_on():
        hitsItemList += ["ZDC_SimPixelHit_Collection#*",
                             "ZDC_SimStripHit_Collection#*"]
    ## ALFA
    if DetFlags.ALFA_on():
        hitsItemList += ["ALFA_HitCollection#*","ALFA_ODHitCollection#*"]

    ## AFP
    if DetFlags.AFP_on():
        hitsItemList += ["AFP_TDSimHitCollection#*","AFP_SIDSimHitCollection#*"]

    ## Ancillary scintillators
    #hitsItemList += ["ScintillatorHitCollection#*"]

    ## TimingAlg
    hitsItemList +=["RecoTimingObj#EVNTtoHITS_timings"]

    if simFlags.RecordStepInfo.get_Value():
        hitsItemList +=["ISF_FCS_Parametrization::FCS_StepInfoCollection#MergedEventSteps"]

    ## add xAOD::TrackParticles output collection Parametric Simulation
    if simFlags.SimulationFlavour == "ParametricSimulation":
        hitsItemList +=["xAOD::TrackParticleContainer#*",
                            "xAOD::TrackParticleAuxContainer#*"]
    ## Add cosmics and test beam configuration hit persistency if required cf. geom tag
    layout = simFlags.SimLayout.get_Value()
    if "tb" not in layout:
        from AthenaCommon.BeamFlags import jobproperties
        if jobproperties.Beam.beamType() == 'cosmics' or \
                (hasattr(simFlags, "WriteTR") and simFlags.WriteTR.statusOn) or \
                (hasattr(simFlags, "ReadTR") and simFlags.ReadTR.statusOn):
            hitsItemList += ["TrackRecordCollection#CosmicRecord", "TrackRecordCollection#CosmicPerigee"]
    else:
        ## CTB-specific
        if layout.startswith("ctb"):
            if simFlags.LArFarUpstreamMaterial.statusOn and simFlags.LArFarUpstreamMaterial.get_Value():
                hitsItemList.append("TrackRecordCollection#LArFarUpstreamMaterialExitLayer")
        ## Persistency of test-beam layout
        if layout.startswith('ctb') or layout.startswith('tb_Tile2000_'):
            hitsItemList += ["TBElementContainer#*"]
    return hitsItemList
示例#5
0
        exec(cmd)

## Pre-include
if hasattr(runArgs,"preInclude"):
    for fragment in runArgs.preInclude:
        include(fragment)

#--------------------------------------------------------------
# Load POOL support
#--------------------------------------------------------------
from AthenaCommon.AppMgr import ServiceMgr
from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
ServiceMgr += AthenaPoolCnvSvc()

from PyJobTransforms.trfUtils import releaseIsOlderThan
if releaseIsOlderThan(17,6):
    ServiceMgr.AthenaPoolCnvSvc.PoolAttributes = [ "DEFAULT_BUFFERSIZE = '2048'" ]

import AthenaPoolCnvSvc.ReadAthenaPool

from CLIDComps.CLIDCompsConf import ClassIDSvc
ServiceMgr += ClassIDSvc()
include( "PartPropSvc/PartPropSvc.py" )

from AthenaCommon.GlobalFlags import jobproperties
jobproperties.Global.DetGeo.set_Value_and_Lock( 'atlas' )
jobproperties.Global.Luminosity.set_Value_and_Lock( 'zero' )
jobproperties.Global.DataSource.set_Value_and_Lock( 'geant4' )

if 'DetFlags' in dir():
    filterHitLog.warning("DetFlags already defined! This means DetFlags should have been fully configured already..")