diff --git a/PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py b/PhysicsAnalysis/D2PDMaker/python/D2PDFlags.py index f388f6d054cfc74b7df8bb481b17696986e4927a..3aac061de773ebdbf6ac424ee77b166e69481592 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/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py index b829d14cc2abecd1e4d1fe4292caada049fde385..43c38f292f76a9667aa7c52a2233b623f63c2ae6 100644 --- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py +++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/CoreCommonD3PD.py @@ -189,12 +189,6 @@ from D3PDMakerConfig.CommonJSD3PD import AddHadronicInfo #AddHadronicInfo(ExtendedJetD3PDObject, ['Tau1','Tau2','Tau3', 'ZCUT12', 'ZCUT23','ZCUT34','Dip12', 'Dip13', 'Dip23','DipExcl12','PlanarFlow','Angularity'], theblockname = 'substructureblocks', level=99) -#from HSG5DPDUtils.HSG5D3PD import addSTRUCTCalib -#addSTRUCTCalib('AntiKt4TopoEMJetsReTagged', input='Topo', mainParam=0.4) -#addSTRUCTCalib('AntiKt6TopoEMJetsReTagged', input='Topo', mainParam=0.6) -#addSTRUCTCalib('AntiKt4LCTopoJetsReTagged', input='Topo', mainParam=0.4) -#addSTRUCTCalib('AntiKt6LCTopoJetsReTagged', input='Topo', mainParam=0.6) - #from JetD3PDMaker import JetMomentFillerTool #ExtendedJetD3PDObject.defineBlock(99, 'splitInfoBlock', JetMomentFillerTool,Moments= ['SPLIT12', 'SPLIT23', 'SPLIT34']) diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/CMakeLists.txt deleted file mode 100644 index 23ac26b20f201dbbc43f80258869109c7b8dec4c..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -################################################################################ -# Package: HiggsD3PDMaker -################################################################################ - -# Declare the package name: -atlas_subdir( HiggsD3PDMaker ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Control/AthenaKernel - GaudiKernel - PhysicsAnalysis/AnalysisCommon/ParticleEvent - PhysicsAnalysis/D3PDMaker/D3PDMakerUtils - PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event - Tracking/TrkEvent/VxVertex ) - -# Component(s) in the package: -atlas_add_component( HiggsD3PDMaker - src/*.cxx - src/components/*.cxx - LINK_LIBRARIES AthenaKernel GaudiKernel ParticleEvent D3PDMakerUtils HSG2Event VxVertex ) - -# Install files from the package: -atlas_install_python_modules( python/*.py ) - diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/HSG2QuadrupletD3PDObject.py b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/HSG2QuadrupletD3PDObject.py deleted file mode 100644 index 4f379a7dd061ba34d190045e18ba946e08fdf16b..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/HSG2QuadrupletD3PDObject.py +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# $Id: HSG2QuadrupletD3PDObject.py 520030 2012-10-03 10:11:57Z krasznaa $ - -# D3PDMaker import(s): -from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject -from D3PDMakerCoreComps.IndexAssociation import IndexAssociation -from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation -from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation -import HiggsD3PDMaker -import EventCommonD3PDMaker - -# Hook setting up the vertex reconstruction in the pre-sequence: -def __vertexReco( c, **kw ): - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - from AthenaCommon.AlgSequence import AlgSequence - from HSG2VertexCreation.HSG2VertexReconstruction import HSG2VertexReconstruction - HSG2VertexReconstruction( "HSG2VertexReconstruction", - AlgSequence( D3PDMakerFlags.PreD3PDAlgSeqName() ) ) - return - -# Create the D3PDObject: -HSG2QuadrupletD3PDObject = make_SGDataVector_D3PDObject( "QuadrupletContainer", - "QuadrupletCandidates", - "quad_", - "HSG2QuadrupletD3PDObject" ) - -# Define the vertex reconstruction hook: -HSG2QuadrupletD3PDObject.defineHook( __vertexReco ) - -# The basic information: -HSG2QuadrupletD3PDObject.defineBlock( 0, "BaseInfo", - HiggsD3PDMaker.QuadrupletFillerTool ) - -# Associate the reconstructed vertices: -VtxAssoc = IndexAssociation( HSG2QuadrupletD3PDObject, - HiggsD3PDMaker.QuadrupletVertexAssociationTool, - target = "quad_vertex_", - blockname = "VertexIndex", - prefix = "vtx_", - level = 1 ) - -# Associate the CombinedParticles: -CombAssoc = SimpleAssociation( HSG2QuadrupletD3PDObject, - HiggsD3PDMaker.QuadrupletCompositeParticleAssociationTool, - blockname = "CombPartMatch", - prefix = "cbpart_", - level = 1 ) - -# Save the 4-momentum of the combined particles: -CombAssoc.defineBlock( 1, "ComPart4Mom", - EventCommonD3PDMaker.FourMomFillerTool ) - -# Save the indices of all the electrons that took part in the combination: -ElAssoc = IndexMultiAssociation( CombAssoc, - EventCommonD3PDMaker.CompositeParticleAssociationTool, - target = "el_", - blockname = "ElectronIndex", - prefix = "el_", - level = 2 ) - -# Save the indices of all the MuID muons that took part in the combination: -MuidAssoc = IndexMultiAssociation( CombAssoc, - EventCommonD3PDMaker.CompositeParticleAssociationTool, - target = "mu_muid_", - blockname = "MuonMuidIndex", - prefix = "mu_muid_", - level = 2 ) - -# Save the indices of all the Staco muons that took part in the combination: -StacoAssoc = IndexMultiAssociation( CombAssoc, - EventCommonD3PDMaker.CompositeParticleAssociationTool, - target = "mu_staco_", - blockname = "MuonStacoIndex", - prefix = "mu_staco_", - level = 2 ) - -# Save the indices of all the Calo muons that took part in the combination: -CaloAssoc = IndexMultiAssociation( CombAssoc, - EventCommonD3PDMaker.CompositeParticleAssociationTool, - target = "mu_calo_", - blockname = "MuonCaloIndex", - prefix = "mu_calo_", - level = 2 ) - -# Save the indices of all the third chain muons that took part in the combination: -MuonAssoc = IndexMultiAssociation( CombAssoc, - EventCommonD3PDMaker.CompositeParticleAssociationTool, - target = "mu_muon_", - blockname = "MuonIndex", - prefix = "mu_muon_", - level = 2 ) diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/HSG2VertexReconstruction.py b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/HSG2VertexReconstruction.py deleted file mode 100644 index 0ee55ddb65e7869bb8f8207b63ef613b1c500307..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/HSG2VertexReconstruction.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration - -# $Id: HSG2VertexReconstruction.py 520030 2012-10-03 10:11:57Z krasznaa $ -# -# The function is this module adds all the information to a D3PD stream -# about the lepton quadruplets and vertices reconstructed while making -# the HSG2 D3PDs. -# - -## -# @short Function adding information about re-fitted 4-lepton vertices -# -# @param d3pdalg The D3PDMaker algorithm/stream to add the info to -# @param quadruplet_key The SG key of the reconstructed lepton quadruplets -# @param vertex_key The SG key of the re-fitted 4-lepton vertices -# @param electron_target Prefix of electrons taking part in the lepton combinations -# @param muid_target Prefix of the MuID muons taking part in the lepton combinations -# @param staco_target Prefix of the Staco muons taking part in the lepton combinations -# @param calo_target Prefix of the Calo muons taking part in the lepton combinations -def addHSG2VertexReconstruction( d3pdalg, - quadruplet_key = "QuadrupletCandidates", - vertex_key = "QuadrupletVertexCandidates", - electron_target = "el_", - muid_target = "mu_muid_", - staco_target = "mu_staco_", - calo_target = "mu_calo_", - muon_target = "mu_muon_" ): - - # Add information about the vertices separately: - from TrackD3PDMaker.xAODVertexD3PDObject import PrimaryxAODVertexD3PDObject - d3pdalg += PrimaryxAODVertexD3PDObject( 1, sgkey = vertex_key, - prefix = "quad_vertex_" ) - - # Add the information about the quadruplets: - from HiggsD3PDMaker.HSG2QuadrupletD3PDObject import HSG2QuadrupletD3PDObject - d3pdalg += HSG2QuadrupletD3PDObject( 10, sgkey = quadruplet_key, - prefix = "quad_", - VertexIndex_target = "quad_vertex_", - ElectronIndex_target = electron_target, - MuonMuidIndex_target = muid_target, - MuonStacoIndex_target = staco_target, - MuonCaloIndex_target = calo_target, - MuonIndex_target = muon_target ) - - return diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/__init__.py b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/__init__.py deleted file mode 100644 index 59ef0d52ee62d35b4964ab4ab06433ac2c484193..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/python/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# $Id: __init__.py 485019 2012-02-24 16:16:04Z krasznaa $ -# -# @file HiggsD3PDMaker/python/__init__.py -# @author scott snyder <snyder@bnl.gov> -# @date Sep, 2009 -# @brief Define shortcuts for referencing configurables in this package. -# -# With this, instead of writing -# -# HiggsD3PDMaker.HiggsD3PDMakerConf.D3PD__QuadrupletFillerTool -# -# we can write -# -# HiggsD3PDMaker.QuadrupletFillerTool -# - -import HiggsD3PDMakerConf -for k, v in HiggsD3PDMakerConf.__dict__.items(): - if k.startswith ('D3PD__'): - globals()[k[6:]] = v diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletCompositeParticleAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletCompositeParticleAssociationTool.cxx deleted file mode 100644 index 876c00852dd99cb15f64bb3bc9ddaacee0c93520..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletCompositeParticleAssociationTool.cxx +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletCompositeParticleAssociationTool.cxx 485019 2012-02-24 16:16:04Z krasznaa $ - -// Local include(s): -#include "QuadrupletCompositeParticleAssociationTool.h" - -namespace D3PD { - - QuadrupletCompositeParticleAssociationTool::QuadrupletCompositeParticleAssociationTool( const std::string& type, - const std::string& name, - const IInterface* parent ) - : SingleAssociationTool< HSG2::Quadruplet, CompositeParticle >( type, name, parent ) { - - } - - const CompositeParticle* QuadrupletCompositeParticleAssociationTool::get( const HSG2::Quadruplet& q ) { - - return *( q.particle() ); - } - -} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletCompositeParticleAssociationTool.h b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletCompositeParticleAssociationTool.h deleted file mode 100644 index b3c7581e31fa2224b80464a3741094e2ae9fc272..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletCompositeParticleAssociationTool.h +++ /dev/null @@ -1,45 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletCompositeParticleAssociationTool.h 485019 2012-02-24 16:16:04Z krasznaa $ -#ifndef HIGGSD3PDMAKER_QuadrupletCompositeParticleAssociationTool_H -#define HIGGSD3PDMAKER_QuadrupletCompositeParticleAssociationTool_H - -// EDM include(s): -#include "HSG2Event/Quadruplet.h" -#include "ParticleEvent/CompositeParticle.h" - -// D3PD include(s): -#include "D3PDMakerUtils/SingleAssociationTool.h" - -namespace D3PD { - - /** - * @short Tool "associating" Quadruplet objects to a VxCandiadte - * - * - * @author Kirill.Prokofiev@cern.ch - * - * $Revision: 485019 $ - * $Date: 2012-02-24 17:16:04 +0100 (Fri, 24 Feb 2012) $ - */ - class QuadrupletCompositeParticleAssociationTool : - public SingleAssociationTool< HSG2::Quadruplet, CompositeParticle > { - - public: - /// Regular AlgTool constructor - QuadrupletCompositeParticleAssociationTool( const std::string& type, - const std::string& name, - const IInterface* parent ); - - /// Function performing the association - virtual const CompositeParticle* get( const HSG2::Quadruplet& q ); - - }; // class QuadrupletCompositeParticleAssociationTool - -} // namespace D3PD - -#endif // HIGGSD3PDMAKER_QuadrupletCompositeParticleAssociationTool_H diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletFillerTool.cxx deleted file mode 100644 index 91f7fed5af69b86e7bc3208f377ffe5172396c60..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletFillerTool.cxx +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletFillerTool.cxx 500852 2012-05-15 15:01:24Z ssnyder $ - -// Athena/Gaudi include(s): -#include "AthenaKernel/errorcheck.h" - -// Local include(s): -#include "QuadrupletFillerTool.h" - -namespace D3PD { - - QuadrupletFillerTool::QuadrupletFillerTool( const std::string& type, - const std::string& name, - const IInterface* parent ) - : BlockFillerTool< HSG2::Quadruplet >( type, name, parent ) - { - book().ignore(); // Avoid coverity warnings. - } - - StatusCode QuadrupletFillerTool::book() { - - CHECK( addVariable( "finalState", m_fs, "Final state type (0: 4 muon; " - "1: 4 electron; 2: 2e2mu)" ) ); - - return StatusCode::SUCCESS; - } - - StatusCode QuadrupletFillerTool::fill( const HSG2::Quadruplet& q ) { - - *m_fs = static_cast< unsigned int >( q.finalState() ); - - return StatusCode::SUCCESS; - } - -} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletFillerTool.h b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletFillerTool.h deleted file mode 100644 index 9af466bf6080b8eb227e261cd739d316d7bad1f3..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletFillerTool.h +++ /dev/null @@ -1,57 +0,0 @@ -// This file's extension implies that it's C, but it's really -*- C++ -*-. - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletFillerTool.h 485019 2012-02-24 16:16:04Z krasznaa $ -/** - * @file HiggsD3PDMaker/src/HiggsQuadrupletFillerTool.h - * @author Kirill Prokofiev <Kirill.Prokofiev@cern.ch> - * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> - * @date Aug, 2009 - * @brief Block filler tool for a four-momentum. - */ -#ifndef HIGGSD3PDMAKER_QuadrupletFillerTool_H -#define HIGGSD3PDMAKER_QuadrupletFillerTool_H - -// EDM include(s): -#include "HSG2Event/Quadruplet.h" - -// D3PDMaker include(s): -#include "D3PDMakerUtils/BlockFillerTool.h" - -namespace D3PD { - - /** - * @brief Block filler for the Higgs quadruplet - * - * Block filler tool for the information stored directly in - * HSG2::Quadruplet objects. - * - * @author Kirill Prokofiev <Kirll.Prokofiev@cern.ch> - * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> - * - * $Revision: 485019 $ - * $Date: 2012-02-24 17:16:04 +0100 (Fri, 24 Feb 2012) $ - */ - class QuadrupletFillerTool : public BlockFillerTool< HSG2::Quadruplet > { - - public: - /// Standard Gaudi tool constructor - QuadrupletFillerTool( const std::string& type, const std::string& name, - const IInterface* parent ); - - /// Book variables for this block. - virtual StatusCode book(); - /// Fill the variables of this block - virtual StatusCode fill( const HSG2::Quadruplet& q ); - - private: - unsigned int* m_fs; ///< Quadruplet final state type - - }; // class QuadrupletFillerTool - -} // namespace D3PD - -#endif // HIGGSD3PDMAKER_QuadrupletFillerTool_H diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletVertexAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletVertexAssociationTool.cxx deleted file mode 100644 index e807fe133c30c56a3c8160aa76e83bf78e85eb00..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletVertexAssociationTool.cxx +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletVertexAssociationTool.cxx 485019 2012-02-24 16:16:04Z krasznaa $ - -// Local include(s): -#include "QuadrupletVertexAssociationTool.h" - -namespace D3PD { - - QuadrupletVertexAssociationTool::QuadrupletVertexAssociationTool( const std::string& type, - const std::string& name, - const IInterface* parent ) - : SingleAssociationTool< HSG2::Quadruplet, Trk::VxCandidate >( type, name, parent ) { - - } - - const Trk::VxCandidate* QuadrupletVertexAssociationTool::get( const HSG2::Quadruplet& q ) { - - return *( q.vertex() ); - } - -} // namespace D3PD diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletVertexAssociationTool.h b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletVertexAssociationTool.h deleted file mode 100644 index 8de48c06cd5218443af3ed3c8463caa6c310a67b..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/QuadrupletVertexAssociationTool.h +++ /dev/null @@ -1,45 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletVertexAssociationTool.h 485019 2012-02-24 16:16:04Z krasznaa $ -#ifndef HIGGSD3PDMAKER_QuadrupletVertexAssociationTool_H -#define HIGGSD3PDMAKER_QuadrupletVertexAssociationTool_H - -// EDM include(s): -#include "HSG2Event/Quadruplet.h" -#include "VxVertex/VxCandidate.h" - -// D3PD include(s): -#include "D3PDMakerUtils/SingleAssociationTool.h" - -namespace D3PD { - - /** - * @short Tool "associating" Quadruplet objects to a VxCandiadte - * - * - * @author Kirill.Prokofiev@cern.ch - * - * $Revision: 485019 $ - * $Date: 2012-02-24 17:16:04 +0100 (Fri, 24 Feb 2012) $ - */ - class QuadrupletVertexAssociationTool : - public SingleAssociationTool< HSG2::Quadruplet, Trk::VxCandidate > { - - public: - /// Regular AlgTool constructor - QuadrupletVertexAssociationTool( const std::string& type, - const std::string& name, - const IInterface* parent ); - - /// Function performing the association - virtual const Trk::VxCandidate* get( const HSG2::Quadruplet& q ); - - }; // class QuadrupletVertexAssociationTool - -} // namespace D3PD - -#endif // HIGGSD3PDMAKER_QuadrupletVertexAssociationTool_H diff --git a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/components/HiggsD3PDMaker_entries.cxx b/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/components/HiggsD3PDMaker_entries.cxx deleted file mode 100644 index 9f7045593815e1b0db80e0a13027dc5abdfe805e..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/HiggsD3PDMaker/src/components/HiggsD3PDMaker_entries.cxx +++ /dev/null @@ -1,8 +0,0 @@ -#include "../QuadrupletFillerTool.h" -#include "../QuadrupletVertexAssociationTool.h" -#include "../QuadrupletCompositeParticleAssociationTool.h" - -DECLARE_COMPONENT( D3PD::QuadrupletFillerTool ) -DECLARE_COMPONENT( D3PD::QuadrupletVertexAssociationTool ) -DECLARE_COMPONENT( D3PD::QuadrupletCompositeParticleAssociationTool ) - diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py deleted file mode 100644 index 6c67b681d58a0163cf3be3d7afb863a767d2a684..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagJSMaker.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from JetRec.JetGetters import * -from JetRec.JetRecFlags import jetFlags -from JetRecTools.JetRecToolsConf import * -from AthenaCommon.AlgSequence import AlgSequence -from JetRec.JetMomentGetter import add_jetMoments_to_JetAlg, make_JetMomentGetter -from JetRec.JetRecConf import JetSorterTool -import JetSubStructure - -from HSG5DPDUtils.JSjets import * - -### overload function from HSG5DPDUtils.JSjets to be able tag truth jets - -def jtsetupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq): - if rec.doTruth(): - myGroomingTools, catNames = getGroomingTools(GroomedDicts) - - sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3) - -### tagging truth subjets - subjets_names = [x for x in catNames if "Subjets" in x] - btag_tool = [] - if subjets_names != '': - from JetRec.JetGetters import getStandardBTaggerTool - from JetRec.JetRecFlags import jetFlags - jetFlags.doBTagging = True - _btag_tool = getStandardBTaggerTool('AntiKt', 0.4, 'Truth') - if len(_btag_tool) > 0: - btag_tool += [ JetSubStructure.JetAlgToolWrapper(name = 'JetBTagger_' + ''.join(subjets_names) - , JetAlgTool = _btag_tool[0], - GroomedjetsAuthor = subjets_names ) ] - jetFlags.doBTagging = False - - - assoc_tool_truth = JetSubStructure.JetAssociationTool( - name = 'JetAssocToolTruth', - GroomingTools = myGroomingTools, UsedSignalState = 2, - JetAlgTools = [sortertool]+btag_tool, OutputLevel = 3 - ) - - myjetgetter_truth = make_StandardJetGetter(myjetfinder, - myjetdr, 'Truth', - seq = theseq, doCalib=False , - addDefaultMoment=False) - - truthcontname = myjetgetter_truth.outputKey() - - make_JetMomentGetter(truthcontname , [assoc_tool_truth], theseq ) - - return [ truthcontname, catNames ] - else: - return [ None, None ] - - -def jtcreateJSJets( ParentDict, GroomedDicts, theseq = AlgSequence()) : - - if type(ParentDict) != dict: - raise TypeError("ParentDict must be a dict!") - - if type(GroomedDicts) != list: - raise TypeError("GroomedDicts must be a list!") - - myjetfinder = ParentDict["JetFinder"] - myjetdr = ParentDict["JetdR"] - myjetinput = ParentDict["JetInput"] - - if myjetinput == 'Truth': - return jtsetupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq) - elif myjetinput == 'Track': - return setupTrackJets(myjetfinder, myjetdr, GroomedDicts, theseq) - else : - return setupCaloJets(myjetfinder, myjetdr, myjetinput, GroomedDicts, theseq) diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py deleted file mode 100644 index 6b7f3986df884cd2b4eaea7562d43ee75164aac3..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/share/JetTagD3PD_configFatJets.py +++ /dev/null @@ -1,24 +0,0 @@ -include.block("JetTagD3PDMaker/JetTagD3PD_configFatJets.py") - -from JetRec.JetRecFlags import jetFlags -jetFlags.doBTagging = False - -### -from HSG5DPDUtils.JSjets import getGroomingTools - -from HSG5DPDUtils.GroomedJetsConfig import getGroomedJetsConfig -dictsConfig = getGroomedJetsConfig() - -sj_n = [] -for dC in dictsConfig: - myjetfinder = dC[0]["JetFinder"] - myjetdr = dC[0]["JetdR"] - myjetinput = dC[0]["JetInput"] - myGroomingTools, catNames = getGroomingTools(dC[1]) - sj_n += [(myjetfinder+"%d"%(myjetdr*10) + myjetinput+x) for x in catNames if "Subjets" in x] - -from BTagging.BTaggingFlags import BTaggingFlags -for sj in sj_n: - BTaggingFlags.Jets += [sj] - BTaggingFlags.JetsWithInfoPlus += [sj] - BTaggingFlags.CalibrationChannelAliases += [sj+"->AntiKt4LCTopo" ] diff --git a/PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py b/PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py deleted file mode 100644 index 7964da34f617c696e7029dd505d8fa39a64f903e..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/D3PDMaker/PhysicsD3PDMaker/share/FatJetsConfig.py +++ /dev/null @@ -1,34 +0,0 @@ -include.block("PhysicsD3PDMaker/FatJetsConfig.py") - -from JetRec.JetRecFlags import jetFlags -jetFlags.doBTagging = False -jetFlags.inputFileType = 'AOD' - -preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) - -### -from HSG5DPDUtils.JSjets import createJSJets,getGroomingTools - -from HSG5DPDUtils.GroomedJetsConfig import getGroomedJetsConfig -dictsConfig = getGroomedJetsConfig() - -sj_n = [] -for dC in dictsConfig: - myjetfinder = dC[0]["JetFinder"] - myjetdr = dC[0]["JetdR"] - myjetinput = dC[0]["JetInput"] - myGroomingTools, catNames = getGroomingTools(dC[1]) - sj_n += [(myjetfinder+"%d"%(myjetdr*10) + myjetinput+x) for x in catNames if "Subjets" in x] - -from BTagging.BTaggingFlags import BTaggingFlags -for sj in sj_n: - BTaggingFlags.Jets += [sj] - BTaggingFlags.JetsWithInfoPlus += [sj] - BTaggingFlags.CalibrationChannelAliases += [sj+"->AntiKt4LCTopo" ] - -include("BTagging/BTagging_LoadTools.py") - -myJetKeys = [] -for dC in dictsConfig: - xx = createJSJets(dC[0], dC[1], preseq) - myJetKeys += [xx] diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/CMakeLists.txt b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/CMakeLists.txt deleted file mode 100644 index a7b1945b350690bffac8676ed3623c6269eb1678..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -################################################################################ -# Package: HSG1AnalysisCommon -################################################################################ - -# Declare the package name: -atlas_subdir( HSG1AnalysisCommon ) - -# Install files from the package: -atlas_install_joboptions( share/*.py ) - diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/share/HSG1_CommonJobOptions.py b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/share/HSG1_CommonJobOptions.py deleted file mode 100644 index 7ff39d4b27e4e498564b56e1b03a14621b680b39..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/share/HSG1_CommonJobOptions.py +++ /dev/null @@ -1,602 +0,0 @@ -## --------------------------------------------------------- -## PhotonAnalysisUtils -## --------------------------------------------------------- - -# Author: Marcello Fanti -# Milano, August 2007 - -## input AOD files must be defined at the bottom of this file... -## ---------------------------------------------------------- - -MessageSvc.OutputLevel = ERROR -MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M" -MessageSvc.warningLimit = 9999999 -MessageSvc.infoLimit = 9999999 -MessageSvc.debugLimit = 9999999 -MessageSvc.verboseLimit = 9999999 - -from AthenaServices.AthenaServicesConf import AthenaEventLoopMgr -AthenaEventLoopMgr.OutputLevel = WARNING - -from AthenaCommon.AppMgr import ServiceMgr - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUanalysis -theJob += PAUanalysis() -theJob.PAUanalysis.UseTrigger = UseTrigger -theJob.PAUanalysis.OnlyTriggerDecision = False -theJob.PAUanalysis.EnforceTriggerLogicalFlow = EnforceTriggerLogicalFlow -theJob.PAUanalysis.ElectronContainerName = ElectronContainer -theJob.PAUanalysis.MuonContainerName = MuonContainer -theJob.PAUanalysis.CaloCellContainer = CaloCells -theJob.PAUanalysis.doTrack = DumpTracks -theJob.PAUanalysis.doEtCone = DumpAdditionalEtCones -theJob.PAUanalysis.doCell = DumpCells -theJob.PAUanalysis.doCluster = DumpClusters - -if ( TriggerNames == 'R14' ) : - theJob.PAUanalysis.TriggerSignatures = [ "g20" , - "g20i" , - "2g20" , - "g25" , - "g105" , - "g10" ] -if ( TriggerNames == 'R15' ) : - theJob.PAUanalysis.TriggerSignatures = [ "g20_loose" , - "g20i_loose" , - "2g20_loose" , - "g25_loose" , - "g105" , - "g10_loose" ] - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUdumper -ToolSvc += PAUdumper() -ToolSvc.PAUdumper.DumpNtuple = DumpNtuple - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUhggUserDataTool -ToolSvc += PAUhggUserDataTool() -ToolSvc.PAUhggUserDataTool.DumpNtuple = DumpNtuple - -# theJob.PAUanalysis.DumpTruth = 2 # dump truth tree in file dumpTruth.txt (BIG! ~ 200 K/evt) -theJob.PAUanalysis.OutputLevel = INFO -theJob.PAUanalysis.EgDetailContainerName = PhotonsDetailsContainerName - -# theJob.PAUanalysis.UsePAUtruthMatchingTool = True - -# here if you want to set which process you are analysing... - -from PhotonAnalysisUtils.PAUanalysisCodes import PAUanalysisCodes -#PAUanalysis.AnalysisCode = PAUanalysisCodes["gluongluon"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["VBF"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["WHprod"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["ZHprod"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["ttHprod"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["QCDgammagamma"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["QCDgammajet"] -#PAUanalysis.AnalysisCode = PAUanalysisCodes["QCDjetjet"] - -### The related algtools ### -from AthenaCommon.AppMgr import ToolSvc - -########################################################################################################## -# Configure the extrapolator -########################################################################################################## -from TrkExTools.AtlasExtrapolator import AtlasExtrapolator -theAtlasExtrapolator=AtlasExtrapolator(name = 'egammaExtrapolator') -theAtlasExtrapolator.DoCaloDynamic = False # this turns off dynamic calculation of eloss in calorimeters -# all left to MaterialEffects/EnergyLossUpdators - -MaterialEffectsUpdator = CfgMgr.Trk__MaterialEffectsUpdator -AtlasMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'AtlasMaterialEffectsUpdator') -ToolSvc += AtlasMaterialEffectsUpdator #default material effects updator -NoElossMaterialEffectsUpdator = MaterialEffectsUpdator(name = 'NoElossMaterialEffectsUpdator') -NoElossMaterialEffectsUpdator.EnergyLoss = False -ToolSvc += NoElossMaterialEffectsUpdator - -#setup MaterialEffectsUpdator arrays -MyUpdators = [] -MyUpdators += [ToolSvc.AtlasMaterialEffectsUpdator] # for ID -MyUpdators += [ToolSvc.NoElossMaterialEffectsUpdator] # for Calo -#MyUpdators += [ToolSvc.NoElossMaterialEffectsUpdator] # for muon - -MySubUpdators = [] -MySubUpdators += [ToolSvc.AtlasMaterialEffectsUpdator.name()] # for ID -MySubUpdators += [ToolSvc.NoElossMaterialEffectsUpdator.name()] # for Calo -MySubUpdators += [ToolSvc.NoElossMaterialEffectsUpdator.name()] # for muon - -theAtlasExtrapolator.MaterialEffectsUpdators = MyUpdators -theAtlasExtrapolator.SubMEUpdators = MySubUpdators -ToolSvc+=theAtlasExtrapolator - -# moved to PAUhybridPrimaryVertexTool theJob.PAUanalysis.ExtrapolationTool=theAtlasExtrapolator - -from CaloDetDescr.CaloDepthToolBase import CaloDepthToolFactory -theCaloDepthTool=CaloDepthToolFactory(depth='cscopt2') -theCaloDepthTool.DepthChoice="cscopt2" -#theCaloDepthTool=CaloDepthToolFactory(depth='cscopt') -ToolSvc += theCaloDepthTool - -# add tool ExtrapolateTrackToCalo -exToCalo = CfgMgr.ExtrapolateToCaloTool(Extrapolator = theAtlasExtrapolator,CaloDepthTool=theCaloDepthTool.getFullName()) -ToolSvc+=exToCalo -#print exToCalo - -#ToolSvc.ExtrapolateToCaloTool.CaloDepthTool.DepthChoice = "egparametrized" -ToolSvc.ExtrapolateToCaloTool.OutputLevel = INFO -# -#print "------------------------------------------------->>>extrapolToCalo<<<---------------------------------------------------" -#print ToolSvc.ExtrapolateToCaloTool.CaloDepthTool -#print ToolSvc.ExtrapolateToCaloTool.CaloDepthTool.DepthChoice -#print exToCalo -#print "------------------------------------------------->>>extrapolToCalo<<<---------------------------------------------------" - - -########################################################################################################## - - -########################################################################################################## -# Configure the InDetConversionFinder -############################################################################################################ - -theAtlasMagField = CfgMgr.Trk__MagneticFieldTool('theAtlasMagField') -ToolSvc += theAtlasMagField - -from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool -theAtlasTrackSummaryTool = AtlasTrackSummaryTool("theAtlasTrackSummaryTool") - -ToolSvc += theAtlasTrackSummaryTool - -from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter -InDetConversionVxFitterTool = Trk__TrkVKalVrtFitter(name = "InDetConversionVxFitter", - # Extrapolator = InDetExtrapolator, - Extrapolator = theAtlasExtrapolator, - IterationNumber = 30, - #MagFieldSvc = InDetMagField, - MagFieldSvc = theAtlasMagField, - Robustness = 6, -#This line has no more meaning Constraint = 12, - usePhiCnst = True, - useThetaCnst = True, - InputParticleMasses = [0.511,0.511], - MassForConstraint = 2., - VertexForConstraint = [0.,0.,0.], - CovVrtForConstraint = [0.015*0.015,0.,0.015*0.015,0.,0.,10000.*10000.], - MakeExtendedVertex=True - # MakeExtendedVertex=False -# IterationPrecision = 1.e-5, - ) - -ToolSvc += InDetConversionVxFitterTool -print InDetConversionVxFitterTool - -#next instruction no more useful but keep it for a while -#theJob.PAUanalysis.VertexFitterTool = InDetConversionVxFitterTool - - - -###### Vertex fitter : need to put a second instance to prevent perturbation to convFlag value ###### -#this is the standard one -from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter -InDetConversionVxFitterTool = Trk__TrkVKalVrtFitter(name = "InDetConversionVxFitter", - Extrapolator = theAtlasExtrapolator, - IterationNumber = 30, - MagFieldSvc = theAtlasMagField, - Robustness = 6, - usePhiCnst = True, - useThetaCnst = True, - InputParticleMasses = [0.511,0.511], - MakeExtendedVertex=True, - FirstMeasuredPoint=True - ) - -###### Vertex fitter : need to put a second instance to prevent perturbation to convFlag value ##### -#This is the one for HybridPrimaryVertex -from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter -InDetConversionVxFitterToolBis = Trk__TrkVKalVrtFitter(name = "InDetConversionVxFitterBis", - Extrapolator = theAtlasExtrapolator, - IterationNumber = 30, - MagFieldSvc = theAtlasMagField, - Robustness = 6, - usePhiCnst = True, - useThetaCnst = True, - InputParticleMasses = [0.511,0.511], - MakeExtendedVertex=True, - FirstMeasuredPoint=True - ) - -ToolSvc += InDetConversionVxFitterToolBis -#next line is debugging mode, for providing feedback to Vadim if some bugs are found. -#ToolSvc.InDetConversionVxFitterBis.OutputLevel= DEBUG -print InDetConversionVxFitterToolBis - -# Distance of minimum approach utility -# -from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__SeedNewtonTrkDistanceFinder -InDetConversionTrkDistanceFinder = Trk__SeedNewtonTrkDistanceFinder(name = 'InDetConversionTrkDistanceFinder') -ToolSvc += InDetConversionTrkDistanceFinder -print InDetConversionTrkDistanceFinder - -# Straight line propagator needed to clean-up single track conversions -# -from TrkExSlPropagator.TrkExSlPropagatorConf import Trk__StraightLinePropagator as Propagator -InDetConversionPropagator = Propagator(name = 'InDetConversionPropagator') -ToolSvc += InDetConversionPropagator -print InDetConversionPropagator - -# Helper Tool -# -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionFinderUtils -InDetConversionHelper = InDet__ConversionFinderUtils(name = "ConversionFinderUtils") -ToolSvc += InDetConversionHelper -print InDetConversionHelper - -# Track selector tool -# -from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetConversionTrackSelectorTool -InDetConversionTrackSelector = InDet__InDetConversionTrackSelectorTool(name = "ConversionTrackSelector", - Extrapolator = theAtlasExtrapolator, - maxSiD0 = 10000., #50., #50.0, # 10000., - maxTrtD0 = 10000., #100., #100., # 10000., - maxSiZ0 = 10000., #350.0, # 10000., - maxTrtZ0 = 10000., #1400., # 10000., - minPt = 500.0, - RatioCut1 = 0.0, #0.5, #0.5, # 0., - RatioCut2 = 0.1, #0.1, # 0., - RatioCut3 = 0.1) #0.05) # 0., maxSiD0 = 50.0, - -# maxTrtD0 = 100., -# maxSiZ0 = 10000., -# maxTrtZ0 = 10000., -# minPt = 500.0, -# RatioCut1 = 0., #0.5, -# RatioCut2 = 0., #0.1, -# RatioCut3 = 0.) #0.05) - -ToolSvc += InDetConversionTrackSelector -print InDetConversionTrackSelector - -# Track pairs selector -# -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__TrackPairsSelector -InDetConversionTrackPairsSelector = InDet__TrackPairsSelector(name = "ConversionTrackPairsSelector", - ConversionFinderHelperTool = InDetConversionHelper, - DistanceTool = InDetConversionTrkDistanceFinder, - MaxFirstHitRadius = 500., - MaxDistBetweenTracks = [10.,50.,50.],#[6.,90.,30.], - MaxEta = [.3,.5,.5]) #[0.5,0.9,0.4], -# MaxInitDistance = [350.,640.,80.]) - -ToolSvc += InDetConversionTrackPairsSelector -print InDetConversionTrackPairsSelector - -# Vertex point estimator -# -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator -InDetConversionVtxPointEstimator = InDet__VertexPointEstimator(name = "ConversionVtxPointEstimator", -# MaxTrkXYDiffAtVtx = [6.,8.,2.], -# MaxTrkZDiffAtVtx = [80.,380.,80.], -# MaxTrkXYValue = [450.,650.,400.], -# MinArcLength = [30.,80.,350.], -# MaxArcLength = [600.,650.,680.], -# MaxChi2OfVtxEstimation = 20.) - MinDeltaR = [-5.,-25.,-50.], - MaxDeltaR = [5.,10.,10.], - MaxPhi = [0.05, 0.1, 0.1]) -ToolSvc += InDetConversionVtxPointEstimator -print InDetConversionVtxPointEstimator - -# Conversion post selector -# -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionPostSelector -InDetConversionPostSelector = InDet__ConversionPostSelector(name = "ConversionPostSelector", - # MaxChi2PerTrack = [400., 100., 80.], # [10000.,10000.,10000.], #[40.,50.,25.], - MaxChi2Vtx = [50., 50., 50.], - MaxInvariantMass = [10000., 10000., 10000.], #[60., 60., 30.], # [10000.,10000.,10000.], #[60.,50.,25.], - MinFitMomentum = [0., 0., 0.], #[2000., 2000., 2000.], # [0.,0.,0.], #[2000.,2000.,2000.], - MinRadius = [-10000., -10000., -10000.], #[30., 35., 250.], # [0.,0.,0.], #[30.,35.,350.], - MinPt = 0., # 500., - MaxdR = -10000., #-250.) # -10000.) #-100. - MaxPhiVtxTrk = 10000.) -ToolSvc += InDetConversionPostSelector -print InDetConversionPostSelector - -# Single track conversion tool -# -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__SingleTrackConversionTool -InDetSingleTrackConversion = InDet__SingleTrackConversionTool(name = "SingleTrackConversionTool", - ConversionFinderHelperTool = InDetConversionHelper, - #TrackSummaryTool = InDetTrackSummaryTool, - TrackSummaryTool = theAtlasTrackSummaryTool, - MinInitialHitRadius = 70., - MinRatioOfHLhits = 0.95)#0.5) -ToolSvc += InDetSingleTrackConversion -print InDetSingleTrackConversion - -############################################################################################################ -#for the second instance : for HybridPrimaryVertex -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools -InDetConversionFinderToolsBis = InDet__InDetConversionFinderTools(name = "InDetConversionFinderToolsBis", -#next line : don't put Bis to prevent conflict with HybridPrimaryVertex - VertexFitterTool = InDetConversionVxFitterTool, - TrackSelectorTool = InDetConversionTrackSelector, - TrackPairsSelector = InDetConversionTrackPairsSelector, - ConversionFinderHelperTool = InDetConversionHelper, - VertexPointEstimator = InDetConversionVtxPointEstimator, - PostSelector = InDetConversionPostSelector, - SingleTrackConversionTool = InDetSingleTrackConversion, - Extrapolator = theAtlasExtrapolator, - TrackParticleCollection = "TrackParticleCandidate", - RemoveTrtTracks = False, - IsConversion = True) -ToolSvc += InDetConversionFinderToolsBis -print InDetConversionFinderToolsBis - -#This is the standard one -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools -InDetConversionFinderTools = InDet__InDetConversionFinderTools(name = "InDetConversionFinderTools", - VertexFitterTool = InDetConversionVxFitterTool, - TrackSelectorTool = InDetConversionTrackSelector, - TrackPairsSelector = InDetConversionTrackPairsSelector, - ConversionFinderHelperTool = InDetConversionHelper, - VertexPointEstimator = InDetConversionVtxPointEstimator, - PostSelector = InDetConversionPostSelector, - SingleTrackConversionTool = InDetSingleTrackConversion, - #Extrapolator = InDetExtrapolator, - Extrapolator = theAtlasExtrapolator, - TrackParticleCollection = "TrackParticleCandidate", - RemoveTrtTracks = False, - IsConversion = True) -ToolSvc += InDetConversionFinderTools -print InDetConversionFinderTools - - - -############################################################################################################ -#for the second instance -from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools -InDetConversionFinderToolsBis = InDet__InDetConversionFinderTools(name = "InDetConversionFinderToolsBis", - VertexFitterTool = InDetConversionVxFitterToolBis, - TrackSelectorTool = InDetConversionTrackSelector, - TrackPairsSelector = InDetConversionTrackPairsSelector, - ConversionFinderHelperTool = InDetConversionHelper, - VertexPointEstimator = InDetConversionVtxPointEstimator, - PostSelector = InDetConversionPostSelector, - SingleTrackConversionTool = InDetSingleTrackConversion, - Extrapolator = theAtlasExtrapolator, - TrackParticleCollection = "TrackParticleCandidate", - RemoveTrtTracks = False, - IsConversion = True) -ToolSvc += InDetConversionFinderToolsBis -print InDetConversionFinderToolsBis -############################################################################################################ - -from TrkMagFieldTools.TrkMagFieldToolsConf import Trk__MagneticFieldTool -theAtlasMagField = Trk__MagneticFieldTool('theAtlasMagField') -ToolSvc += theAtlasMagField - -###### Vertex fitter ###### -from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter -InDetConversionVxFitterTool = Trk__TrkVKalVrtFitter(name = "InDetConversionVxFitter", - # Extrapolator = InDetExtrapolator, - Extrapolator = theAtlasExtrapolator, - IterationNumber = 30, - #MagFieldSvc = InDetMagField, - MagFieldSvc = theAtlasMagField, - Robustness = 6, -#This line has no more meaning Constraint = 12, - usePhiCnst = True, - useThetaCnst = True, - InputParticleMasses = [0.511,0.511], - MassForConstraint = 2., - VertexForConstraint = [0.,0.,0.], - CovVrtForConstraint = [0.015*0.015,0.,0.015*0.015,0.,0.,10000.*10000.]) -ToolSvc += InDetConversionVxFitterTool - -#################################################################################################################### - - - -from TrackToVertex.TrackToVertexConf import Reco__TrackToVertex -TrackToVertexTool = Reco__TrackToVertex() -ToolSvc += TrackToVertexTool - -from TrkExTools.AtlasExtrapolator import AtlasExtrapolator -EMTrackIsolationExtrapolator = AtlasExtrapolator() -ToolSvc+=EMTrackIsolationExtrapolator - -from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool -EMTrackIsolationTrackSummaryTool = AtlasTrackSummaryTool() -ToolSvc += EMTrackIsolationTrackSummaryTool - -from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool -OuterTrackIsolationTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(name = "OuterTrackIsolationTrackSelectorTool", - pTMin = 1000., - IPd0Max = 1.*mm, - IPz0Max = 9999., - nHitBLayer = 1, - nHitPix = 0, - nHitSct = 0, - nHitSi = 7, - #TrtMaxEtaAcceptance = 0, #don't check nb TRT hits - nHitTrt = 0, - #nSharedBLayer = 999, - #nSharedPix = 999, - #nSharedSct = 999, - #nSharedSi = 999, - useTrackQualityInfo = False, - #d0MaxPreselection = 9999., - TrackSummaryTool = EMTrackIsolationTrackSummaryTool, - Extrapolator = EMTrackIsolationExtrapolator, - OutputLevel = WARNING) -ToolSvc += OuterTrackIsolationTrackSelectorTool -OuterTrackIsolationTrackSelectorTool.OutputLevel = INFO - -InnerTrackIsolationTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(name = "InnerTrackIsolationTrackSelectorTool", - pTMin = 1000., - IPd0Max = 1.*mm, - IPz0Max = 9999., - nHitBLayer = 1, - nHitPix = 0, - nHitSct = 0, - nHitSi = 7, - #TrtMaxEtaAcceptance = 0, #don't check nb TRT hits - nHitTrt = 0, - #nSharedBLayer = 999, - #nSharedPix = 999, - #nSharedSct = 999, - #nSharedSi = 999, - useTrackQualityInfo = False, - #d0MaxPreselection = 9999., - TrackSummaryTool = EMTrackIsolationTrackSummaryTool, - Extrapolator = EMTrackIsolationExtrapolator, - OutputLevel = WARNING) -ToolSvc += InnerTrackIsolationTrackSelectorTool -InnerTrackIsolationTrackSelectorTool.OutputLevel = INFO - -from TrackIsolationTools.TrackIsolationToolsConf import TrackIsolationTool -NewTrackIsolationTool = TrackIsolationTool( - name = "NewTrackIsolationTool", - DoTrackIsolation = True, - DoSumConversionTracks = False, - InnerCone = 0.1, - PtMaxInnerCone = 99999999., - UseInnerConeTrkSelection = True, - TrackParticleCollection = "TrackParticleCandidate", - ConversionContainer = "ConversionCandidate", - CaloCellContainer = CaloCells, # ESD: "AllCalo", AOD: "AODCellContainer" - TrackSelector = OuterTrackIsolationTrackSelectorTool, - InnerConeTrackSelector = InnerTrackIsolationTrackSelectorTool, - TrackToVertex = TrackToVertexTool, - DeltaRTolerance = 0. -) -ToolSvc += NewTrackIsolationTool -NewTrackIsolationTool.OutputLevel = ERROR - -print "---------------> NewTrackIsolation" -print NewTrackIsolationTool - -#################################################################################################################### - - - - - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUphotonIdentificationTool -ToolSvc += PAUphotonIdentificationTool() -ToolSvc.PAUphotonIdentificationTool.EgDetailContainerName = PhotonsDetailsContainerName - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUphotonCorrectionTool -ToolSvc += PAUphotonCorrectionTool() -ToolSvc.PAUphotonCorrectionTool.OutputLevel = INFO - -if not 'doReRunEgamma' in dir(): #to be used by PAUphotonSelector only - doReRunEgamma = False - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUphotonSelector -ToolSvc += PAUphotonSelector() -ToolSvc.PAUphotonSelector.OutputLevel = INFO -#ToolSvc.PAUphotonSelector.doRecovery = True -ToolSvc.PAUphotonSelector.PhotonContainer = PhotonContainerMerged -ToolSvc.PAUphotonSelector.TrackIsolationTool = NewTrackIsolationTool -ToolSvc.PAUphotonSelector.UsePhotonRecoveryTool = usePhotonRecoveryTool -ToolSvc.PAUphotonSelector.UsePAUconversionFlagTool = usePAUconversionFlagTool -ToolSvc.PAUphotonSelector.EgDetailContainerName = PhotonsDetailsContainerName -ToolSvc.PAUphotonSelector.RemovePhotonWithoutEgDetail = doReRunEgamma - -#FANTI ToolSvc.PAUphotonSelector.LoopOverElectronContainer = LoopOverElectronContainer -# --- Photon selection: -#ToolSvc.PAUphotonSelector.GammaTypeNames = [ "unconv" ] # default is [ "unconv" , "conv1" , "conv2" ] -#ToolSvc.PAUphotonSelector.PtIsolationCut = ... # Pt cut in MeV (default is 4000; negative value for not using isolation tool) -#ToolSvc.PAUphotonSelector.PhotonIDbyCuts = ... # photon ID (default==0 use isem(PhotonTight); >0 use G.Unal's itune ; -1 use likelihood) -#ToolSvc.PAUphotonSelector.PhotonIDlogLHcut = ... # set cut for photon ID loglikelihood (default==9.4; works if PhotonIDbyCuts==-1) -# --- Event selection: -#ToolSvc.PAUphotonSelector.PtCut1 = ... # inclusive selection: pt cut (MeV) for leading photon (default is 40 GeV) -#ToolSvc.PAUphotonSelector.PtCut2 = ... # inclusive selection: pt cut (MeV) for sub-leading photon (default is 25 GeV) -# --- printout -#ToolSvc.PAUphotonSelector.DumpReco = True # dump reco e/gammas in file dumpReco.txt (~ 0.8 K/evt) -#ToolSvc.PAUphotonSelector.FileEventSummary = "myEventSummary.txt" # comment out to switch off event summary -#ToolSvc.PAUphotonSelector.FileEventDetails = "myEventDetails.txt" # comment out to switch off event details -#ToolSvc.PAUphotonSelector.DumpTriggerDecision = True # dump at INFO level, default is False - -if doESD: - from McParticleTools.McParticleToolsConf import TruthParticleCnvTool - TruthParticleCnvTool.McEvents = MCEventCollection - TruthParticleCnvTool.TruthParticlesOutput = MCParticleContainer - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUtruthTool -ToolSvc += PAUtruthTool() -ToolSvc.PAUtruthTool.OutputLevel = INFO -# --- Truth handling: -#ToolSvc.PAUtruthTool.EGammasFromTruth = True # all e/gamma are kept (otherwise only gammas from H->gg) (default is true) -#ToolSvc.PAUtruthTool.MuonsFromTruth = True # all muons are kept (default is true) -#ToolSvc.PAUtruthTool.HadronsFromTruth = True # all hadrons are kept (default is true) -#ToolSvc.PAUtruthTool.PartonsFromTruth = True # all partons are kept (default is false) -#ToolSvc.PAUtruthTool.RTruthConv = ... # maximum conversion/interaction radius (in mm, default is 800) -#ToolSvc.PAUtruthTool.ZTruthConv = ... # maximum conversion/interaction z (in mm, default is 2800) -#ToolSvc.PAUtruthTool.PtTruthCut = ... # reject truth particles produced with pt<PtTruthCut (in MeV) -#ToolSvc.PAUtruthTool.deltaRmatch = ... # deltaR for angular Reco/Truth match (default is 0.1) -# --- Containers' SG keys -ToolSvc.PAUtruthTool.MCParticleContainer = MCParticleContainer -ToolSvc.PAUtruthTool.MCEventCollection = MCEventCollection -ToolSvc.PAUtruthTool.TruthJetsContainer = TruthJetsContainer -ToolSvc.PAUtruthTool.ConvertFromESD = doESD - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUtruthMatchingTool -ToolSvc += PAUtruthMatchingTool() -ToolSvc.PAUtruthMatchingTool.OutputLevel = INFO - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUconversionFlagTool -ToolSvc += PAUconversionFlagTool() -ToolSvc.PAUconversionFlagTool.ExtrapolateToCaloToolName=exToCalo.name() -#ToolSvc.PAUconversionFlagTool.VertexFinderToolName= InDetConversionFinderTools.getFullName() -ToolSvc.PAUconversionFlagTool.VertexFinderToolName= InDetConversionFinderToolsBis.getFullName() -ToolSvc.PAUconversionFlagTool.OutputLevel = INFO -#ToolSvc.PAUconversionFlagTool.useBDT=True -#ToolSvc.PAUconversionFlagTool.BDTCut=0.2 -#ToolSvc.PAUconversionFlagTool.DBTFileName="TMVAnalysis_BDT.weights.txt" - -ToolSvc.PAUconversionFlagTool.SingleTrkConvTool = InDetSingleTrackConversion - - - - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUhybridPrimaryVertexTool - -ToolSvc += PAUhybridPrimaryVertexTool() - -from CaloDetDescr.CaloDepthToolBase import CaloDepthToolFactory -hybridCaloDepthTool=CaloDepthToolFactory(depth='cscopt2') -#showerdefault -ToolSvc.PAUhybridPrimaryVertexTool.CaloDepthTool=hybridCaloDepthTool.getFullName() - -ToolSvc.PAUhybridPrimaryVertexTool.ExtrapolationTool=theAtlasExtrapolator -ToolSvc.PAUhybridPrimaryVertexTool.OutputLevel= INFO -ToolSvc.PAUhybridPrimaryVertexTool.SingleTrkConvTool = InDetSingleTrackConversion -#ToolSvc.PAUhybridPrimaryVertexTool.VertexFitterTool = InDetConversionVxFitterTool -ToolSvc.PAUhybridPrimaryVertexTool.VertexFitterTool = InDetConversionVxFitterToolBis -ToolSvc.PAUhybridPrimaryVertexTool.ExtrapolateToCaloToolName=exToCalo.name() -ToolSvc.PAUhybridPrimaryVertexTool.VertexFinderToolName= InDetConversionFinderToolsBis.getFullName() - - - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUtrackIsolationTool -ToolSvc += PAUtrackIsolationTool() -ToolSvc.PAUtrackIsolationTool.ExtrapolationTool=theAtlasExtrapolator - -from PhotonAnalysisUtils.PhotonAnalysisUtilsConf import PAUhggFitter -ToolSvc += PAUhggFitter() -ToolSvc.PAUhggFitter.ExtrapolationTool=theAtlasExtrapolator - -from AthenaCommon import CfgMgr -CfgMgr.PAUanalysis(SingleTrkConvTool = InDetSingleTrackConversion) - - - - - - - - - - - - diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/share/README b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/share/README deleted file mode 100644 index b2a171e47edc8d5fb9a234a45b7feba4f1f1ea9e..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1AnalysisCommon/share/README +++ /dev/null @@ -1 +0,0 @@ -HSG1_CommonJobOptions.py is for PAU82, release 16.0.0, and 15.6.2 diff --git a/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/CMakeLists.txt b/PhysicsAnalysis/HiggsPhys/HSG1/HSG1DPDUtils/CMakeLists.txt deleted file mode 100644 index bda8c9aa1d6eac8d57441e197b0672f1a7a1ccb1..0000000000000000000000000000000000000000 --- 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 78fc1aec5f784ec31c2b5ab0ef6f2263ad3d1b42..0000000000000000000000000000000000000000 --- 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 d0cb9f833188d5540e9f89007c4ee6277124c6b3..0000000000000000000000000000000000000000 --- 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 ) - - diff --git a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/CMakeLists.txt b/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/CMakeLists.txt deleted file mode 100644 index 7dadb666fbb3d83b733ec14746944a313edf48fc..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -################################################################################ -# Package: HSG2Event -################################################################################ - -# Declare the package name: -atlas_subdir( HSG2Event ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthLinks - Control/AthenaKernel - PhysicsAnalysis/AnalysisCommon/ParticleEvent - Tracking/TrkEvent/VxVertex ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_library( HSG2Event - src/*.cxx - PUBLIC_HEADERS HSG2Event - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthLinks AthenaKernel ParticleEvent VxVertex - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) - -atlas_add_dictionary( HSG2EventDict - HSG2Event/HSG2EventDict.h - HSG2Event/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthenaKernel ParticleEvent VxVertex HSG2Event ) - diff --git a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/HSG2EventDict.h b/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/HSG2EventDict.h deleted file mode 100644 index 7d7a9ed131edd2224617f4982c24779141c5aec8..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/HSG2EventDict.h +++ /dev/null @@ -1,15 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: HSG2EventDict.h 484888 2012-02-24 11:20:26Z krasznaa $ -#ifndef HSG2EVENT_HSG2EVENTDICT_H -#define HSG2EVENT_HSG2EVENTDICT_H - -// Local include(s): -#include "HSG2Event/QuadrupletContainer.h" -#include "HSG2Event/Quadruplet.h" - -#endif // HSG2EVENT_HSG2EVENTDICT_H diff --git a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/Quadruplet.h b/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/Quadruplet.h deleted file mode 100644 index 39d51c6919eaedef2728dffa079278cf1646ad4b..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/Quadruplet.h +++ /dev/null @@ -1,96 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: Quadruplet.h 485033 2012-02-24 16:54:50Z krasznaa $ -#ifndef HSG2Event_Quadruplet_H -#define HSG2Event_Quadruplet_H - -// EDM include(s): -#include "AthLinks/ElementLink.h" -#include "VxVertex/VxContainer.h" -#include "ParticleEvent/CompositeParticleContainer.h" - -/** - * @short Namespace for HSG2 related classes - * - * To play nice, we put (almost) all the classes used in the - * Athena codes of the HSG2 (H->ZZ) group into this namespace. - * - * @author Kirill Prokofiev <Kirill.Prokofiev@cern.ch> - * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> - * - * $Revision: 485033 $ - * $Date: 2012-02-24 17:54:50 +0100 (Fri, 24 Feb 2012) $ - */ -namespace HSG2 { - - /** - * @short Type definition used for 4-lepton quadruplets - * - * It might look better inside the Quadruplet class, but - * oh well... It's just a simple listing of 4-lepton - * types that the analysis uses. - */ - enum FinalState { - fs_4mu = 0, ///< 4 muon final state - fs_4e = 1, ///< 4 electron final state - fs_2e2mu = 2, ///< 2 electron - 2 muon final state - fs_undef = 100 ///< Undefined final state, needed for technical reasons - }; // enum FinalState - - /** - * @class HSG2::Quadruplet.h - * @short Top level object defining lepton quadruplets - * - * Multi-lepton objects can in principle simply be created using - * the CompositeParticle class on its own. The reason why we need - * this class is that we want to associate the 4-lepton composite - * objects with the vertex objects that were reconstructed using - * their tracks. - * - * @author Kirill Prokofiev <Kirill.Prokofiev@cern.ch> - * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> - * - * $Revision: 485033 $ - * $Date: 2012-02-24 17:54:50 +0100 (Fri, 24 Feb 2012) $ - */ - class Quadruplet { - - public: - /// Default constructor needed for persistency - Quadruplet(); - /// Constructor specifying all properties of the object - Quadruplet( const ElementLink< CompositeParticleContainer >& particle, - const ElementLink< VxContainer >& vertex, - FinalState fs ); - - /// Get the composite particle describing this quadruplet - const ElementLink< CompositeParticleContainer >& particle() const; - /// Get the vertex created from the lepton tracks - const ElementLink< VxContainer >& vertex() const; - /// Get the type of the quadruplet - FinalState finalState() const; - - /// Set the composite particle describing this quadruplet - void setParticle( const ElementLink< CompositeParticleContainer >& comb ); - /// Set the vertex created from the lepton tracks - void setVertex( const ElementLink< VxContainer >& vertex ); - /// Set the type of the quadruplet - void setFinalState( FinalState fs ); - - protected: - /// Link to the composite particle holding the 4 leptons - ElementLink< CompositeParticleContainer > m_particle; - /// Link to the vertex reconstructed from the leptons - ElementLink< VxContainer > m_vertex; - /// Decoded final state enumeration to be used during event processing - FinalState m_finalState; - - }; // class Quadruplet - -}//end of namespace definitions - -#endif /// HSG2Event_Quadruplet_H diff --git a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/QuadrupletContainer.h b/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/QuadrupletContainer.h deleted file mode 100644 index 26db4c336f84dc79592af4cbc0c60b3a5cd6dbea..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/QuadrupletContainer.h +++ /dev/null @@ -1,44 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: QuadrupletContainer.h 485033 2012-02-24 16:54:50Z krasznaa $ -#ifndef HSG2Event_QuadrupletContainer_H -#define HSG2Event_QuadrupletContainer_H - -// Gaudi/Athena include(s): -#include "AthContainers/DataVector.h" -#include "AthenaKernel/CLASS_DEF.h" -#include "AthenaKernel/BaseInfo.h" - -// Local include(s): -#include "Quadruplet.h" - -/** - * @class QuadrupletContainer - * @short Container for reconstructed quadruplets - * - * Such containers can be put into StoreGate to hold the - * 4-lepton candidates that were reconstructed by some algorithm. - * - * @author Kirill Prokofiev <Kirill.Prokofiev@cern.ch> - * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> - * - * $Revision: 485033 $ - * $Date: 2012-02-24 17:54:50 +0100 (Fri, 24 Feb 2012) $ - */ -class QuadrupletContainer : public DataVector< HSG2::Quadruplet > { - -public: - /// Constructor with ownership policy - QuadrupletContainer( SG::OwnershipPolicy own = SG::OWN_ELEMENTS ) - : DataVector< HSG2::Quadruplet >( own ) {} - -}; // class QuadrupletContainer - -CLASS_DEF( QuadrupletContainer, 1146749485, 1 ) -SG_BASE( QuadrupletContainer, DataVector<HSG2::Quadruplet> ); - -#endif // HSG2Event_QuadrupletContainer_H diff --git a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/selection.xml b/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/selection.xml deleted file mode 100644 index f4acce9c38932587ec80d7f71abd93de4a8828d5..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/HSG2Event/selection.xml +++ /dev/null @@ -1,6 +0,0 @@ -<lcgdict> - - <class name="QuadrupletContainer" id="6C9EEE63-6415-4A3A-A31D-1F9E11264008" /> - <class name="HSG2::Quadruplet" /> - -</lcgdict> diff --git a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/src/Quadruplet.cxx b/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/src/Quadruplet.cxx deleted file mode 100644 index f169cb40fe111a9887af0509deb40ddd4a088ecb..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG2/HSG2Event/src/Quadruplet.cxx +++ /dev/null @@ -1,96 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: Quadruplet.cxx 485033 2012-02-24 16:54:50Z krasznaa $ - -// EDM include(s): -#include "VxVertex/VxCandidate.h" -#include "ParticleEvent/CompositeParticle.h" - -// Local include(s): -#include "../HSG2Event/Quadruplet.h" - -namespace HSG2 { - - Quadruplet::Quadruplet() - : m_particle(), m_vertex(), m_finalState( fs_undef ) { - - } - - /** - * @param particle The CombinedParticle holding the 4 leptons - * @param vertex The vertex reconstructed from the lepton tracks - * @param fs The final state type - */ - Quadruplet::Quadruplet( const ElementLink< CompositeParticleContainer >& particle, - const ElementLink< VxContainer >& vertex, - FinalState fs ) - : m_particle( particle ), m_vertex( vertex ), m_finalState( fs ) { - - } - - /** - * @returns The CombinedParticle holding the 4 leptons - */ - const ElementLink< CompositeParticleContainer >& Quadruplet::particle() const { - - return m_particle; - } - - /** - * @returns The vertex reconstructed from the lepton tracks - */ - const ElementLink< VxContainer >& Quadruplet::vertex() const { - - return m_vertex; - } - - /** - * @returns The final state type - */ - FinalState Quadruplet::finalState() const { - - return m_finalState; - } - - /** - * The function only does anything if the ElementLink given to it is valid. If not, - * it just ignores the passed argument. - * - * @param particle The CombinedParticle holding the 4 leptons - */ - void Quadruplet::setParticle( const ElementLink< CompositeParticleContainer >& particle ) { - - if( particle.isValid() ) { - m_particle = particle; - } - - return; - } - - /** - * The function only does anything if the ElementLink given to it is valid. If not, - * it just ignores the passed argument. - * - * @param vertex The vertex reconstructed from the lepton tracks - */ - void Quadruplet::setVertex( const ElementLink< VxContainer>& vertex ) { - - if( vertex.isValid() ) { - m_vertex = vertex; - } - - return; - } - - /** - * @param fs The final state type - */ - void Quadruplet::setFinalState( FinalState fs ) { - - m_finalState = fs; - return; - } - -} // namespace HSG2 diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt deleted file mode 100644 index d701f17f0679dc63b13889a00db799059a100ee1..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -################################################################################ -# Package: HSG5DPDUtils -################################################################################ - -# Declare the package name: -atlas_subdir( HSG5DPDUtils ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Control/AthenaPython - PRIVATE - Event/NavFourMom - GaudiKernel - Reconstruction/Jet/JetEvent - Reconstruction/MuonIdentification/muonEvent ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_component( HSG5DPDUtils - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps NavFourMom GaudiKernel JetEvent muonEvent ) - -# Install files from the package: -atlas_install_headers( HSG5DPDUtils ) -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h deleted file mode 100644 index 62a2d49ab535b5fe0ff2e64175cc77643c26c122..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonFilter.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef HSG5DPDUTILS_LEPTONFILTER_H -#define HSG5DPDUTILS_LEPTONFILTER_H - -#include "AthenaBaseComps/AthFilterAlgorithm.h" - -#include <string> - -class Algorithm; - -namespace HSG5 { - - class LeptonFilter : public AthFilterAlgorithm { - - public: - LeptonFilter(const std::string& name, ISvcLocator* pSvcLocator); - virtual ~LeptonFilter(); - - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); - - private: - std::string findType(std::string l_property); - std::string findName(std::string l_property); - - Algorithm* m_electronFilter; - std::vector<Algorithm*> m_muonFilter; - - std::string m_electronFilterNameAndType; - std::vector<std::string> m_muonFilterNameAndTypeVec; - - }; - -} // end namespace - -#endif // HSG5DPDUTILS_LEPTONFILTER_H diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h deleted file mode 100644 index 8b9bf220202fb25cadc1416d98a1c2fe2d91b6aa..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/HSG5DPDUtils/LeptonJetsFilter.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef HSG5DPDUTILS_LEPTONJETSFILTER_H -#define HSG5DPDUTILS_LEPTONJETSFILTER_H - -#include "AthenaBaseComps/AthFilterAlgorithm.h" - -#include <string> - - -namespace HSG5 { - - class LeptonJetsFilter : public AthFilterAlgorithm { - - public: - - LeptonJetsFilter(const std::string& name, ISvcLocator* pSvcLocator); - virtual ~LeptonJetsFilter(); - - virtual StatusCode initialize(); - virtual StatusCode execute(); - virtual StatusCode finalize(); - - private: - - std::string m_selectedJetContainerName; - std::string m_selectedMuonContainerName; - - int m_minSumJetsAndMuon; - int m_maxSumJetsAndMuon; - - int m_nProcessed; - int m_nEventPassTrigger; - }; - -} // end namespace - -#endif // HSG5DPDUTILS_LEPTONJETSFILTER_H diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py deleted file mode 100644 index 760832a522cf70e980ea95fa41d710bc360b1147..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/BoostedJetFilter.py +++ /dev/null @@ -1,305 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -__doc__ = """This is a short algorithm to select events that contain one -boosted jet which fulfills a certain set of criteria. -""" -__version__ = "0.0.1" -__author__ = "Robert Harrington <R.Harrington@ed.ac.uk>" - - -import AthenaPython.PyAthena as PyAthena -from AthenaPython.PyAthena import StatusCode - -from PrimaryDPDMaker import PrimaryDPDHelpers - -import PyUtils.RootUtils as ru -ROOT = ru.import_root() -from ROOT import JetCollectionHelper - -## Import the module that allows to use named units, e.g. GeV -import AthenaCommon.SystemOfUnits as Units - -class JetFilter( PyAthena.AthFilterAlgorithm ): - """ - This class is a short algorithm to select events that contain one - jet which fulfills a certain set of criteria. All energies below - are uncalibrated (EM scale). The possible criteria are (with - default values): - jetCollectionType = "JetCollection" - jetCollectionName = "CamKt12LCTopoJets" - useUncalibratedJets = True - cutEtMin = 60.0*Units.GeV - cutEtaMin = 0 - cutEtaMax = 2.5 - removeOverlap = False - deltaR = 1.2 - leptonContainerTypeList = [] - leptonContainerNameList = [] - nLeadingsForCheck = 10000000 - minNumberPassed = 1 - recordGoodJets = False - goodJetCollectionName = self.name() - passAll = False - """ - - def __init__ ( self, name = "JetFilter", **kw ): - ## initialize base class - kw['name'] = name - super(JetFilter, self).__init__(**kw) - - ## Define the cuts - self.jetCollectionType = kw.get('jetCollectionType', "JetCollection") - self.jetCollectionName = kw.get('jetCollectionName', "CamKt12LCTopoJets") - self.useUncalibratedJets = kw.get('useUncalibratedJets', True) - self.cutEtMin = kw.get('cutEtMin', 60.0*Units.GeV) - self.cutEtaMin = kw.get('cutEtaMin', 0.0) - self.cutEtaMax = kw.get('cutEtaMax', 2.5) - self.removeOverlap = kw.get('removeOverlap', False) - self.deltaR = kw.get('deltaR', 1.2) - self.leptonContainerTypeList = kw.get('leptonContainerTypeList', []) - self.leptonContainerNameList = kw.get('leptonContainerNameList', []) - self.nLeadingsForCheck = kw.get('nLeadingsForCheck', 10000000) - self.minNumberPassed = kw.get('minNumberPassed', 1) - self.recordGoodJets = kw.get('recordGoodJets', False) - self.goodJetCollectionName = kw.get('goodBoostedJetCollectionName', self.name() ) - self.passAll = kw.get('passAll', False) - - ## Get the storgate handle - self.storeGateSvc = None - - ## Handle to JetSignalState - self.jss = None - - return - - - - - def initialize(self): - self.msg.info( '************************************' ) - self.msg.info( '==> initialize %s...', self.name() ) - self.msg.info( ' jetCollectionType = %r', self.jetCollectionType ) - self.msg.info( ' jetCollectionName = %r', self.jetCollectionName ) - self.msg.info( ' recordGoodJets = %r', self.recordGoodJets ) - self.msg.info( ' goodJetCollectionName = %r', self.goodJetCollectionName ) - self.msg.info( 'Will apply the following cuts:' ) - self.msg.info( ' useUncalibratedJets = %r', self.useUncalibratedJets ) - self.msg.info( ' EtMin (GeV) = %r', self.cutEtMin/Units.GeV ) - self.msg.info( ' EtaMin = %r', self.cutEtaMin ) - self.msg.info( ' EtaMax = %r', self.cutEtaMax ) - self.msg.info( ' removeOverlap = %r', self.removeOverlap ) - self.msg.info( ' deltaR = %r', self.deltaR ) - self.msg.info( ' leptonContainerTypeList = %r', self.leptonContainerTypeList ) - self.msg.info( ' leptonContainerNameList = %r', self.leptonContainerNameList ) - self.msg.info( ' nLeadingsForCheck = %r', self.nLeadingsForCheck ) - self.msg.info( ' minNumberPassed = %r', self.minNumberPassed ) - self.msg.info( ' passAll = %r', self.passAll ) - self.msg.info( '************************************' ) - - ## Initialize the counters - self.nProcessed = 0 - self.nJets = 0 - self.nEventPassed = 0 - - ## Import needed modules - import PyUtils.RootUtils as ru - ROOT = ru.import_root() - - ## 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 - - ## Eagerly load library due to reflex bug (autoloading enums/namespaces doesn't work) - PyAthena.load_library ('FourMomUtils') - - ## Get the JetSignalState helper - self.jss = PyAthena.SignalStateHelper(PyAthena.P4SignalState.JETFINAL) - - ## import some 4-mom utils - import FourMomUtils.Bindings - self.utils = { 'deltaR' : PyAthena.P4Helpers.deltaR } - - - return StatusCode.Success - - - - def execute(self): - self.nProcessed+=1 - self.msg.debug( '==> execute %s on %r. event...' % (self.name(), self.nProcessed) ) - - - ## If passAll is selected, accept all events - if self.passAll : - self.msg.debug( '%s event passed because passAll is true' % self.name() ) - self.setFilterPassed(True) - self.nEventPassed += 1 - return StatusCode.Success - - - # Load the jet collection from the input file - jetCollection = None - try: - jetCollection = self.storeGateSvc.retrieve( self.jetCollectionType, self.jetCollectionName ) - self.msg.debug( 'Loading the jet collection %s from the input file.' % self.jetCollectionName ) - except LookupError: - self.msg.warning( 'Collection %s not found' % self.jetCollectionName ) - self.setFilterPassed(True) - return StatusCode.Success - - - # Load the lepton collections from the input file - self.msg.debug( 'Going to load the leptons of type %s and key %s.' % (self.leptonContainerTypeList, self.leptonContainerNameList) ) - leptonList = [] - if self.leptonContainerTypeList.__len__() == self.leptonContainerNameList.__len__() : - for i in range( self.leptonContainerTypeList.__len__() ) : - try: - lepColl = self.storeGateSvc.retrieve( self.leptonContainerTypeList[i], - self.leptonContainerNameList[i] ) - self.msg.debug( 'Loading the lepton collection %s from the input file.' - % self.leptonContainerNameList[i] ) - for lep in lepColl : - leptonList.append(lep) - pass - pass - except LookupError: - self.msg.warning( 'Collection %s not found' % self.leptonContainerNameList[i] ) - self.setFilterPassed(True) - return StatusCode.Success - pass - pass - else : - self.msg.error( 'List of leptons type %s and key %s has different lenght!' - % (self.leptonContainerTypeList, self.leptonContainerNameList) ) - pass - - - ## Turn all jets into uncalibrated state - if self.useUncalibratedJets : - self.jss.setSignalState( PyAthena.P4SignalState.UNCALIBRATED) - self.msg.debug( 'Setting the jet state to uncalibrated jets.' ) - - - # Create a class-member list of all jets that passed all cuts. - # This can then be used by other filters to do overlap removal, etc. - VIEW_ELEMENTS = 1 - goodJets = PyAthena.JetCollection(VIEW_ELEMENTS) - - - # Print a debug message - self.msg.debug( 'Starting loop over all jets. In this event, there are %s jets' % jetCollection.size() ) - - - ## Find leading Et - leadEt = 0.0*Units.GeV - jet_pass=0 - jet_n=0 - - controlObject = self.jss.controlObject - releaseObject = self.jss.releaseObject - - for jet in jetCollection : - controlObject(jet) - self.msg.debug( ' jet = '+str(jet)) - self.nJets += 1 - jet_n += 1 - if jet_n <= self.nLeadingsForCheck : - if abs(jet.eta()) >= self.cutEtaMin and abs(jet.eta()) < self.cutEtaMax : - if jet.et() > self.cutEtMin : - if self.removeOverlap : - self.msg.debug( 'JetFilter: I am in overlap!' ) - doesOverlap = False - for lep in leptonList : - if self.utils['deltaR'](jet, lep) <= self.deltaR : - doesOverlap = True - break - pass - if not doesOverlap : - if jet.et() > leadEt : - leadEt = jet.et() - pass - jet_pass+=1 - jetCopy = jet - goodJets.push_back( jetCopy ) - pass - pass - else : - self.msg.debug( 'JetFilter: I am NOT in overlap!' ) - if jet.et() > leadEt : - leadEt = jet.et() - pass - jet_pass+=1 - jetCopy = jet - goodJets.push_back( jetCopy ) - pass - pass - pass - pass - pass - - # Print a debug message - self.msg.debug( 'Done with the loop over the jets. Have %s jets in collection, put %s jets in goodJets, and the leading jet has et = %s GeV.' % ( jetCollection.size(), goodJets.__len__(), leadEt/Units.GeV ) ) - - releaseObject() - - - ## Record the good jets into StoreGate so that they can be retrieved by other algorithms - if self.recordGoodJets : - if JetCollectionHelper.record_jets( self.storeGateSvc, goodJets, self.goodJetCollectionName ).isFailure() : - self.msg.error( 'Could not record the goodJets into StoreGate with the key = %s' % self.goodJetCollectionName ) - pass - pass - - ## Check if the event is accepted - if goodJets.__len__() >= self.minNumberPassed : - self.msg.debug( 'The %d leading jets are > %f GeV', jet_pass, self.cutEtMin/Units.GeV) - self.msg.debug( '%s event passed.' % self.name() ) - self.setFilterPassed(True) - self.nEventPassed += 1 - pass - else: - self.msg.debug( '%s event failed' % self.name() ) - self.setFilterPassed(False) - pass - - return StatusCode.Success - - - - def finalize(self): - ## Import needed modules - import math - - ## Calculate the efficiencies and their errors - effiJets = 0.0 - effiEvents = 0.0 - effiErrJets = 0.0 - effiErrEvents = 0.0 - try : - # Efficiencies - effiJets = self.nJets / float(self.nProcessed) - effiEvents = self.nEventPassed / float(self.nProcessed) - - # Error on efficiencies - effiErrJets = math.sqrt(self.nJets) / float(self.nProcessed) - effiErrEvents = 100.0*math.sqrt(effiEvents*(1.-effiEvents)/float(self.nProcessed)) - - effiEvents *= 100. - - except ZeroDivisionError : - self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' ) - - - - 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 all jets: %r and number of jets per event: %3.3f +/- %3.3f' % ( self.nJets, effiJets, effiErrJets ) ) - self.msg.info( ' Events accepted: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventPassed, effiEvents, effiErrEvents ) ) - self.msg.info( '***************************************************************' ) - - return StatusCode.Success diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py deleted file mode 100644 index 54837ab4f15765bae231db79e574b25428d144db..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/GroomedJetsConfig.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import copy - -def getGroomedJetsConfig(): - - dictsConf = [] - - ParentDict = { - 'JetFinder' : 'CamKt', - 'JetdR' : 1.2, - 'JetInput' : 'LCTopo', - } - - GroomedDicts = [ - #{ 'Type' : 'BDRSFiltering', 'args' : { 'SaveSubjets' : True } } #, - { 'Type' : 'BDRSFiltering', 'args' : { 'SaveSubjets' : True , 'minSplitR' :0.} } - ] - - - dictsConf += [ [ParentDict, GroomedDicts] ] - - ParentDict = { - 'JetFinder' : 'CamKt', - 'JetdR' : 1.2, - 'JetInput' : 'Truth', - } - - dictsConf += [ [ParentDict, GroomedDicts] ] - - - return dictsConf diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py deleted file mode 100644 index 8ae5f87e2a70f80e414ac1dc169d3d1d8d449ffe..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PD.py +++ /dev/null @@ -1,758 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# -# @file HSG5D3PD.py -# @author Robert Harrington <R.Harrington@ed.ac.uk> -# @date Oct, 2011 -# @brief Construct a boosted Higgs physics D3PD (copied from and based on SMWZD3PD). -# - - -import D3PDMakerCoreComps -from D3PDMakerCoreComps.resolveSGKey import testSGKey - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# local flags -from HSG5Flags import * -from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation - - -# event - -from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject -from EventCommonD3PDMaker.LBMetadataConfig import LBMetadataConfig -from TruthD3PDMaker.GenEventD3PDObject import GenEventD3PDObject - -from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation - - -# eletron/photon - -from egammaD3PDMaker.ElectronD3PDObject import ElectronD3PDObject -from egammaD3PDMaker.GSFElectronD3PDObject import GSFElectronD3PDObject -from egammaD3PDMaker.PhotonD3PDObject import PhotonD3PDObject -from egammaD3PDMaker.egammaTriggerBitsD3PDObject import egammaTriggerBitsD3PDObject - -# muons - -from MuonD3PDMaker.MuonD3PDObject import MuonD3PDObject -from MuonD3PDMaker.MuonSegmentD3PDObject import MuonSegmentD3PDObject -from MuonD3PDMaker.MuonTriggerBitsD3PDObject import MuonTriggerBitsD3PDObject - -# jet - -from JetD3PDMaker.JetD3PDObject import JetD3PDObject - -# tau, not for exclusion - -from TauD3PDMaker.makeTrackFilterAlg import makeTrackFilterAlg - -# calo - -from CaloD3PDMaker.MBTSD3PDObject import MBTSD3PDObject -from CaloD3PDMaker.MBTSTimeD3PDObject import MBTSTimeD3PDObject -from CaloD3PDMaker.MBTSTriggerBitsD3PDObject import MBTSTriggerBitsD3PDObject -from CaloD3PDMaker.LArCollisionTimeD3PDObject import LArCollisionTimeD3PDObject -from CaloD3PDMaker.CollisionDecisionD3PDObject import CollisionDecisionD3PDObject -from CaloD3PDMaker.ClusterD3PDObject import ClusterD3PDObject -from CaloD3PDMaker.EMClusterD3PDObject import EMClusterD3PDObject -from CaloD3PDMaker.makeClusterFilter import makeClusterFilter - -# baseline track config - -from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags - -#TrackD3PDFlags.doTruth = False # True -TrackD3PDFlags.doTruth = True -TrackD3PDFlags.storeDetailedTruth = False -TrackD3PDFlags.storeDiagonalCovarianceAsErrors = True -#TrackD3PDFlags.storeHitTruthMatching = False # True -TrackD3PDFlags.storeHitTruthMatching = True -TrackD3PDFlags.storePixelHitsOnTrack = False -TrackD3PDFlags.storePixelHolesOnTrack = False -TrackD3PDFlags.storePixelOutliersOnTrack = False -TrackD3PDFlags.storeSCTHitsOnTrack = False -TrackD3PDFlags.storeSCTHolesOnTrack = False -TrackD3PDFlags.storeSCTOutliersOnTrack = False -TrackD3PDFlags.storeTRTHitsOnTrack = False -TrackD3PDFlags.storeTRTHolesOnTrack = False -TrackD3PDFlags.storeTRTOutliersOnTrack = False -TrackD3PDFlags.storeTrackFitQuality = True -TrackD3PDFlags.storeTrackInfo = False -TrackD3PDFlags.storeTrackMomentum = True -TrackD3PDFlags.storeTrackPredictionAtBLayer = False -#TrackD3PDFlags.storeTrackSummary = False # True -TrackD3PDFlags.storeTrackSummary = True -TrackD3PDFlags.trackParametersAtBeamSpotLevelOfDetails = 0 -TrackD3PDFlags.trackParametersAtGlobalPerigeeLevelOfDetails = 0 -TrackD3PDFlags.trackParametersAtPrimaryVertexLevelOfDetails = 1 - -# setting specifically for HSG5D3PD -TrackD3PDFlags.storeTrackSummary.IDSharedHits = True # IC -TrackD3PDFlags.storeDetailedTruth=False -TrackD3PDFlags.storeVertexKinematics=False -TrackD3PDFlags.storeVertexPurity=False -#TrackD3PDFlags.storeVertexTrackIndexAssociation=False -TrackD3PDFlags.storeVertexTrackIndexAssociation=True -TrackD3PDFlags.trackParametersAtPrimaryVertexLevelOfDetails=1 -TrackD3PDFlags.vertexPositionLevelOfDetails=1 -TrackD3PDFlags.storeTrackInfo=True # IC -TrackD3PDFlags.storeTrackSummary=True # IC -D3PDMakerFlags.TruthWriteHadrons = True -# end HSG5D3PD configuration - -from TrackD3PDMaker.TrackD3PDObject import TrackParticleD3PDObject - -# PV config - -TrackD3PDFlags.storeVertexFitQuality = True -TrackD3PDFlags.storeVertexKinematics = True -TrackD3PDFlags.storeVertexPurity = False -TrackD3PDFlags.storeVertexTrackAssociation = False -TrackD3PDFlags.storeVertexTrackIndexAssociation = True -TrackD3PDFlags.vertexPositionLevelOfDetails = 2 - -from TrackD3PDMaker.VertexD3PDObject import PrimaryVertexD3PDObject - -# BeamSpot / MinBias - -from TrackD3PDMaker.BeamSpotD3PDObject import BeamSpotD3PDObject - -# MET - -from MissingETD3PDMaker.MissingETD3PDMakerFlags import MissingETD3PDMakerFlags -from MissingETD3PDMaker.MissingETD3PDObject import * -from MissingETD3PDMaker.MissingETD3PDTriggerBitsObject import * - -MissingETD3PDMakerFlags.doCellOutEflow=True -MissingETD3PDMakerFlags.METDefaultJetCollectionSGKey = 'AntiKt4LCTopoJets' -MissingETD3PDMakerFlags.METDefaultJetPrefix = "jet_AntiKt4LCTopo_MET_" - -# Trigger - -from TriggerD3PDMaker.TrigDecisionD3PDObject import TrigDecisionD3PDObject -from TriggerD3PDMaker.TrigConfMetadata import addTrigConfMetadata -from TriggerD3PDMaker.BGCodeD3PDObject import BGCodeD3PDObject -from TrigEgammaD3PDMaker.TrigEgammaD3PD import TrigEgammaD3PDObjects -from TrigMuonD3PDMaker.TrigMuonD3PD import TrigMuonD3PDObjects -from TriggerD3PDMaker.EnergySumROID3PDObject import EnergySumROID3PDObject -from TrigMissingETD3PDMaker.TrigMETD3PDObject import TrigMETD3PDObject -from PhysicsD3PDMaker.SMWZTriggerBitsD3PDObject import SMWZTriggerBitsD3PDObject - -from RecExConfig.RecFlags import rec -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - - -def _args (level, name, kwin, **kw): - kw = kw.copy() - kw['level'] = level - for (k, v) in kwin.items(): - if k.startswith (name + '_'): - kw[k[len(name)+1:]] = v - return kw - -# Routine to write GSCFactor and WidthFraction jet moments -#def addSTRUCTCalib(jetcoll , **options): -# from JetCalibTools.MakeCalibSequences import alternateCalibSequence -# emSeq = alternateCalibSequence('CAL:STRUCT1',options) -# StructSeq = emSeq.CalibToolSequence[-1] -# StructSeq.MomentTag = "GSCFactor" -# StructSeq.SimpleFactorCorrection = True -# for t in StructSeq.CalibToolSequence[:-1]: #switch off all moments writing but the last. -# t.WriteMoments = False - - #from JetRec.JetGetters import getJetCalibrationTool - #emToolFromDict = getJetCalibrationTool(emSeq, "STRUCTcalib",inPlaceCorr=False) - -# from JetMomentTools.JetMomentToolsConf import JetMomentsFromCalib -# momTool = JetMomentsFromCalib() -# momTool.Calibrator = emSeq - -# from JetRec.JetMomentGetter import make_JetMomentGetter -# make_JetMomentGetter( jetcoll , [momTool]) - - -def HSG5D3PD (alg = None, - file = 'hsg5.root', - tuplename = 'physics', - streamname = 'd3pdstream', - flags=HSG5Flags, - **kw): - - if flags.doTaus(): - # tau - from TauD3PDMaker.TauD3PDObject import TauD3PDObject - - # define associations - if flags.doPhotons() and not PhotonD3PDObject.allBlocknames().has_key('RecoveryMatch'): - from PhotonD3PDMaker.PhotonRecoveryAssociation import PhotonRecoveryAssociation - PhotonRecoveryAssoc = PhotonRecoveryAssociation(PhotonD3PDObject, - 'ElectronContainer', - D3PDMakerFlags.ElectronSGKey(), - prefix = 'el_', - blockname = 'RecoveryMatch', - target = 'ph_ElectronRecovered_') - - - # define track and cluster filters - - preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) - - if flags.doGoodTracks() and not hasattr( preseq, "GoodTracks" ): - filter1 = makeTrackFilterAlg(TracksName = D3PDMakerFlags.TrackSGKey(), - OutputTracksName='GoodTracks', - ptCut=0.,nSCTPix=4) - preseq += filter1 - - if flags.doHighPtTracks() and not hasattr( preseq, "HighPtTracks" ): - filter2 = makeTrackFilterAlg(TracksName = D3PDMakerFlags.TrackSGKey(), - OutputTracksName='HighPtTracks', - ptCut=5000.,nSCTPix=4) - preseq += filter2 - - - if flags.doHighPtClusters() and not hasattr( preseq, "HighPtClusters" ): - filter3 = makeClusterFilter(InputName = D3PDMakerFlags.ClusterSGKey(), - OutputName = 'HighPtClusters', - ptCut=10000.) - preseq += filter3 - - if flags.doHighPtEMClusters() and not hasattr( preseq, "HighPtEMClusters" ): - filter4 = makeClusterFilter(InputName = D3PDMakerFlags.EMTopoClusterSGKey(), - OutputName = 'HighPtEMClusters', - ptCut=10000.) - preseq += filter4 - - # perform recoil calculation - - if flags.doHadronicRecoil(): - from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__ElectronSelector - from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__MuonSelector - from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__EflowSelector - from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__RecoilCalculation - from HadronicRecoil.HadronicRecoilConf import HadronicRecoil__EflowRecoil - - if not hasattr( preseq, "HadronicRecoil::ElectronSelector" ): - preseq += HadronicRecoil__ElectronSelector() - if not hasattr( preseq, "HadronicRecoil::MuonSelector" ): - preseq += HadronicRecoil__MuonSelector() - if not hasattr( preseq, "HadronicRecoil::EflowSelector" ): - preseq += HadronicRecoil__EflowSelector() - if not hasattr( preseq, "HadronicRecoil::RecoilCalculation" ): - preseq += HadronicRecoil__RecoilCalculation( ConeSizes = [0.20] ) - if not hasattr( preseq, "EflowRecoil_20" ): - preseq += HadronicRecoil__EflowRecoil("EflowRecoil_20", - TrackRough = "RoughRecoil_track_20", - TrackUE = "ueCorrection_track_20", - TrackRef = "RefinedRecoil_track_20", - ClusNoTrackRough = "RoughRecoil_clusNoTrack_20", - ClusNoTrackUE = "ueCorrection_clusNoTrack_20", - ClusNoTrackRef = "RefinedRecoil_clusNoTrack_20", - RoughRecoil_out = "RoughRecoil_Eflow_20", - ueCorrection_out = "ueCorrection_Eflow_20", - RefinedRecoil_out= "RefinedRecoil_Eflow_20", - MET_out = "MET_HR_Eflow_20" ) - - # now configure the D3PD - - if not alg: - alg = MSMgr.NewRootStream(StreamName = streamname, FileName = file, TreeName = tuplename) - - - alg += EventInfoD3PDObject (**_args (10, 'EventInfo', kw)) - alg += LArCollisionTimeD3PDObject (**_args (10, 'LArCollisionTime', kw)) - - from TriggerD3PDMaker.BunchStructureMetadata import addBunchStructureMetadata - addBunchStructureMetadata (alg) - - # Eta rings of energy - # FIXME brian crashing aod running - if not rec.readAOD: - from CaloD3PDMaker.RapgapD3PDObject import EtaRingsNonTileD3PDObject - from CaloD3PDMaker.RapgapD3PDObject import EtaRingsD3PDObject - - alg += EtaRingsNonTileD3PDObject ( **_args ( 0, 'EtaRings', kw) ) - alg += EtaRingsD3PDObject ( **_args ( 0, 'EtaRings', kw) ) - - # Electron/Photon blocks - - alg += ElectronD3PDObject (**_args (10, 'Electron', kw)) - - if testSGKey ('ElectronContainer', D3PDMakerFlags.GSFElectronSGKey()): - alg += GSFElectronD3PDObject (**_args (10, 'GSFElectron', kw, - sgkey = D3PDMakerFlags.GSFElectronSGKey(), - prefix = 'el_gsf_')) - - if flags.doPhotons(): - print "adding photons" - alg += PhotonD3PDObject (**_args (10, 'Photon', kw)) - - - # Muon blocks - - ### add the scattering significance filler - to be removed when added in the MuonD3PDMaker - if not MuonD3PDObject.allBlocknames().has_key("MuonScatteringAngleSignificance"): - from AthenaCommon.AppMgr import ToolSvc - muonScatteringSigTool=None - if hasattr(ToolSvc, "MuonScatteringSigTool"): - muonScatteringSigTool=ToolSvc.MuonScatteringSigTool - from JetTagD3PDMaker import MuonScatteringAngleSignificanceFillerTool - MuonD3PDObject.defineBlock (100, "MuonScatteringAngleSignificance", - MuonScatteringAngleSignificanceFillerTool, - ScatteringSigTool=muonScatteringSigTool) - - alg += MuonD3PDObject (**_args (10, 'MuidMuon', kw, - sgkey='MuidMuonCollection', prefix='mu_muid_', - include = ["EFCBInfoIndex", "EFMGInfoIndex", "EFMEInfoIndex", - "L2CBInfoIndex", "L1InfoIndex"], - exclude = ["EFCBInfo", "EFMGInfo", "EFMEInfo", "L2CBInfo", "L1Info"], - allowMissing = True )) - - alg += MuonD3PDObject (**_args (10, 'StacoMuon', kw, - sgkey='StacoMuonCollection', prefix='mu_staco_', - include = ["EFCBInfoIndex", "EFMGInfoIndex", "EFMEInfoIndex", - "L2CBInfoIndex", "L1InfoIndex"], - exclude = ["EFCBInfo", "EFMGInfo", "EFMEInfo", "L2CBInfo", "L1Info"], - allowMissing = True )) - - from AthenaCommon.KeyStore import CfgItemList - if CfgItemList("KeyStore_inputFile").has_item("Analysis::MuonContainer#Muons"): - alg += MuonD3PDObject (**_args (10, 'Muons', kw, - sgkey='Muons', prefix='mu_muons_', - include = ["EFCBInfoIndex", "EFMGInfoIndex", "EFMEInfoIndex", - "L2CBInfoIndex", "L1InfoIndex"], - exclude = ["EFCBInfo", "EFMGInfo", "EFMEInfo", "L2CBInfo", "L1Info"], - allowMissing = True )) - - alg += MuonD3PDObject (**_args (0, 'CaloMuon', kw, sgkey='CaloMuonCollection', prefix='mu_calo_', - include = ["MuonHitSummary", "Authors", "Likelihood", - "Isolation", "CaloEnergyLoss", "Quality"] )) - - # Tau block - - if flags.doTaus(): - alg += TauD3PDObject (**_args ( 1, 'Tau', kw)) - - - - # track and cluster blocks - - # ... all clusters, very low LOD - - alg += ClusterD3PDObject (**_args ( 0, 'Clusters1', kw, - exclude='SamplingBasics')) - - # ... higher LOD for pt>10 GeV - if flags.doHighPtClusters(): - alg += ClusterD3PDObject (**_args ( 2, 'Clusters2', kw, - sgkey = 'HighPtClusters', - prefix = 'clpt10_')) - - if flags.doHighPtEMClusters(): - alg += ClusterD3PDObject (**_args ( 3, 'Clusters3', kw, - sgkey = 'HighPtEMClusters', - prefix = 'emclpt10_')) - - from TrackD3PDMaker.TrackD3PDObject import TrackD3PDObject - - # ... good tracks only (nSCT>3; no pt cut) - - # use standard level of track info for 'GoodTracks' - - if flags.doGoodTracks(): - # use standard level of track info for 'GoodTracks' - alg += TrackParticleD3PDObject (**_args ( 3, 'Tracks1', kw, - sgkey = 'GoodTracks', - label = 'trk', - prefix = 'trk_')) - - # ... high-pt tracks (nSCT>3; pt>5 GeV) - - if flags.doHighPtTracks(): - - from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags as highPtFlags - highPtFlags.doTruth = True - highPtFlags.storeDiagonalCovarianceAsErrors = True - highPtFlags.storeHitTruthMatching = True - highPtFlags.storePixelHitsOnTrack = False - highPtFlags.storePixelHolesOnTrack = False - highPtFlags.storePixelOutliersOnTrack = False - highPtFlags.storeSCTHitsOnTrack = False - highPtFlags.storeSCTHolesOnTrack = False - highPtFlags.storeSCTOutliersOnTrack = False - highPtFlags.storeTRTHitsOnTrack = False - highPtFlags.storeTRTHolesOnTrack = False - highPtFlags.storeTRTOutliersOnTrack = False - highPtFlags.storeTrackFitQuality = True - highPtFlags.storeTrackMomentum = True - highPtFlags.storeTrackSummary = True - highPtFlags.storeTrackSummary.IDOutliers = True - highPtFlags.storeTrackSummary.PixelInfoPlus = True - highPtFlags.storeTrackSummary.SCTInfoPlus = True - highPtFlags.storeTrackSummary.TRTInfoPlus = True - highPtFlags.storeTrackSummary.InfoPlus = True - highPtFlags.trackParametersAtBeamSpotLevelOfDetails = 0 - highPtFlags.trackParametersAtGlobalPerigeeLevelOfDetails = 2 - highPtFlags.trackParametersAtPrimaryVertexLevelOfDetails = 3 - - HighPtTrackParticleD3PDObject = TrackD3PDObject(_label='trkpt5', - _prefix='trkpt5_', - _sgkey='HighPtTracks', - typeName='Rec::TrackParticleContainer', - flags=highPtFlags) - - alg += HighPtTrackParticleD3PDObject(**_args ( 3, 'Tracks2', kw, - sgkey = 'HighPtTracks', - label = 'trkpt5', - prefix = 'trkpt5_')) - - - # Jet blocks - - from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags - - # include list modified for HSG5D3PD - - includelist = JetTagD3PDFlags.StdInfoInclude() - - from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys - includelist += [JetTagD3PDKeys.BTagWeightsBlockName()] - #includelist += [JetTagD3PDKeys.JetFitterInfoBaseBlockName()] - #includelist += [JetTagD3PDKeys.JetFitterTagInfoBlockName()] - #includelist += [JetTagD3PDKeys.IP3DInfoBaseBlockName()] - #includelist += [JetTagD3PDKeys.IP3DIPInfoBaseBlockName()] - #includelist += [JetTagD3PDKeys.JetFitterCombInfoBaseBlockName()] - includelist += [JetTagD3PDKeys.JetTrackAssocBlockName()] - includelist += [JetTagD3PDKeys.JetTrackBlockName()] - includelist += [JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()] - includelist += [JetTagD3PDKeys.IPInfoPlusTrackBlockName()] - includelist += ['ConstituentScale'] - - jetkw = kw - if not jetkw.has_key ( 'AK4TopoEMJet_'+JetTagD3PDKeys.JetTrackAssocBlockName()+'_target'): - jetkw['AK4TopoEMJet_'+JetTagD3PDKeys.JetTrackAssocBlockName()+'_target']= "trk" - if not jetkw.has_key ( 'AK4TopoEMJet_'+JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target'): - jetkw['AK4TopoEMJet_'+JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target']= "trk" - - alg += JetD3PDObject (**_args ( 3, 'AK4TopoEMJet', jetkw, - sgkey='AntiKt4TopoEMJets', prefix='jet_AntiKt4TopoEM_', - include = includelist, - JetVertexFraction_FromUD=True, - JetVertexFraction_FillFullJVF=True, - allowMissing = True)) - - alg += JetD3PDObject (**_args ( 3, 'AK6TopoEMJet', kw, - sgkey='AntiKt6TopoEMJets', prefix='jet_AntiKt6TopoEM_', - include = [JetTagD3PDFlags.StdInfoInclude(),'ConstituentScale'], - JetVertexFraction_FromUD=True, - JetVertexFraction_FillFullJVF=True, - allowMissing = True)) - - alg += JetD3PDObject (**_args ( 3, 'AK4LCTopoJet', kw, - sgkey='AntiKt4LCTopoJets', prefix='jet_AntiKt4LCTopo_', - exclude=['Layer'], - include=['ConstituentScale'], - JetVertexFraction_FromUD=True, - JetVertexFraction_FillFullJVF=True, - allowMissing = True)) - - alg += JetD3PDObject (**_args ( 3, 'AK6LCTopoJet', kw, - sgkey='AntiKt6LCTopoJets', prefix='jet_AntiKt6LCTopo_', - exclude=['Layer'], - include=['ConstituentScale'], - JetVertexFraction_FromUD=True, - JetVertexFraction_FillFullJVF=True, - allowMissing = True)) - - - from TopInputsD3PDMaker.HforD3PDObject import HforD3PDObject - alg += HforD3PDObject(**_args (0, 'HforInfo', kw)) - - - # MET blocks - # a whole mess to remove x,y components separately for all flavours - - if flags.doAllMissingET() : - alg += MissingETD3PDObject (**_args (10, 'MissingET', kw, - exclude=['MET_Base', 'MET_Base0', 'MET_Truth_Int', - 'MET_RefFinal_Comps','MET_Calib_Comps','MET_CellOut_Comps', - 'MET_CorrTopo_Comps','MET_Cryo_Comps','MET_CryoCone_Comps', - 'MET_Final_Comps','MET_LocHadTopo_Comps', - 'MET_LocHadTopoObj_Comps', - 'MET_Muid_Comps','MET_Muid_Spectro_Comps','MET_Muid_Track_Comps', - 'MET_MuonBoy_Comps','MET_MuonBoy_Spectro_Comps','MET_MuonBoy_Track_Comps', - 'MET_Muons_Comps','MET_Muons_Spectro_Comps','MET_Muons_Track_Comps', - 'MET_MuonMuid_Comps', - 'MET_Muon_Comps','MET_Muon_Isol_Muid_Comps', - 'MET_Muon_Isol_Staco_Comps','MET_Muon_NonIsol_Muid_Comps', - 'MET_Muon_NonIsol_Staco_Comps','MET_Muon_Total_Muid_Comps', - 'MET_Muon_Total_Staco_Comps','MET_RefEle_Comps', - 'MET_RefEle_em_Comps','MET_RefGamma_Comps', - 'MET_RefGamma_em_Comps','MET_RefJet_Comps', - 'MET_RefJet_em_Comps','MET_RefMuon_Comps', - 'MET_RefMuon_Muid_Comps','MET_RefMons_Comps','MET_RefMuon_Staco_Comps', - 'MET_RefMuon_Track_Muid_Comps','MET_RefMuon_Track_Staco_Comps', - 'MET_RefMuon_Track_em_Comps','MET_RefMuon_Track_Comps', - 'MET_RefMuons_Track_Comps', - 'MET_RefMuon_em_Comps','MET_RefTau_Comps', - 'MET_RefTau_em_Comps','MET_SoftJets_Comps', - 'MET_SoftJets_em_Comps','MET_Topo_Comps', - 'MET_TopoObj_Comps','MET_Track_Comps','MET_Comps', - 'MET_Track_Weights','MET_Cluster_Weights'], - allowMissing=True)) - else : - alg += MissingETD3PDObject(0, sgkey = "MET_RefFinal", prefix = "MET_RefFinal") - - # MuonBoy terms used in RefFinal - alg += MissingETD3PDObject(0, sgkey = "MET_MuonBoy", prefix = "MET_MuonBoy") - alg += MissingETD3PDObject(0, sgkey = "MET_RefMuon", prefix = "MET_RefMuon") - alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_Eflow", prefix = "MET_CellOut_Eflow") - - # terms needed to calculate RefFinal with Muid instead of Staco - alg += MissingETD3PDObject(0, sgkey = "MET_RefMuon_Muid", prefix = "MET_RefMuon_Muid") - alg += MissingETD3PDObject(0, sgkey = "MET_MuonMuid", prefix = "MET_MuonMuid") - alg += MissingETD3PDObject(0, sgkey = "MET_Muid", prefix = "MET_Muid") - alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_Eflow_Muid", prefix = "MET_CellOut_Eflow_Muid") - - # terms needed to calculate RefFinal with third chain instead of Staco - from AthenaCommon.KeyStore import CfgItemList - keystore = CfgItemList("KeyStore_inputFile") - if keystore.has_item("MissingET#MET_Muons"): - alg += MissingETD3PDObject(0, sgkey = "MET_Muons", prefix = "MET_Muons") - if keystore.has_item("MissingET#MET_RefMuons"): - alg += MissingETD3PDObject(0, sgkey = "MET_RefMuons", prefix = "MET_RefMuons") - if keystore.has_item("MissingET#MET_CellOut_Eflow_Muons"): - alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_Eflow_Muons", prefix = "MET_CellOut_Eflow_Muons") - - # I have no idea what these are for - alg += MissingETD3PDObject(0, sgkey = "MET_SoftJets", prefix = "MET_SoftJets") - alg += MissingETD3PDObject(0, sgkey = "MET_RefFinal_em", prefix = "MET_RefFinal_em") - alg += MissingETD3PDObject(0, sgkey = "MET_CellOut_em", prefix = "MET_CellOut_em") - alg += MissingETD3PDObject(0, sgkey = "MET_SoftJets_em", prefix = "MET_SoftJets_em") - - - # HadronicRecoil blocks - - if flags.doHadronicRecoil(): - alg += ElectronD3PDObject(0, sgkey = "HR_selectedElectrons", prefix = "hr_el_") - alg += MuonD3PDObject( 0, sgkey = "HR_selectedMuons", prefix = "hr_mu_" ) - - alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_20", prefix = "hr_roughRecoil_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "ueCorrection_20", prefix = "hr_ueCorrection_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_20", prefix = "hr_corrRecoil_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "MET_HR_20", prefix = "hr_MET_20", - exclude=['MET_Regions','MET_Comps'] ) - - alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_track_20", prefix = "hr_roughRecoil_track_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "ueCorrection_track_20", prefix = "hr_ueCorrection_track_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_track_20", prefix = "hr_corrRecoil_track_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "MET_HR_track_20", prefix = "hr_MET_track_20", - exclude=['MET_Regions','MET_Comps'] ) - - alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_clusNoTrack_20", prefix = "hr_roughRecoil_clusNoTrack_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "ueCorrection_clusNoTrack_20", prefix = "hr_ueCorrection_clusNoTrack_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_clusNoTrack_20", prefix = "hr_corrRecoil_clusNoTrack_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "MET_HR_clusNoTrack_20", prefix = "hr_MET_clusNoTrack_20", - exclude=['MET_Regions','MET_Comps'] ) - - alg += MissingETD3PDObject(0, sgkey = "RoughRecoil_Eflow_20", prefix = "hr_roughRecoil_Eflow_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "ueCorrection_Eflow_20", prefix = "hr_ueCorrection_Eflow_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "RefinedRecoil_Eflow_20", prefix = "hr_corrRecoil_Eflow_20", - exclude=['MET_Regions','MET_Comps'] ) - alg += MissingETD3PDObject(0, sgkey = "MET_HR_Eflow_20", prefix = "hr_MET_Eflow_20", - exclude=['MET_Regions','MET_Comps'] ) - - - """ - # track and cluster blocks - - # ... all clusters, very low LOD - - alg += ClusterD3PDObject (**_args ( 0, 'Clusters1', kw, - exclude='SamplingBasics')) - - # ... higher LOD for pt>10 GeV - if flags.doHighPtClusters(): - alg += ClusterD3PDObject (**_args ( 2, 'Clusters2', kw, - sgkey = 'HighPtClusters', - prefix = 'clpt10_')) - - if flags.doHighPtEMClusters(): - alg += ClusterD3PDObject (**_args ( 3, 'Clusters3', kw, - sgkey = 'HighPtEMClusters', - prefix = 'emclpt10_')) - - from TrackD3PDMaker.TrackD3PDObject import TrackD3PDObject - - # ... good tracks only (nSCT>3; no pt cut) - - # use standard level of track info for 'GoodTracks' - - if flags.doGoodTracks(): - # use standard level of track info for 'GoodTracks' - alg += TrackParticleD3PDObject (**_args ( 3, 'Tracks1', kw, - sgkey = 'GoodTracks', - label = 'trk', - prefix = 'trk_')) - - # ... high-pt tracks (nSCT>3; pt>5 GeV) - - if flags.doHighPtTracks(): - - from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags as highPtFlags - highPtFlags.doTruth = True - highPtFlags.storeDiagonalCovarianceAsErrors = True - highPtFlags.storeHitTruthMatching = True - highPtFlags.storePixelHitsOnTrack = False - highPtFlags.storePixelHolesOnTrack = False - highPtFlags.storePixelOutliersOnTrack = False - highPtFlags.storeSCTHitsOnTrack = False - highPtFlags.storeSCTHolesOnTrack = False - highPtFlags.storeSCTOutliersOnTrack = False - highPtFlags.storeTRTHitsOnTrack = False - highPtFlags.storeTRTHolesOnTrack = False - highPtFlags.storeTRTOutliersOnTrack = False - highPtFlags.storeTrackFitQuality = True - highPtFlags.storeTrackMomentum = True - highPtFlags.storeTrackSummary = True - highPtFlags.storeTrackSummary.IDOutliers = True - highPtFlags.storeTrackSummary.PixelInfoPlus = True - highPtFlags.storeTrackSummary.SCTInfoPlus = True - highPtFlags.storeTrackSummary.TRTInfoPlus = True - highPtFlags.storeTrackSummary.InfoPlus = True - highPtFlags.trackParametersAtBeamSpotLevelOfDetails = 0 - highPtFlags.trackParametersAtGlobalPerigeeLevelOfDetails = 2 - highPtFlags.trackParametersAtPrimaryVertexLevelOfDetails = 3 - - HighPtTrackParticleD3PDObject = TrackD3PDObject(_label='trkpt5', - _prefix='trkpt5_', - _sgkey='HighPtTracks', - typeName='Rec::TrackParticleContainer', - flags=highPtFlags) - - alg += HighPtTrackParticleD3PDObject(**_args ( 3, 'Tracks2', kw, - sgkey = 'HighPtTracks', - label = 'trkpt5', - prefix = 'trkpt5_')) - """ - - # Primary vertex block - May be missing in single-beam data. - - alg += PrimaryVertexD3PDObject (**_args (1, 'PrimaryVertex', kw, - allowMissing = True, - sgkey = D3PDMakerFlags.VertexSGKey(), - prefix = 'vxp_')) - - # MBTS - - alg += MBTSD3PDObject (**_args (10, 'MBTS', kw)) - alg += MBTSTimeD3PDObject (**_args (10, 'MBTSTime', kw)) - alg += MBTSTriggerBitsD3PDObject (**_args (10, 'MBTSTriggerBits', kw)) - #alg += CollisionDecisionD3PDObject(**_args (10, 'CollisionDecision', kw)) - - # Truth - - if rec.doTruth(): - - from TruthD3PDMaker.TruthParticleD3PDObject import TruthParticleD3PDObject - from MuonD3PDMaker.TruthMuonD3PDObject import TruthMuonD3PDObject - - alg += TruthMuonD3PDObject (**_args ( 2, 'TruthMuon', kw)) - alg += GenEventD3PDObject (**_args ( 1, 'GenEvent', kw)) - alg += TruthParticleD3PDObject(**_args ( 1, 'TruthParticle', kw)) - - # TruthJets - alg += JetD3PDObject (**_args ( 1, 'AK4TruthJet', kw, - sgkey='AntiKt4TruthJets',prefix='jet_AntiKt4Truth_', - allowMissing = True)) - alg += JetD3PDObject (**_args ( 1, 'AK6TruthJet', kw, - sgkey='AntiKt6TruthJets', prefix='jet_AntiKt6Truth_', - allowMissing = True)) - alg += JetD3PDObject (**_args ( 1, 'AK4TruthJetALL', kw, - sgkey='AntiKt4TruthJets_ALL', prefix='jet_AntiKt4TruthALL_', - allowMissing = True)) - alg += JetD3PDObject (**_args ( 1, 'AK6TruthJetALL', kw, - sgkey='AntiKt6TruthJets_ALL', prefix='jet_AntiKt6TruthALL_', - allowMissing = True)) - alg += JetD3PDObject (**_args ( 1, 'AK4TruthJetWZ', kw, - sgkey='AntiKt4TruthJets_WZ', prefix='jet_AntiKt4TruthWZ_', - allowMissing = True)) - alg += JetD3PDObject (**_args ( 1, 'AK6TruthJetWZ', kw, - sgkey='AntiKt6TruthJets_WZ', prefix='jet_AntiKt6TruthWZ_', - allowMissing = True)) - - - if not rec.doTruth(): - alg += BeamSpotD3PDObject(10) - - - from TrigMissingETD3PDMaker.TrigMETD3PD import TrigMETD3PDObjects - TrigMETD3PDObjects(alg,10) - - # Trigger - - if D3PDMakerFlags.DoTrigger(): - - alg += SMWZTriggerBitsD3PDObject (**_args (10, 'SMWZTriggerBits', kw)) - - # Trigger Decision + metadata - - alg += TrigDecisionD3PDObject (**_args(10, 'TrigDecision', kw)) - addTrigConfMetadata(alg) - - # Bunch group info - - alg += BGCodeD3PDObject (**_args (2, 'BGCode', kw)) - - # Egamma and Mu - - TrigEgammaD3PDObjects (alg, 1) - TrigMuonD3PDObjects( alg, 1) - - # Esum - - #alg += EnergySumROID3PDObject(**_args (2, 'EnergySumROI', kw, - # prefix = "trig_L1_esum_")) - - # The LVL2 information: - - #alg += TrigMETD3PDObject(**_args( 2, 'TrigMETL2', kw, - # prefix = "trig_L2_met_", - # sgkey = "HLT_T2MissingET" )) - # The EF information: - - #alg += TrigMETD3PDObject(**_args ( 2, 'TrigMETEF', kw, - # prefix = "trig_EF_met_", - # sgkey = "HLT_TrigEFMissingET" )) - -# Event metadata - - alg.MetadataTools += [LBMetadataConfig()] - -# Invoke routine to write GSCFactor and WidthFraction jet moments - - #addSTRUCTCalib('AntiKt4LCTopoJets', input='Topo', mainParam=0.4) - #addSTRUCTCalib('AntiKt6LCTopoJets', input='Topo', mainParam=0.6) - #addSTRUCTCalib('AntiKt4TopoEMJets', input='Topo', mainParam=0.4) - #addSTRUCTCalib('AntiKt6TopoEMJets', input='Topo', mainParam=0.6) - - if D3PDMakerFlags.FilterCollCand(): - from CaloD3PDMaker.CollisionFilterAlg import CollisionFilterAlg - alg.filterSeq += CollisionFilterAlg (tuplename + '_CollCandFilter') - - return alg diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py deleted file mode 100644 index 1afc2d9e08e78484e915fc11b342858d85d16da2..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5D3PDProdFlags.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# $Id$ -# -# @file HSG5DPDUtils/python/HSG5D3PDProdFlags.py -# @author Robert Harrington <roberth@cern.ch> -# @date March 16, 2012 -# @brief Define flags and configuration settings used when making -# HSG5 D3PDs from production transforms. -# -# Any objects here with a name of the form Write*D3PD that derive -# from JobProperty are added to D3PDProdFlags. -# - -from AthenaCommon.JobProperties import JobProperty - -allowedD3PDList = [] - -# WH D3PD -class WriteHSG5WHD3PD (JobProperty): - """Produce the HSG5 BOOSTED WH D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5WH' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5WHFile') - -class WriteHSG5WHUD3PD (JobProperty): - """Produce the HSG5 UNBOOSTED WH D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5WHU' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5WHUFile') - -class WriteHSG5WHQD3PD (JobProperty): - """Produce the HSG5 UNBOOSTED WH QCD D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5WHQ' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5WHQFile') - -# ZHLL D3PD -class WriteHSG5ZHLLD3PD (JobProperty): - """Produce the HSG5 BOOSTED ZH->llbb D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5ZHLL' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5ZHLLFile') - -class WriteHSG5ZHLLUD3PD (JobProperty): - """Produce the HSG5 UNBOOSTED ZH->llbb D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5ZHLLU' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5ZHLLUFile') - -# ZHMET D3PD -class WriteHSG5ZHMETD3PD (JobProperty): - """Produce the HSG5 BOOSTED ZH->nunubb D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5ZHMET' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5ZHMETFile') - -class WriteHSG5ZHMETUD3PD (JobProperty): - """Produce the HSG5 UNBOOSTED ZH->nunubb D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5ZHMETU' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5ZHMETUFile') - -# GAMH D3PD (should no longer be used) -class WriteHSG5GAMHD3PD (JobProperty): - """Produce the HSG5 boosted gamma-H D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5GAMH' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5GAMHFile') - -# GAMZ D3PD -class WriteHSG5GAMZD3PD (JobProperty): - """Produce the HSG5 boosted gamma-Z D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5GAMZ' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5GAMZFile') - -# ZBB D3PD -class WriteHSG5ZBBD3PD (JobProperty): - """Produce the HSG5 boosted Z->bb D3PD.""" - statusOn = True - allowedTypes = ['bool'] - StoredValue = False - StreamName = 'StreamNTUP_HSG5ZBB' - FileName = '' - isVirtual = False - DPDMakerScript = "HSG5DPDUtils/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py" - TreeNames = ['physics'] - SubSteps = ['a2d', 'e2d'] -allowedD3PDList.append('outputNTUP_HSG5ZBBFile') diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py deleted file mode 100644 index e3657920c45e5e289d87eda78dd7d26ebe038a76..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Flags.py +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# -## @file HSG5D3PDUtils/python/HSG5Flags.py -## @purpose Python module to hold common flags to configure HSG5D3PD JobOptions -## - -##----------------------------------------------------------------------------- -## Import -from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer -from AthenaCommon.JobProperties import jobproperties - -# General flags -_flags = [] - -class doHadronicRecoil(JobProperty): - """ Turn on filling of hadronic recoil branches - """ - statusOn=True - allowedTypes=['bool'] - StoredValue=False -_flags.append(doHadronicRecoil) - -class doGoodTracks(JobProperty): - """ Turn on filling of hadronic recoil branches - """ - statusOn=True - allowedTypes=['bool'] - StoredValue=True -_flags.append(doGoodTracks) - -class doHighPtTracks(JobProperty): - """ Turn on filling of HighPtTracks branches - """ - statusOn=False - allowedTypes=['bool'] - StoredValue=False -_flags.append(doHighPtTracks) - -class doHighPtClusters(JobProperty): - """ Turn on filling of HighPtClusters branches - """ - statusOn=False - allowedTypes=['bool'] - StoredValue=False -_flags.append(doHighPtClusters) - -class doHighPtEMClusters(JobProperty): - """ Turn on filling of HighPtEMClusters branches - """ - statusOn=False - allowedTypes=['bool'] - StoredValue=False -_flags.append(doHighPtEMClusters) - -class doTaus(JobProperty): - """ Turn on filling of tau branches - """ - statusOn=False - allowedTypes=['bool'] - StoredValue=False -_flags.append(doTaus) - -class doPhotons(JobProperty): - """ Turn on filling of photon branches - """ - statusOn=False - allowedTypes=['bool'] - StoredValue=False -_flags.append(doPhotons) - -class doAllMissingET(JobProperty): - """ Turn on filling of all MissingET branches - """ - statusOn=True - allowedTypes=['bool'] - StoredValue=True -_flags.append(doAllMissingET) - -# V0D3PDObject flags - - -##----------------------------------------------------------------------------- -## Definition of the HSG5 flag container - -class HSG5Flags(JobPropertyContainer): - """ The HSG5 base D3PD flag container - """ - -class HSG5WHFlags(JobPropertyContainer): - """ The HSG5WH D3PD flag container - """ - -class HSG5WHUFlags(JobPropertyContainer): - """ The HSG5WHU D3PD flag container - """ - -class HSG5WHQFlags(JobPropertyContainer): - """ The HSG5WHU D3PD flag container - """ - -class HSG5ZHLLFlags(JobPropertyContainer): - """ The HSG5ZHLL D3PD flag container - """ - -class HSG5ZHLLUFlags(JobPropertyContainer): - """ The HSG5ZHLLU D3PD flag container - """ - -class HSG5ZHMETFlags(JobPropertyContainer): - """ The HSG5ZHMET D3PD flag container - """ - -class HSG5ZHMETUFlags(JobPropertyContainer): - """ The HSG5ZHMETU D3PD flag container - """ - -class HSG5GAMZFlags(JobPropertyContainer): - """ The HSG5GAMZ D3PD flag container - """ - -class HSG5ZBBFlags(JobPropertyContainer): - """ The HSG5ZBB D3PD flag container - """ - -# add the reconstruction flags container to the top containers -jobproperties.add_Container(HSG5Flags) -jobproperties.add_Container(HSG5WHFlags) -jobproperties.add_Container(HSG5WHUFlags) -jobproperties.add_Container(HSG5WHQFlags) -jobproperties.add_Container(HSG5ZHLLFlags) -jobproperties.add_Container(HSG5ZHLLUFlags) -jobproperties.add_Container(HSG5ZHMETFlags) -jobproperties.add_Container(HSG5ZHMETUFlags) -jobproperties.add_Container(HSG5GAMZFlags) -jobproperties.add_Container(HSG5ZBBFlags) - -for flag in _flags: - jobproperties.HSG5Flags.add_JobProperty(flag) - jobproperties.HSG5WHFlags.add_JobProperty(flag) - jobproperties.HSG5WHUFlags.add_JobProperty(flag) - jobproperties.HSG5WHQFlags.add_JobProperty(flag) - jobproperties.HSG5ZHLLFlags.add_JobProperty(flag) - jobproperties.HSG5ZHLLUFlags.add_JobProperty(flag) - jobproperties.HSG5ZHMETFlags.add_JobProperty(flag) - jobproperties.HSG5ZHMETUFlags.add_JobProperty(flag) - jobproperties.HSG5GAMZFlags.add_JobProperty(flag) - jobproperties.HSG5ZBBFlags.add_JobProperty(flag) -del _flags - -HSG5Flags=jobproperties.HSG5Flags -HSG5WHFlags=jobproperties.HSG5WHFlags -HSG5WHUFlags=jobproperties.HSG5WHUFlags -HSG5WHQFlags=jobproperties.HSG5WHQFlags -HSG5ZHLLFlags=jobproperties.HSG5ZHLLFlags -HSG5ZHLLUFlags=jobproperties.HSG5ZHLLUFlags -HSG5ZHMETFlags=jobproperties.HSG5ZHMETFlags -HSG5ZHMETUFlags=jobproperties.HSG5ZHMETUFlags -HSG5GAMZFlags=jobproperties.HSG5GAMZFlags -HSG5ZBBFlags=jobproperties.HSG5ZBBFlags - - diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py deleted file mode 100644 index e4e4ef8ccb28e84582965a31710d46bdba5d06fc..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/HSG5Selectors.py +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -import AthenaCommon.SystemOfUnits as Units -from D2PDMaker.D2PDMakerConf import D2PDMuonSelector, D2PDElectronSelector - -from ROOT import egammaPID - -class MuonSelector( object ) : - - def __init__( self, - name = 'HSG5_MuonSelector', - inputCollection = 'MuidMuonCollection', - outputLinkCollection = 'HSG5_ElectronLinkCollection', - minNumberPassed = 1, - ptMin = 18.0, - absEtaMax = 2.5, - acceptIsCombined = False, - acceptIsSegmentTagged = False, - doRelPtCone20 = False, - relPtCone20Max = 0.15, - requireIsLoose = False, - requireIsTight = False) : - - self.name = name - self.inputCollection = inputCollection - self.outputLinkCollection = outputLinkCollection - self.minNumberPassed = minNumberPassed - self.ptMin = ptMin - self.absEtaMax = absEtaMax - self.acceptIsCombined = acceptIsCombined - self.acceptIsSegmentTagged = acceptIsSegmentTagged - self.doRelPtCone20 = doRelPtCone20 - self.relPtCone20Max = relPtCone20Max - self.muonRequireIsLoose = requireIsLoose - self.muonRequireIsTight = requireIsTight - - def getMuonSelector ( self, name="", inputCollection="", outputLinkCollection="" ) : - - if name!="": - self.name=name - if inputCollection!="": - self.inputCollection=inputCollection - if outputLinkCollection!="": - self.outputLinkCollection=outputLinkCollection - - muonParametersList = [] - muonParametersMinList = [] - muonParametersMaxList = [] - muonParametersUseRelativeCutsList = [] - if self.doRelPtCone20: - muonParametersList.append(17) # ptcone20 - muonParametersMinList.append(0.) - muonParametersMaxList.append(self.relPtCone20Max) - muonParametersUseRelativeCutsList.append(True) - - return D2PDMuonSelector(self.name, - inputCollection = self.inputCollection, - outputLinkCollection = self.outputLinkCollection, - minNumberPassed = self.minNumberPassed, - ptMin = self.ptMin*Units.GeV, - absEtaMax = self.absEtaMax, - muonAcceptIsCombined = self.acceptIsCombined, - muonAcceptIsSegmentTagged = self.acceptIsSegmentTagged, - muonRequireIsLoose = self.muonRequireIsLoose, - muonRequireIsTight = self.muonRequireIsTight, - muonParametersList = muonParametersList, - muonParametersMinList = muonParametersMinList, - muonParametersMaxList = muonParametersMaxList, - muonParametersUseRelativeCutsList = muonParametersUseRelativeCutsList ) - - -class ElectronSelector( object ) : - - def __init__( self, - name = 'HSG5_ElectronSelector', - outputLinkCollection = 'HSG5_ElectronLinkCollection', - minNumberPassed = 1, - ptMin = 20.0, - clusterEtaMax = 2.5, - requireTight = False) : - - self.name = name - self.outputLinkCollection = outputLinkCollection - self.minNumberPassed = minNumberPassed - self.ptMin = ptMin - self.clusterEtaMax = clusterEtaMax - self.requireTight = requireTight - - def getElectronSelector ( self, name="", outputLinkCollection="" ) : - - if name!="": - self.name=name - if outputLinkCollection!="": - self.outputLinkCollection=outputLinkCollection - - electronIsEM = egammaPID.isEM - if self.requireTight: - electronIsEM = egammaPID.ElectronTight - - return D2PDElectronSelector( self.name, - inputCollection = 'ElectronAODCollection', - outputLinkCollection = self.outputLinkCollection, - minNumberPassed = self.minNumberPassed, - ptMin = self.ptMin*Units.GeV, - clusterEtaMax = self.clusterEtaMax, - electronIsEM = electronIsEM ) - - -class JetSelector( object ) : - - def __init__( self, - name = 'HSG5_JetSelector', - inputCollection = 'AntiKt4TopoEMJets', - outputLinkCollection = 'HSG5_JetLinkCollection', - minNumberPassed = 1, - ptMin = 20.0, - etaMax = 2.5, - emVeto = False, - emCollection = 'HSG5_ElectronLinkCollection', - emJetDeltaRMax = 0.3) : - - self.name = name - self.inputCollection = inputCollection, - self.outputLinkCollection = 'HSG5_JetLinkCollection' - self.minNumberPassed = minNumberPassed - self.ptMin = ptMin - self.etaMax = 2.5 - self.emVeto = emVeto - self.emCollection = emCollection - self.emJetDeltaRMax = emJetDeltaRMax - - def getJetSelector( self, name="", outputLinkCollection="") : - - if name!="": - self.name=name - if outputLinkCollection!="": - self.outputLinkCollection=outputLinkCollection - - - outputAssociationContainerList = [] - numberOfAssociationsContainerList = [] - - if self.emVeto: - from AssociationComps.AssociationCompsConf import DeltaRAssociationTool - ToolSvc += DeltaRAssociationTool( self.name+"_emDeltaRAssocTool", - OutputLevel = INFO, - inputAssociateToCollection = self.emCollection, - deltaRMax = self.emJetDeltaRMax, - writeUserData = False) - outputAssociationContainerList.append(self.name+"_emDeltaRAssocTool") - numberOfAssociationsContainerList.append(0) - - return D2PDJetSelector( self.name, - inputCollection = self.inputCollection, - outputLinkCollection = self.outputLinkCollection, - associationToolList = [ ToolSvc.HSG5WHU_emDeltaRAssociationTool ], - outputAssociationContainerList = outputAssociationContainerList, - numberOfAssociationsMaxCutList = numberOfAssociationsMaxCutList, - minNumberPassed = self.minNumberPassed, - ptMin = self.ptMin*Units.GeV, - etaMax = self.etaMax) diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py deleted file mode 100644 index 292bbe426914bb69082e2f8e5dd777b0bf734fbc..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSD3PD.py +++ /dev/null @@ -1,221 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from JetD3PDMaker.JetD3PDObject import getJetD3PDObject -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from RecExConfig.RecFlags import rec -from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation -from D3PDMakerCoreComps.IndexAssociation import IndexAssociation -from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation -from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation -import JetSubstructureD3PDMaker -from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject -import EventCommonD3PDMaker -#from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject -from JetTagD3PDMaker.JetTagD3PDMakerKeys import JetTagD3PDKeys -from JetTagD3PDMaker.JetTagD3PDMakerFlags import JetTagD3PDFlags -import JetTagD3PDMaker - - -from AthenaCommon.AlgSequence import AlgSequence -topSequence = AlgSequence() - -def getJetCollectionD3PDObject(objectname = 'JetCollectionD3PDObject', prefix = 'jet_'): - return make_SG_D3PDObject('JetCollection','','jet_', objectname) - - -def AddUniqueMoments(obj, momlist, theblockname = 'ConfigParams', level = 0): - obj.defineBlock(level, theblockname, JetSubstructureD3PDMaker.JetMomentUniqueFillerTool, Moments = momlist, OutputLevel=3) - - -def AddHadronicInfo(obj, additionalMoments = [], theblockname = 'SubjetMomentsHadronic', level=0): - - from JetD3PDMaker import JetMomentFillerTool - obj.defineBlock(level, theblockname, JetMomentFillerTool,Moments= [] + additionalMoments) - -def AddAssocJetsIndex(obj, jetassocname, jettarget, intermediate_names = [], level=0): - - JetAssocTrack = IndexMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,jettarget,level = level, - prefix=jetassocname+'_', - blockname=jetassocname+'blockindex', AssociationName = jetassocname , IntermediateAssociationNames=intermediate_names, OutputLevel=3 ) - -def AddConstitIndex(object, typename='CaloCluster', target='cl_', level=0): - - import EventCommonD3PDMaker - import D3PDMakerCoreComps - ConstitAssoc = ContainedVectorMultiAssociation \ - (object, - EventCommonD3PDMaker.NavigableConstituentAssociationTool, - 'constit_', - blockname=typename+'NavigableConstituentAssociationTool', - TypeName = typename, WriteWeight = True, - level = level) - - ConstitAssoc.defineBlock (0, 'ConstitIndex'+typename, D3PDMakerCoreComps.IndexFillerTool, Target = target) - -def AddConstitTruthIndex(object, typename='TruthParticle', target='mc_', level=0): - - import EventCommonD3PDMaker - import D3PDMakerCoreComps - import TruthD3PDMaker - ConstitAssoc = ContainedVectorMultiAssociation \ - (object, - EventCommonD3PDMaker.NavigableConstituentAssociationTool, - 'constit_', - blockname=typename+'NavigableConstituentAssociationTool', - TypeName = typename, WriteWeight = False, - level = level) - - genPart = SimpleAssociation(ConstitAssoc,TruthD3PDMaker.TruthParticleGenParticleAssociationTool) - trupart2 = IndexAssociation (genPart, TruthD3PDMaker.GenParticleTruthParticleAssociationTool, - target = 'mc_', - Target = 'mc_') - - - -def AddBTaggingInfo(obj, level = 0, block_prefix = "my"): - - obj.defineBlock(level,block_prefix+JetTagD3PDKeys.BTagWeightsBlockName(), - JetTagD3PDMaker.JetTagBTagWeightsFillerTool, - prefix=JetTagD3PDKeys.BTagWeightsPrefix(), - TaggerNames=JetTagD3PDFlags.Taggers()) - #addBTagInfoToJetObject(obj,0) - -def AddBTaggingInfoFromSubjets(obj, sj_assoc_name = 'SplitFiltSubjets', sj_prefix = "subjets", level=0): - t = ContainedVectorMultiAssociation(obj, JetSubstructureD3PDMaker.JetSubstructureTagJetINavigable4MomentumAssociationTool,level = level, prefix= sj_prefix+"_", - blockname='blockbtag'+sj_assoc_name, nrowName = 'nsj', OutputLevel=3, AssociationName=sj_assoc_name, IntermediateAssociationNames=['Parent']) - - #t.defineBlock(0, 'myKinematics', EventCommonD3PDMaker.FourMomFillerTool, WriteE = True) - - AddBTaggingInfo(t, 0, "my"+sj_assoc_name) - -myJSD3PD = [] - -def JSD3PD(jetsToWrite, alg): - - global myJSD3PD - - if not alg: - raise TypeError("alg should be specified!") - - jsD3PD=None - for val in myJSD3PD: - if val[0]==jetsToWrite: - print "using existing JSD3PD" - jsD3PD=val[1] - break - - if jsD3PD==None: - jsD3PD = JSD3PD_Tool(jetsToWrite) - myJSD3PD += [ (jetsToWrite, jsD3PD) ] - - jsD3PD.addToAlg(alg) - -class JSD3PD_Tool(object): - - def __init__(self,jetsToWrite): - - self.commonExcludeList = ['El02Match','Mu02Match','L1Info','L2Info','EFInfo'] - self.commonIncludeList = [] - - MyJetD3PDObject = getJetD3PDObject(objectname='MyJetD3PDObject') - MyGroomedJetD3PDObject = getJetD3PDObject(objectname='MyGroomedJetD3PDObject') - - import re - JetAlgPattern = re.compile(r'^(\D+)(\d{1,2})(\D+)Jets') #assuming standard notation - ars = JetAlgPattern.match(jetsToWrite[0]).groups() - - self.parentJets = ''.join(ars) #remove the 'Jets' at the end - - self.groomedJetsList = jetsToWrite[1] - - if 'Track' in self.parentJets: - AddConstitIndex(MyGroomedJetD3PDObject, typename='Rec::TrackParticle', target='trk') - AddConstitIndex(MyJetD3PDObject, typename='Rec::TrackParticle', target='trk') - elif 'LCTopo' in self.parentJets: - AddConstitIndex(MyGroomedJetD3PDObject) - AddConstitIndex(MyJetD3PDObject) - elif 'Truth' in self.parentJets: - AddConstitTruthIndex(MyJetD3PDObject) - AddConstitTruthIndex(MyGroomedJetD3PDObject) - - #if 'Track' not in self.parentJets and 'Truth' not in self.parentJets: - # AddAssocJetsIndex(MyJetD3PDObject, 'TrackJets', 'jet_' + ars[0] + ars[1] + 'TrackZ_') - # if rec.doTruth(): - # AddAssocJetsIndex(MyJetD3PDObject, 'TruthJets', 'jet_' + ars[0] + ars[1] + 'Truth_') - - self.JetQualInclude = [] - - if 'Topo' in self.parentJets or 'LCTopo' in self.parentJets: - self.commonIncludeList += ['ConstituentScale', 'EMScale'] - AddHadronicInfo(MyJetD3PDObject, ['OriginIndex','nTrk','sumPtTrk','EtaOrigin' , 'PhiOrigin' , 'MOrigin'], theblockname = 'OriginIndexBlock') - AddHadronicInfo(MyGroomedJetD3PDObject, ['EtaOrigin' , 'PhiOrigin' , 'MOrigin' ], theblockname = 'OriginIndexBlock') - - - if (self.parentJets == 'AntiKt10LCTopo') or (self.parentJets == 'CamKt12LCTopo'): - AddHadronicInfo(MyJetD3PDObject, ['LCJES', 'LCJES_EtaCorr', 'LCJES_MassCorr' ], theblockname='LCJESBlock') - AddHadronicInfo(MyGroomedJetD3PDObject, ['LCJES', 'LCJES_EtaCorr', 'LCJES_MassCorr' ], theblockname='LCJESBlock') - - self.VtxInclude = [] - - if 'Topo' in self.parentJets: - self.VtxInclude += ['JVtx','JetVertexFraction'] - - AddAssocJetsIndex(MyGroomedJetD3PDObject, 'Parent', 'jet_' + self.parentJets + '_') - for gr in self.groomedJetsList: - AddAssocJetsIndex(MyJetD3PDObject, gr, 'jet_' + self.parentJets + gr + '_') - - MyGroomedJetCollectionD3PDObject = getJetCollectionD3PDObject(objectname = "MyGroomedJetCollectionD3PDObject") - AddUniqueMoments(MyGroomedJetCollectionD3PDObject, ['SmallR','PtFrac', 'NSub'], theblockname = 'TrimConfigMoments', level=99) - AddUniqueMoments(MyGroomedJetCollectionD3PDObject, ['NSubjets','ktycut2','massFraction','minRfilt','minSplitR'], theblockname = 'FiltConfigMoments', level = 99) - - AddHadronicInfo(MyGroomedJetD3PDObject, ['CORE_RBB','CORE_RFILT'], theblockname = 'FiltMoments', level=99) - - ## in groomedJetsList, subjets name should follow the name of the 'full/composite' jet. - for idx,gr in enumerate(self.groomedJetsList): - ## names are unique - if 'Subjets' in gr and idx != 0 and 'Subjets' not in self.groomedJetsList[idx-1]: - AddBTaggingInfoFromSubjets(MyGroomedJetD3PDObject, sj_assoc_name = gr, sj_prefix = gr, level = 99) - AddAssocJetsIndex(MyGroomedJetD3PDObject, gr, 'jet_' + self.parentJets + gr + '_', intermediate_names = ['Parent'], level=99) - elif 'Subjets' in gr: - raise ValueError("Subjets without full composite jet ?") ## not suppose to happen - - self.MyJetD3PDObject = MyJetD3PDObject - self.MyGroomedJetD3PDObject = MyGroomedJetD3PDObject - self.MyGroomedJetCollectionD3PDObject = MyGroomedJetCollectionD3PDObject - - - - def addToAlg(self,alg): - - alg += self.MyJetD3PDObject(0, prefix='jet_' + self.parentJets + '_', sgkey=self.parentJets+'Jets', exclude=self.commonExcludeList, include = self.commonIncludeList + self.VtxInclude + self.JetQualInclude) - - for idx,gr in enumerate(self.groomedJetsList): - - kw = {} - includelist = [] - includelist_unique = [] - - if 'Trim' in gr: - includelist_unique += ['TrimConfigMoments'] - - elif 'Filt' in gr and 'Subjets' not in gr: - includelist += ['FiltMoments'] - includelist_unique += ['FiltConfigMoments'] - if len(self.groomedJetsList) > idx+1 and 'Subjets' in self.groomedJetsList[idx+1]: - includelist += ['blockbtag'+self.groomedJetsList[idx+1], self.groomedJetsList[idx+1]+'blockindex'] - - elif 'Subjets' in gr: - includelist += [JetTagD3PDKeys.BTagWeightsBlockName()] - includelist += [JetTagD3PDKeys.JetTrackAssocBlockName()] - includelist += [JetTagD3PDKeys.JetTrackBlockName()] - includelist += [JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()] - includelist += [JetTagD3PDKeys.IPInfoPlusTrackBlockName()] - - kw[JetTagD3PDKeys.JetTrackAssocBlockName()+'_target']= "trk" - kw[JetTagD3PDKeys.IPInfoPlusTrackAssocBlockName()+'_target']= "trk" - - alg += self.MyGroomedJetD3PDObject(0, prefix='jet_' + self.parentJets + gr + '_', sgkey=self.parentJets + gr +'Jets', include = includelist + self.commonIncludeList,exclude=self.commonExcludeList,**kw) - - alg += self.MyGroomedJetCollectionD3PDObject( 0, prefix='jet_' + self.parentJets + gr + '_config_', sgkey=self.parentJets + gr +'Jets', include = includelist_unique) - - return diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py deleted file mode 100644 index a1d79d7f5526be7d5532fef3dc3fa8ee2acea6a2..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/JSjets.py +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -#####Jet Reco ############ - -# Before adding your algorithms to topSequence -from JetRec.JetGetters import * -from JetRec.JetRecFlags import jetFlags -from JetRecTools.JetRecToolsConf import * -from AthenaCommon.AlgSequence import AlgSequence -from JetRec.JetMomentGetter import add_jetMoments_to_JetAlg, make_JetMomentGetter -from JetRec.JetRecConf import JetSorterTool -#from JetMomentTools.JetMomentToolsConf import JetWidthTool - -import JetSubStructure - -_GroomingTool = { - 'Trimming' : JetSubStructure.SimpleTrimmingTool, - 'BDRSFiltering' : JetSubStructure.BDRSFilteringTool, -} - -def buildName(GroomedDict): - - if type(GroomedDict) != dict: - raise TypeError("GroomedDicts must contain dicts!") - - if GroomedDict['Type'] in _GroomingTool: - strconfig = "" - theArgs = GroomedDict['args'] - for k in theArgs.keys(): - if type(theArgs[k]) == int: - strconfig += k + '%d' % theArgs[k] - elif type(theArgs[k]) == float: - strconfig += k + '%d' % (theArgs[k]*100) - - toolname = strconfig - - return toolname - else: - raise KeyError("Couldn't find grooming tool %s" % GroomedDict['Type']) - - -def getGroomingTools(GroomedDicts): - - myGroomingTools = [] - catNames = [] - for gr in GroomedDicts: - toolname = buildName(gr) - defname = _GroomingTool[gr['Type']].__slots__['Name'] ## safe hack ? - - defsubjetsname = '' - if "SubjetsName" in _GroomingTool[gr['Type']].__slots__.keys(): - defsubjetsname = _GroomingTool[gr['Type']].__slots__['SubjetsName'] - - kw = gr['args'].copy() - if 'Name' not in kw.keys(): - kw['Name'] = defname - kw['Name'] += toolname - - if 'SubjetsName' not in kw.keys() and defsubjetsname != '': - kw['SubjetsName'] = defsubjetsname - kw['SubjetsName'] += toolname - - myGroomingTools += [_GroomingTool[gr['Type']](gr['Type']+toolname, StoreConfigParam = True, **kw)] - - catNames += [ kw['Name'] ] - - ## are we requesting subjets ? - if "SaveSubjets" in kw.keys(): - if kw["SaveSubjets"] == True: - catNames += [ kw['SubjetsName'] ] - - return myGroomingTools, catNames - - -###################### -## Truth Jets ## -###################### - -def setupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq): - if rec.doTruth(): - myGroomingTools, catNames = getGroomingTools(GroomedDicts) - - sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3) - - assoc_tool_truth = JetSubStructure.JetAssociationTool( - name = 'JetAssocToolTruth', - GroomingTools = myGroomingTools, UsedSignalState = 2, - JetAlgTools = [sortertool], OutputLevel = 3 - ) - - myjetgetter_truth = make_StandardJetGetter(myjetfinder, myjetdr, 'Truth', seq = theseq, doCalib=False ,addDefaultMoment=False) - truthcontname = myjetgetter_truth.outputKey() - - make_JetMomentGetter(truthcontname , [assoc_tool_truth], theseq ) - - return [ truthcontname, catNames ] - else: - return [ None, None ] - -###################### -## Track Jets ## -###################### - -def setupTrackJets(myjetfinder, myjetdr, GroomedDicts, theseq): - - myGroomingTools, catNames = getGroomingTools(GroomedDicts) - - sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3 ) - - assoc_tool_track = JetSubStructure.JetAssociationTool( - name = 'JetAssocToolTrack', - GroomingTools = myGroomingTools, UsedSignalState = 2, - JetAlgTools = [sortertool], OutputLevel = 3 - ) - - - #---- TrackJet ---- - - from JetSubStructure.JSTrackJets import createJSTrackJets - mygetter = createJSTrackJets(theseq, myjetfinder,myjetdr) - - trackjetcontname = mygetter.outputKey() - - #---- End TrackJet ---- - - make_JetMomentGetter(trackjetcontname , [assoc_tool_track], theseq ) - - return [ trackjetcontname, catNames ] - - -###################### -## Calo Jets ## -###################### - -def setupCaloJets(myjetfinder, myjetdr, myjetinput, GroomedDicts, theseq): - - myGroomingTools, catNames = getGroomingTools(GroomedDicts) - - sortertool = JetSorterTool('myJetSorter', SortOrder="ByPtDown", OutputLevel=3 ) - - grjets_calib = [] - - ## Origin correction / Eta-Mass-JES hack - - from JetSubStructure.mySetupJetCalibrators import doEtaMassJESCorrection - from JetCalibTools.MakeCalibSequences import calibTags - calibTags['ETAMASSJES'] = doEtaMassJESCorrection - - mydoCalib = False - mycalibName = '' - - if 'LCTopo' in myjetinput: - mydoCalib = True - if (myjetfinder + '%d'%(myjetdr*10) == 'AntiKt10') or (myjetfinder + '%d'%(myjetdr*10) == 'CamKt12'): - mycalibName = 'LC:ORIGIN_ETAMASSJES' - else: - mycalibName = 'LC:ORIGIN' - - stdcaliblist = [] - allowedcalib = ['AntiKt10LCTopoTrimmedJets', 'AntiKt10LCTopoTrimmedPtFrac3SmallR30Jets','AntiKt10LCTopoTrimmedPtFrac5SmallR30Jets','CamKt12LCTopoTrimmedPtFrac5SmallR30Jets'] - for x in catNames: - author = myjetfinder + '%d'%(myjetdr*10) + myjetinput + x + 'Jets' - if author in allowedcalib : - grjets_calib += [JetSubStructure.JetAlgToolWrapper(name = 'calibtool_origin_etamassjes_'+x, - JetAlgTool = getStandardCalibTool(myjetfinder,myjetdr, myjetinput+x, doCalib=True, calibName='LC:ORIGIN_ETAMASSJES')[0], - GroomedjetsAuthor = [x] )] - else: - stdcaliblist += [x] - - if stdcaliblist != [] : - grjets_calib += [JetSubStructure.JetAlgToolWrapper(name = 'calibtool_origin', - JetAlgTool = getStandardCalibTool(myjetfinder,myjetdr, myjetinput, doCalib=True, calibName='LC:ORIGIN')[0], - GroomedjetsAuthor = stdcaliblist )] - elif 'Topo' in myjetinput: - mydoCalib = True - mycalibName = 'EM:ORIGIN' - grjets_calib += getStandardCalibTool(myjetfinder,myjetdr, myjetinput, doCalib=True, calibName='EM:ORIGIN') - - assoc_tools = [] - if rec.doTruth(): - truthcontname = myjetfinder + '%dTruthJets' % (myjetdr*10) - if hasattr(theseq, truthcontname): - truthj_assoc = JetSubStructure.JetJetAssociatorTool("Truth_JetJetAssociatorTool", ContainerName = truthcontname, AssociationName = "TruthJets", MatchOrigin = False) - - trackjetcontname = myjetfinder + '%dTrackZJets' % (myjetdr*10) - if hasattr(theseq, trackjetcontname): - trkj_assoc = JetSubStructure.JetJetAssociatorTool("Trk_JetJetAssociatorTool", ContainerName = trackjetcontname, AssociationName = "TrackJets", MatchOrigin = True) - - - ## batgging ## - subjets_names = [x for x in catNames if "Subjets" in x] - btag_tool = [] - if subjets_names != '': - from JetRec.JetGetters import getStandardBTaggerTool - from JetRec.JetRecFlags import jetFlags - jetFlags.doBTagging = True - _btag_tool = getStandardBTaggerTool('AntiKt', 0.4, 'LCTopo') - if len(_btag_tool) > 0: - btag_tool += [ JetSubStructure.JetAlgToolWrapper(name = 'JetBTagger_' + ''.join(subjets_names), JetAlgTool = _btag_tool[0], - GroomedjetsAuthor = subjets_names ) ] - jetFlags.doBTagging = False - - ## btagging end ## - - assoc_tool = JetSubStructure.JetAssociationTool( - name = 'JetAssocTool', - AssociatorTools = assoc_tools, - GroomingTools = myGroomingTools, UsedSignalState = 2, - JetAlgTools = grjets_calib + [sortertool] + btag_tool, OutputLevel = 3 - ) - - - myjetgetter = make_StandardJetGetter(myjetfinder, myjetdr, myjetinput, seq = theseq, doCalib=mydoCalib, calibName=mycalibName,addDefaultMoment=False) - contname = myjetgetter.outputKey() - - - # ------------------------------------------------ - # Associate a vertex and set the JVF moment. Must be placed AFTER vertex correction - # ------------------------------------------------ - from AthenaCommon.DetFlags import DetFlags - from AthenaCommon.AppMgr import ToolSvc - noVertex = jobproperties.Beam.beamType == 'cosmics' or jobproperties.Beam.beamType == 'singlebeam' - if DetFlags.detdescr.ID_on() and jetFlags.doJVF() and 'Truth' not in myjetinput and not noVertex: - from JetSubStructure.mySetupJetMomentTools import mygetJetVertexAssociationTool - myjvatool = mygetJetVertexAssociationTool(myjetfinder, myjetdr,myjetinput,'Custom%d'%(myjetdr*10)) - add_jetMoments_to_JetAlg(myjetgetter, [myjvatool]) - - make_JetMomentGetter(contname , [assoc_tool], theseq ) - - return [ contname, catNames ] - - -def createJSJets( ParentDict, GroomedDicts, theseq = AlgSequence()) : - - if type(ParentDict) != dict: - raise TypeError("ParentDict must be a dict!") - - if type(GroomedDicts) != list: - raise TypeError("GroomedDicts must be a list!") - - myjetfinder = ParentDict["JetFinder"] - myjetdr = ParentDict["JetdR"] - myjetinput = ParentDict["JetInput"] - - if myjetinput == 'Truth': - return setupTruthJets(myjetfinder, myjetdr, GroomedDicts, theseq) - elif myjetinput == 'Track': - return setupTrackJets(myjetfinder, myjetdr, GroomedDicts, theseq) - else : - return setupCaloJets(myjetfinder, myjetdr, myjetinput, GroomedDicts, theseq) - diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py deleted file mode 100644 index 59622f931a9a4f1a2450edc494a1a425e46499d2..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/LeptonFilter.py +++ /dev/null @@ -1,609 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -##============================================================================= -## Name: LeptonFilter.py -## -## Author: Robert Harrington -## Created: July 2011 -## -## Description: This is a short algorithm to select events that contain one -## electron or muon which fulfills a certain set of criteria. -##============================================================================= - -__doc__ = """This is a short algorithm to select events that contain one -electron or muon which fulfills a certain set of criteria. -""" -__version__ = "0.0.1" -__author__ = "Robert Harrington <roberth@cern.ch>" - - -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 - -class LeptonFilter( PyAthena.AthFilterAlgorithm ): - - """ - This class is a short algorithm to select events that contain one - electron which fulfills a certain set of criteria. - - The possible criteria for electrons are (with default values): - - cutEtMin = 20.0*Units.GeV) - cutIsEM = 'None' # Possible values: 'None', 'Loose', 'Medium', 'Tight', 'TightNoIsolation' - cutElAuthor = 'either' # Possible values: 'softe', 'egamma', 'either' - cutElEtaMax = 2.5 - removeEtaCrack = False - crackEtaMin = 1.37 - crackEtaMax = 1.52 - minNumberPassedEl= 1 - passAllEl = False - - The possible criteria for muons are (with default values): - - cutPtMinMu = 0*Units.GeV - muonAuthors = 'all' # Possible values: 'lowpt', 'combined', 'calo', 'standalone', 'all' - cutContainerMu = 'all' # Possible values: 'staco', 'muid', 'calo','all' - cutEtaMuMax = 3.0 - passAllMu = False - usingAOD = True - doEtconeMu = False - etconeMuMax = 6.0*Units.GeV - doNoTrackIsolMu = False - noTrackIsolMu = 5 - innerNoTrackRadiusMu = 0.05 - outerNoTrackRadiusMu = 0.5 - doPtTrackIsolMu = False - ptTrackIsolMu = 8.0*Units.GeV - innerPtTrackRadiusMu = 0.05 - outerPtTrackRadiusMu = 0.5 - doCaloIsolMu = False - caloIsolMu = 6.0*Units.GeV - innerCaloRadiusMu = 0.05 - outerCaloRadiusMu = 0.5 - doJetIsolMu = False - jetIsolEtMu = 15.0*Units.GeV - jetDistanceMu = 0.5 - minNumberPassedMu = 1 - """ - - - def __init__ ( self, name = "LeptonFilter", **kw ): - - ## initialize base class - kw['name'] = name - super(LeptonFilter, self).__init__(**kw) - - ## Define the cuts - self.electronCollectionType = kw.get('electronCollectionType', "ElectronContainer") - self.electronCollectionName = kw.get('electronCollectionName', "ElectronAODCollection") - self.goodElectronCollectionName = kw.get('goodElectronCollectionName', self.name() ) - - self.cutEtMinEl = kw.get('cutEtMinEl', 20.0*Units.GeV) - self.cutIsEM = kw.get('cutIsEM', "None") # Possible values: "None", "Loose", 'Medium', 'Tight', 'TightNoIsolation' - self.cutElAuthor = kw.get('cutElAuthor', "either") # Possible values: 'softe', 'egamma', 'either' - self.cutElEtaMax = kw.get('cutElEtaMax', 2.5) - self.removeEtaCrack = kw.get('removeEtaCrack', False) - self.crackEtaMin = kw.get('crackEtaMin', 1.37) - self.crackEtaMax = kw.get('crackEtaMax', 1.52) - self.minNumberPassedEl = kw.get('minNumberPassedEl', 1) - self.passAllEl = kw.get('passAllEl', False) - - ## muon - self.cutPtMinMu = kw.get('cutPtMinMu', 0.0*Units.GeV) - self.muonAuthors = kw.get('muonAuthors', "all") # Possible values: 'lowpt', 'combined', 'calo', 'standalone', 'all' - self.muonContainers = kw.get('muonContainers', "all") # Possible values: 'staco', 'muid', 'calo','all' - self.goodMuonCollectionName = kw.get('goodMuonCollectionName', self.name() ) - self.cutMuEtaMax = kw.get('cutMuEtaMax', 3.0) - self.passAllMu = kw.get('passAllMu', False) - self.doEtconeMu = kw.get('doEtconeMu', False) - self.etconeMuMax = kw.get('etconeMuMax', 6.0*Units.GeV) - self.doNoTrackIsolMu = kw.get('doNoTrackIsolMu', False) - self.noTrackIsolMu = kw.get('noTrackIsolMu', 5) - self.innerNoTrackRadiusMu = kw.get('innerNoTrackRadiusMu', 0.05) - self.outerNoTrackRadiusMu = kw.get('outerNoTrackRadiusMu', 0.5) - self.doPtTrackIsolMu = kw.get('doPtTrackIsolMu', False) - self.ptTrackIsolMu = kw.get('ptTrackIsolMu', 8.0*Units.GeV) - self.innerPtTrackRadiusMu = kw.get('innerPtTrackRadiusMu', 0.05) - self.outerPtTrackRadiusMu = kw.get('outerPtTrackRadiusMu', 0.5) - self.doCaloIsolMu = kw.get('doCaloIsolMu', False) - self.caloIsolMu = kw.get('caloIsolMu', 6.0*Units.GeV) - self.innerCaloRadiusMu = kw.get('innerCaloRadiusMu', 0.05) - self.outerCaloRadiusMu = kw.get('outerCaloRadiusMu', 0.5) - self.doJetIsolMu = kw.get('doJetIsolMu', False) - self.jetIsolEtMu = kw.get('jetIsolEtMu', 15.0*Units.GeV) - self.jetDistanceMu = kw.get('jetDistanceMu', 0.5) - self.jetContainerName = kw.get('jetContainerName',"Cone4TowerJets") - self.muonIsolationTool = kw.get('muonIsolation',None) - self.minNumberPassedMu = kw.get('minNumberPassedMu', 1) - - self.usingAOD = kw.get('usingAOD', True) - - ## Get the storgate handle - self.storeGateSvc = None - self.muContainerNames = [] - - return - - - def initialize(self): - - self.msg.info( '************************************' ) - self.msg.info( '==> initialize %s...', self.name() ) - self.msg.info( 'Will apply the following electron cuts:' ) - self.msg.info( ' EtMinEl = %r', self.cutEtMinEl ) - self.msg.info( ' IsEmEl = %s', self.cutIsEM ) - self.msg.info( ' AuthorEl = %s', self.cutElAuthor ) - self.msg.info( ' ElEtaMax = %r', self.cutElEtaMax ) - self.msg.info( ' removeEtaCrack = %r', self.removeEtaCrack ) - self.msg.info( ' crackEtaMin = %r', self.crackEtaMin ) - self.msg.info( ' crackEtaMax = %r', self.crackEtaMax ) - self.msg.info( ' minNumberPassedEl = %r', self.minNumberPassedEl ) - self.msg.info( ' passAllEl = %r', self.passAllEl ) - - self.msg.info( 'And the following muon cuts:' ) - self.msg.info( ' PtMinMu = %r', self.cutPtMinMu ) - self.msg.info( ' AuthorMu = %s', self.muonAuthors ) - self.msg.info( ' MuEtaMax = %r', self.cutMuEtaMax ) - if self.doEtconeMu: self.msg.info( ' muon etcone cut = %r', self.etconeMuMax ) - self.msg.info( ' passAllMu = %r', self.passAllMu ) - self.msg.info( ' minNumberPassedMu = %r', self.minNumberPassedMu ) - self.msg.info( '************************************' ) - - - ## Also, declare some counters and initialize them to zero - self.nProcessed = 0 - self.nEventMinNumPassed = 0 - - self.nElectrons = 0 - self.nEventElPassEta = 0 - self.nEventElPassEt = 0 - self.nEventElPassIsEM = 0 - self.nEventElPassAuthor = 0 - - self.nMuons = 0 - self.nEventMuPassEta = 0 - self.nEventMuPassPt = 0 - self.nEventMuPassAuthor = 0 - self.nEventMuPassPrescale = 0 - self.nEventMuPassIsolation = 0 - - ## Import needed modules - import PyUtils.RootUtils as ru - ROOT = ru.import_root() - - if self.doNoTrackIsolMu or self.doPtTrackIsolMu or self.doCaloIsolMu : - if self.muonIsolationTool is None: - self.msg.warning("Problem retrieving MuonIsolationTool pointer ") - self.msg.warning("setting Track and Calo isolation to False ") - self.doNoTrackIsolMu = False - self.doPtTrackIsolMu = False - self.doCaloIsolMu = False - - ## import some 4-mom utils - import FourMomUtils.Bindings - self.utils = { 'deltaR' : PyAthena.P4Helpers.deltaR } - - _append = self.muContainerNames.append - if self.usingAOD : - if self.muonContainers.__contains__('staco') or self.muonContainers is 'all': - _append("StacoMuonCollection") - if self.muonContainers.__contains__('muid') or self.muonContainers is 'all': - _append("MuidMuonCollection") - if self.muonContainers.__contains__('calo') or self.muonContainers is 'all': - _append("CaloMuonCollection") - else : - if self.muonContainers.__contains__('staco') or self.muonContainers is 'all': - _append("StacoESDMuonCollection") - if self.muonAuthors is 'combined' or self.muonAuthors is 'all' : - _append("StacoCombinedMuonContainer") - if self.muonAuthors is 'lowpt' or self.muonAuthors is 'all' : - _append("StacoCombinedMuonContainerLowPt") - if self.muonAuthors is 'standalone' or self.muonAuthors is 'all': - _append("MboyESDMuonContainer") - if self.muonContainers.__contains__('muid') or self.muonContainers is 'all': - _append("MuidESDMuonCollection") - if self.muonAuthors is 'combined' or self.muonAuthors is 'all' : - _append("MuidCombinedMuonContainer") - if self.muonAuthors is 'lowpt' or self.muonAuthors is 'all' : - _append("MuGirlCombinedMuonContainer") - if self.muonAuthors is 'standalone' or self.muonAuthors is 'all' : - _append("MuidExtrMuonContainer") - if self.muonContainers.__contains__('calo') or self.muonContainers is 'all': - if self.muonAuthors is 'calo' or self.muonAuthors is 'all' : - _append("CaloMuonIdContainer") - _append("CaloESDMuonCollection") - del _append - - ## 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.msg.debug( '==> execute %s on %r. event...' % (self.name(), self.nProcessed) ) - - passEl = self.passElectronSelection() - passMu = self.passMuonSelection() - - if ( passEl or passMu) : - self.nEventMinNumPassed += 1 - self.msg.debug( '%s event passed.' % self.name() ) - self.setFilterPassed(True) - pass - else : - self.msg.debug( '%s event failed.' % self.name() ) - self.setFilterPassed(False) - pass - - - return StatusCode.Success - - - def finalize(self): - ## Import needed modules - import math - - ## Calculate the efficiencies and their errors - effiElectrons = 0.0 - effiElPassEta = 0.0 - effiElPassEt = 0.0 - effiElPassAuthor = 0.0 - effiElPassIsEM = 0.0 - effiMinNumPassed = 0.0 - effiErrElectrons = 0.0 - effiErrElPassEta = 0.0 - effiErrElPassEt = 0.0 - effiErrElPassAuthor = 0.0 - effiErrElPassIsEM = 0.0 - effiErrMinNumPassed = 0.0 - try : - # Efficiencies - effiElectrons = self.nElectrons / (1.0*self.nProcessed) - effiElPassEta = self.nEventElPassEta / float(self.nProcessed) - effiElPassEt = self.nEventElPassEt / float(self.nProcessed) - effiElPassAuthor = self.nEventElPassAuthor / float(self.nProcessed) - effiElPassIsEM = self.nEventElPassIsEM / float(self.nProcessed) - effiMinNumPassed = self.nEventMinNumPassed / float(self.nProcessed) - - # Error on efficiencies; use binomial errors - effiErrElectrons = math.sqrt(self.nElectrons) / self.nElectrons - effiErrElPassEta = 100.0 * math.sqrt( effiElPassEta*(1.0 - effiElPassEta) / float(self.nProcessed) ) - effiErrElPassEt = 100.0 * math.sqrt( effiElPassEt*(1.0 - effiElPassEt) / float(self.nProcessed) ) - effiErrElPassAuthor = 100.0 * math.sqrt( effiElPassAuthor*(1.0 - effiElPassAuthor) / float(self.nProcessed) ) - effiErrElPassIsEM = 100.0 * math.sqrt( effiElPassIsEM*(1.0 - effiElPassIsEM) / float(self.nProcessed) ) - effiErrMinNumPassed = 100.0 * math.sqrt( effiMinNumPassed*(1.0 - effiMinNumPassed) / float(self.nProcessed) ) - - effiElPassEta *= 100.0 - effiElPassEt *= 100.0 - effiElPassAuthor *= 100.0 - effiElPassIsEM *= 100.0 - effiMinNumPassed *= 100.0 - - except ZeroDivisionError : - self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' ) - pass - - - 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 all electrons: %r and number of electrons per event: %3.3f +/- %3.3f' % ( self.nElectrons, effiElectrons, effiErrElectrons ) ) - self.msg.info( ' Events after eta cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassEta, effiElPassEta, effiErrElPassEta ) ) - self.msg.info( ' Events after E_T cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassEt, effiElPassEt, effiErrElPassEt ) ) - self.msg.info( ' Events after author cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassAuthor, effiElPassAuthor, effiErrElPassAuthor ) ) - self.msg.info( ' Events after IsEM cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventElPassIsEM, effiElPassIsEM, effiErrElPassIsEM ) ) - self.msg.info( ' Events after minNumberPassedEl %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMinNumPassed, effiMinNumPassed, effiErrMinNumPassed ) ) - self.msg.info( '***************************************************************' ) - - ## Import needed modules - import math - - ## Calculate the efficiencies and their errors - effiMuons = 0.0 - effiMuPassEta = 0.0 - effiMuPassPt = 0.0 - effiMuPassAuthor = 0.0 - effiMuPassIsol = 0.0 - effiMinNumPassed = 0.0 - effiErrMuons = 0.0 - effiErrMuPassEta = 0.0 - effiErrMuPassPt = 0.0 - effiErrMuPassAuthor = 0.0 - effiErrMuPassIsol = 0.0 - effiErrMinNumPassed = 0.0 - try : - # Efficiencies - effiMuons = self.nMuons / (1.0*self.nProcessed) - effiMuPassEta = self.nEventMuPassEta / float(self.nProcessed) - effiMuPassPt = self.nEventMuPassPt / float(self.nProcessed) - effiMuPassAuthor = self.nEventMuPassAuthor / float(self.nProcessed) - effiMuPassIsol = self.nEventMuPassIsolation / float(self.nProcessed) - effiMinNumPassed = self.nEventMinNumPassed / float(self.nProcessed) - - # Error on efficiencies, use binomial errors - effiErrMuons = math.sqrt(self.nMuons) / self.nMuons - effiErrMuPassEta = 100.0 * math.sqrt( effiMuPassEta*(1.0 - effiMuPassEta) / float(self.nProcessed) ) - effiErrMuPassPt = 100.0 * math.sqrt( effiMuPassPt*(1.0 - effiMuPassPt) / float(self.nProcessed) ) - effiErrMuPassAuthor = 100.0 * math.sqrt( effiMuPassAuthor*(1.0 - effiMuPassAuthor) / float(self.nProcessed) ) - effiErrMuPassIsol = 100.0 * math.sqrt( effiMuPassIsol*(1.0 - effiMuPassIsol) / float(self.nProcessed) ) - effiErrMinNumPassed = 100.0 * math.sqrt( effiMinNumPassed*(1.0 - effiMinNumPassed) / float(self.nProcessed) ) - - effiMuPassEta *= 100.0 - effiMuPassPt *= 100.0 - effiMuPassAuthor *= 100.0 - effiMuPassIsol *= 100.0 - effiMinNumPassed *= 100.0 - - except ZeroDivisionError : - self.msg.warning( 'Division by zero error when calculating the uncertainties on the pass efficiencies...' ) - pass - - - 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 all muons: %r and number of muons per event: %3.3f +/- %3.3f' % ( self.nMuons, effiMuons, effiErrMuons ) ) - self.msg.info( ' Events after eta cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassEta, effiMuPassEta, effiErrMuPassEta ) ) - self.msg.info( ' Events after p_T cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassPt, effiMuPassPt, effiErrMuPassPt ) ) - self.msg.info( ' Events after author cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassAuthor, effiMuPassAuthor, effiErrMuPassAuthor ) ) - self.msg.info( ' Events after isolation cut: %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMuPassIsolation, effiMuPassIsol, effiErrMuPassIsol ) ) - self.msg.info( ' Events after minNumberPassed %r and resulting efficiency = (%3.3f +/- %3.3f)%%' % ( self.nEventMinNumPassed, effiMinNumPassed, effiErrMinNumPassed ) ) - self.msg.info( '***************************************************************' ) - - - return StatusCode.Success - - - def passPresel(self,muon) : - if not self.doEtconeMu : - return True - if (muon.parameter(1)<self.etconeMax) : - return True - return False - - - def passCaloIsol(self,muon) : - - if not self.doCaloIsolMu : - return True - outerConeEt = self.muonIsolationTool.caloIsolationEnergy(muon, dR, False,None) - innerConeEt = self.muonIsolationTool.caloIsolationEnergy(muon, dR, False,None) - - if (outerConeEt-innerConeEt) < self.caloIsolMu : - return True - return False - - def passNoTracksIsol(self,muon) : - - if not self.doNoTrackIsolMu : - return True - outerConeNoTracks = self.muonIsolationTool.trackIsolationNumberOfTrack(muon,self.outerNoTrackRadiusMu) - innerConeNoTracks = self.muonIsolationTool.trackIsolationNumberOfTrack(muon,self.innerNoTrackRadiusMu) - if (outerConeNoTracks-innerConeNoTracks) < self.noTracksIsolMu : - return True - return False - - def passPtTracksIsol(self,muon) : - - if not self.doPtTrackIsolMu : - return True - outerConePtTracks = self.muonIsolationTool.trackIsolationEnergy(muon,self.outerNoTrackRadiusMu) - innerConePtTracks = self.muonIsolationTool.trackIsolationEnergy(muon,self.innerNoTrackRadiusMu) - if (outerConePtTracks-innerConePtTracks) < self.ptTracksIsolMu : - return True - return False - - def passJetIsol(self,muon,jetCollection) : - - # Declare the utility to calculate the DeltaR between two objects - deltaR = self.utils['deltaR'] - - if not self.doJetIsolMu : - return True - for jet in jetCollection : - if deltaR(jet,muon) < self.jetDistanceMu and jet.et() > self.jetIsolEtMu : - return True - return False - - def passElectronSelection(self) : - - ####################################################### - # electron selection - ####################################################### - - nElPassEta = 0 - nElPassEt = 0 - nElPassIsEM = 0 - nElPassAuthor = 0 - - # Create a class-member list of all electrons that passed all cuts. - # This can then be used by other filters to do overlap removal, etc. - VIEW_ELEMENTS = 1 - goodElectrons = PyAthena.ElectronContainer(VIEW_ELEMENTS) - - ## If passAll is selected, accept all events - if self.passAllEl : - self.msg.debug( '%s event passed electron selection because passAll is true' % self.name() ) - return True - - # Get the electron collection from StoreGate - try: - electronCollection = self.storeGateSvc.retrieve( self.electronCollectionType, self.electronCollectionName ) - pass - except LookupError: - self.msg.warning( 'Collection %s not found' % self.electronCollectionName ) - return True - - # Loop over all electrons and make the selections cuts - for electron in electronCollection : - self.nElectrons += 1 - # Use Et of CaloCluster. - cluster = None - cluster = electron.cluster() - if cluster == None : - self.msg.warning( 'Could not get the cluster for this electron!' ) - pass - else : - if abs(cluster.etaBE(2)) < self.cutElEtaMax : - # Check if the EM calorimeter barrel-encap crack should be removed. - if not self.removeEtaCrack or ( self.removeEtaCrack and \ - ( abs(cluster.etaBE(2)) < self.crackEtaMin - or abs(cluster.etaBE(2)) > self.crackEtaMax ) ): - nElPassEta += 1 - # If the Et of this electron is larger than the minimum required Et - # of the high-Et cut, then the high-Et electron is found. - if cluster.et() > self.cutEtMinEl : - nElPassEt += 1 - # Check that the electron in question comes from the right reconstruction algorithm using PrimaryDPDHelpers - if PrimaryDPDHelpers.checkEgammaAuthor( electron, self.cutElAuthor ) : - nElPassAuthor += 1 - # Check the quality of the electron using PrimaryDPDHelpers - if PrimaryDPDHelpers.checkElectronIsEM( electron, self.cutIsEM ): - nElPassIsEM += 1 - # goodElectrons.append( electron ) - goodElectrons.push_back( electron) - pass - pass - pass - pass - pass - pass - pass - - - ## Translate the electron pass counters into event pass counters - if nElPassEta > 0 : self.nEventElPassEta += 1 - if nElPassEt > 0 : self.nEventElPassEt += 1 - if nElPassIsEM > 0 : self.nEventElPassIsEM += 1 - if nElPassAuthor > 0 : self.nEventElPassAuthor += 1 - - if self.storeGateSvc.record( goodElectrons, self.goodElectronCollectionName ) != StatusCode.Success : - self.msg.error( 'Could not record the goodElectrons into StoreGate with the key = ' % self.goodElectronCollectionName ) - pass - - - ## Check if the event is accepted - if goodElectrons.__len__() >= self.minNumberPassedEl : - self.msg.debug( '%s event passed electron selection' % self.name() ) - return True - - - self.msg.debug( '%s event failed electron selection' % self.name() ) - return False - - - def passMuonSelection(self) : - - ####################################################### - # muon selection - ####################################################### - - ## If passAll is selected, accept all events - if self.passAllMu : - self.msg.debug( '%s event passed muon selection because passAllMu is true' % self.name() ) - return True - - jetCollection = None - _retrieve = self.storeGateSvc.retrieve - - if self.doJetIsolMu : - try : - jetCollection = _retrieve ('JetCollection', jetContainerName) - except LookupError : - self.msg.warning('%s container not found in StoreGate ' % self.jetContainerName) - self.msg.warning('Turning jet isolation off ') - self.doJetIsolMu = False - - #Then... here we go! - hasMuon = False - hasMuonPt = False - hasMuonEta = False - - # Create a class-member list of all muons that passed all cuts. - # This can then be used by other filters to do overlap removal, etc. - VIEW_ELEMENTS = 1 - goodMuons = PyAthena.Analysis.MuonContainer(VIEW_ELEMENTS) - - _contains = self.storeGateSvc.contains - for name in self.muContainerNames : - if not _contains('Analysis::MuonContainer', name): - self.msg.debug('%s container not found in StoreGate ' % name) - continue - muonCollection = None - try : - muonCollection = _retrieve('Analysis::MuonContainer', name) - pass - except LookupError: - self.msg.warning( 'Collection %s not found' % name ) - return false - - ############## - nMuPassEta = 0 - nMuPassPt = 0 - nMuPassAuthor = 0 - nMuPassIsolation = 0 - - for muon in muonCollection : - self.nMuons += 1 - - # eta cut - if abs(muon.eta()) < self.cutMuEtaMax : - nMuPassEta += 1 - - # muon pT cut - if muon.pt() > self.cutPtMinMu : - nMuPassPt += 1 - - # Check that the muon in question comes from the right reconstruction algorithm using PrimaryDPDHelpers - if PrimaryDPDHelpers.checkMuonAuthor( muon, self.muonAuthors ) : - nMuPassAuthor += 1 - - if self.passCaloIsol(muon) and self.passNoTracksIsol(muon) and self.passPtTracksIsol(muon) and self.passJetIsol(muon, jetCollection) and self.passPresel(muon) : - nMuPassIsolation += 1 - - goodMuons.push_back(muon) - pass - pass - pass - pass - pass - - - ## Translate the muon pass counters into event pass counters - if nMuPassEta > 0 : self.nEventMuPassEta += 1 - if nMuPassPt > 0 : self.nEventMuPassPt += 1 - if nMuPassAuthor > 0 : self.nEventMuPassAuthor += 1 - if nMuPassIsolation > 0 : self.nEventMuPassIsolation += 1 - - pass - - ## Record the good muons into StoreGate so that they can be retrieved by other algorithms - if self.storeGateSvc.record( goodMuons, self.goodMuonCollectionName ) != StatusCode.Success : - self.msg.error( 'Could not record the goodMuons into StoreGate with the key = ' % self.goodMuonCollectionName ) - pass - - - ## Check if the event is accepted - if goodMuons.__len__() >= self.minNumberPassedMu : - self.msg.debug( '%s event passed muon selection' % self.name() ) - return True - - self.msg.debug( '%s event failed muon selection' % self.name() ) - return False diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py deleted file mode 100644 index 04a7917a89e5cebcfe68290bc9ff5bd94f27cf4e..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/python/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# template __init__.py defined in the GaudiPolicy package. diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py deleted file mode 100644 index 98315dc4e16f49275942dcde12c289790f006156..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/AODToHSG5_WHlnubb_boosted_D3PD.py +++ /dev/null @@ -1,49 +0,0 @@ -###################################################################3 -# Define the input file here. -# - -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -#athenaCommonFlags.FilesInput= ["AOD.pool.root"] -athenaCommonFlags.FilesInput= ["/tmp/roberth/AOD.324274._000001.pool.root.1"] - - -###################################################################3 -# Define the output file here. -# - -if not globals().get('tupleFileOutput'): - tupleFileOutput = 'hsg5_WHlnubb_boosted.root' - -from D3PDMakerConfig.D3PDProdFlags import prodFlags -prodFlags.WriteSMWZD3PD = True -prodFlags.WriteSMWZD3PD.FileName = tupleFileOutput -prodFlags.WriteSMWZD3PD.lock() - -#prodFlags.WriteHSG5_WHlnubb_boosted_D3PD = True -#prodFlags.WriteHSG5_WHlnubb_boosted_D3PD.FileName = tupleFileOutput -#prodFlags.WriteHSG5_WHlnubb_boosted_D3PD.lock() - -###################################################################3 -# Define other job options here. -# - -athenaCommonFlags.EvtMax = -1 - -# Example of changing D3PD maker flags. -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -#D3PDMakerFlags.DoTrigger = False - - -################################################################### -# Configure RecExCommon. -# - -from RecExConfig.RecFlags import rec -rec.DPDMakerScripts.append( "PhysicsD3PDMaker/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py" ) -rec.doCBNT.set_Value_and_Lock( False ) -rec.doWriteTAG.set_Value_and_Lock( False ) - -include( "RecExCommon/RecExCommon_topOptions.py" ) - -print "topSequence: " -print topSequence diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py deleted file mode 100644 index d8d505046114a8a861de4e15aa61286a2a52dfe3..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_ExampleSimpleTest.py +++ /dev/null @@ -1,67 +0,0 @@ -##----------------------------------------------------------------------------- -## Name: D2PD_Test.py -## -## Author: Elias Coniavitis (Uppsala), based on code by Karsten Koeneke (DESY) -## Email: elias.coniavitis@cern.ch; karsten.koeneke@desy.de -## -## Description: This defines the content of the D2PD example -## for HSG5 -## -##----------------------------------------------------------------------------- - -## 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 D2PDMaker.D2PDFlags import D2PDFlags -from RecExConfig.RecFlags import rec - -## This handels multiple output streams -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - - - -#==================================================================== -# Define the test DPD output stream -#==================================================================== -from D2PDMaker.D2PDHelpers import buildFileName -streamName = D2PDFlags.WriteExampleSimpleTestStream.StreamName -fileName = buildFileName( D2PDFlags.WriteExampleSimpleTestStream ) -ExampleTestStream = MSMgr.NewPoolStream( streamName, fileName ) - - -ExampleTestStream.AddItem( 'TruthParticleContainer#SpclMC' ) -ExampleTestStream.AddItem( 'MissingEtTruth#MET_Truth_PileUp' ) -ExampleTestStream.AddItem( 'MissingET#MET_RefFinal' ) -ExampleTestStream.AddItem( 'TrigDec::TrigDecision#TrigDecision' ) -ExampleTestStream.AddItem( 'MissingEtTruth#MET_Truth' ) -ExampleTestStream.AddItem( 'Analysis::MuonContainer#StacoMuonCollection' ) -ExampleTestStream.AddItem( 'CTP_Decision#CTP_Decision' ) -ExampleTestStream.AddItem( 'EventInfo#*' ) -ExampleTestStream.AddItem( 'Analysis::TauJetContainer#TauRecContainer' ) -ExampleTestStream.AddItem( 'JetCollection#Cone4TruthJets' ) -ExampleTestStream.AddItem( 'JetCollection#AntiKt4TruthJets' ) -ExampleTestStream.AddItem( 'JetCollection#Cone4H1TopoJets' ) -ExampleTestStream.AddItem( 'JetCollection#AntiKt4H1TopoJets' ) -ExampleTestStream.AddItem( 'Analysis::TauDetailsContainer#TauRecDetailsContainer' ) -ExampleTestStream.AddItem( 'ElectronContainer#ElectronAODCollection' ) -ExampleTestStream.AddItem( 'egDetailContainer#egDetailAOD' ) -ExampleTestStream.AddItem( 'JetKeyDescriptor#JetKeyMap' ) -ExampleTestStream.AddItem( 'McEventCollection#GEN_AOD' ) -ExampleTestStream.AddItem( 'HLT::HLTResult#HLTResult_L2' ) -ExampleTestStream.AddItem( 'HLT::HLTResult#HLTResult_EF' ) - - - -### Yellow containers - -#Trigger stuff -ExampleTestStream.AddItem( 'egammaContainer#HLT_egamma' ) -ExampleTestStream.AddItem( 'TrigMuonEFContainer#HLT_MuonEF' ) -ExampleTestStream.AddItem( 'TrigMuonEFInfoContainer#HLT_MuonEFInfo' ) -#ExampleTestStream.AddItem( 'TrigMissingETContainer#HLT_TrigEFMissingET' ) -#ExampleTestStream.AddItem( 'Analysis::TauJetContainer#HLT_TrigTauRecMerged' ) -ExampleTestStream.AddItem( 'egDetailContainer#HLT_egamma_Electrons' ) -#'Rerunning' stuff -ExampleTestStream.AddItem( 'CaloClusterContainer#CaloCalTopoCluster') -ExampleTestStream.AddItem( 'Rec::TrackParticleContainer#TrackParticleCandidate') diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py deleted file mode 100644 index 3ae13e3a9bdd2a1cb2fd237874b924a6641cf7fc..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/D2PD_topOptions.py +++ /dev/null @@ -1,71 +0,0 @@ -##============================================================================= -## Name: D2PD_topOptions.py -## -## Author: Karsten Koeneke (DESY) -## Created: April 2009 - -## Description: job options for all AOD->D2PD and D1PD->D2PD. -## -## Usage: Here, all neccessary job options for the D2PDs can be set. -## To run, type: -## athena D2PDMaker/D2PD_topOptions.py 2>&1 | tee log.txt -##============================================================================= - - -#============================================================================== -## Include the job property flags for this package -#============================================================================== -from D2PDMaker.D2PDFlags import D2PDFlags - -#============================================================================== -# If you have your own DPD Maker scripts -# (see: -# share/D2PD_ExampleSimple*.py -# for examples), -# then just append your script (wherever it is) to this list: -# -# D2PDFlags.DPDMakerScripts.append("MyPackage/MyScript") -# -# The example scripts are appended below, so you can see how it works! -#============================================================================== - -D2PDFlags.DPDMakerScripts.append("D2PDMaker/D2PD_ExampleSimpleTest.py") - - -#============================================================================== -# Load your input file -#============================================================================== -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -athenaCommonFlags.PoolAODInput=["AOD.079660._000094.pool.root.1"] - - - -#============================================================================== -# Set the geometry for your input file -#============================================================================== -from AthenaCommon.GlobalFlags import globalflags -globalflags.DetDescrVersion.set_Value_and_Lock("ATLAS-GEO-08-00-01") - - -#============================================================================== -# You can change the location and name of your output file with -# these three flags: -#============================================================================== -#D2PDFlags.OutputDirectoryName = "/my/directory/with/enough/space/" -#D2PDFlags.OutputPoolRootFileNamePrefix = "MyFirstD2PD" -#D2PDFlags.OutputMiddleName = "test1" - - -#============================================================================== -# Set the number of events that you want to process -#============================================================================== -#athenaCommonFlags.SkipEvents.set_Value_and_Lock(0) -if not vars().has_key('EvtMax'): EvtMax = 50#250 -athenaCommonFlags.EvtMax=EvtMax - - -#============================================================================== -# Execute the dpd maker -#============================================================================== -include("D2PDMaker/aodtodpd.py") - diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py deleted file mode 100644 index ab77cdcf94537341b95ac5d68cbd4c3c17f3589c..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/FatJetsConfig.py +++ /dev/null @@ -1,34 +0,0 @@ -include.block("HSG5DPDUtils/FatJetsConfig.py") - -from JetRec.JetRecFlags import jetFlags -jetFlags.doBTagging = False -jetFlags.inputFileType = 'AOD' - -preseq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName()) - -### -from HSG5DPDUtils.JSjets import createJSJets,getGroomingTools - -from HSG5DPDUtils.GroomedJetsConfig import getGroomedJetsConfig -dictsConfig = getGroomedJetsConfig() - -sj_n = [] -for dC in dictsConfig: - myjetfinder = dC[0]["JetFinder"] - myjetdr = dC[0]["JetdR"] - myjetinput = dC[0]["JetInput"] - myGroomingTools, catNames = getGroomingTools(dC[1]) - sj_n += [(myjetfinder+"%d"%(myjetdr*10) + myjetinput+x) for x in catNames if "Subjets" in x] - -from BTagging.BTaggingFlags import BTaggingFlags -for sj in sj_n: - BTaggingFlags.Jets += [sj] - BTaggingFlags.JetsWithInfoPlus += [sj] - BTaggingFlags.CalibrationChannelAliases += [sj+"->AntiKt4LCTopo" ] - -include("BTagging/BTagging_LoadTools.py") - -myJetKeys = [] -for dC in dictsConfig: - xx = createJSJets(dC[0], dC[1], preseq) - myJetKeys += [xx] diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 89b8fadf9e7ebf8eaae729e6d4063aa2877271b6..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_WHlnubb_boosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_boosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5WHD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 WH D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the SMWZ D3PD: -streamName = prodFlags.WriteHSG5WHD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5WHD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5WHFlags -#HSG5WHFlags.doTaus = True -#HSG5WHFlags.doPhotons = True - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream, flags=HSG5WHFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/WHlnubb_boostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 03461249ef5513abff70f6d133f7a2716ee1540b..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,76 +0,0 @@ -''' -Created on 28 Feb 2012 - -@author: wvazquez -''' -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_unboosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5WHUD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 WH unboosted D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the SMWZ D3PD: -streamName = prodFlags.WriteHSG5WHUD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5WHUD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5WHUFlags -HSG5WHUFlags.doTaus = True -HSG5WHUFlags.doPhotons = True - -print "HSG5WHUFlags.doPhotons()=",HSG5WHUFlags.doPhotons() - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -print "after import of HSG5D3PD, HSG5WHUFlags.doPhotons()=",HSG5WHUFlags.doPhotons() -HSG5D3PD( HSG5D3PD_Stream, flags=HSG5WHUFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/WHlnubb_unboostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py deleted file mode 100644 index e82650323bb1aac08c1a2164cb490a6a7bcfb5b0..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,71 +0,0 @@ -''' -Created on 28 Feb 2012 - -@author: wvazquez -''' -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_WHlnubb_unboosted_QCDbkg_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_WHlnubb_unboosted_D3PD_QCDbkg_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5WHQD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 WH QCD D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 QCD D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the SMWZ D3PD: -streamName = prodFlags.WriteHSG5WHQD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5WHQD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5WHQFlags - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream, flags=HSG5WHQFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/WHlnubb_unboostedFilterQCDbkg.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py deleted file mode 100644 index ff07dd11618299fad20376336ec7a35d590a086c..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_ZHllbb_boosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHllbb_boosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5ZHLLD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 ZHLL D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 ZHLL D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the HSG5 D3PD: -streamName = prodFlags.WriteHSG5ZHLLD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5ZHLLD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5ZHLLFlags -HSG5ZHLLFlags.doTaus = True - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZHLLFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/ZHllbb_boostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py deleted file mode 100644 index c2b1f89f03f432facd17500677674c33a1007870..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHllbb_unboosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5ZHLLUD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 ZHLL unboosted D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 ZHLL unboosted D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the HSG5 D3PD: -streamName = prodFlags.WriteHSG5ZHLLUD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5ZHLLUD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5ZHLLUFlags -HSG5ZHLLUFlags.doTaus = True - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream, flags=HSG5ZHLLUFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/ZHllbb_unboostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 5d35c7ac4091752decc52aadd81279c89f0bdaf0..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,67 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHnunubb_boosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5ZHMETD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 ZHMET D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 ZHMET D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the HSG5 D3PD: -streamName = prodFlags.WriteHSG5ZHMETD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5ZHMETD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5ZHMETFlags -#HSG5ZHMETFlags.doAllMissingET = True -HSG5ZHMETFlags.doTaus = True - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZHMETFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/ZHnunubb_boostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 225ce7e5dd1927dc419ad5c66883fb9aebb45dae..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,67 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_ZHnunubb_unboosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5ZHMETUD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 ZHMET unboosted D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 ZHMET unboosted D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the HSG5 D3PD: -streamName = prodFlags.WriteHSG5ZHMETUD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5ZHMETUD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5ZHMETUFlags -#HSG5ZHMETUFlags.doAllMissingET = True -HSG5ZHMETUFlags.doTaus = True - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZHMETUFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/ZHnunubb_unboostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 56a5155b19144df674f23c914f97d4a744629fda..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_Zbb_boosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_Zbb_boosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5ZBBD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 ZBB D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 ZBB D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the HSG5 D3PD: -streamName = prodFlags.WriteHSG5ZBBD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5ZBBD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) - -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5ZBBFlags - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream,flags=HSG5ZBBFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/Zbb_boostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 202430c6c1d3e4c1722011a0e82ca01a3b9e7828..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,3 +0,0 @@ -include.block("HSG5DPDUtils/HSG5_gammaHbb_boosted_D3PD_prodJobOFragment.py") -print "OBSOLETE WARNING please use HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py" -include("HSG5DPDUtils/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py") diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py deleted file mode 100644 index 0f009185da7a7f4a610f3c8aa8b54bc60b761124..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# This jobO fragment is meant to be called by Reco_trf.py in transformation jobs. - -# This jobO should not be included more than once: -include.block( "HSG5DPDUtils/HSG5_gammaZbb_boosted_D3PD_prodJobOFragment.py" ) - -# Common import(s): -from AthenaCommon.JobProperties import jobproperties -prodFlags = jobproperties.D3PDProdFlags -from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName - - -# Set up a logger: -from AthenaCommon.Logging import logging -HSG5D3PD_msg = logging.getLogger( 'HSG5_gammaZbb_boosted_D3PD_prodJobOFragment' ) - -# Check if the configuration makes sense: -if prodFlags.WriteHSG5GAMZD3PD.isVirtual: - HSG5D3PD_msg.error( "The HSG5 GAMZ D3PD stream can't be virtual! " + - "It's a configuration error!" ) - raise NameError( "HSG5 GAMZ D3PD set to be a virtual stream" ) - pass - -# Create the D3PD streams: -from OutputStreamAthenaPool.MultipleStreamManager import MSMgr - -# Construct the stream and file names for the HSG5 D3PD: -streamName = prodFlags.WriteHSG5GAMZD3PD.StreamName -fileName = buildFileName( prodFlags.WriteHSG5GAMZD3PD ) - -HSG5D3PD_msg.info( "Configuring HSG5D3PD with streamName '%s' and fileName '%s'" % \ - ( streamName, fileName ) ) - -HSG5D3PD_Stream = MSMgr.NewRootStream( streamName, fileName, "physics" ) - -# create stream -#from PhysicsD3PDMaker.SMWZD3PD import SMWZD3PD -#SMWZD3PD( HSG5D3PD_Stream ) -if 'IS_SIMULATION' in inputFileSummary['evt_type']: - from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags - D3PDMakerFlags.TruthWriteHadrons.set_Value_and_Lock(True) - -# set flags -from HSG5DPDUtils.HSG5Flags import HSG5GAMZFlags -HSG5GAMZFlags.doPhotons = True - -from HSG5DPDUtils.HSG5D3PD import HSG5D3PD -HSG5D3PD( HSG5D3PD_Stream,flags=HSG5GAMZFlags ) - -include("HSG5DPDUtils/FatJetsConfig.py") - -from HSG5DPDUtils.JSD3PD import JSD3PD -for xx in myJetKeys: - if xx[0] != None and xx[1] != None: - JSD3PD(xx, HSG5D3PD_Stream ) - -# add filters -HSG5D3PD_Stream.AcceptAlgs=[] -HSG5D3PD_Stream.RequireAlgs=[] - -include ("HSG5DPDUtils/gammaZbb_boostedFilter.py") - -from EventCommonD3PDMaker.CutFlowMetadataConfig import CutFlowMetadataConfig -HSG5D3PD_Stream.MetadataTools += [CutFlowMetadataConfig(HSG5D3PD_Stream)] - -ToolSvc.TrigDecisionTool.Navigation.OutputLevel=ERROR diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py deleted file mode 100644 index c8337a47ca790fe82e3e00c722a3b7e7d0ee67bc..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_boostedFilter.py +++ /dev/null @@ -1,75 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer - -from ROOT import egammaPID - -sequencer = AthSequencer("HSG5WH_Sequencer", - StopOverride=False) - -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -sequencer += D2PDJetSelector( "HSG5WH_BoostedJetFilter", - inputCollection = 'CamKt12LCTopoJets', - outputLinkCollection = 'HSG5WH_LooseBoostedJetLinkCollection', - minNumberPassed = 1, - ptMin = 150.0*Units.GeV) -HSG5D3PD_Stream.RequireAlgs.append("HSG5WH_BoostedJetFilter") - -from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter -leptonFilter=HSG5__LeptonFilter("HSG5WH_SingleLeptonFilter", - ElectronFilterNameAndType="D2PDElectronSelector/HSG5WH_ElectronSelector", - MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5WH_MuidMuonSelector", - "D2PDMuonSelector/HSG5WH_StacoMuonSelector", - "D2PDMuonSelector/HSG5WH_ThirdChainMuonSelector"]) - -# create electron and muon selectors -from D2PDMaker.D2PDMakerConf import D2PDElectronSelector -leptonFilter += D2PDElectronSelector( "HSG5WH_ElectronSelector", - inputCollection = 'ElectronAODCollection', - outputLinkCollection = 'HSG5WH_LooseElectronLinkCollection', - minNumberPassed = 1, - etMin = 15.0*Units.GeV, - clusterEtaMin = -2.5, - clusterEtaMax = 2.5 - #clusterEtaVetoRanges = "[-1.52, -1.37], [1.37, 1.52]" - ) - -from HSG5DPDUtils.HSG5Selectors import MuonSelector -muSelector = MuonSelector( minNumberPassed = 1, - ptMin = 18.0, - absEtaMax = 2.5, - requireIsLoose = True ) - -leptonFilter += muSelector.getMuonSelector('HSG5WH_MuidMuonSelector','MuidMuonCollection', - 'HSG5WH_LooseMuidMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5WH_StacoMuonSelector','StacoMuonCollection', - 'HSG5WH_LooseStacoMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5WH_ThirdChainMuonSelector','Muons', - 'HSG5WH_LooseThirdChainMuonLinkCollection') - -sequencer += leptonFilter - -HSG5D3PD_Stream.RequireAlgs.append("HSG5WH_SingleLeptonFilter") - -# MET selector -from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector -sequencer += D2PDMissingEtSelector( "HSG5WH_MissingEtFilter", - inputCollection = 'MET_RefFinal', - outputCollection = 'HSG5WH_NeutrinoRefFinal', - minNumberPassed = 1, - missingEtMin = 15.0*Units.GeV) -HSG5D3PD_Stream.RequireAlgs.append("HSG5WH_MissingEtFilter") - - -if False: - # (for private production ony) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py deleted file mode 100644 index 69dbacd67322e40835a07d1666686ffe126c3050..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilter.py +++ /dev/null @@ -1,86 +0,0 @@ -''' -Created on 28 Feb 2012 - -@author: wvazquez -''' - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer - -from ROOT import egammaPID - -sequencer = AthSequencer("HSG5WHU_Sequencer", - StopOverride=False) - -from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter -leptonFilter=HSG5__LeptonFilter("HSG5WHU_SingleLeptonFilter", - ElectronFilterNameAndType="D2PDElectronSelector/HSG5WHU_ElectronSelector", - MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5WHU_MuidMuonSelector", - "D2PDMuonSelector/HSG5WHU_StacoMuonSelector", - "D2PDMuonSelector/HSG5WHU_ThirdChainMuonSelector" ]) - - -# create electron and muon selectors -from D2PDMaker.D2PDMakerConf import D2PDElectronSelector -leptonFilter += D2PDElectronSelector( "HSG5WHU_ElectronSelector", - inputCollection = 'ElectronAODCollection', - outputLinkCollection = 'HSG5WHU_LooseElectronLinkCollection', - minNumberPassed = 1, - ptMin = 20.0*Units.GeV, - clusterEtaMin = -2.5, - clusterEtaMax = 2.5, - electronIsEM = egammaPID.ElectronTight ) - -from HSG5DPDUtils.HSG5Selectors import MuonSelector -muSelector = MuonSelector( minNumberPassed = 1, - ptMin = 18.0, - absEtaMax = 2.5, - acceptIsCombined = True, - acceptIsSegmentTagged = True, - doRelPtCone20 = True, - relPtCone20Max = 0.15 ) - -leptonFilter += muSelector.getMuonSelector('HSG5WHU_MuidMuonSelector','MuidMuonCollection', - 'HSG5WHU_LooseMuidMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5WHU_StacoMuonSelector','StacoMuonCollection', - 'HSG5WHU_LooseStacoMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5WHU_ThirdChainMuonSelector','Muons', - 'HSG5WHU_LooseThirdChainMuonLinkCollection') - -sequencer += leptonFilter - -HSG5D3PD_Stream.RequireAlgs.append("HSG5WHU_SingleLeptonFilter") - -# jet selector -from AssociationComps.AssociationCompsConf import DeltaRAssociationTool -ToolSvc += DeltaRAssociationTool( "HSG5WHU_emDeltaRAssociationTool", - OutputLevel = INFO, - inputAssociateToCollection = 'HSG5WHU_LooseElectronLinkCollection', - deltaRMax = 0.3, - writeUserData = False) - -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -sequencer += D2PDJetSelector( "HSG5WHU_JetFilter", - inputCollection = 'AntiKt4TopoEMJets', - outputLinkCollection = 'HSG5WHU_JetLinkCollection', - associationToolList = [ ToolSvc.HSG5WHU_emDeltaRAssociationTool ], - outputAssociationContainerList = [ "HSG5WHU_jetsMatchedToElectrons" ], - numberOfAssociationsMaxCutList = [ 0 ], - minNumberPassed = 1, - ptMin = 20.0*Units.GeV, - etaMax = 2.5) - -HSG5D3PD_Stream.RequireAlgs.append("HSG5WHU_JetFilter") - -if False: - # (for private production ony) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py deleted file mode 100644 index b9a744a74b861ca4855bd240796c4e044de96a89..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/WHlnubb_unboostedFilterQCDbkg.py +++ /dev/null @@ -1,86 +0,0 @@ -''' -Created on 28 Feb 2012 - -@author: wvazquez -''' - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer -from ROOT import egammaPID - -sequencer = AthSequencer("HSG5WHQ_Sequencer", - StopOverride=False) - - - -from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter -leptonFilter=HSG5__LeptonFilter("HSG5WHQ_SingleLeptonFilter", - ElectronFilterNameAndType="D2PDElectronSelector/HSG5WHQ_ElectronSelector", - MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5WHQ_MuidMuonSelector", - "D2PDMuonSelector/HSG5WHQ_StacoMuonSelector", - "D2PDMuonSelector/HSG5WHQ_ThirdChainMuonSelector"]) - -# create electron and muon selectors -from D2PDMaker.D2PDMakerConf import D2PDElectronSelector -leptonFilter += D2PDElectronSelector( "HSG5WHQ_ElectronSelector", - inputCollection = 'ElectronAODCollection', - outputLinkCollection = 'HSG5WHQ_LooseElectronLinkCollection', - minNumberPassed = 1, - ptMin = 20.0*Units.GeV, - clusterEtaMin = -2.5, - clusterEtaMax = 2.5, - electronIsEM = egammaPID.ElectronMedium ) - -from HSG5DPDUtils.HSG5Selectors import MuonSelector -muSelector = MuonSelector( minNumberPassed = 1, - ptMin = 18.0, - absEtaMax = 2.5, - acceptIsCombined = True, - acceptIsSegmentTagged = True, - doRelPtCone20 = True, - relPtCone20Max = 0.5 ) - -leptonFilter += muSelector.getMuonSelector('HSG5WHQ_MuidMuonSelector','MuidMuonCollection', - 'HSG5WHQ_LooseMuidMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5WHQ_StacoMuonSelector','StacoMuonCollection', - 'HSG5WHQ_LooseStacoMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5WHQ_ThirdChainMuonSelector','Muons', - 'HSG5WHQ_LooseThirdChainMuonLinkCollection') - -sequencer += leptonFilter - -HSG5D3PD_Stream.RequireAlgs.append("HSG5WHQ_SingleLeptonFilter") - -# jet selector -from AssociationComps.AssociationCompsConf import DeltaRAssociationTool -ToolSvc += DeltaRAssociationTool( "HSG5WHQ_emDeltaRAssociationTool", - OutputLevel = INFO, - inputAssociateToCollection = 'HSG5WHQ_LooseElectronLinkCollection', - deltaRMax = 0.3, - writeUserData = False) - -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -sequencer += D2PDJetSelector( "HSG5WHQ_JetFilter", - inputCollection = 'AntiKt4TopoEMJets', - outputLinkCollection = 'HSG5WHQ_JetLinkCollection', - associationToolList = [ ToolSvc.HSG5WHQ_emDeltaRAssociationTool ], - outputAssociationContainerList = [ "HSG5WHQ_jetsMatchedToElectrons" ], - numberOfAssociationsMaxCutList = [ 0 ], - minNumberPassed = 1, - ptMin = 20.0*Units.GeV, - etaMax = 2.5) - -HSG5D3PD_Stream.RequireAlgs.append("HSG5WHQ_JetFilter") - -if False: - # (for private production ony) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py deleted file mode 100644 index 31c83a84faec929e2f1e5a7ebb004e5e4f77216c..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_boostedFilter.py +++ /dev/null @@ -1,72 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer -from ROOT import egammaPID - -sequencer = AthSequencer("HSG5ZHLL_Sequencer", - StopOverride=False) - -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -sequencer += D2PDJetSelector( "HSG5ZHLL_BoostedJetFilter", - inputCollection = 'CamKt12LCTopoJets', - outputLinkCollection = 'HSG5ZHLL_LooseBoostedJetLinkCollection', - minNumberPassed = 1, - ptMin = 150.0*Units.GeV) -HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHLL_BoostedJetFilter") - -from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter -leptonFilter=HSG5__LeptonFilter("HSG5ZHLL_DileptonFilter", - ElectronFilterNameAndType="D2PDElectronSelector/HSG5ZHLL_ElectronSelector", - MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5ZHLL_MuidMuonSelector", - "D2PDMuonSelector/HSG5ZHLL_StacoMuonSelector"]) - -# create electron and muon selectors -from D2PDMaker.D2PDMakerConf import D2PDElectronSelector -leptonFilter += D2PDElectronSelector( "HSG5ZHLL_ElectronSelector", - inputCollection = 'ElectronAODCollection', - outputLinkCollection = 'HSG5ZHLL_LooseElectronLinkCollection', - minNumberPassed = 2, - etMin = 15.0*Units.GeV, - clusterEtaMin = -2.5, - clusterEtaMax = 2.5, - #clusterEtaVetoRanges = "[-1.52, -1.37], [1.37, 1.52]" - ) - -from HSG5DPDUtils.HSG5Selectors import MuonSelector -muSelector = MuonSelector( minNumberPassed = 2, - ptMin = 15.0, - absEtaMax = 2.6, - requireIsTight = True) - -leptonFilter += muSelector.getMuonSelector('HSG5ZHLL_MuidMuonSelector', 'MuidMuonCollection', - 'HSG5ZHLL_LooseMuidMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5ZHLL_StacoMuonSelector', 'StacoMuonCollection', - 'HSG5ZHLL_LooseStacoMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5ZHLL_ThirdChainMuonSelector', 'Muons', - 'HSG5ZHLL_LooseThirdChainMuonLinkCollection') - -sequencer += leptonFilter - -HSG5D3PD_Stream.AcceptAlgs.append("HSG5ZHLL_DileptonFilter") - - -from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector -sequencer += D2PDMissingEtSelector( "HSG5ZHLL_MissingEtFilter", - inputCollection = 'MET_RefFinal', - outputCollection = 'HSG5ZHLL_NeutrinoRefFinal', - minNumberPassed = 1, - missingEtMax = 50.0*Units.GeV) -HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHLL_MissingEtFilter") - -if False: - # (for private production only) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py deleted file mode 100644 index d9e7e13f239beda3025b73c29f2f6ef0a387ca80..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHllbb_unboostedFilter.py +++ /dev/null @@ -1,56 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer -from ROOT import egammaPID - -sequencer = AthSequencer("HSG5ZHLLunb_Sequencer", - StopOverride=False) - -from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonFilter -leptonFilter=HSG5__LeptonFilter("HSG5ZHLLunb_DileptonFilter", - ElectronFilterNameAndType="D2PDElectronSelector/HSG5ZHLLunb_ElectronSelector", - MuonFilterNameAndTypeVec=["D2PDMuonSelector/HSG5ZHLLunb_MuidMuonSelector", - "D2PDMuonSelector/HSG5ZHLLunb_StacoMuonSelector"]) - - -# create electron and muon selectors -from D2PDMaker.D2PDMakerConf import D2PDElectronSelector -leptonFilter += D2PDElectronSelector( "HSG5ZHLLunb_ElectronSelector", - inputCollection = 'ElectronAODCollection', - outputLinkCollection = 'HSG5ZHLLunb_LooseElectronLinkCollection', - minNumberPassed = 2, - clusterEtMin = 15.0*Units.GeV, - clusterEtaMin = -2.6, - clusterEtaMax = 2.6, - electronIsEM = egammaPID.ElectronLoose - ) - -from HSG5DPDUtils.HSG5Selectors import MuonSelector -muSelector = MuonSelector( minNumberPassed = 2, - ptMin = 15.0, - absEtaMax = 2.6, - requireIsTight = True) - -leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_MuidMuonSelector', 'MuidMuonCollection', - 'HSG5ZHLLunb_LooseMuidMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_StacoMuonSelector', 'StacoMuonCollection', - 'HSG5ZHLLunb_LooseStacoMuonLinkCollection') -leptonFilter += muSelector.getMuonSelector('HSG5ZHLLunb_ThirdChainMuonSelector', 'Muons', - 'HSG5ZHLLunb_LooseThirdChainMuonLinkCollection') - -sequencer += leptonFilter - -HSG5D3PD_Stream.AcceptAlgs.append("HSG5ZHLLunb_DileptonFilter") - -if False: - # (for private production only) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py deleted file mode 100644 index 2feb8ab76d1662f551f597dfa5509bf19512b98d..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_boostedFilter.py +++ /dev/null @@ -1,40 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer - -sequencer = AthSequencer("HSG5ZHMET_Sequencer", - StopOverride=False) - -# boosted jet selector -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -sequencer += D2PDJetSelector( "HSG5ZHMET_BoostedJetFilter", - inputCollection = 'CamKt12LCTopoJets', - outputLinkCollection = 'HSG5ZHMET_boosted_LooseBoostedJetLinkCollection', - minNumberPassed = 1, - ptMin = 20.0*Units.GeV) -HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHMET_BoostedJetFilter") - - -# MET selector -from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector -sequencer += D2PDMissingEtSelector( "HSG5ZHMET_MissingEtFilter", - inputCollection = 'MET_RefFinal', - outputCollection = 'HSG5ZHMET_NeutrinoRefFinal', - minNumberPassed = 1, - missingEtMin = 40.0*Units.GeV) - #missingEtSignificanceMin = 5.0) -HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHMET_MissingEtFilter") - - -if False: - # (for private production only) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py deleted file mode 100644 index fe364512ae4a43045974df63b86e661dc0e73fc7..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/ZHnunubb_unboostedFilter.py +++ /dev/null @@ -1,31 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer - -# create electron and muon selectors -sequencer = AthSequencer("HSG5ZHMETU_Sequencer", - StopOverride=False) - -# MET selector -from D2PDMaker.D2PDMakerConf import D2PDMissingEtSelector -sequencer += D2PDMissingEtSelector( "HSG5ZHMETU_MissingEtFilter", - inputCollection = 'MET_RefFinal', - outputCollection = 'HSG5ZHMETU_NeutrinoRefFinal', - minNumberPassed = 1, - missingEtMin = 40.0*Units.GeV) - #missingEtSignificanceMin = 5.0) -HSG5D3PD_Stream.RequireAlgs.append("HSG5ZHMETU_MissingEtFilter") - - -if False: - # (for private production only) insert in beginning of PreD3PDSequencer - mainSequencer = AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName(), - StopOverride = False) - - if not hasattr( topSequence, D3PDMakerFlags.PreD3PDAlgSeqName() ): - topSequence += mainSequencer - - mainSequencer.insert(0,sequencer) - -else: - topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py deleted file mode 100644 index 5f68fef1e364a3b83794eb37f7342a762e1c8006..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/Zbb_boostedFilter.py +++ /dev/null @@ -1,37 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer - -# create electron and muon selectors -sequencer = AthSequencer("HSG5ZBB_Sequencer", StopOverride=False) - -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -boostedJetCollectionName = 'HSG5ZBB_boosted_LooseBoostedJetLinkCollection' -sequencer += D2PDJetSelector( "HSG5ZBB_BoostedJetFilter", - inputCollection = 'CamKt12LCTopoJets', - outputLinkCollection = boostedJetCollectionName, - minNumberPassed = 1, - ptMin = 150.0*Units.GeV) -HSG5D3PD_Stream.RequireAlgs.append("HSG5ZBB_BoostedJetFilter") - -from AssociationComps.AssociationCompsConf import DeltaRAssociationTool -ToolSvc += DeltaRAssociationTool( "HSG5ZBB_subjetBoostedJetDeltaRAssociationTool", - OutputLevel = INFO, - inputAssociateToCollection = boostedJetCollectionName, - deltaRMax = 1.3, - writeUserData = False) - -if not 'IS_SIMULATION' in inputFileSummary['evt_type']: - sequencer += D2PDJetSelector( "HSG5ZBB_btaggedSubjetFilter", - OutputLevel = DEBUG, - inputCollection = 'CamKt12LCTopoSplitFiltSubjetsminSplitR0Jets', - outputLinkCollection = 'HSG5ZBB_btaggedSubjetLinkCollection', - associationToolList = [ ToolSvc.HSG5ZBB_subjetBoostedJetDeltaRAssociationTool ], - outputAssociationContainerList = [ "HSG5ZBB_subjetsMatchedToBoostedJets" ], - numberOfAssociationsMinCutList = [ 2 ], - jetFlavourTagName = 'JetFitterCOMBNN', - jetFlavourTagWeightMin = -1.25, - minNumberPassed = 2) - HSG5D3PD_Stream.RequireAlgs.append("HSG5ZBB_btaggedSubjetFilter") - -topSequence+=sequencer diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py deleted file mode 100644 index 30838719c3452cf165f3de617be7d8667fc7c4a4..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaHbb_boostedFilter.py +++ /dev/null @@ -1,3 +0,0 @@ -include.block("HSG5DPDUtils/gammaHbb_boostedFilter.py") -print "OBSOLETE WARNING please use gammaZbb_boostedFilter.py" -include ("HSG5DPDUtils/gammaZbb_boostedFilter.py") diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py deleted file mode 100644 index cc09f61141d495ee7dfdddc82cde93cc69640419..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/share/gammaZbb_boostedFilter.py +++ /dev/null @@ -1,89 +0,0 @@ - -from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags -from AthenaCommon.AlgSequence import AlgSequence,AthSequencer - -outputLevel=INFO - -# create electron and muon selectors -sequencer = AthSequencer("HSG5GAMZ_Sequencer", StopOverride=False) - -if not 'IS_SIMULATION' in inputFileSummary['evt_type']: - print "applying trigger selection" - from PrimaryDPDMaker.TriggerFilter import TriggerFilter - sequencer += TriggerFilter( "HSG5GAMZ_triggerFilter", - OutputLevel = outputLevel, - trigger = "EF_g([2-9][0-9][0-9]|1[2-9][0-9]+).*") # 120 or higher - - HSG5D3PD_Stream.RequireAlgs.append("HSG5GAMZ_triggerFilter") -else: - print "no trigger selection" - -zbb_or_zllSequencer = AthSequencer("HSG5GAMZ_zbb_or_zllSequencer", StopOverride=True) - -zbbSequencer = AthSequencer("HSG5GAMZ_zbbSequencer", StopOverride=False) - -boostedJetCollectionName='HSG5GAMZ_boosted_LooseBoostedJetLinkCollection' -from D2PDMaker.D2PDMakerConf import D2PDJetSelector -zbbSequencer += D2PDJetSelector( "HSG5GAMZ_BoostedJetFilter", - OutputLevel = outputLevel, - inputCollection = 'CamKt12LCTopoJets', - outputLinkCollection = boostedJetCollectionName, - minNumberPassed = 1, - ptMin = 80.0*Units.GeV) - -from AssociationComps.AssociationCompsConf import DeltaRAssociationTool -ToolSvc += DeltaRAssociationTool( "HSG5GAMZ_subjetBoostedJetDeltaRAssociationTool", - OutputLevel = outputLevel, - inputAssociateToCollection = boostedJetCollectionName, - deltaRMax = 1.3, - writeUserData = False) - - -zbbSequencer += D2PDJetSelector( "HSG5GAMZ_btaggedSubjetFilter", - OutputLevel = outputLevel, - inputCollection = 'CamKt12LCTopoSplitFiltSubjetsminSplitR0Jets', - outputLinkCollection = 'HSG5GAMZ_btaggedSubjetLinkCollection', - associationToolList = [ ToolSvc.HSG5GAMZ_subjetBoostedJetDeltaRAssociationTool ], - outputAssociationContainerList = [ "HSG5GAMZ_subjetsMatchedToBoostedJets" ], - numberOfAssociationsMinCutList = [ 1 ], - jetFlavourTagName = 'JetFitterCOMBNN', - jetFlavourTagWeightMin = -1.25, - minNumberPassed = 1) -zbb_or_zllSequencer+=zbbSequencer - -HSG5D3PD_Stream.AcceptAlgs.append("HSG5GAMZ_btaggedSubjetFilter") - -# add muon and jet algs, but don't add to RequireAlgs (they're used for LeptonJetsFilter) -outputJetContainerName="HSG5GAMZ_jetLinkCollection" -zbb_or_zllSequencer += D2PDJetSelector( "HSG5GAMZ_jetFilter", - OutputLevel = outputLevel, - inputCollection = 'AntiKt4TopoEMJets', - outputLinkCollection = outputJetContainerName, - ptMin = 19.0*Units.GeV, - minNumberPassed = 0) - -from D2PDMaker.D2PDMakerConf import D2PDMuonSelector -outputMuonContainerName="HSG5GAMZ_muonLinkCollection" -zbb_or_zllSequencer += D2PDMuonSelector( "HSG5GAMZ_muonFilter", - OutputLevel = outputLevel, - inputCollection = 'StacoMuonCollection', - outputLinkCollection = outputMuonContainerName, - ptMin = 19.0*Units.GeV, - muonRequireIsLoose = True, - minNumberPassed = 0) - -# now add LeptonJetsSelector -from HSG5DPDUtils.HSG5DPDUtilsConf import HSG5__LeptonJetsFilter -zbb_or_zllSequencer += HSG5__LeptonJetsFilter("HSG5GAMZ_leptonJetsFilter", - OutputLevel = outputLevel, - SelectedJetContainerName = outputJetContainerName, - SelectedMuonContainerName = outputMuonContainerName, - MinSumJetsAndMuon=3) - -sequencer+=zbb_or_zllSequencer -HSG5D3PD_Stream.AcceptAlgs.append("HSG5GAMZ_leptonJetsFilter") - -topSequence+=sequencer - -print "printing topSequence" -print topSequence diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx deleted file mode 100644 index 9df7fed9837a4a5b09b22f125cb67586c89cd43b..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonFilter.cxx +++ /dev/null @@ -1,138 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GaudiKernel/Algorithm.h" - -#include "HSG5DPDUtils/LeptonFilter.h" - -namespace HSG5 { - -//________________________________________________________________________ -LeptonFilter::LeptonFilter( const std::string& name, - ISvcLocator* pSvcLocator ) - : AthFilterAlgorithm(name,pSvcLocator), - m_electronFilter(0) -{ - - declareProperty("ElectronFilterNameAndType", m_electronFilterNameAndType="D2PDElectronSelector/ElectronSelector"); - - //declareProperty("MuonFilterNameAndType", m_muonFilterNameAndType="D2PDMuonSelector/MuonSelector"); - - std::vector<std::string> defaultFilters; - defaultFilters.push_back("D2PDMuonSelector/MuonSelector"); - declareProperty("MuonFilterNameAndTypeVec", m_muonFilterNameAndTypeVec=defaultFilters); - -} - -//________________________________________________________________________ -LeptonFilter::~LeptonFilter() -{ - -} - -//________________________________________________________________________ -StatusCode LeptonFilter::initialize() -{ - StatusCode sc = StatusCode::SUCCESS; - - // get electron sub-algorithm type and instance names - std::string elType = findType(m_electronFilterNameAndType); - std::string elName = findName(m_electronFilterNameAndType); - ATH_MSG_INFO("Electron filter sub-algorithm type="<<elType - <<" and instance name="<<elName); - sc = createSubAlgorithm(elType,elName,m_electronFilter); - if (sc.isFailure()) { - ATH_MSG_FATAL("Failed to create electron filter algorithm"); - return sc; - } - - // get muon sub-algorithms - int nfilters=m_muonFilterNameAndTypeVec.size(); - m_muonFilter.resize(nfilters); - - for (int ifilter=0;ifilter<nfilters;ifilter++) { - std::string muType = findType(m_muonFilterNameAndTypeVec[ifilter]); - std::string muName = findName(m_muonFilterNameAndTypeVec[ifilter]); - ATH_MSG_INFO("Muon filter sub-algorithm type="<<muType<<" and instance name=" - <<muName); - sc = createSubAlgorithm(muType,muName,m_muonFilter[ifilter]); - if (sc.isFailure()) { - ATH_MSG_FATAL("Failed to create muon filter algorithm"); - } - } - - return sc; -} - -//________________________________________________________________________ -StatusCode LeptonFilter::finalize() -{ - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -StatusCode LeptonFilter::execute() -{ - ATH_MSG_DEBUG("Start executing lepton filter"); - - StatusCode sc = StatusCode::SUCCESS; - - bool muonPassed=false; - for (int ifilter=0;ifilter<(int)m_muonFilter.size();ifilter++) { - sc = m_muonFilter[ifilter] -> execute(); - if (sc.isFailure()) { - ATH_MSG_FATAL("Failure in muonFilter execute"); - return sc; - } - if (m_muonFilter[ifilter]->filterPassed()) { - muonPassed=true; - break; - } - } - - if (msgLvl(MSG::DEBUG)) { - if (muonPassed) ATH_MSG_DEBUG("passed muon selection"); - else ATH_MSG_DEBUG("failed muon selection"); - } - - sc = m_electronFilter -> execute(); - if (sc.isFailure()) { - ATH_MSG_FATAL("Failure in electronFilter execute"); - return sc; - } - - bool electronPassed = m_electronFilter->filterPassed(); - if (msgLvl(MSG::DEBUG)) { - if (electronPassed) ATH_MSG_DEBUG("passed electron selection"); - else ATH_MSG_DEBUG("failed electron selection"); - } - - if (electronPassed || muonPassed) { - ATH_MSG_DEBUG("passed lepton selection"); - setFilterPassed(true); - } - else { - ATH_MSG_DEBUG("failed lepton selection"); - setFilterPassed(false); - } - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -std::string LeptonFilter::findType(std::string l_property) -{ - int slash_pos = l_property.find_first_of("/"); - std::string type = l_property.substr( 0, slash_pos ); - return type ; -} - -//________________________________________________________________________ -std::string LeptonFilter::findName(std::string l_property){ - int slash_pos = l_property.find_first_of("/"); - std::string type = l_property.substr( 0, slash_pos ); - std::string name = (slash_pos > 0) ? l_property.substr( slash_pos + 1) : type ; - return name ; -} - -} // end namespace diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx deleted file mode 100644 index 96cdee9c7091dd4b3f3a122701462a89823eb78e..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/LeptonJetsFilter.cxx +++ /dev/null @@ -1,125 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GaudiKernel/Algorithm.h" - -#include "HSG5DPDUtils/LeptonJetsFilter.h" - -#include "JetEvent/JetCollection.h" -#include "muonEvent/MuonContainer.h" -#include "NavFourMom/INav4MomLinkContainer.h" - -namespace HSG5 { - -//________________________________________________________________________ -LeptonJetsFilter::LeptonJetsFilter( const std::string& name, - ISvcLocator* pSvcLocator ) - : AthFilterAlgorithm(name,pSvcLocator) - , m_nProcessed(0) - , m_nEventPassTrigger(0) -{ - declareProperty("SelectedJetContainerName", m_selectedJetContainerName="", "Name of output jet container from JetSelector"); - declareProperty("SelectedMuonContainerName", m_selectedMuonContainerName="", "Name of output muon container from MuonSelector"); - - declareProperty("MinSumJetsAndMuon", m_minSumJetsAndMuon=0, "Minimum number of jets and muons combined"); - declareProperty("MaxSumJetsAndMuon", m_maxSumJetsAndMuon=999, "Maximum number of jets and muons combined"); - -} - -//________________________________________________________________________ -LeptonJetsFilter::~LeptonJetsFilter() -{ - -} - -//________________________________________________________________________ -StatusCode LeptonJetsFilter::initialize() -{ - StatusCode sc = StatusCode::SUCCESS; - - - return sc; -} - -//________________________________________________________________________ -StatusCode LeptonJetsFilter::finalize() -{ - float effiPassTrigger = 100. * m_nEventPassTrigger / float(m_nProcessed); - float effiErrPassTrigger = 100. * std::sqrt(m_nEventPassTrigger) / float(m_nProcessed); - - ATH_MSG_INFO("==> finalize "<<this->name()<<"..."); - ATH_MSG_INFO("***************************************************************"); - ATH_MSG_INFO("Cut-flow table of "<<this->name()<<" skimming algorithm"); - ATH_MSG_INFO("-------------"); - ATH_MSG_INFO(" Number of processed events: "<<m_nProcessed); - std::stringstream effstr; - effstr<<" Events passing selection: "<<m_nEventPassTrigger<<" and resulting efficiency = (" - <<std::setw(3)<<effiPassTrigger<<" +/- "<<effiErrPassTrigger<<")"; - ATH_MSG_INFO(effstr.str()); - - ATH_MSG_INFO("***************************************************************"); - - return StatusCode::SUCCESS; -} - -//________________________________________________________________________ -StatusCode LeptonJetsFilter::execute() -{ - ATH_MSG_DEBUG("Start executing lepton-jet filter"); - - ++m_nProcessed; - - StatusCode sc = StatusCode::SUCCESS; - - int sumJetsAndMuon=0; - - // get number output jets from StoreGate - const INav4MomLinkContainer* outputJetContainer=0; - if (evtStore()->contains<INav4MomLinkContainer>(m_selectedJetContainerName)) { - sc = evtStore()->retrieve(outputJetContainer, m_selectedJetContainerName); - if (sc.isFailure()) { - ATH_MSG_WARNING("No collection with name "<<m_selectedJetContainerName<<" found in StoreGate"); - } - else { - ATH_MSG_DEBUG("found jet container, adding "<<outputJetContainer->size()<<" to sum"); - sumJetsAndMuon+=outputJetContainer->size(); - } - } - else - ATH_MSG_DEBUG("StoreGate does not contain collection with name "<<m_selectedJetContainerName); - - // get output muons from StoreGate - const INav4MomLinkContainer* outputMuonContainer=0; - if (evtStore()->contains<INav4MomLinkContainer>(m_selectedMuonContainerName)) { - sc = evtStore()->retrieve(outputMuonContainer, m_selectedMuonContainerName); - if (sc.isFailure()) { - ATH_MSG_WARNING("No collection with name "<<m_selectedMuonContainerName<<" found in StoreGate"); - } - else { - ATH_MSG_DEBUG("found muon container, adding "<<outputMuonContainer->size()<<" to sum"); - sumJetsAndMuon+=outputMuonContainer->size(); - } - } - else - ATH_MSG_DEBUG("StoreGate does not contain collection with name "<<m_selectedMuonContainerName); - - - // check if passed selection cuts - ATH_MSG_DEBUG("sumJetsAndMuon="<<sumJetsAndMuon<<", min: "<<m_minSumJetsAndMuon - <<", max: "<<m_maxSumJetsAndMuon); - if (sumJetsAndMuon>=m_minSumJetsAndMuon && - sumJetsAndMuon<=m_maxSumJetsAndMuon) { - ATH_MSG_DEBUG("passed lepton+jets filter"); - setFilterPassed(true); - ++m_nEventPassTrigger; - } - else { - ATH_MSG_DEBUG("failed lepton+jets filter"); - setFilterPassed(false); - } - - return StatusCode::SUCCESS; -} - -} // end namespace diff --git a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx b/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx deleted file mode 100644 index 8a73f998fe6dad57ec5893d6a36a28c9c1e29e01..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils/src/components/HSG5DPDUtils_entries.cxx +++ /dev/null @@ -1,6 +0,0 @@ -#include "HSG5DPDUtils/LeptonFilter.h" -#include "HSG5DPDUtils/LeptonJetsFilter.h" - -DECLARE_COMPONENT( HSG5::LeptonFilter ) -DECLARE_COMPONENT( HSG5::LeptonJetsFilter ) - diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt index d53ba75d8257def09069da5ce407aa34a218b0c2..c8378cf2bc850ba68542527a9026a0885ef86692 100644 --- a/Projects/Athena/package_filters.txt +++ b/Projects/Athena/package_filters.txt @@ -58,5 +58,3 @@ # Don't build PerfMonVTune which has external Intel tool dependency - Control/PerformanceMonitoring/PerfMonVTune -# Old packages that don't work with AthenaMT -- PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils