コード例 #1
0
#

from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

from CaloRec.CaloRecConf import CaloTowerAlgorithm

# -- switch on some monitoring
if not 'doCaloCombinedTowerMonitoring' in dir():
    doCaloCombinedTowerMonitoring = False

# -- do monitoring
if doCaloCombinedTowerMonitoring:

    from CaloRec.CaloRecConf import CaloTowerMonitor
    topSequence += CaloTowerAlgorithm("CmbTowerBldr")
    topSequence += CaloTowerMonitor("TowerSpy")

else:
    topSequence += CaloTowerAlgorithm("CmbTowerBldr")

# --------------------------------------------------------------
#  Algorithms Private Options
# --------------------------------------------------------------
# tower Maker:
# CmbTowerBldr.OutputLevel = 2
CmbTowerBldr = topSequence.CmbTowerBldr

CmbTowerBldr.TowerContainerName = "CombinedTower"
CmbTowerBldr.NumberOfPhiTowers = 64
CmbTowerBldr.NumberOfEtaTowers = 100
コード例 #2
0
#
# $Id: TileMonTower_jobOptions.py,v 1.1 2008-07-14 10:58:46 lfiorini Exp $
#
#
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

from CaloRec.CaloRecConf import CaloTowerAlgorithm
topSequence += CaloTowerAlgorithm("TileTowerBldr")
TileTowerBldr =  topSequence.TileTowerBldr
TileTowerBldr.TowerContainerName="TileTower"
TileTowerBldr.NumberOfPhiTowers=64
TileTowerBldr.NumberOfEtaTowers=100
TileTowerBldr.EtaMin=-5.0
TileTowerBldr.EtaMax=5.0
from TileRecUtils.TileRecUtilsConf import TileTowerBuilderTool
TileCmbTwrBldr = TileTowerBuilderTool( name = 'TileCmbTwrBldr',
                                       CellContainerName = "AllCalo",
                                       DumpTowers        = False,
                                       DumpWeightMap     = False);
TileTowerBldr +=  TileCmbTwrBldr
TileTowerBldr.TowerBuilderTools = [ TileCmbTwrBldr ]


コード例 #3
0
    def configure(self):
        mlog = logging.getLogger('CaloTowerEmGetter::configure :')
        mlog.info('entering')

        # get handle to upstream object
        # handle tile

        # handle LAr
        theCaloCellGetter = self.getInputGetter\
                            (jp.CaloRecFlags.clusterCellGetterName())

        # now configure the algorithm, part of this could be done in a separate class
        # cannot have same name
        try:
            from CaloRec.CaloRecConf import CaloTowerAlgorithm
        except Exception:
            mlog.error("could not import CaloRec.CaloTowerAlgorithm")
            print(traceback.format_exc())
            return False

        theCaloTowerAlgorithm = CaloTowerAlgorithm("EmTowerBldr")
        self._CaloTowerAlgorithmHandle = theCaloTowerAlgorithm

        # configure CaloTowerAlgorithm here

        try:
            from LArRecUtils.LArRecUtilsConf import LArTowerBuilderTool
            theLArTowerBuilderTool = LArTowerBuilderTool("LArEmTwrBldr")
        except Exception:
            mlog.error(
                "could not get handle to LArTowerBuilderTool or LArFCalTowerBuilderTool. Quit"
            )
            print(traceback.format_exc())
            return False

        theCaloTowerAlgorithm.TowerBuilderTools += [
            theLArTowerBuilderTool.getFullName()
        ]

        theCaloTowerAlgorithm.NumberOfPhiTowers = 256
        theCaloTowerAlgorithm.NumberOfEtaTowers = 200
        theCaloTowerAlgorithm.EtaMin = -2.5
        theCaloTowerAlgorithm.EtaMax = 2.5

        theLArTowerBuilderTool.CellContainerName = theCaloCellGetter.outputKey(
        )
        theLArTowerBuilderTool.IncludedCalos = ["LAREM"]

        # add tool to alg . From now on theCaloClusterBuilderSW will point
        # on a COPY of the tool, so property cannot be further modified !
        theCaloTowerAlgorithm += theLArTowerBuilderTool

        # FIXME TowerSpy missing

        #

        # sets output key
        theCaloTowerAlgorithm.TowerContainerName = self.outputKey()

        # register output in objKeyStore
        from RecExConfig.ObjKeyStore import objKeyStore

        # LArTowerEM are not written in ESD
        # objKeyStore.addStreamESD(self.outputType(),self.outputKey())
        objKeyStore.addTransient(self.outputType(), self.outputKey())

        # now add algorithm to topSequence
        # this should always come at the end

        mlog.info(" now adding to topSequence")
        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        topSequence += theCaloTowerAlgorithm

        return True
コード例 #4
0
    def configure(self):
        mlog = logging.getLogger('CaloTowerCmbGetter::configure :')
        mlog.info('scheduled to output %s', self.output())

        # get handle to upstream object
        # handle tile

        # handle LAr
        theCaloCellGetter = self.getInputGetter\
                            (jp.CaloRecFlags.clusterCellGetterName())

        # now configure the algorithm, part of this could be done in a separate class
        # cannot have same name
        try:
            from CaloRec.CaloRecConf import CaloTowerAlgorithm
            theCaloTowerAlgorithm = CaloTowerAlgorithm("CmbTowerBldr")
        except:
            mlog.error("could not import CaloRec.CaloTowerAlgorithm")
            print traceback.format_exc()
            return False

        self._CaloTowerAlgorithmHandle = theCaloTowerAlgorithm

        # configure CaloTowerAlgorithm here

        try:
            from TileRecUtils.TileRecUtilsConf import TileTowerBuilderTool
            theTileTowerBuilderTool = TileTowerBuilderTool("TileCmbTwrBldr")
        except:
            mlog.error("could not get handle to TileTowerBuilderTool Quit")
            print traceback.format_exc()
            return False

        # add the tool to list of tool ( should use ToolHandle eventually)
        theCaloTowerAlgorithm.TowerBuilderTools += [
            theTileTowerBuilderTool.getFullName()
        ]

        try:
            from LArRecUtils.LArRecUtilsConf import LArTowerBuilderTool, LArFCalTowerBuilderTool
            theLArTowerBuilderTool = LArTowerBuilderTool("LArCmbTwrBldr")
            theLArFCalTowerBuilderTool = LArFCalTowerBuilderTool(
                "LArFCalCmbTwrBldr")
        except:
            mlog.error(
                "could not get handle to LArTowerBuilderTool or LArFCalTowerBuilderTool. Quit"
            )
            print traceback.format_exc()
            return False

        theCaloTowerAlgorithm.TowerBuilderTools += [
            theLArTowerBuilderTool.getFullName()
        ]
        theCaloTowerAlgorithm.TowerBuilderTools += [
            theLArFCalTowerBuilderTool.getFullName()
        ]

        theCaloTowerAlgorithm.NumberOfPhiTowers = 64
        theCaloTowerAlgorithm.NumberOfEtaTowers = 100
        theCaloTowerAlgorithm.EtaMin = -5.0
        theCaloTowerAlgorithm.EtaMax = 5.0

        theLArTowerBuilderTool.CellContainerName = theCaloCellGetter.outputKey(
        )
        theLArTowerBuilderTool.IncludedCalos = ["LAREM", "LARHEC"]

        theLArFCalTowerBuilderTool.CellContainerName = theCaloCellGetter.outputKey(
        )
        theLArFCalTowerBuilderTool.MinimumEt = 0 * MeV

        theTileTowerBuilderTool.CellContainerName = theCaloCellGetter.outputKey(
        )
        theTileTowerBuilderTool.DumpTowers = False
        theTileTowerBuilderTool.DumpWeightMap = False

        # add tool to alg . From now on theCaloClusterBuilderSW will point
        # on a COPY of the tool, so property cannot be further modified !
        theCaloTowerAlgorithm += theLArTowerBuilderTool
        theCaloTowerAlgorithm += theLArFCalTowerBuilderTool
        theCaloTowerAlgorithm += theTileTowerBuilderTool

        # FIXME TowerSpy missing

        #

        # sets output key
        theCaloTowerAlgorithm.TowerContainerName = self.outputKey()

        # register output in objKeyStore
        from RecExConfig.ObjKeyStore import objKeyStore

        objKeyStore.addStreamESD(self.outputType(), self.outputKey())

        # now add algorithm to topSequence
        # this should always come at the end

        mlog.info(" now adding to topSequence")

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        topSequence += theCaloTowerAlgorithm

        return True