Example #1
0
# Use cell container created by TauRecCoreBuilder as an input.
################################################################################
from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMomentsMaker, CaloClusterMaker, CaloCell2ClusterMapper
from CaloRec.CaloTopoClusterFlags import jobproperties
from AthenaCommon.SystemOfUnits import deg, GeV, MeV
from AthenaCommon.AlgSequence import AlgSequence
from AthenaCommon.GlobalFlags import globalflags

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

TopoClusterForTaus = CaloTopoClusterMaker("TopoClusterForTaus")

TopoClusterForTaus.CellsNames = ["TauCells"]
#TopoClusterForTaus.OutputLevel=2
TopoClusterForTaus.CalorimeterNames = ["LAREM"]
TopoClusterForTaus.SeedSamplingNames = [
    "PreSamplerB", "EMB1", "EMB2", "PreSamplerE", "EME1", "EME2"
]
TopoClusterForTaus.CaloNoiseTool = theCaloNoiseTool
TopoClusterForTaus.UseCaloNoiseTool = True
TopoClusterForTaus.UsePileUpNoise = True
TopoClusterForTaus.NeighborOption = "super3D"
TopoClusterForTaus.RestrictHECIWandFCalNeighbors = False
TopoClusterForTaus.CellThresholdOnEorAbsEinSigma = 0.0
TopoClusterForTaus.NeighborThresholdOnEorAbsEinSigma = 2.0
TopoClusterForTaus.SeedThresholdOnEorAbsEinSigma = 4.0
TopoClusterForTaus.SeedCutsInAbsE = True
TopoClusterForTaus.ClusterEtorAbsEtCut = 1 * GeV
        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

# maker tools
HadTopoMaker = CaloTopoClusterMaker("HadTopoMaker")

HadTopoMaker.CellsNames = ["AllCalo"]
HadTopoMaker.CalorimeterNames = ["TILE", "LARHEC"]
# cells from the following samplings will be able to form
# seeds. By default no sampling is excluded
HadTopoMaker.SeedSamplingNames = [
    "TileBar0", "TileBar1", "TileBar2", "TileExt0", "TileExt1", "TileExt2",
    "HEC0", "HEC1", "HEC2", "HEC3", "TileGap1", "TileGap2", "TileGap3"
]
HadTopoMaker.CaloNoiseTool = theCaloNoiseTool
HadTopoMaker.NoiseSigma = 1.68 / 1023 / 64 * 800 * 1.414214 * GeV
#HadTopoMaker.UseCaloNoiseTool=False
HadTopoMaker.UseCaloNoiseTool = True
HadTopoMaker.UsePileUpNoise = False
HadTopoMaker.NeighborOption = "super3D"
HadTopoMaker.RestrictHECIWandFCalNeighbors = False
HadTopoMaker.SeedThresholdOnEorAbsEinSigma = 4.0