name="EGAM2_TriggerSkimmingTool", TriggerListOR=triggers) ToolSvc += EGAM2_TriggerSkimmingTool print "EGAM2 trigger skimming tool:", EGAM2_TriggerSkimmingTool #================ # THINNING #================ thinningTools = [] # TO BE ADDED #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM2_GainDecoratorTool = GainDecorator() ToolSvc += EGAM2_GainDecoratorTool cluster_sizes = (3, 5), (5, 7), (7, 7), (7, 11) EGAM2_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR EGAM2_SkimmingTool = DerivationFramework__FilterCombinationOR( name="EGAM2SkimmingTool", FilterList=[EGAM2_OfflineSkimmingTool, EGAM2_TriggerSkimmingTool])
#layers_gains = ( "_Lr0", "_Lr1", "_Lr2", "_Lr3", # "_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG", # "_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG", # "_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" ) # #for cell in cells: # ExtraContentPhotons.append("Photons."+cell) # for layer in layers_gains: # ExtraContentPhotons.append("Photons."+cell+layer) # #for cell in cells: # ExtraContentElectrons.append("Electrons."+cell) # for layer in layers_gains: # ExtraContentElectrons.append("Electrons."+cell+layer) from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations GainDecoratorTool = GainDecorator() ExtraContentPhotons.extend(getGainDecorations(GainDecoratorTool)) ExtraContentElectrons.extend(getGainDecorations(GainDecoratorTool)) ExtraContentAll = ExtraContentElectrons + ExtraContentMuons + ExtraContentPhotons + ExtraContentGSFConversionVertices + ExtraContentHLTPhotons + ExtraContentPrimaryVertices ExtraContentAllTruth = ExtraElectronsTruth + ExtraMuonsTruth + ExtraPhotonsTruth ExtraContainersTruth = [ "TruthEvents", "TruthParticles", "TruthVertices", "AntiKt4TruthJets", "egammaTruthParticles", "MuonTruthParticles" #,"BTagging_AntiKt4TruthWZ" #,"AntiKt4TruthWZJets" ] ExtraContainersPhotons = [ "Photons",
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM9_SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="EGAM9_SkimmingTool", expression=expression) ToolSvc += EGAM9_SkimmingTool print "EGAM9 skimming tool:", EGAM9_SkimmingTool #==================================================================== # SET UP AUGMENTATIONS #==================================================================== #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM9_GainDecoratorTool = GainDecorator() ToolSvc += EGAM9_GainDecoratorTool cluster_sizes = (3, 5), (5, 7), (7, 7), (7, 11) EGAM9_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] #==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator EGAM9_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name="EGAM9_MaxCellDecoratorTool",
# Skimming criteria expression = 'count(EGAM8_DiElectronMass > 50.0*GeV)>=1' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM8SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "EGAM8SkimmingTool", expression = expression) ToolSvc += EGAM8SkimmingTool print "EGAM8 skimming tool:", EGAM8SkimmingTool #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM8_GainDecoratorTool = GainDecorator() ToolSvc += EGAM8_GainDecoratorTool cluster_sizes = (3,5), (5,7), (7,7), (7,11) EGAM8_ClusterEnergyPerLayerDecorators = [getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes] #==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator EGAM8_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name = "EGAM8_MaxCellDecoratorTool", SGKey_electrons = "Electrons", SGKey_photons = "Photons", )
triggers += ['HLT_e120_vloose' ] expression = '(' + ' || '.join(triggers) + ') && '+objectSelection print expression from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM7SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name = "EGAM7SkimmingTool", expression = expression) ToolSvc += EGAM7SkimmingTool print "EGAM7 skimming tool:", EGAM7SkimmingTool #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM7_GainDecoratorTool = GainDecorator() ToolSvc += EGAM7_GainDecoratorTool cluster_sizes = (3,5), (5,7), (7,7), (7,11) EGAM7_ClusterEnergyPerLayerDecorators = [getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes] #==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator EGAM7_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name = "EGAM7_MaxCellDecoratorTool", SGKey_electrons = "Electrons", SGKey_photons = "Photons", )
# Skimming criteria #expression = '( ( count(Photons.pt > 10*GeV) > 0 ) || ( count(Electrons.pt > 10*GeV) > 0 ) )' expression = 'count(EGAM1_DiElectronMass > 50.0*GeV)>=1 || count(EGAM1_DiElectronMass2 > 50.0*GeV)>=1 || count(EGAM1_DiElectronMass3 > 50.0*GeV)>=1 || count (EGAM1_ElectronPhotonMass > 50.0*GeV)>=1' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM1SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="EGAM1SkimmingTool", expression=expression) ToolSvc += EGAM1SkimmingTool print "EGAM1 skimming tool:", EGAM1SkimmingTool #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM1_GainDecoratorTool = GainDecorator() ToolSvc += EGAM1_GainDecoratorTool cluster_sizes = (3, 5), (5, 7), (7, 7), (7, 11) EGAM1_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] #==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator EGAM1_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name="EGAM1_MaxCellDecoratorTool",
#==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator HIGG1D1_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name = "HIGG1D1_MaxCellDecoratorTool", SGKey_electrons = "Electrons", SGKey_photons = "Photons" ) ToolSvc += HIGG1D1_MaxCellDecoratorTool #==================================================================== # Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations HIGG1D1_GainDecoratorTool = GainDecorator() #==================================================================== # CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS #==================================================================== # The name of the kernel (LooseSkimKernel in this case) must be unique to this derivation from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("HIGG1D1Kernel", SkimmingTools = [SkimmingToolHIGG1D1], AugmentationTools = [HIGG1D1_MaxCellDecoratorTool,HIGG1D1_GainDecoratorTool], ThinningTools = thinningTools ) #==================================================================== # SET UP STREAM #====================================================================
print EGAM6_ZEGMassTool # Skimming criteria #expression = '( ( count(Photons.pt > 10*GeV) > 0 ) || ( count(Electrons.pt > 10*GeV) > 0 ) )' expression = 'count(EGAM6_DiElectronMass > 60.0*GeV)>=1 || count(EGAM6_DiElectronMass2 > 60.0*GeV)>=1 || count(EGAM6_DiElectronMass3 > 60.0*GeV)>=1 || count (EGAM6_ElectronPhotonMass > 60.0*GeV)>=1' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM6SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="EGAM6SkimmingTool", expression=expression) ToolSvc += EGAM6SkimmingTool print "EGAM6 skimming tool:", EGAM6SkimmingTool #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM6_GainDecoratorTool = GainDecorator() ToolSvc += EGAM6_GainDecoratorTool cluster_sizes = (3, 5), (5, 7), (7, 7), (7, 11) EGAM6_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] #==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator EGAM6_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name="EGAM6_MaxCellDecoratorTool",
name="EGAM5_SkimmingTool", FilterList=[ EGAM5_TriggerSkimmingTool, EGAM5_OfflineSkimmingTool, EGAM5_ThirdSkimmingTool ]) ToolSvc += EGAM5_SkimmingTool #==================================================================== # DECORATION TOOLS #==================================================================== #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM5_GainDecoratorTool = GainDecorator() ToolSvc += EGAM5_GainDecoratorTool cluster_sizes = (3, 5), (5, 7), (7, 7), (7, 11) EGAM5_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] #==================================================================== # Max Cell sum decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__MaxCellDecorator EGAM5_MaxCellDecoratorTool = DerivationFramework__MaxCellDecorator( name="EGAM5_MaxCellDecoratorTool", SGKey_electrons="Electrons",
from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM4_SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="EGAM4_SkimmingTool", expression=skimmingExpression) ToolSvc += EGAM4_SkimmingTool print "EGAM4 skimming tool: ", EGAM4_SkimmingTool #==================================================================== # SET UP AUGMENTATIONS #==================================================================== #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== # GM: do we really need new, different tools: getClusterEnergyPerLayerDecoratorNew, getClusterEnergyPerLayerDecoratorMaxVar, getClusterEnergyPerLayerDecoratorMinVar? from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations, getClusterEnergyPerLayerDecoratorNew, getClusterEnergyPerLayerDecoratorMaxVar, getClusterEnergyPerLayerDecoratorMinVar EGAM4_GainDecoratorTool = GainDecorator() ToolSvc += EGAM4_GainDecoratorTool cluster_sizes = (3, 7), (5, 5), (7, 11) EGAM4_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] if DoCellReweighting: EGAM4_ClusterEnergyPerLayerDecorators += [ getClusterEnergyPerLayerDecoratorNew(neta, nphi)() for neta, nphi in cluster_sizes ] if DoCellReweightingVariations: EGAM4_ClusterEnergyPerLayerDecorators += [ getClusterEnergyPerLayerDecoratorMaxVar(neta, nphi)()
photon_quality = 'Photons.DFCommonPhotonsIsEMTight' else: photon_quality = 'Photons.Tight' expression = '(count(DFCommonPhotons_et>9.5*GeV)>=1 && count(EGAM3_DiElectronMass > 40.0*GeV)>=1) || (count(DFCommonPhotons_et>9.5*GeV && ' + photon_quality + ')>=1 && (count(EGAM3_DiElectronMass2 > 40.0*GeV)>=1 || count(EGAM3_DiElectronMass3 > 40.0*GeV)>=1))' from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool EGAM3SkimmingTool = DerivationFramework__xAODStringSkimmingTool( name="EGAM3SkimmingTool", expression=expression) ToolSvc += EGAM3SkimmingTool print "EGAM3 skimming tool:", EGAM3SkimmingTool #==================================================================== # Gain and cluster energies per layer decoration tool #==================================================================== from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations, getClusterEnergyPerLayerDecorator, getClusterEnergyPerLayerDecorations EGAM3_GainDecoratorTool = GainDecorator() ToolSvc += EGAM3_GainDecoratorTool cluster_sizes = (3, 5), (5, 7), (7, 7), (7, 11) EGAM3_ClusterEnergyPerLayerDecorators = [ getClusterEnergyPerLayerDecorator(neta, nphi)() for neta, nphi in cluster_sizes ] #================ # THINNING #================ thinningTools = [] # TO BE ADDED #=======================================