def makeCaloCellSlimmedD3PDObject(maker, prefix, object_name):

    cellD3PDObject = D3PDObject(makeCellD3PDObject, prefix, object_name)

    if prefix in prefix_to_det.keys():
        #print " in makeCaloCellD3PDMaker, prefix ="  , prefix
        cellD3PDObject.defineHook(hookForCaloCellFilterAlg)

    cellD3PDObject.defineBlock(0,
                               'Kinematics',
                               EventCommonD3PDMaker.FourMomFillerTool,
                               WriteE=True,
                               WriteM=False,
                               WritePt=False)

    from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
    theCaloNoiseTool = CaloNoiseToolDefault()
    svcMgr.ToolSvc += theCaloNoiseTool

    cellD3PDObject.defineBlock(1,
                               'Detail1',
                               CaloD3PDMaker.CaloCellDetailsFillerTool,
                               SaveCellQuality=True,
                               SaveBadCellStatus=True,
                               SaveSigma=True,
                               SaveId=True,
                               SaveDetInfo=True,
                               NoiseTool=theCaloNoiseTool)

    return cellD3PDObject
Beispiel #2
0
def make_SCD3PDObject( typeName="CaloCellContainer",
                             sgKey="AllCalo",
                             prefix="sc_",
                             object_name="SCD3PDObject",
                             *args, **kw ):
        
    obj = D3PDObject(_makeSC_obj_, prefix, object_name,
                     allow_args=["CaloEtaCut","CaloPhiCut",
                                 "CaloLayers","CaloDetectors","TileDLayerOption"],
                     sgkey=sgKey,
                     typename=typeName)
    obj.defineBlock( 0, 'Basic', CaloSysD3PDMaker.SCFillerTool)
    obj.defineHook( _hookForSCD3PDObject_ )
    return obj
Beispiel #3
0
def make_LArSCHitD3PDObject( typeName="LArHitContainer",
                             sgKey="LArHitEMB",
                             prefix="sch_",
                             object_name="LArSCHitD3PDObject",
                             *args, **kw ):
        
    obj = D3PDObject(_makeLArSCHit_obj_, prefix, object_name,
                     allow_args=["CaloEtaCut","CaloPhiCut",
                                 "CaloLayers","CaloDetectors"],
                     sgkey=sgKey,
                     typename=typeName)
    obj.defineBlock( 0, 'Basic', CaloD3PDMaker.LArSCHitFillerTool)
    obj.defineHook( _hookForLArSCHitD3PDObject_ )
    return obj
def getTowerD3PDObject(maker, prefix, object_name):

    towerD3PDObject = D3PDObject(maker, prefix, object_name)

    towerD3PDObject.defineBlock(0,
                                'Detail0',
                                CaloD3PDMaker.TowerFillerTool,
                                SaveNCellConstituents=False)

    towerD3PDObject.defineBlock(1,
                                'Detail1',
                                CaloD3PDMaker.TowerFillerTool,
                                SaveNCellConstituents=True)
    return towerD3PDObject
Beispiel #5
0
def DRIndexMultiAssociation (parent,
                   type_name,
                   default_sgkey,
                   default_drcut,
                   prefix = '',
                   target = '',
                   level = 0,
                   blockname = None,
                   *args, **kw):
    """Helper for setting up an association to objects within a DR cone,
    represented by indices.
"""


    if blockname == None:
        blockname = prefix + 'DRIndexMultiAssoc'

    def maker (name, prefix, object_name,
               sgkey = default_sgkey,
               getter = None,
               assoc = None,
               drcut = default_drcut):

        if not getter:
            getter = D3PDMakerCoreComps.SGDataVectorGetterTool \
                     (name + '_Getter',
                      TypeName = type_name,
                      SGKey = sgkey)
        if not assoc:
            assoc = EventCommonD3PDMaker.DRConeAssociationTool (name + 'Assoc',
                                                            Getter = getter,
                                                            DRCut = drcut)

        filler = D3PDMakerCoreComps.ContainedVectorMultiAssociationFillerTool \
                 (name,
                  Prefix = prefix,
                  Associator = assoc,
                  NrowName = '')
        indexer = D3PDMakerCoreComps.IndexFillerTool \
                  (name + 'Index', 
                   Target = target)
        filler.BlockFillers += [indexer]
        filler += [indexer]
        return filler
    

    obj = D3PDObject (maker, prefix)
    parent.defineBlock (level, blockname, obj)
    return obj
Beispiel #6
0
def BuildV0D3PDObject(_prefix='v0_',
                      _label='v0',
                      _sgkey='SimpleV0Candidates',
                      _object_name='V0D3PDObject'):
    def makeV0D3PDObject(name,
                         prefix,
                         object_name,
                         getter=None,
                         sgkey=_sgkey,
                         label=_label):

        if sgkey == None:
            sgkey = 'SimpleV0Candidates'

        if label == None:
            label = prefix

        if not getter:
            from InDetD3PDMaker import V0ContainerGetterTool
            getter = V0ContainerGetterTool\
                     (name + '_Getter',
                      TypeName = 'V0Container',
                      SGKey = sgkey,
                      Label = label)

        from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
        return D3PDMakerCoreComps.VectorFillerTool (name,
                                                    Prefix = prefix,
                                                    Getter = getter,
                                                    ObjectName = object_name,
                                                    AllowMissing = True,
                                                    SaveMetadata = \
                                                    D3PDMakerFlags.SaveObjectMetadata())

    object = D3PDObject(makeV0D3PDObject, _prefix, _object_name)

    object.defineBlock(0, 'V0Attributes', InDetD3PDMaker.V0CandidateFillerTool)

    VxCandidateAssoc = SimpleAssociation\
                       (object,
                        InDetD3PDMaker.V0CandidateVxCandidateAssociationTool)

    DefineVertexD3PDObject(VxCandidateAssoc,
                           trackTarget='trk',
                           trackPrefix='trk_',
                           trackType='Rec::TrackParticleContainer')
    return object
Beispiel #7
0
def MissingETCompAssociation(
        parent,
        type_name,
        default_sgkey,
        assocTool=MissingETD3PDMaker.MissingETCompAssociationTool,
        prefix='',
        matched='',
        level=0,
        objectType='egamma',
        blockname=None,
        allowMissing=False,
        *args,
        **kw):

    if blockname == None:
        blockname = prefix + 'METCompAssoc'

    def maker(name,
              prefix,
              object_name,
              sgkey=default_sgkey,
              getter=None,
              assoc=None):

        if not getter:
            getter = D3PDMakerCoreComps.SGObjGetterTool \
                     (name + '_Getter',
                      TypeName = type_name,
                      SGKey = sgkey)

        assoc = assocTool(name + 'Assoc',
                          Getter=getter,
                          ObjectType=objectType,
                          AllowMissing=allowMissing)

        return D3PDMakerCoreComps.ContainedAssociationFillerTool(
            name, Prefix=prefix, Associator=assoc, Matched=matched)

    obj = D3PDObject(maker, prefix)
    parent.defineBlock(level, blockname, obj)
    return obj
Beispiel #8
0
def MyIndexMultiAssociation (parent,
                             assoctool,
                             target,
                             prefix = '',
                             level = 0,
                             blockname = None,
                             *args, **kw):

    if blockname == None:
        blockname = assoctool.__name__

    def maker (name, prefix, *args_inner, **kw_inner):
        kw2 = kw.copy()
        kw2.update (kw_inner)
        assoc = assoctool (name + 'Assoc', *(args + args_inner), **kw2)
        return TrackD3PDMaker.MyIndexMultiAssociationFillerTool \
               (name, Target = target, Prefix = prefix, Associator = assoc)

    obj = D3PDObject (maker, prefix)
    parent.defineBlock (level, blockname, obj)
    return obj
Beispiel #9
0
def make_GenEvent_D3PDObject(default_prefix,
                             default_sgkey,
                             default_object_name="",
                             default_filter=AllTruthFilterTool(),
                             default_label=None,
                             **other_defaults):
    def make_obj(name,
                 prefix,
                 object_name,
                 getter=None,
                 sgkey=None,
                 filter=default_filter,
                 label=default_label,
                 **kw):

        if sgkey == None: sgkey = default_sgkey
        if label == None: label = TruthD3PDKeys.GenEventGetterLabel()
        if getter == None:
            getter = TruthD3PDMaker.GenEventGetterTool(name + '_Getter',
                                                       Label=label,
                                                       Selector=filter,
                                                       SGKey=sgkey)

        defs = other_defaults.copy()
        defs.update(kw)

        from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
        return D3PDMakerCoreComps.VectorFillerTool( name,
                                                    Prefix = prefix,
                                                    Getter = getter,
                                                    ObjectName = object_name,
                                                    SaveMetadata = \
                                                    D3PDMakerFlags.SaveObjectMetadata(),
                                                    **defs )

    return D3PDObject(make_obj, default_prefix, default_object_name)
Beispiel #10
0
def makeTileCellD3PDObject(maker, prefix, object_name):

    cellD3PDObject = D3PDObject(maker, prefix, object_name)
    cellD3PDObject.defineHook(hookForTileCellFilterAlg)

    cellD3PDObject.defineBlock(
        0,
        'Kinematics',
        EventCommonD3PDMaker.FourMomFillerTool,
        WriteE=True,
        WritePt=True,
        WriteEtaPhi=True,
        WriteM=False,
    )

    cellD3PDObject.defineBlock(
        1,
        'TileDetails',
        CaloSysD3PDMaker.TileCellDetailsFillerTool,
        SaveCellDetails=True,
        SavePositionInfo=False,
    )

    TileRawInCell = TileCellRawAssoc(parent=cellD3PDObject,
                                     prefix='rawCh_',
                                     target='tileraw_',
                                     level=2,
                                     blockname='RawChAssoc')

    TileDigitInCell = TileCellDigitAssoc(parent=cellD3PDObject,
                                         prefix='digit_',
                                         target='tiledigit_',
                                         level=3,
                                         blockname='DigitAssoc')

    return cellD3PDObject
Beispiel #11
0

def makeD3PDObject(name,
                   prefix,
                   object_name,
                   getter=None,
                   sgkey=None,
                   label=None):
    if sgkey == None: sgkey = "TRTUncompressedHits"
    if label == None: label = prefix

    if not getter:
        getter = InDetD3PDMaker.TRTUncompressedHitContainerGetterTool \
                 (name + '_Getter',
                  TypeName = 'TRTUncompressedHitCollection',
                  SGKey = sgkey,
                  Label = label)
    getter.OutputLevel = 1
    return D3PDMakerCoreComps.VectorFillerTool(name,
                                               Prefix=prefix,
                                               Getter=getter,
                                               ObjectName=object_name,
                                               OutputLevel=1)


TRTUncompressedHitD3PDObject = D3PDObject(makeD3PDObject, 'trthit_',
                                          'TRTUncompressedHitD3PDObject')

TRTUncompressedHitD3PDObject.defineBlock(
    1, 'Hits', InDetD3PDMaker.TRTUncompressedHitFillerTool)
Beispiel #12
0
    if not getter:
        getter = D3PDMakerCoreComps.SGDataVectorGetterTool \
                 (name + '_Getter',
                  TypeName = 'TileL2Container',
                  SGKey = sgkey,
                  Label = label)

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return D3PDMakerCoreComps.VectorFillerTool (name,
                                                Prefix = prefix,
                                                Getter = getter,
                                                ObjectName = object_name,
                                                SaveMetadata = \
                                                D3PDMakerFlags.SaveObjectMetadata())


TileL2D3PDObject = D3PDObject(makeTileL2D3PDObject, 'TileL2Met_',
                              'TileL2D3PDObject')

TileL2D3PDObject.defineBlock(0,
                             'TileL2',
                             CaloSysD3PDMaker.TileL2FillerTool,
                             SaveL2Details=True,
                             SaveMuRODDetails=False)

TileL2D3PDObject.defineBlock(2,
                             'TileMuID_ROD',
                             CaloSysD3PDMaker.TileL2FillerTool,
                             SaveL2Details=False,
                             SaveMuRODDetails=True)
#
# The maker function.
# We don't get any input from SG (directly).
#
def makeSMWZTriggerBitsD3PDObject(name,
                                  prefix,
                                  object_name,
                                  getter=None,
                                  sgkey=''):

    return D3PDMakerCoreComps.VoidObjFillerTool(name, Prefix=prefix)


# Create the object type.
SMWZTriggerBitsD3PDObject = \
  D3PDObject (makeSMWZTriggerBitsD3PDObject,
              default_name = 'SMWZTriggerBitsFiller')

######
# Define blocks.

if D3PDMakerFlags.DoTrigger():

    defineTriggerBits(SMWZTriggerBitsD3PDObject, 0, ['EF_.*'])

    ##bjet bits
    defineTriggerBits(
        SMWZTriggerBitsD3PDObject,
        0,
        [
            "L1_J10",
            "L1_JE100",
                             object_name,
                             getter=None,
                             sgkey='SCT_Clusters',
                             typename='InDet::SCT_ClusterContainer',
                             label='SCTClus'):
    if not getter:
        from TrackD3PDMaker.TrackD3PDMakerConf import D3PD__SCTClusterCollectionGetterTool
        getter = D3PD__SCTClusterCollectionGetterTool(name + '_Getter',
                                                      SGKey=sgkey,
                                                      TypeName=typename,
                                                      Label=label)

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return  D3PDMakerCoreComps.VectorFillerTool (name, Prefix = prefix,
                                                 Getter = getter,
                                                 ObjectName = object_name,
                                                 SaveMetadata = \
                                                 D3PDMakerFlags.SaveObjectMetadata())


##---
SCTClusterD3PDObject = D3PDObject(makeSCTClusterD3PDObject, 'sctClus_',
                                  'SCTClusterD3PDObject')

#SCTRDOAssoc = IndexMultiAssociation(SCTClusterD3PDObject,TrackD3PDMaker.SCTClusterSCTRDOAssociationTool,'SCTRdo','rdoAssoc_',level = 1)

#TrackAssoc = IndexMultiAssociation(SCTClusterD3PDObject,TrackD3PDMaker.SCTClusterToTrackParticleAssociationTool,'trk','trkAssoc_',level = 1, TrackParticleContainerSGKey = D3PDMakerFlags.TrackSGKey())

SCTClusterD3PDObject.defineBlock(0, 'SCT_Cluster', SCTClusterFiller)
#SCTClusterD3PDObject.defineBlock (1, 'SCT_Clster_RDOIndex',  SCTRDOAssoc)
Beispiel #15
0
def makeUnassociatedHitsD3PDObject(name,
                                   prefix,
                                   object_name,
                                   getter=None,
                                   sgkey='MinBiasD3PD::PRDAssociation'):
    if not getter:
        from MinBiasD3PDMaker.MinBiasD3PDMakerConf import D3PD__UnassociatedHitsGetterTool
        getter = D3PD__UnassociatedHitsGetterTool(
            name + '_Getter',
            TrackCollection="Tracks",
            PixelClusters="PixelClusters",
            SCTClusterContainer="SCT_Clusters",
            TRTDriftCircleContainer="TRT_DriftCircles")
        pass

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return  D3PDMakerCoreComps.ObjFillerTool( name, Prefix = prefix,
                                              Getter = getter,
                                              ObjectName = object_name,
                                              SaveMetadata = \
                                              D3PDMakerFlags.SaveObjectMetadata() )


UnassociatedHitsD3PDObject = D3PDObject(makeUnassociatedHitsD3PDObject,
                                        'unassocHits_',
                                        "UnassociatedHitsD3PDObject")

UnassociatedHitsD3PDObject.defineBlock(0, 'Unassociated_Hits',
                                       UnassociatedHitsFiller)
Beispiel #16
0
    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return D3PDMakerCoreComps.VectorFillerTool (name,
                                                Prefix = prefix,
                                                Getter = getter,
                                                ObjectName = object_name,
                                                SaveMetadata = \
                                                D3PDMakerFlags.SaveObjectMetadata())


""" level of details:
0: digits
1: digit+section+side+tower

"""

TileDigitD3PDObject = D3PDObject(makeTileDigitD3PDObject, 'tiledigit_',
                                 'TileDigitD3PDObject')

TileDigitD3PDObject.defineBlock(
    0,
    'Digits',
    CaloSysD3PDMaker.TileDigitFillerTool,
    SaveOfflineInfo=False,
    SaveHardwareInfo=True,
)

TileDigitD3PDObject.defineBlock(
    1,
    'SST',
    CaloSysD3PDMaker.TileDigitFillerTool,
    SaveOfflineInfo=True,
    SaveHardwareInfo=False,
Beispiel #17
0
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration

import TrackD3PDMaker
import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject


def makeBeamSpotD3PDObject(name, prefix, object_name, getter=None):
    if not getter:
        from InDetD3PDMaker import BeamSpotGetterTool
        getter = BeamSpotGetterTool(name + '_Getter')

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return D3PDMakerCoreComps.ObjFillerTool (name,
                                             Prefix = prefix,
                                             Getter = getter,
                                             ObjectName = object_name,
                                             AllowMissing=True,
                                             SaveMetadata = \
                                             D3PDMakerFlags.SaveObjectMetadata())


BeamSpotD3PDObject = D3PDObject(makeBeamSpotD3PDObject, 'beamSpot_',
                                'BeamSpotD3PDObject')

from InDetD3PDMaker import BeamSpotFillerTool
BeamSpotD3PDObject.defineBlock(0, 'BeamSpot', BeamSpotFillerTool)
Beispiel #18
0
                                jetCollections=[]):

    from JetTagD3PDMaker import JetTagPhotonInJetGetterTool
    getter = JetTagPhotonInJetGetterTool(name + '_Getter',
                                         Label=label,
                                         JetCollections=jetCollections)

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return  D3PDMakerCoreComps.VectorFillerTool (name, Prefix = prefix, Getter = getter,
                                                 ObjectName = object_name,
                                                 SaveMetadata = \
                                                 D3PDMakerFlags.SaveObjectMetadata())


JetTagPhotonInJetD3PDObject = D3PDObject(makeJetTagPhotonInJetObject,
                                         JetTagD3PDKeys.PhotonInJetPrefix(),
                                         'JetTagPhotonInJetD3PDObject')

JetTagPhotonInJetD3PDObject.defineBlock(0,
                                        'Kinematics',
                                        EventCommonD3PDMaker.FourMomFillerTool,
                                        WriteRect=True,
                                        WriteE=True,
                                        WriteM=True)

JetTagPhotonInJetD3PDObject.defineBlock(0, 'Authors',
                                        egammaD3PDMaker.egammaAuthorFillerTool)

#
## get the PhotonInJetObject
## jet collections to be used should be specified
Beispiel #19
0

def makePixModCondD3PDObject (name, prefix, object_name):

    from JetTagD3PDMaker import JetTagPixelModuleGetterTool
    getter =  JetTagPixelModuleGetterTool( name + '_Getter' )

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return D3PDMakerCoreComps.ObjFillerTool (name,
                                             Prefix = prefix,
                                             Getter = getter,
                                             ObjectName = object_name,
                                             SaveMetadata = \
                                             D3PDMakerFlags.SaveObjectMetadata())
    
JetTagPixModCondD3PDObject = D3PDObject (makePixModCondD3PDObject, 'deadPixMod_', 'JetTagPixModCondD3PDObject')


JetTagPixModCondD3PDObject.defineBlock (_jetTagPixModCondAssocLevel, 'DeadPixMod',
                                        JetTagD3PDMaker.JetTagPixelModCondFillerTool)


def getJetTagPixModCondD3PDObject(PixSummarySvc=None, **kw):
              
    return  JetTagPixModCondD3PDObject(0, DeadPixMod_PixelSummarySvc=PixSummarySvc, **kw) 

 



Beispiel #20
0
def makeLArRawChannelD3PDObject(name,
                                prefix,
                                object_name='LArRawChannelD3PDObject',
                                getter=None,
                                sgkey=None,
                                label=None):
    if sgkey == None: sgkey = LArRawChannelSGKey
    if label == None: label = prefix

    if not getter:
        getter = CaloSysD3PDMaker.LArRawChannelContainerGetterTool(
            name + '_Getter',
            TypeName='LArRawChannelContainer',
            SGKey=LArRawChannelSGKey)

    # create the selected cells
    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return D3PDMakerCoreComps.VectorFillerTool(name,
                                               Prefix=prefix,
                                               Getter=getter,
                                               ObjectName=object_name)


LArRawChannelD3PDObject = D3PDObject(makeLArRawChannelD3PDObject,
                                     'larrawchannel_',
                                     'LArRawChannelD3PDObject')

LArRawChannelD3PDObject.defineBlock(0, 'Digits',
                                    CaloSysD3PDMaker.LArRawChannelFillerTool)
Beispiel #21
0
        jetCollections=[]):

    from JetTagD3PDMaker import JetTagMSVVtxInfoGetterTool
    getter = JetTagMSVVtxInfoGetterTool(name + '_Getter',
                                        Label=label,
                                        JetCollections=jetCollections)

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return  D3PDMakerCoreComps.VectorFillerTool (name, Prefix = prefix, Getter = getter,
                                                 ObjectName = object_name,
                                                 SaveMetadata = \
                                                 D3PDMakerFlags.SaveObjectMetadata())


JetTagMSVVtxInfoInJetD3PDObject = D3PDObject(
    makeJetTagMSVVtxInJetObject, JetTagD3PDKeys.MSVVtxInfoInJetPrefix(),
    'JetTagMSVVtxInfoInJetD3PDObject')

JetTagMSVVtxInfoInJetD3PDObject.defineBlock(
    0, 'MSVVtxInfo', JetTagD3PDMaker.JetTagMSVVtxInfoFillerTool)


def _jetTagMultiSVAssocLevel(reqlev, args):
    if not args.has_key('target'):
        return False
    return True


MSVVtxInfoAssoc = IndexMultiAssociation(
    JetTagMSVVtxInfoInJetD3PDObject,
    JetTagD3PDMaker.JetTagMSVVtxInfoTrackAssociationTool,
Beispiel #22
0
    return D3PDMakerCoreComps.VectorFillerTool (name,
                                                Prefix = prefix,
                                                Getter = getter,
                                                ObjectName = object_name,
                                                SaveMetadata = \
                                                D3PDMakerFlags.SaveObjectMetadata())



""" level of details:
0: amp, time, quality and pedestal
1: hardware id + amp, time, quality and pedestal

"""

TileRawChannelD3PDObject = D3PDObject( makeTileRawChannelD3PDObject, 'tileraw_',
                                       'TileRawChannelD3PDObject' )

TileRawChannelD3PDObject.defineBlock (0, 'RawChannel',
                                CaloD3PDMaker.TileRawChannelFillerTool,
                                SaveHardwareInfo=False,
                                SaveRawChannel= True,
                                )



TileRawChannelD3PDObject.defineBlock (1, 'Hardware',
                                CaloD3PDMaker.TileRawChannelFillerTool,
                                SaveHardwareInfo=True,
                                SaveRawChannel= False,
                                )
Beispiel #23
0
from eflowRec.eflowTrackToCaloTrackExtrapolatorTool import eflowTrackToCaloTrackExtrapolatorToolDefault
TrackToCaloTrackExtrapolatorToolDefault = eflowTrackToCaloTrackExtrapolatorToolDefault(
)

####  ####  ####  ####  ####  ####  ####  ####  ####
#
#                       Configure the D3PD
#
####  ####  ####  ####  ####  ####  ####  ####  ####

from D3PDMakerCoreComps.D3PDObject import D3PDObject

#### The basic kinematics ####
from eflowD3PDMaker.eflowD3PDObject import *
eflowD3PDObject = D3PDObject(makeeflowD3PDObject, 'eflowBase_')
eflowD3PDObject.SGKey = SGKEY_eflowObjects
eflowD3PDObject.defineBlock(0, 'Kinematics',
                            eflowD3PDMakerConf.D3PD__eflowFillerTool)
eflowD3PDObject.defineBlock(
    0, 'Details', eflowD3PDMakerConf.D3PD__eflowObjectDetailsFillerTool)
alg += eflowD3PDObject(level=10)

#### The track variables ####
from eflowD3PDMaker.eflowTrackD3PDObject import *
eflowTrackD3PDObject = D3PDObject(makeeflowTrackD3PDObject, 'eflowTrack_')
eflowTrackD3PDObject.SGKey = SGKEY_eflowObjects
eflowTrackD3PDObject.defineBlock(0,
                                 'eflowTrack',
                                 eflowD3PDMakerConf.D3PD__eflowTrackFillerTool,
                                 eflowTrackToCaloTrackExtrapolatorTool=
Beispiel #24
0
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

import MuonD3PDMaker
import D3PDMakerCoreComps
from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags


def makeD3PDObject (name, prefix, object_name, getter = None,
                    sgkey = 'MDT_DriftCircles',
                    typename = 'Muon::MdtPrepDataContainer',
                    label = 'MdtPrepData'):
    if not getter:
        from MuonD3PDMaker.MuonD3PDMakerConf import D3PD__MdtPrepDataCollectionGetterTool
        getter = D3PD__MdtPrepDataCollectionGetterTool \
                 (name + '_Getter',
                  SGKey = sgkey,
                  TypeName = typename,
                  Label = label)
    getter.OutputLevel=1    
    return D3PDMakerCoreComps.VectorFillerTool (name,
                                                Prefix = prefix,
                                                Getter = getter,
                                                ObjectName = object_name, OutputLevel=1)


MdtPrepDataD3PDObject =  D3PDObject (makeD3PDObject, 'mdt_', 'MdtPrepDataD3PDObject')

MdtPrepDataD3PDObject.defineBlock (0, 'PrepData', MuonD3PDMaker.MdtPrepDataFillerTool)
    from JetTagD3PDMaker import JetTagMuonInJetGetterTool
    getter = JetTagMuonInJetGetterTool(name + '_Getter',
                                       Label=label,
                                       JetCollections=jetCollections,
                                       MuonsName=muonsName)

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return  D3PDMakerCoreComps.VectorFillerTool (name, Prefix = prefix, Getter = getter,
                                                 ObjectName = object_name,
                                                 SaveMetadata = \
                                                 D3PDMakerFlags.SaveObjectMetadata())


JetTagMuonInJetD3PDObject = D3PDObject(makeJetTagMuonInJetObject,
                                       JetTagD3PDKeys.MuonInJetPrefix(),
                                       'JetTagMuonInJetD3PDObject')

JetTagMuonInJetD3PDObject.defineBlock(0,
                                      'Kinematics',
                                      EventCommonD3PDMaker.FourMomFillerTool,
                                      WriteRect=True,
                                      WriteE=True,
                                      WriteM=True)

JetTagMuonInJetD3PDObject.defineBlock(0, 'Authors',
                                      MuonD3PDMaker.MuonAuthorFillerTool)

JetTagMuonInJetD3PDObject.defineBlock(0, 'TrkMatchQuality',
                                      MuonD3PDMaker.MuonMatchQualityFillerTool)
Beispiel #26
0
## vx9 = GeneralVertexer(system='Combined', setup="DefaultVKalVrtFinding", tracksName="CombinedInDetTracks")
## vx10 = GeneralVertexer(system='Resolved', setup="DefaultVKalVrtFinding", tracksName=InDetKeys.ResolvedTracks())

if doD3PD:
    import D3PDMakerCoreComps
    import EventCommonD3PDMaker
    from D3PDMakerCoreComps.D3PDObject import D3PDObject
    from TrackD3PDMaker.TrackD3PDObject import ResolvedTracksD3PDObject
    from TrackD3PDMaker.TrackD3PDObject import TrackParticleD3PDObject
    ### Make the core
    alg = D3PDMakerCoreComps.MakerAlg('BeamSpotTree', topSequence,
                                      "VtxNtuple.root")
    alg.OutputLevel = ERROR
    # ## Add the event headers
    from EventCommonD3PDMaker.EventInfoD3PDObject import makeEventInfoD3PDObject
    EventInfoD3PDObject = D3PDObject(makeEventInfoD3PDObject, 'ei_')
    EventInfoD3PDObject.defineBlock(0, 'eventID',
                                    EventCommonD3PDMaker.EventIDFillerTool)
    alg += EventInfoD3PDObject(10)

    from MinBiasD3PDMaker.BeamSpotD3PDObject import BeamSpotD3PDObject
    #alg += BeamSpotD3PDObject(10)

    from TrackD3PDMaker.TruthTrackD3PDObject import TruthTrackD3PDObject
    from TrackD3PDMaker.TruthVertexD3PDObject import TruthVertexD3PDObject
    if InDetFlags.doTruth():
        alg += TruthTrackD3PDObject(10)
        alg += TruthVertexD3PDObject(10)
        pass

    #index = 8 if not InDetFlags.doTruth() else 10
Beispiel #27
0
import D3PDMakerCoreComps
import TriggerD3PDMaker
from TriggerD3PDMaker.defineTriggerBits import defineTriggerBits
from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags


#
# The maker function.
# We don't get any input from SG (directly).
#
def makeQcdTriggerBitsD3PDObject(name,
                                 prefix,
                                 object_name,
                                 getter=None,
                                 sgkey=''):
    return D3PDMakerCoreComps.VoidObjFillerTool(name, Prefix=prefix)


# Create the object type.
QcdTriggerBitsD3PDObject = D3PDObject(makeQcdTriggerBitsD3PDObject,
                                      default_name='QcdTriggerBitsFiller')

######
# Define blocks.

if D3PDMakerFlags.DoTrigger():
    defineTriggerBits(QcdTriggerBitsD3PDObject, 0,
                      ['EF_.*'])  # filter for "a4"ntiKt
Beispiel #28
0
        if not hasattr(D3PDMakerCoreComps.VectorFillerTool, k):
            del defs[k]

    if not defs.has_key("SaveMetadata"):
        defs["SaveMetadata"] = D3PDMakerFlags.SaveObjectMetadata()

    return D3PDMakerCoreComps.VectorFillerTool(name,
                                               Prefix=prefix,
                                               Getter=getter,
                                               ObjectName=object_name,
                                               AllowMissing=allowMissing,
                                               **defs)


JetTagTwoTrackVertexD3PDObject = D3PDObject(
    make_TwoTrackVertex_D3PDObject, JetTagD3PDKeys.JFTwoTrackVertexPrefix(),
    'JetTagTwoTrackVertexD3PDObject')

JetTagTwoTrackVertexD3PDObject.defineHook(_jetTwoTrackVertexTagAlgHook)

JetTagTwoTrackVertexD3PDObject.defineBlock(
    0, '', JetTagD3PDMaker.JetTagTwoTrackVertexFillerTool)

if JetTagD3PDFlags.TrackAssocLabel() != "":


    JetTagTwoTrackVertexTrackAssoc = IndexMultiAssociation(\
        JetTagTwoTrackVertexD3PDObject,
        JetTagD3PDMaker.JetTagTwoTrackVertexTrackAssociationTool,
        JetTagD3PDFlags.TrackAssocLabel(),
        level=0,
# Track Filler
from TileD3PDMaker import TileTrackFillerTool
TileTrackFillerTool.LevelOfDetails        = 1
TileTrackFillerTool.TrackTools            = TrackTools
TileTrackFillerTool.TrackParType          = 0 ;  #track parameters per 0: sampling 1: layer
TileTrackFillerTool.TrackToVertexTool     = TrackToVertexTool
def tileTrackFiller(name, prefix, object_name):
    tileTrackGetter = SGDataVectorGetterTool('track_getter',
                                             TypeName = 'xAOD::TrackParticleContainer',
                                             SGKey = 'SelectedTracks')
    return VectorFillerTool(name,
                            Prefix = prefix,
                            Getter = tileTrackGetter,
                            ObjectName = 'trackparticles',
                            SaveMetadata = D3PDMakerFlags.SaveObjectMetadata())
TileTrackD3PDObject = D3PDObject(tileTrackFiller, 'tracks_' , 'TracksD3PDObject')
TileTrackD3PDObject.defineBlock(0, 'TrackParticleDump', TileTrackFillerTool)

#Define cell filler
from TileD3PDMaker import TileCellFillerTool
TileCellFillerTool.TrackTools             = TrackTools
TileCellFillerTool.LevelOfDetails         = 5
TileCellFillerTool.MuonContainerName      = "SelectedMuons"  
TileCellFillerTool.TrackType              = track_type
def tileCellFiller(name, prefix, object_name):
    tilecell_getter = SGDataVectorGetterTool('cell_getter',
                                             TypeName = 'CaloCellContainer',
                                             SGKey = 'SelectedCells')
    return VectorFillerTool(name,
                            Prefix = prefix,
                            Getter = tilecell_getter,
Beispiel #30
0
                  TypeName = 'TileCosmicMuonContainer',
                  SGKey = sgkey,
                  Label = label)
        

    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    return D3PDMakerCoreComps.VectorFillerTool (name,
                                                Prefix = prefix,
                                                Getter = getter,
                                                ObjectName = object_name,
                                                SaveMetadata = \
                                                D3PDMakerFlags.SaveObjectMetadata())



TileCosmicMuonD3PDObject=D3PDObject(makeTileCosmicMuonD3PDObject,'TileTracks_','TileCosmicMuonD3PDObject')
    
TileCosmicMuonD3PDObject.defineBlock (0, 'TileCosmicMuons',
                                      CaloSysD3PDMaker.TileCosmicMuonFillerTool)

TileCosmicMuonTileCells=ContainedVectorMultiAssociation(TileCosmicMuonD3PDObject,
                                                        CaloSysD3PDMaker.TileCosmicMuonTileCellAssociationTool,
                                                        "cell",1)

TileCosmicMuonTileCells.defineBlock (1, 'TileDetail0',
                                CaloSysD3PDMaker.TileCellDetailsFillerTool,
                                SaveCellDetails=True,
                                SavePositionInfo=False,
                                )
    
TileCosmicMuonTileCells.defineBlock (2, 'TileDetail1',