Пример #1
0
    name="EGAMCOMCaloFillRectangularCluster711",
    cells_name="AODCellContainer",
    eta_size=7,
    phi_size=11,
    fill_cluster=True)
ToolSvc += EGAMCOM_caloFillRect711

#====================================================================
# AUGMENTATION TOOLS
#====================================================================
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper

# decorate electrons with the output of LH very loose
ElectronPassLHVeryLoose = DerivationFramework__AsgSelectionToolWrapper(
    name="ElectronPassLHVeryLoose",
    AsgSelectionTool=ElectronLHSelectorVeryLoose,
    CutType="",
    StoreGateEntryName="DFCommonElectronsLHVeryLoose",
    ContainerName="Electrons")
ToolSvc += ElectronPassLHVeryLoose
print ElectronPassLHVeryLoose

# decorate electrons with the output of LH loose
ElectronPassLHLoose = DerivationFramework__AsgSelectionToolWrapper(
    name="ElectronPassLHLoose",
    AsgSelectionTool=ElectronLHSelectorLoose,
    CutType="",
    StoreGateEntryName="DFCommonElectronsLHLoose",
    ContainerName="Electrons")
ToolSvc += ElectronPassLHLoose
print ElectronPassLHLoose
Пример #2
0
DFCommonMuonToolWrapperTools = []

### IDHits
DFCommonMuonsSelector = CP__MuonSelectionTool(name = "DFCommonMuonsSelector")
DFCommonMuonsSelector.MaxEta = 3.
DFCommonMuonsSelector.MuQuality = 3
# turn of the momentum correction which is not needed for IDHits cut and Preselection
DFCommonMuonsSelector.TurnOffMomCorr = True

if DFCommonMuonsTrtCutOff is not None: DFCommonMuonsSelector.TrtCutOff = DFCommonMuonsTrtCutOff
ToolSvc += DFCommonMuonsSelector
print (DFCommonMuonsSelector)

DFCommonMuonToolWrapper = DerivationFramework__AsgSelectionToolWrapper( name = "DFCommonMuonToolWrapper",
                                                                        AsgSelectionTool = DFCommonMuonsSelector,
                                                                        CutType = "IDHits",
                                                                        StoreGateEntryName = "DFCommonGoodMuon",
                                                                        ContainerName = "Muons")
ToolSvc += DFCommonMuonToolWrapper
print (DFCommonMuonToolWrapper)
DFCommonMuonToolWrapperTools.append(DFCommonMuonToolWrapper)

### Preselection
DFCommonMuonsSelectorPreselection = CP__MuonSelectionTool(name = "DFCommonMuonsSelectorPreselection")
DFCommonMuonsSelectorPreselection.MaxEta = 3.
DFCommonMuonsSelectorPreselection.MuQuality = 3
# turn of the momentum correction which is not needed for IDHits cut and Preselection
DFCommonMuonsSelectorPreselection.TurnOffMomCorr = True

if DFCommonMuonsTrtCutOff is not None: DFCommonMuonsSelectorPreselection.TrtCutOff = DFCommonMuonsTrtCutOff
ToolSvc += DFCommonMuonsSelectorPreselection
Пример #3
0
def AddTauAugmentation(Seq=None,
                       doVeryLoose=None,
                       doLoose=None,
                       doMedium=None,
                       doTight=None):

    if not Seq or hasattr(Seq, "TauAugmentationKernel" + Seq.name()):
        print("Tau augmentation will not be scheduled")
        return

    from AthenaCommon.AppMgr import ToolSvc
    from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
    from TauAnalysisTools.TauAnalysisToolsConf import TauAnalysisTools__TauSelectionTool
    import PyUtils.RootUtils as ru
    ROOT = ru.import_root()
    import cppyy
    cppyy.loadDictionary('TauAnalysisTools')

    TauAugmentationTools = []

    if doVeryLoose:
        if not hasattr(ToolSvc, "TauVeryLooseWrapper"):
            TauSelectorVeryLoose = TauAnalysisTools__TauSelectionTool(
                name="TauSelectorVeryLoose")
            TauSelectorVeryLoose.JetIDWP = ROOT.TauAnalysisTools.e_JETID.JETIDRNNVERYLOOSE
            TauSelectorVeryLoose.SelectionCuts = ROOT.TauAnalysisTools.SelectionCuts.CutJetIDWP
            TauSelectorVeryLoose.ConfigPath = ''
            ToolSvc += TauSelectorVeryLoose

            TauVeryLooseWrapper = DerivationFramework__AsgSelectionToolWrapper(
                name="TauVeryLooseWrapper",
                AsgSelectionTool=TauSelectorVeryLoose,
                StoreGateEntryName="DFTauVeryLoose",
                ContainerName="TauJets")
            ToolSvc += TauVeryLooseWrapper
        else:
            TauVeryLooseWrapper = getattr(ToolSvc, "TauVeryLooseWrapper")

        print(TauVeryLooseWrapper)
        TauAugmentationTools.append(TauVeryLooseWrapper)

    if doLoose:
        if not hasattr(ToolSvc, "TauLooseWrapper"):
            TauSelectorLoose = TauAnalysisTools__TauSelectionTool(
                name="TauSelectorLoose")
            TauSelectorLoose.JetIDWP = ROOT.TauAnalysisTools.e_JETID.JETIDRNNLOOSE
            TauSelectorLoose.SelectionCuts = ROOT.TauAnalysisTools.SelectionCuts.CutJetIDWP
            TauSelectorLoose.ConfigPath = ''
            ToolSvc += TauSelectorLoose

            TauLooseWrapper = DerivationFramework__AsgSelectionToolWrapper(
                name="TauLooseWrapper",
                AsgSelectionTool=TauSelectorLoose,
                StoreGateEntryName="DFTauLoose",
                ContainerName="TauJets")
            ToolSvc += TauLooseWrapper
        else:
            TauLooseWrapper = getattr(ToolSvc, "TauLooseWrapper")

        print(TauLooseWrapper)
        TauAugmentationTools.append(TauLooseWrapper)

    if doMedium:
        if not hasattr(ToolSvc, "TauMediumWrapper"):
            TauSelectorMedium = TauAnalysisTools__TauSelectionTool(
                name="TauSelectorMedium")
            TauSelectorMedium.JetIDWP = ROOT.TauAnalysisTools.e_JETID.JETIDRNNMEDIUM
            TauSelectorMedium.SelectionCuts = ROOT.TauAnalysisTools.SelectionCuts.CutJetIDWP
            TauSelectorMedium.ConfigPath = ''
            ToolSvc += TauSelectorMedium

            TauMediumWrapper = DerivationFramework__AsgSelectionToolWrapper(
                name="TauMediumWrapper",
                AsgSelectionTool=TauSelectorMedium,
                StoreGateEntryName="DFTauMedium",
                ContainerName="TauJets")
            ToolSvc += TauMediumWrapper
        else:
            TauMediumWrapper = getattr(ToolSvc, "TauMediumWrapper")

        print(TauMediumWrapper)
        TauAugmentationTools.append(TauMediumWrapper)

    if doTight:
        if not hasattr(ToolSvc, "TauTightWrapper"):
            TauSelectorTight = TauAnalysisTools__TauSelectionTool(
                name="TauSelectorTight")
            TauSelectorTight.JetIDWP = ROOT.TauAnalysisTools.e_JETID.JETIDRNNTIGHT
            TauSelectorTight.SelectionCuts = ROOT.TauAnalysisTools.SelectionCuts.CutJetIDWP
            TauSelectorTight.ConfigPath = ''
            ToolSvc += TauSelectorTight

            TauTightWrapper = DerivationFramework__AsgSelectionToolWrapper(
                name="TauTightWrapper",
                AsgSelectionTool=TauSelectorTight,
                StoreGateEntryName="DFTauTight",
                ContainerName="TauJets")
            ToolSvc += TauTightWrapper
        else:
            TauTightWrapper = getattr(ToolSvc, "TauTightWrapper")

        print(TauTightWrapper)
        TauAugmentationTools.append(TauTightWrapper)

    if TauAugmentationTools:
        Seq += CfgMgr.DerivationFramework__DerivationKernel(
            "TauAugmentationKernel" + Seq.name(),
            AugmentationTools=TauAugmentationTools)
Пример #4
0
#====================================================================
# CP GROUP TOOLS
#====================================================================
from MuonSelectorTools.MuonSelectorToolsConf import CP__MuonSelectionTool
TEST5MuonTool = CP__MuonSelectionTool(name="TEST5MuonTool")
ToolSvc += TEST5MuonTool
print TEST5MuonTool

#====================================================================
# AUGMENTATION TOOLS
#====================================================================
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
TEST5MuonToolWrapper = DerivationFramework__AsgSelectionToolWrapper(
    name="TEST5MuonToolWrapper",
    AsgSelectionTool=TEST5MuonTool,
    CutType="IDHits",
    StoreGateEntryName="TEST5GoodMuons",
    ContainerName="Muons")
ToolSvc += TEST5MuonToolWrapper
print TEST5MuonToolWrapper

#====================================================================
# SKIMMING TOOLS
#====================================================================
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool
expression = 'count((TEST5GoodMuons) && (Muons.pt > 10*GeV)) >= 1'
TEST5StringSkimmingTool = DerivationFramework__xAODStringSkimmingTool(
    name="TEST5StringSkimmingTool", expression=expression)
#expression = "EventInfo.eventNumber")

ToolSvc += TEST5StringSkimmingTool
Пример #5
0
# AUGMENTATION TOOLS
#====================================================================
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
from TauAnalysisTools.TauAnalysisToolsConf import TauAnalysisTools__TauSelectionTool
DFCommonTauWrapperTools = []

# Loose
DFCommonTausSelectorLoose = TauAnalysisTools__TauSelectionTool(
    name="DFCommonTausSelectorLoose")
DFCommonTausSelectorLoose.JetIDWP = 2
DFCommonTausSelectorLoose.SelectionCuts = 1 << 6
#TauAnalysisTools::CutJetIDWP should be used but issue with the dictionnary
ToolSvc += DFCommonTausSelectorLoose
DFCommonTausLooseWrapper = DerivationFramework__AsgSelectionToolWrapper(
    name="DFCommonTausLooseWrapper",
    AsgSelectionTool=DFCommonTausSelectorLoose,
    StoreGateEntryName="DFCommonTausLoose",
    ContainerName="TauJets")
ToolSvc += DFCommonTausLooseWrapper
print DFCommonTausLooseWrapper
DFCommonTauWrapperTools.append(DFCommonTausLooseWrapper)

# Medium
DFCommonTausSelectorMedium = TauAnalysisTools__TauSelectionTool(
    name="DFCommonTausSelectorMedium")
DFCommonTausSelectorMedium.JetIDWP = 3
DFCommonTausSelectorMedium.SelectionCuts = 1 << 6
ToolSvc += DFCommonTausSelectorMedium
DFCommonTausMediumWrapper = DerivationFramework__AsgSelectionToolWrapper(
    name="DFCommonTausMediumWrapper",
    AsgSelectionTool=DFCommonTausSelectorMedium,