From 8b6300d04d22a3d5f600fe047ed80f99d62ce9a9 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Mon, 9 Nov 2020 16:18:58 +0100 Subject: [PATCH] HSG1DPDUtils: delete package Delete unused HSG1 D2PD maker. --- PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py | 18 +-- .../HSG1/HSG1DPDUtils/CMakeLists.txt | 14 -- .../HSG1/HSG1DPDUtils/python/HSG1Filter.py | 135 ------------------ .../HSG1/HSG1DPDUtils/share/DAOD_HSG1.py | 90 ------------ 4 files changed, 1 insertion(+), 256 deletions(-) delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/CMakeLists.txt delete mode 100755 PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/python/HSG1Filter.py delete mode 100644 PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/share/DAOD_HSG1.py diff --git a/PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py b/PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py index f388f6d054c..3aac061de77 100644 --- a/PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py +++ b/PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ##============================================================================= ## Name: D2PDFlags @@ -9,7 +9,6 @@ ## Description: Here, all neccessary job flags for the D2PDMaker ## are defined. ## -## $Id: D2PDFlags.py,v 1.2 2009/04/16 08:39:22 kkoeneke Exp $ ##============================================================================= __doc__ = """Here, all neccessary job flags for the D2PDMaker are defined.""" @@ -266,21 +265,6 @@ class WriteDAOD_JPSIHSG2Stream(JobProperty): jobproperties.D2PDFlags.add_JobProperty(WriteDAOD_JPSIHSG2Stream) listAODtoD2PD.append(WriteDAOD_JPSIHSG2Stream.StreamName) -class WriteDAOD_HSG1Stream(JobProperty): - """Produce DAOD_HSG1""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = "DAOD_HSG1" - FileName = "" - DPDMakerScript = "HSG1DPDUtils/DAOD_HSG1.py" - ApplyThinning = True - ApplySlimming = True - CreateControlPlots = False - pass -jobproperties.D2PDFlags.add_JobProperty(WriteDAOD_HSG1Stream) -listAODtoD2PD.append(WriteDAOD_HSG1Stream.StreamName) - class WriteDAOD_HWWStream(JobProperty): """Produce DAOD_HWW""" statusOn = True diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/CMakeLists.txt b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/CMakeLists.txt deleted file mode 100644 index bda8c9aa1d6..00000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################################################ -# Package: HSG1DPDUtils -################################################################################ - -# Declare the package name: -atlas_subdir( HSG1DPDUtils ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Tools/PyJobTransformsCore ) - -# Install files from the package: -atlas_install_python_modules( python/*.py ) - diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/python/HSG1Filter.py b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/python/HSG1Filter.py deleted file mode 100755 index 78fc1aec5f7..00000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/python/HSG1Filter.py +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -##============================= -## Name: HSG1Filter -## -## Author: James Saxon -## Created: February 2013 -##============================= - -__doc__ = "Perform the HSG1 preselection." -__author__ = "James Saxon" - -import AthenaPython.PyAthena as PyAthena -from AthenaPython.PyAthena import StatusCode - -from PrimaryDPDMaker import PrimaryDPDHelpers - -## Import the module that allows to use named units, e.g. GeV -import AthenaCommon.SystemOfUnits as Units - -# ---- Load the egammaPID and egammaParameters information -# This is needed to always be up-to-date with the egamma -# IsEM selections and also the author selections -from ROOT import egammaPID -from ROOT import egammaParameters - -from math import fabs - - -####################################################### -#### THIS CLASS DEFINES THE PHOTON SELECTION #### -####################################################### - -class HSG1PreselectionFilter( PyAthena.AthFilterAlgorithm ): - - """ - This class performs (most of) the HSG1 preselection. - """ - - def __init__ ( self, name = "HSG1PreselectionFilter", **kw ): - - ## initialize base class - kw['name'] = name - super(HSG1PreselectionFilter, self).__init__(**kw) - - ## Define the cuts - self.photonCollectionType = kw.get('photonCollectionType', "PhotonContainer") - self.photonCollectionName = kw.get('photonCollectionName', "PhotonAODCollection") - - ## Get the storgate handle - self.storeGateSvc = None - - - def initialize(self): - self.msg.info( '************************************' ) - self.msg.info( '==> initialize %s...', self.name() ) - self.msg.info( 'Will apply the following cuts:' ) - self.msg.info( ' photonCollectionName = %r', self.photonCollectionName ) - self.msg.info( '************************************' ) - - ## Also, declare some counters and initialize them to zero - self.nProcessed = 0 - self.nLeading = 0 - self.nTotal = 0 - self.nPassed = 0 - - ## Get the StoreGate service - self.storeGateSvc = PyAthena.py_svc('StoreGateSvc') - if self.storeGateSvc is None: - self.msg.error("Problem retrieving StoreGateSvc pointer !!") - return StatusCode.Failure - - return StatusCode.Success - - def execute(self): - - self.nProcessed += 1 - self.nLeading = 0 - self.nTotal = 0 - self.msg.debug( '==> execute %s on %r. event...' % (self.name(), self.nProcessed) ) - - #--- Photons! - photonCollection = None - try: - - photonCollection = self.storeGateSvc.retrieve( self.photonCollectionType, - self.photonCollectionName ) - for photon in photonCollection : - - if photon.isem(egammaPID.PhotonLoose): - continue - - if photon.isem(0x800000): - continue - - if photon.isgoodoq(34214): - continue - -# eta = fabs(photon.cluster().etaBE(2)) -# if 1.37 < eta < 1.55 or 2.37 < eta: -# continue - - # using > 5% as a (very) conservative max(alpha) - if photon.hlv().perp() > 37.*Units.GeV: - self.nLeading += 1 - - if photon.hlv().perp() > 27.*Units.GeV: - self.nTotal += 1 - - except LookupError: - self.msg.warning( 'Collection %s not found' % self.photonCollectionName ) - - if self.nLeading and self.nTotal >= 2: - self.msg.debug( '%s event passed' % self.name() ) - self.setFilterPassed(True) - self.nPassed += 1 - - else: - self.msg.debug( '%s event failed' % self.name() ) - self.setFilterPassed(False) - - return StatusCode.Success - - - def finalize(self): - self.msg.info( '==> finalize %s...' % self.name() ) - self.msg.info( '***************************************************************' ) - self.msg.info( 'Cut-flow table of %s skimming algorithm:' % self.name() ) - self.msg.info( '-------------' ) - self.msg.info( ' Number of processed events: %r' % self.nProcessed ) - - self.msg.info( ' Number of events passed : %r' % self.nPassed ) - - return StatusCode.Success - diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/share/DAOD_HSG1.py b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/share/DAOD_HSG1.py deleted file mode 100644 index d0cb9f83318..00000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/share/DAOD_HSG1.py +++ /dev/null @@ -1,90 +0,0 @@ -##=================================== -## Name: DAOD_HSG1 -## -## Author: James Saxon -## Created: February 2013 -##=================================== - -__doc__ = "Perform the HSG1 preselection." -__author__ = "James Saxon" - -#if this file is already inlcuded, don't include it again -include.block("DAOD_HSG1.py") - - -from AthenaCommon.AlgSequence import AlgSequence -import AthenaPython.PyAthena as PyAthena -from AthenaPython.PyAthena import StatusCode - -## for messaging -from AthenaCommon.Logging import logging -DAOD_EGammaStream_msg = logging.getLogger( 'DAOD_EGammaStream' ) - -## Import the module that allows to use named units, e.g. GeV -import AthenaCommon.SystemOfUnits as Units - -## Include the job property flags for this package and from RecExCommon -from PrimaryDPDMaker.PrimaryDPDFlags import primDPD -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -## This handles multiple output streams -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - - -##==================================================================== -## Define the skimming (event selection) for the ZEEPHO DAOD output stream -##==================================================================== -from PrimaryDPDMaker.TriggerFilter import TriggerFilter -from D2PDMaker.D2PDMakerConf import D2PDVertexSelector - -topSequence += TriggerFilter("DAODM_HSG1_EF_g35_loose_g25_loose", trigger = "EF_g35_loose_g25_loose") - -topSequence += D2PDVertexSelector("DAODM_HSG1_VertexFilter", - inputCollection = 'VxPrimaryCandidate', - minNumberVxTracks = 2) - -from HSG1DPDUtils.HSG1Filter import HSG1PreselectionFilter -topSequence += HSG1PreselectionFilter("DAODM_HSG1_PreselectionFilter") - -# book-keeping for these three pieces.... -hsg1FilterBookkeeping = ["DAODM_HSG1_EF_g35_loose_g25_loose", - "DAODM_HSG1_VertexFilter", - "DAODM_HSG1_PreselectionFilter"] - - -##### DO I NEED TO DO THIS??? -# streamName = primDPD.WriteDAOD_ZEEGAMMAStream.StreamName -# fileName = buildFileName( primDPD.WriteDAOD_ZEEGAMMAStream ) -# if primDPD.isVirtual() == False: -# DAOD_EGammaStream = MSMgr.NewPoolStream( streamName, fileName ) -# pass -# if primDPD.isVirtual() == True: -# DAOD_EGammaStream = MSMgr.NewVirtualStream( streamName, fileName ) -# pass - - -#--------------------------------------------------- -# Add the containers to the output stream -#--------------------------------------------------- -from D2PDMaker.D2PDFlags import D2PDFlags -from D2PDMaker.D2PDHelpers import buildFileName -fileName = buildFileName( D2PDFlags.WriteDAODM_HSG1Stream ) -streamName = D2PDFlags.WriteDAODM_HSG1Stream.StreamName - -DAOD_EGammaStream = MSMgr.NewPoolStream( streamName, fileName ) - -# Only events that pass the filters listed below are written out -# AcceptAlgs = logical OR of filters -# RequireAlgs = logical AND of filters -# SkimmedOutputStream.AcceptAlgs( [""] ) -DAOD_EGammaStream.RequireAlgs( [ "DAODM_HSG1_EF_g35_loose_g25_loose", - "DAODM_HSG1_VertexFilter", - "DAODM_HSG1_PreselectionFilter"] ) - -DAOD_EGammaStream.AddOtherAlgsToBookkeep( hsg1FilterBookkeeping ) - -excludeList = [] -from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput -dpdOutput.addAllItemsFromInputExceptExcludeList( streamName, excludeList ) - - -- GitLab