16 """Main config method for LRT e-gamma decorations"""
31 if not hasattr(acc,
"ElectronChargeIDSelectorLoose"):
32 if ConfigFlags.Derivation.Egamma.addECIDS:
33 from ElectronPhotonSelectorTools.AsgElectronChargeIDSelectorToolConfig
import (
34 AsgElectronChargeIDSelectorToolCfg,
37 ElectronChargeIDSelector = acc.popToolsAndMerge(
39 ConfigFlags, name=
"ElectronChargeIDSelectorLoose"
42 ElectronChargeIDSelector.primaryVertexContainer =
"PrimaryVertices"
43 ElectronChargeIDSelector.TrainingFile = (
44 "ElectronPhotonSelectorTools/ChargeID/"
45 +
"ECIDS_20180731rel21Summer2018.root"
47 acc.addPublicTool(ElectronChargeIDSelector)
52 from DerivationFrameworkEGamma.EGammaToolsConfig
import (
53 EGElectronLikelihoodToolWrapperCfg,
60 if ConfigFlags.Derivation.Egamma.addECIDS:
61 LRTElectronPassECIDS = acc.getPrimaryAndMerge(
64 name=
"LRTElectronPassECIDS",
65 EGammaElectronLikelihoodTool=ElectronChargeIDSelector,
68 StoreGateEntryName=
"DFCommonElectronsECIDS",
69 ContainerName=
"LRTElectrons",
76 from DerivationFrameworkEGamma.EGammaToolsConfig
import EGCrackVetoCleaningToolCfg
78 LRTElectronPassCrackVeto = acc.getPrimaryAndMerge(
81 name=
"LRTElectronPassCrackVeto",
82 StoreGateEntryName=
"DFCommonCrackVetoCleaning",
83 ContainerName=
"LRTElectrons",
89 from DerivationFrameworkEGamma.EGammaToolsConfig
import EGElectronAmbiguityToolCfg
91 LRTElectronAmbiguity = acc.getPrimaryAndMerge(
94 name=
"LRTElectronAdditionnalAmbiguity",
95 idCut=
"DFCommonElectronsLHLooseNoPix",
96 ContainerName=
"LRTElectrons",
97 isMC=ConfigFlags.Input.isMC,
102 LRTEGAugmentationTools = [LRTElectronPassCrackVeto, LRTElectronAmbiguity]
103 if ConfigFlags.Derivation.Egamma.addECIDS:
104 LRTEGAugmentationTools.extend([LRTElectronPassECIDS])
108 if ConfigFlags.Input.isMC:
110 from MCTruthClassifier.MCTruthClassifierConfig
import MCTruthClassifierCfg
112 BkgElectronMCTruthClassifier = acc.popToolsAndMerge(
115 name=
"BkgElectronMCTruthClassifier",
116 ParticleCaloExtensionTool=
"",
119 acc.addPublicTool(BkgElectronMCTruthClassifier)
121 from DerivationFrameworkEGamma.EGammaToolsConfig
import (
122 BkgElectronClassificationCfg,
125 BkgLRTElectronClassificationTool = acc.getPrimaryAndMerge(
128 name=
"BkgLRTElectronClassificationTool",
129 MCTruthClassifierTool=BkgElectronMCTruthClassifier,
130 ElectronContainerName=
"LRTElectrons",
133 LRTEGAugmentationTools.append(BkgLRTElectronClassificationTool)
140 CompFactory.DerivationFramework.CommonAugmentation(
141 "EGammaLRTKernel", AugmentationTools=LRTEGAugmentationTools
148 from IsolationAlgs.DerivationTrackIsoConfig
import DerivationTrackIsoCfg
152 ConfigFlags, object_types=(
"Electrons",
"Muons"), postfix=
"LRT"
156 if not hasattr(acc,
"LRTElectronCaloIsolationBuilder"):
157 from IsolationAlgs.IsolationSteeringDerivConfig
import (
158 LRTElectronIsolationSteeringDerivCfg,
163 from IsolationAlgs.IsolationBuilderConfig
import egIsolationCfg
168 name=
"electronIsolationLRT",
171 ElectronCollectionContainerName=
"LRTElectrons",