Exemplo n.º 1
0
    def __init__(self, name="eflowMomentCalculatorToolDefault"):

        eflowMomentCalculatorTool.__init__(self, name)

        mlog = logging.getLogger('eflowMomentCalculatorToolDefault::__init__ ')
        mlog.info("entering")

        try:
            from CaloRec.CaloRecConf import CaloClusterMomentsMaker
            ClusterMomentsMaker = CaloClusterMomentsMaker()
        except:
            mlog.error("could not import CaloRec.CaloClusterMomentsMaker")
            print traceback.format_exc()
            return False

        from CaloRec.CaloTopoClusterFlags import jobproperties

        from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
        theCaloNoiseTool = CaloNoiseToolDefault()
        from AthenaCommon.AppMgr import ToolSvc
        ToolSvc += theCaloNoiseTool

        ClusterMomentsMaker.MaxAxisAngle = 20 * deg
        ClusterMomentsMaker.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
        )
        ClusterMomentsMaker.MinBadLArQuality = 4000
        ClusterMomentsMaker.CaloNoiseTool = theCaloNoiseTool
        ClusterMomentsMaker.UsePileUpNoise = True
        ClusterMomentsMaker.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise(
        )
        ClusterMomentsMaker.OutputLevel = INFO
        ClusterMomentsMaker.MomentsNames = [
            "FIRST_PHI", "FIRST_ETA", "SECOND_R", "SECOND_LAMBDA", "DELTA_PHI",
            "DELTA_THETA", "DELTA_ALPHA", "CENTER_X", "CENTER_Y", "CENTER_Z",
            "CENTER_MAG", "CENTER_LAMBDA", "LATERAL", "LONGITUDINAL",
            "FIRST_ENG_DENS", "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_FRAC_CORE",
            "FIRST_ENG_DENS", "SECOND_ENG_DENS", "ISOLATION", "EM_PROBABILITY",
            "ENG_POS", "ENG_BAD_CELLS", "N_BAD_CELLS", "BADLARQ_FRAC",
            "AVG_LAR_Q", "AVG_TILE_Q", "SIGNIFICANCE"
        ]

        self.CaloClusterMomentsMaker = ClusterMomentsMaker

        from eflowRec.eflowMomentCalculatorSetup import setup_eflowMomentCalculatorTool
        return setup_eflowMomentCalculatorTool(self, "LC", mlog)
Exemplo n.º 2
0
def ApplySubtractionToClusters(**kwargs):
    if 'event_shape_key' in kwargs.keys():
        event_shape_key = kwargs['event_shape_key']
    else:
        from HIGlobal.HIGlobalFlags import jobproperties
        event_shape_key = jobproperties.HIGlobalFlags.EventShapeKey()

    if 'cluster_key' in kwargs.keys(): cluster_key = kwargs['cluster_key']
    else: cluster_key = HIJetFlags.HIClusterKey()

    if 'modulator' in kwargs.keys(): mod_tool = kwargs['modulator']
    else: mod_tool = GetNullModulator()

    from HIJetRec.HIJetRecConf import HIClusterSubtraction
    toolName = 'HIClusterSubtraction'
    if 'name' in kwargs.keys(): toolName = kwargs['name']
    theAlg = HIClusterSubtraction(toolName)
    theAlg.ClusterKey = cluster_key
    theAlg.EventShapeKey = event_shape_key
    theAlg.Subtractor = GetSubtractorTool(**kwargs)
    theAlg.Modulator = mod_tool

    do_cluster_moments = False
    if 'CalculateMoments' in kwargs.keys():
        do_cluster_moments = kwargs['CalculateMoments']
    if do_cluster_moments:
        from CaloRec.CaloRecConf import CaloClusterMomentsMaker
        from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
        theCaloNoiseTool = CaloNoiseToolDefault()
        from AthenaCommon.AppMgr import ToolSvc
        ToolSvc += theCaloNoiseTool

        HIClusterMoments = CaloClusterMomentsMaker("HIClusterMoments")
        #HIClusterMoments.MaxAxisAngle = 20*deg
        HIClusterMoments.CaloNoiseTool = theCaloNoiseTool
        HIClusterMoments.UsePileUpNoise = False
        HIClusterMoments.MinBadLArQuality = 4000
        HIClusterMoments.MomentsNames = [
            "CENTER_MAG", "LONGITUDINAL", "FIRST_ENG_DENS", "SECOND_ENG_DENS",
            "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_FRAC_CORE", "ENG_BAD_CELLS",
            "N_BAD_CELLS", "N_BAD_CELLS_CORR", "BAD_CELLS_CORR_E",
            "BADLARQ_FRAC", "ENG_POS", "SIGNIFICANCE", "CELL_SIGNIFICANCE",
            "CELL_SIG_SAMPLING", "AVG_LAR_Q", "AVG_TILE_Q"
        ]

        from IOVDbSvc.CondDB import conddb
        if not conddb.isOnline:
            from LArRecUtils.LArHVScaleRetrieverDefault import LArHVScaleRetrieverDefault
            HIClusterMoments.LArHVScaleRetriever = LArHVScaleRetrieverDefault()
            HIClusterMoments.MomentsNames += [
                "ENG_BAD_HV_CELLS", "N_BAD_HV_CELLS"
            ]

        theAlg.ClusterCorrectionTools = [HIClusterMoments]

    jtm.add(theAlg)
    jtm.jetrecs += [theAlg]
    jtm.HIJetRecs += [theAlg]
Exemplo n.º 3
0
# cells from the following samplings will be able to form local
# maxima. The excluded samplings are PreSamplerB, EMB1,
# PreSamplerE, EME1, all Tile samplings, all HEC samplings and the
# two rear FCal samplings.
#
#TopoSplitterForTaus.OutputLevel=2
TopoSplitterForTaus.SamplingNames = ["EMB2", "EME2"]
# cells from the following samplings will also be able to form
# local maxima but only if they are not overlapping in eta and phi
# with local maxima in previous samplings from the primary list.
#
TopoSplitterForTaus.SecondarySamplingNames = ["EMB1", "EME1"]
TopoSplitterForTaus.ShareBorderCells = True
TopoSplitterForTaus.RestrictHECIWandFCalNeighbors = False

TopoMomentsForTaus = CaloClusterMomentsMaker("TopoMomentsForTaus")
TopoMomentsForTaus.MaxAxisAngle = 30 * deg
TopoMomentsForTaus.MomentsNames = [
    "FIRST_PHI", "FIRST_ETA", "SECOND_R", "SECOND_LAMBDA", "DELTA_PHI",
    "DELTA_THETA", "DELTA_ALPHA", "CENTER_X", "CENTER_Y", "CENTER_Z",
    "CENTER_LAMBDA", "LATERAL", "LONGITUDINAL", "FIRST_ENG_DENS",
    "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_FRAC_CORE", "FIRST_ENG_DENS",
    "SECOND_ENG_DENS"
]

CaloTopoForTausMaker = CaloClusterMaker("CaloTopoForTausMaker")
CaloTopoForTausMaker.ClustersOutputName = "EMTopoForTaus"
CaloTopoForTausMaker.ClusterMakerTools = [
    TopoClusterForTaus.getFullName(),
    TopoSplitterForTaus.getFullName()
]
Exemplo n.º 4
0
    OOCPi0Calib += LCOutPi0

    DMCalib = CaloClusterLocalCalib("DMCalibForTaus")
    DMCalib.ClusterRecoStatus = [1, 2]
    #DMCalib.LocalCalibToolNames = [DMTool.getFullName()]
    #DMCalib += DMTool
    DMCalib.LocalCalibTools = [LCDeadMaterial]

    DMCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
    )

    DMCalib += LCDeadMaterial

# correction tools not using tools
TopoMomentsForTaus = CaloClusterMomentsMaker("TauPi0TopoMoments")
TopoMomentsForTaus.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
)
TopoMomentsForTaus.MaxAxisAngle = 20 * deg
TopoMomentsForTaus.CaloNoiseTool = theCaloNoiseTool
TopoMomentsForTaus.UsePileUpNoise = True
TopoMomentsForTaus.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise(
)
TopoMomentsForTaus.MinBadLArQuality = 4000
TopoMomentsForTaus.MomentsNames = [
    "FIRST_PHI", "FIRST_ETA", "SECOND_R", "SECOND_LAMBDA", "DELTA_PHI",
    "DELTA_THETA", "DELTA_ALPHA", "CENTER_X", "CENTER_Y", "CENTER_Z",
    "CENTER_MAG", "CENTER_LAMBDA", "LATERAL", "LONGITUDINAL", "ENG_FRAC_EM",
    "ENG_FRAC_MAX", "ENG_FRAC_CORE", "FIRST_ENG_DENS", "SECOND_ENG_DENS",
    "ISOLATION"
]
Exemplo n.º 5
0
    def configure(self):

        mlog = logging.getLogger('CaloClusterTopoFromTowerGetter::configure :')
        mlog.info('scheduled to output %s', self._output)

        if not self._status['Initialize']:
            mlog.error('module is disabled due to initialization problems')
            return False

        # get handle to upstream object
        theCaloCellGetter = self.getInputGetter(
            jp.CaloRecFlags.clusterCellGetterName())
        cellContKey = theCaloCellGetter.outputKey()

        # configure cluster maker
        TopoBuilder = CaloTopoClusterFromTowerMaker(
            jobproperties.CaloTopoClusterFromTowerFlags.towerConverterName.
            get_Value(),
            CaloTowerContainerKey=jobproperties.CaloTopoClusterFromTowerFlags.
            inputTowerContainerKey.get_Value(),
            CaloCellContainerKey=cellContKey,
            OrderClusterByPt=jobproperties.CaloTopoClusterFromTowerFlags.
            orderByPt.get_Value())

        # moment makers
        TopoMoments = CaloClusterMomentsMaker("TopoMoments")
        TopoMoments.MaxAxisAngle = 20 * deg
        TopoMoments.CaloNoiseTool = theCaloNoiseTool
        TopoMoments.UsePileUpNoise = True
        TopoMoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise(
        )
        TopoMoments.MinBadLArQuality = 4000
        TopoMoments.MomentsNames = [
            "AVG_LAR_Q", "AVG_TILE_Q", "BAD_CELLS_CORR_E", "BADLARQ_FRAC",
            "CELL_SIGNIFICANCE", "CELL_SIG_SAMPLING", "CENTER_LAMBDA",
            "CENTER_MAG", "CENTER_X", "CENTER_Y", "CENTER_Z", "DELTA_ALPHA",
            "DELTA_PHI", "DELTA_THETA", "ENG_BAD_CELLS", "ENG_FRAC_CORE",
            "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_POS", "FIRST_ENG_DENS",
            "FIRST_ETA", "FIRST_PHI", "ISOLATION", "LATERAL", "LONGITUDINAL",
            "MASS", "N_BAD_CELLS", "N_BAD_CELLS_CORR", "PTD",
            "SECOND_ENG_DENS", "SECOND_LAMBDA", "SECOND_R", "SIGNIFICANCE"
        ]

        # only add HV related moments if it is offline.
        from IOVDbSvc.CondDB import conddb
        if not conddb.isOnline:
            from LArRecUtils.LArHVScaleRetrieverDefault import LArHVScaleRetrieverDefault
            TopoMoments.LArHVScaleRetriever = LArHVScaleRetrieverDefault()
            TopoMoments.MomentsNames += ["ENG_BAD_HV_CELLS", "N_BAD_HV_CELLS"]

        # cluster maker
        CaloTopoCluster = CaloClusterMaker(
            jobproperties.CaloTopoClusterFromTowerFlags.clusterMakerName.
            get_Value())
        mlog.info('instantiated CaloClusterMaker "{0}"'.format(
            CaloTopoCluster.name()))
        CaloTopoCluster.ClustersOutputName = self._output[self._outputType]
        CaloTopoCluster.ClusterMakerTools = [TopoBuilder]

        # bad cell corrections
        from CaloClusterCorrection.CaloClusterBadChannelListCorr import CaloClusterBadChannelListCorr
        BadChannelListCorr = CaloClusterBadChannelListCorr()

        # Correction tools
        CaloTopoCluster.ClusterCorrectionTools += [BadChannelListCorr]
        CaloTopoCluster.ClusterCorrectionTools += [TopoMoments]

        # configuring the algorithm
        CaloTopoCluster += TopoBuilder
        CaloTopoCluster += BadChannelListCorr
        CaloTopoCluster += TopoMoments

        objKeyStore.addManyTypesTransient(self.output())
        mlog.info('add output %s', self.output())
        # only write main object in AOD
        # 2014-01-15 W.L. Remove objs from output streams  b/c of xAOD migration
        #objKeyStore.addStreamESD(self.outputType(),self.outputKey())
        #objKeyStore.addStreamESD("CaloShowerContainer",self.outputKey()+"_Data")
        #objKeyStore.addStreamESD("CaloCellLinkContainer",self.outputKey()+"_Link")
        #objKeyStore.addStreamAOD(self.outputType(),self.outputKey())

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        topSequence += CaloTopoCluster

        self._handle = CaloTopoCluster

        return True
Exemplo n.º 6
0
        0.00
    ]
    TBCluster.seedCut = 4.0
    TBCluster.cellCut = -9999999.
    TBCluster.deltaR = 0.02
    TBCluster.maxIterations = 4
    TBCluster.CellEnergyInADC = False
    TBCluster.fixClusterPosition = False
    TBCluster.etaCluster = 2.79
    TBCluster.phiCluster = 2.49
    if not doSimpleNoiseTool:
        TBCluster.noiseToolName = theCaloNoiseTool.getFullName()
    else:
        TBCluster.noiseToolName = SimpleNoiseTool.getFullName()
    from CaloRec.CaloRecConf import CaloClusterMomentsMaker
    Moments = CaloClusterMomentsMaker("Moments")
    Moments.MaxAxisAngle = 30 * deg
    Moments.MomentsNames = [
        "FIRST_PHI", "FIRST_ETA", "SECOND_R", "SECOND_LAMBDA", "DELTA_PHI",
        "DELTA_THETA", "DELTA_ALPHA", "CENTER_X", "CENTER_Y", "CENTER_Z",
        "CENTER_LAMBDA", "LATERAL", "LONGITUDINAL"
    ]
    ClusterMaker.ClusterMakerTools = [TBCluster.getFullName()]
    ClusterMaker.ClusterCorrectionTools = [Moments.getFullName()]
    ClusterMaker += TBCluster
    ClusterMaker += Moments
    topSequence += ClusterMaker

if doMakeElecCluster:
    EMClusterMaker = CaloClusterMaker("EMClusterMaker")
    EMClusterMaker.ClustersOutputName = "EMTBClusters"
Exemplo n.º 7
0
def MakeClustersFromTowers(clusterMakerName='CaloClusterMaker',clusterContainerKey='TowerTopoCluster',configDict=ClustersFromTowersDict(),applyEnergyThreshold=False,debugOn=False):
    ''' This function generates an instance of a cluster algorithm producting clusters trom towers with or without moments 
    '''
    # collect inputs
    mlog = logging.getLogger('MakeClustersFromTowers.py:: ')
    mlog.info('ClusterMakerName    = "'+clusterMakerName+'"')
    mlog.info('ClusterContainerKey = <'+clusterContainerKey+'>')
    mlog.info('Converter parameters: ',configDict)

    # configure cluster builder
    cnvname  = configDict['ClusterBuilderName']
    twralgo  = configDict['CaloTowerBuilder']
    towerkey = twralgo.CaloTowerContainer
    mlog.info('(input) CaloTowerContainer <'+towerkey+'>')
    cellkey  = 'AllCalo' ### twralgo.InputCellContainer --> this does not work, why?
    mlog.info('(input) CaloCellContainer  <'+cellkey+'>')
    ptorder  = configDict['OrderClusterByPt']
    tcluskey = configDict['CaloTopoClusterContainerKey']
    tcwgtkey = configDict['CellClusterWeightKey'] 
    #### buildtt  = ( tcluskey != 'NONE' and tcwgtkey != 'NONE' )
    buildtt  = configDict['ApplyLCW']
    ''' Configuration module for the tower converter
    '''
    towerConverter = CaloTopoClusterFromTowerMaker(cnvname,CaloTowerContainerKey=towerkey,CaloCellContainerKey=cellkey,OrderClusterByPt=ptorder)
    ''' Refinement of converter configuration
    '''
    mlog.info(' ')
    if buildtt:
        mlog.info('################################################')
        mlog.info('## Produce LCW calibrated topo-tower clusters ##')
        mlog.info('################################################')
        mlog.info('CaloTopoClusterContainerKey .. {0}'.format(tcluskey))
        mlog.info('CellClusterWeightKey ......... {0}'.format(tcwgtkey))
        towerConverter.CaloTopoClusterContainerKey = tcluskey
        towerConverter.CellClusterWeightKey        = tcwgtkey
        towerConverter.ApplyLCW                    = True
    else:
        mlog.info('####################################################')
        mlog.info('## Produce EM calibrated inclusive tower clusters ##')
        mlog.info('####################################################')
    mlog.info(' ')
    if applyEnergyThreshold:
        towerConverter.CellEnergyThreshold = twralgo.CellEnergyThreshold 
    if debugOn:
        towerConverter.OutputLevel = Lvl.DEBUG
    # setting up the moments: external tools
    from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
    caloNoiseTool = CaloNoiseToolDefault()
    from AthenaCommon.AppMgr import ToolSvc
    ToolSvc += caloNoiseTool

    # moment maker
    from CaloRec.CaloTopoClusterFlags import jobproperties
    from AthenaCommon.SystemOfUnits import deg, GeV, MeV
    from CaloRec.CaloRecConf import CaloClusterMomentsMaker
    clusterMoments = CaloClusterMomentsMaker (clusterMakerName+'MomentMaker')
    clusterMoments.MaxAxisAngle = 20*deg
    clusterMoments.CaloNoiseTool = caloNoiseTool
    clusterMoments.UsePileUpNoise = True
    clusterMoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise()
    clusterMoments.MinBadLArQuality = 4000
    clusterMoments.MomentsNames = ["FIRST_PHI" 
                                   ,"FIRST_ETA"
                                   ,"SECOND_R" 
                                   ,"SECOND_LAMBDA"
                                   ,"DELTA_PHI"
                                   ,"DELTA_THETA"
                                   ,"DELTA_ALPHA" 
                                   ,"CENTER_X"
                                   ,"CENTER_Y"
                                   ,"CENTER_Z"
                                   ,"CENTER_MAG"
                                   ,"CENTER_LAMBDA"
                                   ,"LATERAL"
                                   ,"LONGITUDINAL"
                                   ,"FIRST_ENG_DENS" 
                                   ,"ENG_FRAC_EM" 
                                   ,"ENG_FRAC_MAX" 
                                   ,"ENG_FRAC_CORE" 
                                   ,"SECOND_ENG_DENS" 
                                   ,"ISOLATION"
                                   ,"ENG_BAD_CELLS"
                                   ,"N_BAD_CELLS"
                                   ,"N_BAD_CELLS_CORR"
                                   ,"BAD_CELLS_CORR_E"
                                   ,"BADLARQ_FRAC"
                                   ,"ENG_POS"
                                   ,"SIGNIFICANCE"
                                   ,"CELL_SIGNIFICANCE"
                                   ,"CELL_SIG_SAMPLING"
                                   ,"AVG_LAR_Q"
                                   ,"AVG_TILE_Q"
                                   ,"PTD"
                                   ,"MASS"
                                   ]

    # only add HV related moments if it is offline.
    from IOVDbSvc.CondDB import conddb
    if not conddb.isOnline:
        from LArRecUtils.LArHVScaleRetrieverDefault import LArHVScaleRetrieverDefault
        clusterMoments.LArHVScaleRetriever=LArHVScaleRetrieverDefault()
        clusterMoments.MomentsNames += ["ENG_BAD_HV_CELLS"
                                        ,"N_BAD_HV_CELLS"
                                        ]

    # cluster maker
    from CaloRec.CaloRecConf import CaloClusterMaker
    clusterMaker = CaloClusterMaker(clusterMakerName)
    clusterMaker.ClustersOutputName = clusterContainerKey
    clusterMaker.ClusterMakerTools  = [ towerConverter ]
    mlog.info('instantiated CaloClusterMaker "{0}"'.format(clusterMaker.name()))

    # bad cell corrections          
##    from CaloClusterCorrection.CaloClusterBadChannelListCorr import CaloClusterBadChannelListCorr
##    badChannelCorr = CaloClusterBadChannelListCorr()

    # Correction tools
##    clusterMaker.ClusterCorrectionTools += [ badChannelCorr ]
    clusterMaker.ClusterCorrectionTools += [ clusterMoments ]

    # configuring the algorithm
    clusterMaker += towerConverter
##    clusterMaker += badChannelCorr
    clusterMaker += clusterMoments

    if buildtt:
        from CaloRec.CaloRecConf import CaloTopoClusterFromTowerCalibrator
        calgname = clusterMakerName+'Calibrator'
        mlog.info('TopoTowers: add LCW calibration tool <'+calgname+'>')
        clusterCalibrator = CaloTopoClusterFromTowerCalibrator(calgname)
        mlog.info('TopoTowers: '+calgname+'.CellClusterWeightKey = "'+tcwgtkey+'"')
        clusterCalibrator.CellClusterWeightKey     = tcwgtkey
        clusterCalibrator.OrderClusterByPt         = ptorder
        clusterMaker.ClusterCorrectionTools       += [ clusterCalibrator ]
        clusterMaker                              += clusterCalibrator

    # done
    return clusterMaker
Exemplo n.º 8
0
PFRecoverSplitShowersTool.eflowCellEOverPTool=CellEOverPTool_Recover

if jobproperties.eflowRecFlags.recoverIsolatedTracks == True:
   PFRecoverSplitShowersTool.RecoverIsolatedTracks = True
   
if jobproperties.eflowRecFlags.useUpdated2015ChargedShowerSubtraction == False:
   PFRecoverSplitShowersTool.useUpdated2015ChargedShowerSubtraction = False

if jobproperties.eflowRecFlags.eflowAlgType != "EOverP":
   PFAlgorithm.SubtractionToolList += [PFRecoverSplitShowersTool]

from eflowRec.eflowRecConf import PFMomentCalculatorTool
PFMomentCalculatorTool = PFMomentCalculatorTool("PFMomentCalculatorTool")

from CaloRec.CaloRecConf import CaloClusterMomentsMaker
PFClusterMomentsMaker = CaloClusterMomentsMaker("PFClusterMomentsMaker")

from CaloRec.CaloTopoClusterFlags import jobproperties

PFClusterMomentsMaker.MaxAxisAngle = 20*deg
PFClusterMomentsMaker.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute() 
PFClusterMomentsMaker.MinBadLArQuality = 4000
PFClusterMomentsMaker.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise()
PFClusterMomentsMaker.OutputLevel = INFO
PFClusterMomentsMaker.MomentsNames = [
   "FIRST_PHI" 
   ,"FIRST_ETA"
   ,"SECOND_R" 
   ,"SECOND_LAMBDA"
   ,"DELTA_PHI"
   ,"DELTA_THETA"
Exemplo n.º 9
0
    def configure(self):
        mlog = logging.getLogger('CaloClusterTopoGetter::configure :')
        mlog.info('scheduled to output %s', self.output())

        # get handle to upstream object
        theCaloCellGetter = self.getInputGetter\
                            (jp.CaloRecFlags.clusterCellGetterName())

        # configure cell weight calibration
        if jobproperties.CaloTopoClusterFlags.doCellWeightCalib():
            from CaloClusterCorrection.CaloClusterCorrectionConf import H1WeightToolCSC12Generic
            from CaloClusterCorrection.StandardCellWeightCalib import H1Calibration, getCellWeightTool
            CellWeights = CaloClusterCellWeightCalib("CellWeights")
            # -- configure weight tool
            finder = jobproperties.CaloTopoClusterFlags.cellWeightRefFinder.get_Value(
            )
            size = jobproperties.CaloTopoClusterFlags.cellWeightRefSize.get_Value(
            )
            signal = jobproperties.CaloTopoClusterFlags.cellWeightRefSignal.get_Value(
            )
            WeightTool = getCellWeightTool(finder, size, signal)
            # -- connect weight tool
            CellWeights.CellSignalWeightTool = WeightTool
            CellWeights += WeightTool
            #-- default properties
            CellWeights.Direction = "AbsSignal"  #-- use absolute cell energies for eta/phi calculation
            CellWeights.BelowThresholdLikeAll = True  #-- treat clusters below thresholds the same as all others
            CellWeights.BelowThresholdDirection = "AbsSignal"  #-- alternative direction calculation for below threshold clusters,
            #   ignored if BelowThresholdLikeAll = True
            CellWeights.EnergyThreshold = 0.0 * MeV  #-- threshold for possible change of direction calculation
            CellWeights.IgnoreGeoWeights = False  #-- ignore geometrical cell signal weights if True

        # now configure local hadronic calibration
        if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib():
            # tools used by tools
            # EMFrac   = EMFracClusterClassificationTool("EMFrac")
            # EMFrac.ClassificationKey   = "EMFracClassify"
            # EMFrac.UseEMFractionSpread = False
            # EMFrac.MaxEMFraction       = 0.5
            #
            # H1Weight = H1ClusterCellWeightTool("H1Weight")
            # H1Weight.CorrectionKey       = "H1ClusterCellWeights"
            # H1Weight.SignalOverNoiseCut  = 2.0
            # H1Weight.CaloNoiseTool       = theCaloNoiseTool
            #
            # OOCC     = OutOfClusterCorrectionTool("OOCC")
            # OOCC.CorrectionKey       = "OOCCorrection"
            #
            # OOCCPi0  = OutOfClusterCorrectionTool("OOCCPi0")
            # OOCCPi0.CorrectionKey    = "OOCPi0Correction"

            # tools used by tools
            LCClassify = CaloLCClassificationTool("LCClassify")
            LCClassify.ClassificationKey = "EMFracClassify"
            LCClassify.UseSpread = False
            LCClassify.MaxProbability = 0.5
            # add the moments EM_PROBABILITY, HAD_WEIGHT, OOC_WEIGHT, DM_WEIGHT to the AOD:
            LCClassify.StoreClassificationProbabilityInAOD = True
            LCClassify.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )

            LCWeight = CaloLCWeightTool("LCWeight")
            LCWeight.CorrectionKey = "H1ClusterCellWeights"
            LCWeight.SignalOverNoiseCut = 2.0
            LCWeight.CaloNoiseTool = theCaloNoiseTool
            LCWeight.UseHadProbability = True

            LCOut = CaloLCOutOfClusterTool("LCOut")
            LCOut.CorrectionKey = "OOCCorrection"
            LCOut.UseEmProbability = False
            LCOut.UseHadProbability = True

            LCOutPi0 = CaloLCOutOfClusterTool("LCOutPi0")
            LCOutPi0.CorrectionKey = "OOCPi0Correction"
            LCOutPi0.UseEmProbability = True
            LCOutPi0.UseHadProbability = False

            #DMTool   = DeadMaterialCorrectionTool2("DMTool")
            #DMTool.HadDMCoeffKey       = "HadDMCoeff2"
            #DMTool.SignalOverNoiseCut  = 1.0
            #DMTool.ClusterRecoStatus   = 0
            #DMTool.WeightModeDM        = 2
            #DMTool.CaloNoiseTool       = theCaloNoiseTool

            LCDeadMaterial = CaloLCDeadMaterialTool("LCDeadMaterial")
            LCDeadMaterial.HadDMCoeffKey = "HadDMCoeff2"
            LCDeadMaterial.ClusterRecoStatus = 0
            LCDeadMaterial.WeightModeDM = 2
            LCDeadMaterial.UseHadProbability = True
            LCDeadMaterial.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )
            # correction tools using tools
            LocalCalib = CaloClusterLocalCalib("LocalCalib")
            LocalCalib.ClusterClassificationTool = [LCClassify]
            #LocalCalib.ClusterRecoStatus             = [2]
            LocalCalib.ClusterRecoStatus = [1, 2]
            LocalCalib.LocalCalibTools = [LCWeight]
            LocalCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )

            LocalCalib += LCClassify
            LocalCalib += LCWeight

            OOCCalib = CaloClusterLocalCalib("OOCCalib")
            #OOCCalib.ClusterRecoStatus   = [2]
            OOCCalib.ClusterRecoStatus = [1, 2]
            OOCCalib.LocalCalibTools = [LCOut]
            OOCCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )

            OOCCalib += LCOut

            OOCPi0Calib = CaloClusterLocalCalib("OOCPi0Calib")
            #OOCPi0Calib.ClusterRecoStatus   = [1]
            OOCPi0Calib.ClusterRecoStatus = [1, 2]
            OOCPi0Calib.LocalCalibTools = [LCOutPi0]

            OOCPi0Calib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )

            OOCPi0Calib += LCOutPi0

            DMCalib = CaloClusterLocalCalib("DMCalib")
            DMCalib.ClusterRecoStatus = [1, 2]
            #DMCalib.LocalCalibToolNames = [DMTool.getFullName()]
            #DMCalib += DMTool
            DMCalib.LocalCalibTools = [LCDeadMaterial]

            DMCalib.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )

            DMCalib += LCDeadMaterial

        # correction tools not using tools
        TopoMoments = CaloClusterMomentsMaker("TopoMoments")
        TopoMoments.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
        )
        TopoMoments.MaxAxisAngle = 20 * deg
        TopoMoments.CaloNoiseTool = theCaloNoiseTool
        TopoMoments.UsePileUpNoise = True
        TopoMoments.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise(
        )
        TopoMoments.MinBadLArQuality = 4000
        TopoMoments.MomentsNames = [
            "AVG_LAR_Q", "AVG_TILE_Q", "BAD_CELLS_CORR_E", "BADLARQ_FRAC",
            "CELL_SIGNIFICANCE", "CELL_SIG_SAMPLING", "CENTER_LAMBDA",
            "CENTER_MAG", "CENTER_X", "CENTER_Y", "CENTER_Z", "DELTA_ALPHA",
            "DELTA_PHI", "DELTA_THETA", "ENG_BAD_CELLS", "ENG_FRAC_CORE",
            "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_POS", "FIRST_ENG_DENS",
            "FIRST_ETA", "FIRST_PHI", "ISOLATION", "LATERAL", "LONGITUDINAL",
            "MASS", "N_BAD_CELLS", "N_BAD_CELLS_CORR", "PTD",
            "SECOND_ENG_DENS", "SECOND_LAMBDA", "SECOND_R", "SIGNIFICANCE"
        ]

        doDigiTruthFlag = False
        try:
            from Digitization.DigitizationFlags import digitizationFlags
            doDigiTruthFlag = digitizationFlags.doDigiTruth()
        except:
            log = logging.getLogger('CaloClusterTopoGetter')
            log.info(
                'Unable to import DigitizationFlags in CaloClusterTopoGetter. Expected in AthenaP1'
            )

        if doDigiTruthFlag:
            TopoMoments_Truth = CaloClusterMomentsMaker_DigiHSTruth(
                "TopoMoments_Truth")
            TopoMoments_Truth.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
            )
            TopoMoments_Truth.MaxAxisAngle = 20 * deg
            TopoMoments_Truth.CaloNoiseTool = theCaloNoiseTool
            TopoMoments_Truth.UsePileUpNoise = True
            TopoMoments_Truth.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise(
            )
            TopoMoments_Truth.MinBadLArQuality = 4000
            TopoMoments_Truth.MomentsNames = [
                "FIRST_PHI_DigiHSTruth", "FIRST_ETA_DigiHSTruth",
                "SECOND_R_DigiHSTruth", "SECOND_LAMBDA_DigiHSTruth",
                "DELTA_PHI_DigiHSTruth", "DELTA_THETA_DigiHSTruth",
                "DELTA_ALPHA_DigiHSTruth", "CENTER_X_DigiHSTruth",
                "CENTER_Y_DigiHSTruth", "CENTER_Z_DigiHSTruth",
                "CENTER_MAG_DigiHSTruth", "CENTER_LAMBDA_DigiHSTruth",
                "LATERAL_DigiHSTruth", "LONGITUDINAL_DigiHSTruth",
                "ENG_FRAC_CORE_DigiHSTruth", "FIRST_ENG_DENS_DigiHSTruth",
                "SECOND_ENG_DENS_DigiHSTruth", "ISOLATION_DigiHSTruth",
                "BAD_CELLS_CORR_E_DigiHSTruth", "ENG_POS_DigiHSTruth",
                "SIGNIFICANCE_DigiHSTruth", "CELL_SIGNIFICANCE_DigiHSTruth",
                "CELL_SIG_SAMPLING_DigiHSTruth", "AVG_LAR_Q_DigiHSTruth",
                "AVG_TILE_Q_DigiHSTruth", "ENERGY_DigiHSTruth",
                "PHI_DigiHSTruth", "ETA_DigiHSTruth"
            ]

        # only add HV related moments if it is offline.
        from IOVDbSvc.CondDB import conddb
        if not conddb.isOnline:
            from LArRecUtils.LArHVScaleRetrieverDefault import LArHVScaleRetrieverDefault
            TopoMoments.LArHVScaleRetriever = LArHVScaleRetrieverDefault()
            TopoMoments.MomentsNames += ["ENG_BAD_HV_CELLS", "N_BAD_HV_CELLS"]

#        TopoMoments.AODMomentsNames = ["LATERAL"
#                                       ,"LONGITUDINAL"
#                                       ,"SECOND_R"
#                                       ,"SECOND_LAMBDA"
#                                       ,"CENTER_MAG"
#                                       ,"CENTER_LAMBDA"
#                                       ,"FIRST_ENG_DENS"
#                                       ,"ENG_FRAC_MAX"
#                                       ,"ISOLATION"
#                                       ,"ENG_BAD_CELLS"
#                                       ,"N_BAD_CELLS"
#                                       ,"BADLARQ_FRAC"
#                                       ,"ENG_POS"
#                                       ,"SIGNIFICANCE"
#                                       ,"CELL_SIGNIFICANCE"
#                                       ,"CELL_SIG_SAMPLING"
#                                       ,"AVG_LAR_Q"
#                                       ,"AVG_TILE_Q"
#                                       ]

#if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies() or jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables():
#    LockVariables = CaloClusterLockVars("LockVariables")
#    LockVariables.FixBasicEnergy = True
#    LockVariables.LockedSamplingVariables = []
#    if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies():
#        LockVariables.LockedSamplingVariables += [
#            "Energy", "Max_Energy"]
#    if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables():
#        LockVariables.LockedSamplingVariables += [
#            "Eta", "Phi", "Delta_Eta",
#            "Delta_Phi", "Max_Eta", "Max_Phi"
#            ]

#if jobproperties.CaloTopoClusterFlags.printTopoClusters():
#    PrintCaloCluster = CaloClusterPrinter("PrintCaloCluster")
#    PrintCaloCluster.PrintFirstOnly = True
#    PrintCaloCluster.PrintFrequency = 1
#    PrintCaloCluster.EnergyUnit     = 1.0*GeV

        theCaloClusterSnapshot = CaloClusterSnapshot(
            OutputName="CaloTopoCluster", SetCrossLinks=True)

        # maker tools
        TopoMaker = CaloTopoClusterMaker("TopoMaker")

        TopoMaker.CellsName = theCaloCellGetter.outputKey()
        TopoMaker.CalorimeterNames = ["LAREM", "LARHEC", "LARFCAL", "TILE"]
        # cells from the following samplings will be able to form
        # seeds. By default no sampling is excluded
        TopoMaker.SeedSamplingNames = [
            "PreSamplerB", "EMB1", "EMB2", "EMB3", "PreSamplerE", "EME1",
            "EME2", "EME3", "HEC0", "HEC1", "HEC2", "HEC3", "TileBar0",
            "TileBar1", "TileBar2", "TileExt0", "TileExt1", "TileExt2",
            "TileGap1", "TileGap2", "TileGap3", "FCAL0", "FCAL1", "FCAL2"
        ]
        TopoMaker.CaloNoiseTool = theCaloNoiseTool
        TopoMaker.UseCaloNoiseTool = True
        TopoMaker.UsePileUpNoise = True
        TopoMaker.NeighborOption = "super3D"
        TopoMaker.RestrictHECIWandFCalNeighbors = False
        TopoMaker.RestrictPSNeighbors = True
        TopoMaker.CellThresholdOnEorAbsEinSigma = 0.0
        TopoMaker.NeighborThresholdOnEorAbsEinSigma = 2.0
        TopoMaker.SeedThresholdOnEorAbsEinSigma = 4.0
        #timing
        TopoMaker.SeedCutsInT = jobproperties.CaloTopoClusterFlags.doTimeCut()

        # note E or AbsE
        #
        # the following property must be set to TRUE in order to make double
        # sided cuts on the seed and the cluster level
        #
        TopoMaker.SeedCutsInAbsE = True
        TopoMaker.ClusterEtorAbsEtCut = 0.0 * MeV
        #
        # note E or AbsE
        #
        # by default neighbor and cell thresholds are on AbsE. Set the following
        # properties to FALSE in order to switch to cuts on E
        #
        #TopoMaker.NeighborCutsInAbsE              = False
        #TopoMaker.CellCutsInAbsE                 = False
        # the following Et thresholds are ignored in case UsePileUpNoise
        # is TRUE
        #
        #
        # CellThresholdOnAbsEt = 0.0*MeV
        # NeighborThresholdOnAbsEt = 100.0*MeV
        # SeedThresholdOnEtorAbsEt = 200.0*MeV
        # note Et or AbsEt

        # use 2-gaussian or single gaussian noise for TileCal
        TopoMaker.TwoGaussianNoise = jobproperties.CaloTopoClusterFlags.doTwoGaussianNoise(
        )

        TopoSplitter = CaloTopoClusterSplitter("TopoSplitter")
        # cells from the following samplings will be able to form local
        # maxima. The excluded samplings are PreSamplerB, EMB1,
        # PreSamplerE, EME1, all Tile samplings, all HEC samplings and the
        # two rear FCal samplings.
        #
        TopoSplitter.SamplingNames = ["EMB2", "EMB3", "EME2", "EME3", "FCAL0"]
        # cells from the following samplings will also be able to form
        # local maxima but only if they are not overlapping in eta and phi
        # with local maxima in previous samplings from the primary list.
        #
        TopoSplitter.SecondarySamplingNames = [
            "EMB1", "EME1", "TileBar0", "TileBar1", "TileBar2", "TileExt0",
            "TileExt1", "TileExt2", "HEC0", "HEC1", "HEC2", "HEC3", "FCAL1",
            "FCAL2"
        ]
        TopoSplitter.ShareBorderCells = True
        TopoSplitter.RestrictHECIWandFCalNeighbors = False
        TopoSplitter.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute(
        )
        #
        # the following options are not set, since these are the default
        # values
        #
        # NeighborOption                = "super3D",
        # NumberOfCellsCut              = 4,
        # EnergyCut                     = 500*MeV,

        # cluster maker
        CaloTopoCluster = CaloClusterMaker("CaloTopoCluster")
        if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib():
            CaloTopoCluster.ClustersOutputName = "CaloCalTopoClusters"
        else:
            CaloTopoCluster.ClustersOutputName = "CaloTopoCluster"
        CaloTopoCluster.ClusterMakerTools = [TopoMaker, TopoSplitter]

        from CaloClusterCorrection.CaloClusterBadChannelListCorr import CaloClusterBadChannelListCorr
        BadChannelListCorr = CaloClusterBadChannelListCorr()
        CaloTopoCluster.ClusterCorrectionTools += [BadChannelListCorr]

        CaloTopoCluster.ClusterCorrectionTools += [TopoMoments]

        if doDigiTruthFlag:
            CaloTopoCluster.ClusterCorrectionTools += [TopoMoments_Truth]

        CaloTopoCluster += TopoMaker
        CaloTopoCluster += TopoSplitter
        CaloTopoCluster += BadChannelListCorr
        CaloTopoCluster += TopoMoments
        if doDigiTruthFlag:
            CaloTopoCluster += TopoMoments_Truth

        if jobproperties.CaloTopoClusterFlags.doClusterVertexFraction():
            from CaloTrackUtils.CaloTrackUtilsConf import CaloClusterVertexFractionMaker
            MyCaloClusterVertexFractionMaker = CaloClusterVertexFractionMaker(
                name="CaloClusterVertexFractionMaker",
                VxContainerName="VxPrimaryCandidate",
                dRMatchMax=0.17)
            CaloTopoCluster.ClusterCorrectionTools += [
                MyCaloClusterVertexFractionMaker
            ]
            CaloTopoCluster += MyCaloClusterVertexFractionMaker

        if jobproperties.CaloTopoClusterFlags.doCalibHitMoments(
        ) and rec.doTruth():
            from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterMomentsMaker2
            TopoCalibMoments = CaloCalibClusterMomentsMaker2(
                "TopoCalibMoments")
            TopoCalibMoments.MomentsNames = [
                "ENG_CALIB_TOT",
                "ENG_CALIB_OUT_L"
                #,"ENG_CALIB_OUT_M"
                # ,"ENG_CALIB_OUT_T"
                # ,"ENG_CALIB_DEAD_L"
                # ,"ENG_CALIB_DEAD_M"
                # ,"ENG_CALIB_DEAD_T"
                ,
                "ENG_CALIB_EMB0",
                "ENG_CALIB_EME0",
                "ENG_CALIB_TILEG3",
                "ENG_CALIB_DEAD_TOT",
                "ENG_CALIB_DEAD_EMB0",
                "ENG_CALIB_DEAD_TILE0",
                "ENG_CALIB_DEAD_TILEG3",
                "ENG_CALIB_DEAD_EME0",
                "ENG_CALIB_DEAD_HEC0",
                "ENG_CALIB_DEAD_FCAL",
                "ENG_CALIB_DEAD_LEAKAGE",
                "ENG_CALIB_DEAD_UNCLASS",
                "ENG_CALIB_FRAC_EM",
                "ENG_CALIB_FRAC_HAD",
                "ENG_CALIB_FRAC_REST"
            ]

            #            TopoCalibMoments.AODMomentsNames = ["ENG_CALIB_TOT"
            #                                                 ,"ENG_CALIB_OUT_L"
            #                                                #,"ENG_CALIB_OUT_M"
            #                                                # ,"ENG_CALIB_OUT_T"
            #                                                # ,"ENG_CALIB_DEAD_L"
            #                                                # ,"ENG_CALIB_DEAD_M"
            #                                                # ,"ENG_CALIB_DEAD_T"
            #                                                ,"ENG_CALIB_EMB0"
            #                                                ,"ENG_CALIB_EME0"
            #                                                ,"ENG_CALIB_TILEG3"
            #                                                ,"ENG_CALIB_DEAD_TOT"
            #                                                ,"ENG_CALIB_DEAD_EMB0"
            #                                                ,"ENG_CALIB_DEAD_TILE0"
            #                                                ,"ENG_CALIB_DEAD_TILEG3"
            #                                                ,"ENG_CALIB_DEAD_EME0"
            #                                                ,"ENG_CALIB_DEAD_HEC0"
            #                                                ,"ENG_CALIB_DEAD_FCAL"
            #                                                ,"ENG_CALIB_DEAD_LEAKAGE"
            #                                                ,"ENG_CALIB_DEAD_UNCLASS"
            #                                                ,"ENG_CALIB_FRAC_EM"
            #                                                ,"ENG_CALIB_FRAC_HAD"
            #                                                ,"ENG_CALIB_FRAC_REST"]
            TopoCalibMoments.CalibrationHitContainerNames = [
                "LArCalibrationHitInactive", "LArCalibrationHitActive",
                "TileCalibHitActiveCell", "TileCalibHitInactiveCell"
            ]
            TopoCalibMoments.DMCalibrationHitContainerNames = [
                "LArCalibrationHitDeadMaterial", "TileCalibHitDeadMaterial"
            ]
            CaloTopoCluster.ClusterCorrectionTools += [TopoCalibMoments]
            CaloTopoCluster += TopoCalibMoments

        #if jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingEnergies() or jobproperties.CaloTopoClusterFlags.lockTopoClusterSamplingVariables():
        #    CaloTopoCluster.ClusterCorrectionTools += [
        #        LockVariables.getFullName()]
        #    CaloTopoCluster += LockVariables

        CaloTopoCluster.ClusterCorrectionTools += [theCaloClusterSnapshot]
        CaloTopoCluster += theCaloClusterSnapshot

        if jobproperties.CaloTopoClusterFlags.doCellWeightCalib():
            CaloTopoCluster.ClusterCorrectionTools += [
                CellWeights.getFullName()
            ]
            CaloTopoCluster += CellWeights

        if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib():
            CaloTopoCluster.ClusterCorrectionTools += [
                LocalCalib, OOCCalib, OOCPi0Calib, DMCalib
            ]

            CaloTopoCluster += LocalCalib
            CaloTopoCluster += OOCCalib
            CaloTopoCluster += OOCPi0Calib
            CaloTopoCluster += DMCalib

        #
        # pool/cool part
        #
        if jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib():
            from CaloRec import CaloClusterTopoCoolFolder
            if globalflags.DetDescrVersion().startswith("Rome"):
                CaloTopoCluster.LocalCalib.LCClassify.MaxProbability = 0.85
                CaloTopoCluster.LocalCalib.LCClassify.UseNormalizedEnergyDensity = False
            else:
                CaloTopoCluster.LocalCalib.LCClassify.MaxProbability = 0.50
                CaloTopoCluster.LocalCalib.LCClassify.UseNormalizedEnergyDensity = True

        self._handle = CaloTopoCluster

        objKeyStore.addManyTypesTransient(self.output())
        # only write main object in AOD
        # 2014-01-15 W.L. Remove objs from output streams  b/c of xAOD migration
        #objKeyStore.addStreamESD(self.outputType(),self.outputKey())
        #objKeyStore.addStreamESD("CaloShowerContainer",self.outputKey()+"_Data")
        #objKeyStore.addStreamESD("CaloCellLinkContainer",self.outputKey()+"_Link")
        #objKeyStore.addStreamAOD(self.outputType(),self.outputKey())

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        topSequence += CaloTopoCluster

        return True
Exemplo n.º 10
0
from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
theCaloNoiseTool = CaloNoiseToolDefault()
from CaloRec.CaloTopoClusterFlags import jobproperties

from AthenaCommon.AppMgr import ToolSvc
ToolSvc += theCaloNoiseTool
print theCaloNoiseTool

doTopoClusterLocalCalib = False

from CaloRec.CaloTopoClusterFlags import jobproperties
jobproperties.CaloTopoClusterFlags.doTopoClusterLocalCalib.set_Value(False)

# correction tools not using tools
TileTopoMoments = CaloClusterMomentsMaker("TileTopoMoments")
TileTopoMoments.MaxAxisAngle = 30 * deg
TileTopoMoments.OutputLevel = INFO
TileTopoMoments.MomentsNames = [
    "FIRST_PHI", "FIRST_ETA", "SECOND_R", "SECOND_LAMBDA", "DELTA_PHI",
    "DELTA_THETA", "DELTA_ALPHA", "CENTER_X", "CENTER_Y", "CENTER_Z",
    "CENTER_LAMBDA", "LATERAL", "LONGITUDINAL", "FIRST_ENG_DENS",
    "ENG_FRAC_EM", "ENG_FRAC_MAX", "ENG_FRAC_CORE", "FIRST_ENG_DENS",
    "SECOND_ENG_DENS", "ISOLATION"
]
if Rel17Style:
    TileTopoMoments.AODMomentsNames = [
        "LATERAL", "LONGITUDINAL", "SECOND_R", "SECOND_LAMBDA",
        "CENTER_LAMBDA", "FIRST_ENG_DENS", "ENG_FRAC_MAX", "ISOLATION"
    ]