Exemplo n.º 1
0
    from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
    D3PDMakerFlags.TruthSGKey = 'TruthEvent'

    from TruthD3PDMaker.TruthD3PDMakerKeys import TruthD3PDKeys
    from TruthD3PDMaker.TruthD3PDMakerFlags import TruthD3PDFlags

    from TruthD3PDAnalysis.GenObjectsFilterTool import *

    from TruthD3PDMaker.GenVertexD3PDObject import GenVertexD3PDObject
    alg += GenVertexD3PDObject(10, filter=AllTrackFilterTool())

    from TruthD3PDMaker.GenParticleD3PDObject import GenParticleD3PDObject
    alg += GenParticleD3PDObject(10, filter=AllTrackFilterTool())

    from CaloD3PDMaker.TileHitD3PDObject import TileHitD3PDObject
    alg += TileHitD3PDObject(10)

if doHitNtuple:

    if not hasattr(svcMgr, 'NtupleSvc'):
        from GaudiSvc.GaudiSvcConf import NTupleSvc
        svcMgr += NTupleSvc()
    NTupleSvc = svcMgr.NTupleSvc
    NTupleSvc.Output = [
        "NTUP DATAFILE='tiletb%s.ntup.root' OPT='NEW'" % FileSuffix
    ]

    #--- Create TileCal h32 ntuple with all G4 hits ---------
    from TileRec.TileRecConf import TileHitVecToNtuple
    theTileHitToNtuple = TileHitVecToNtuple()
    topSeq += theTileHitToNtuple
Exemplo n.º 2
0
    from TruthD3PDAnalysis.GenObjectsFilterTool import *

    from TruthD3PDMaker.GenVertexD3PDObject import GenVertexD3PDObject
    alg += GenVertexD3PDObject(10, filter=AllTrackFilterTool())

    from TruthD3PDMaker.GenParticleD3PDObject import GenParticleD3PDObject
    alg += GenParticleD3PDObject(10, filter=AllTrackFilterTool())

    if doD3PDHitInfo:
        from CaloD3PDMaker.TileHitInfoD3PDObject import TileHitInfoD3PDObject
        alg += TileHitInfoD3PDObject(0, sgkey='TileHitVec', prefix='Tile_')

    if doD3PDHit:
        from CaloD3PDMaker.TileHitD3PDObject import TileHitD3PDObject
        alg += TileHitD3PDObject(0, prefix='TileHit_')

    if doD3PDDigit:
        from CaloD3PDMaker.TileDigitD3PDObject import TileDigitD3PDObject
        alg += TileDigitD3PDObject(2,
                                   prefix='tiledigit_',
                                   sgkey='TileDigitsCnt')

    if doD3PDRawChannel:
        from CaloD3PDMaker.TileRawChannelD3PDObject import TileRawChannelD3PDObject
        alg += TileRawChannelD3PDObject(2,
                                        prefix='tileraw_',
                                        sgkey='TileRawChannelCnt')

    if doD3PDCellInfo:
        from CaloD3PDMaker.CaloInfoD3PDObject import CaloInfoD3PDObject
Exemplo n.º 3
0
def CaloHitD3PD(alg=None, file='calo.root', tuplename='calohit'):
    # Core algorithm
    # By default the user of this function should have created an algorithm
    # already.  But for backwards compatibility let the function create its own
    # algorithm if needed...
    if not alg:
        from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
        alg = MSMgr.NewRootStream(tuplename, file)

        alg += EventInfoD3PDObject(10)

        calohit_sgkey_lar = 'LArHitEMB'
        if testSGKey('LArHitContainer', calohit_sgkey_lar):
            alg += LArHitEMBD3PDObject(10)

        calohit_sgkey_lar = 'LArHitEMEC'
        if testSGKey('LArHitContainer', calohit_sgkey_lar):
            alg += LArHitEMECD3PDObject(10)

        calohit_sgkey_lar = 'LArHitHEC'
        if testSGKey('LArHitContainer', calohit_sgkey_lar):
            alg += LArHitHECD3PDObject(10)

        calohit_sgkey_lar = 'LArHitFCAL'
        if testSGKey('LArHitContainer', calohit_sgkey_lar):
            alg += LArHitFCALD3PDObject(10)

        calohit_sgkey_tile = 'TileHitVec'
        if testSGKey('TileHitVector', calohit_sgkey_tile):
            alg += TileHitD3PDObject(10)

        calohit_sgkey_tile = 'MBTSHits'
        if testSGKey('TileHitVector', calohit_sgkey_tile):
            MBTSHitD3PDObject = D3PDObject(makeTileHitD3PDObject, 'MBTSHit_',
                                           'MBTSHitD3PDObject',
                                           CaloD3PDMaker.TileHitFillerTool,
                                           calohit_sgkey_tile)
            MBTSHitD3PDObject.defineBlock(0, 'MBTSHitDetails',
                                          CaloD3PDMaker.TileHitFillerTool)
            alg += MBTSHitD3PDObject(10)

        calohit_sgkey_lar = 'LArCalibrationHitActive'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_lar):
            alg += LArActiveCaloCalibHitD3PDObject(10)

        calohit_sgkey_lar = 'LArCalibrationHitInactive'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_lar):
            alg += LArInactiveCaloCalibHitD3PDObject(10)

        calohit_sgkey_tile = 'TileCalibrationCellHitCnt'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_tile):
            alg += TileCaloCalibHitD3PDObject(10)

        calohit_sgkey_tile = 'TileCalibHitActiveCell'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_tile):
            alg += TileActiveCaloCalibHitD3PDObject(10)

        calohit_sgkey_tile = 'TileCalibHitInactiveCell'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_tile):
            alg += TileInactiveCaloCalibHitD3PDObject(10)

        calohit_sgkey_dmlar = 'LArCalibrationHitDeadMaterial'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_dmlar):
            alg += LArDMCaloCalibHitD3PDObject(10)

        calohit_sgkey_dmtile = 'TileCalibrationDMHitCnt'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_dmtile):
            alg += TileDMOCaloCalibHitD3PDObject(10)

        calohit_sgkey_dmtile = 'TileCalibHitDeadMaterial'
        if testSGKey('CaloCalibrationHitContainer', calohit_sgkey_dmtile):
            alg += TileDMCaloCalibHitD3PDObject(10)

        return alg