Skip to content
Snippets Groups Projects
Commit c90c2119 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'higgs_delete' into 'master'

Higgs: delete unused DPD packages

See merge request atlas/athena!38048
parents c62de8f7 bc73fc6c
No related branches found
No related tags found
No related merge requests found
Showing
with 1 addition and 1206 deletions
# 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
......
......@@ -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'])
......
################################################################################
# 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 )
# 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 )
# 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
# 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
/*
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
// 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
/*
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
// 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
/*
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
// 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
#include "../QuadrupletFillerTool.h"
#include "../QuadrupletVertexAssociationTool.h"
#include "../QuadrupletCompositeParticleAssociationTool.h"
DECLARE_COMPONENT( D3PD::QuadrupletFillerTool )
DECLARE_COMPONENT( D3PD::QuadrupletVertexAssociationTool )
DECLARE_COMPONENT( D3PD::QuadrupletCompositeParticleAssociationTool )
# 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)
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" ]
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]
################################################################################
# Package: HSG1AnalysisCommon
################################################################################
# Declare the package name:
atlas_subdir( HSG1AnalysisCommon )
# Install files from the package:
atlas_install_joboptions( share/*.py )
HSG1_CommonJobOptions.py is for PAU82, release 16.0.0, and 15.6.2
################################################################################
# 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 )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment