Exemplo n.º 1
0
def CaloD3PD(file,
             level=4,
             tuplename='MyTuple',
             seq=topSequence,
             D3PDSvc='D3PD::RootD3PDSvc',
             streamNameRoot=None,
             **kw):

    alg = MakerAlg(tuplename,
                   seq,
                   file=file,
                   D3PDSvc=D3PDSvc,
                   streamNameRoot=streamNameRoot)
    alg += EventInfoD3PDObject(**_args(level, 'EventInfo', kw))

    # CaloTower
    alg += TowerD3PDObject(
        **_args(0, 'CaloTower', kw, sgkey='CombinedTower', prefix='tw_calo_'))
    # TopoTower
    alg += TowerD3PDObject(
        **_args(1, 'TopoTower', kw, sgkey='TopoTower', prefix='tw_topo_'))

    return alg
include("RecExCommon/RecExCommon_topOptions.py")

# D3PDMaker calo block

from D3PDMakerCoreComps.MakerAlg import *
from CaloD3PDMaker.ClusterD3PDObject import *
from CaloD3PDMaker.CaloCellD3PDObject import *
from CaloD3PDMaker.CaloInfoD3PDObject import *

# switch off?? LArDigit JT. 09.10.2012
# from CaloD3PDMaker.LArDigitD3PDObject import *

from EventCommonD3PDMaker.EventInfoD3PDObject import *

alg = MakerAlg("caloD3PD",
               topSequence,
               file=tuple_name,
               D3PDSvc='D3PD::RootD3PDSvc')
alg += EventInfoD3PDObject(1)

# alg += AllCaloCellD3PDObject (10)
#alg += SelCaloCellD3PDObject (Param)
# alg += EMCellD3PDObject (10)
# alg += HECCellD3PDObject (10)
# alg += FCALCellD3PDObject (10)
# alg += TileCellD3PDObject (10)

alg += CaloInfoD3PDObject(1)

alg += ClusterD3PDObject(2)

# switch off LArDigitObj JT 09.10.2012
if not 'doWriteESD' in dir():
    doWriteESD = True
doWriteAOD = False
doAOD = False
doWriteTAG = False

# main jobOption
include("RecExCommon/RecExCommon_topOptions.py")

from D3PDMakerCoreComps.MakerAlg import *
from JetD3PDMaker.JetD3PDObject import *
from EventCommonD3PDMaker.EventInfoD3PDObject import *

# Configure a very basic JetD3PDMaker
alg = MakerAlg("MyTuple",
               topSequence,
               file="JetD3PD.root",
               D3PDSvc='D3PD::RootD3PDSvc')

alg += EventInfoD3PDObject(10)

# AntiKt4H1TowerJets as a default
alg += JetD3PDObject(3,
                     prefix='AntiKt4H1TowerJets_',
                     sgkey='AntiKt4H1TowerJets')
# AntiKt4TruthJets - note that the detail level is chosen to be 0
# because all quantities at other levels are reco-only
alg += JetD3PDObject(0, prefix='AntiKt4TruthJets_', sgkey='AntiKt4TruthJets')

topSequence += alg