コード例 #1
0
def egammaDecorationTools():
    "Return a list with the tools that decorate both electrons and photons"
    return [
        EMClusterTool(),
        EMFourMomBuilder(),
        EMShowerBuilder(),
        egammaOQFlagsBuilder()
    ]
コード例 #2
0
    if not hasattr(tool, "EMExtrapolationTools"):
        tool += EMExtrapolationTools()


TrigEMTrackMatchBuilder = EMTrackMatchBuilder.copy(
    name="TrigEMTrackMatchBuilder",
    postInit=[appendtoTrigEMTrackMatchBuilder],
    broadDeltaEta=0.2,  #For offline 0.1
    broadDeltaPhi=0.2,  #For offline 0.15
    useScoring=False,
    SecondPassRescale=False,
)

TrigEMShowerBuilder = EMShowerBuilder.copy(
    name="TrigEgammaShowerBuilder",
    CellsName="",
    Print=True,
)

from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
from egammaMVACalib import egammaMVACalibConf
mlog.info("MVA version version %s" % EgammaSliceFlags.calibMVAVersion())
mlog.info("Cluster Correction version %s" %
          EgammaSliceFlags.clusterCorrectionVersion())
EgammaSliceFlags.calibMVAVersion.set_On()
TrigEgammaMVACalibTool = ToolFactory(egammaMVACalibConf.egammaMVATool,
                                     name="TrigEgammaMVACalibTool",
                                     folder=EgammaSliceFlags.calibMVAVersion(),
                                     use_layer_corrected=False)

from TrigCaloRec.TrigCaloRecConf import TrigCaloClusterMaker
コード例 #3
0
    # second, run a tool that creates the clusters and objects from these new cells
    EGAM1_ClusterDecoratorTool = ClusterDecoratorWithNewCells(
        "EGAM1_ClusterDecoratorTool",
        #OutputLevel=DEBUG,
        OutputClusterSGKey="EGammaSwClusterWithNewCells",
        OutputClusterLink="NewSwClusterLink",
        SGKey_caloCells="NewCellContainer",
        SGKey_electrons="Electrons",
        SGKey_photons="Photons")
    print EGAM1_ClusterDecoratorTool
    ToolSvc += EGAM1_ClusterDecoratorTool
    augmentationTools += [EGAM1_ClusterDecoratorTool]

    # third, schedule a tool that will be invoked by the EGammaReweightTool to create on-the-fly the shower shapes with the new cells
    from egammaTools.egammaToolsFactories import EMShowerBuilder
    EGAM1_EMShowerBuilderTool = EMShowerBuilder("EGAM1_EMShowerBuilderTool",
                                                CellsName="NewCellContainer")

    print EGAM1_EMShowerBuilderTool
    ToolSvc += EGAM1_EMShowerBuilderTool

    # fourth, decorate the new objects with their shower shapes computed from the new clusters
    EGAM1_EGammaReweightTool = EGammaReweightTool(
        "EGAM1_EGammaReweightTool",
        #OutputLevel=DEBUG,
        SGKey_electrons="Electrons",
        SGKey_photons="Photons",
        NewCellContainerName="NewCellContainer",
        NewElectronContainer="NewSwElectrons",
        NewPhotonContainer="NewSwPhotons",
        EMShowerBuilderTool=EGAM1_EMShowerBuilderTool,
        ClusterCorrectionToolName="DFEgammaSWToolWithNewCells",