Commit f951bf0e authored by Pierre Antoine Delsart's avatar Pierre Antoine Delsart Committed by Frank Winklmeier
Browse files

Jet reco and config in analysis base

parent 4ddfdcc2
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef PARTICLEJETTOOLSDICT_H
......@@ -16,5 +16,8 @@
#include "ParticleJetTools/JetParticleCenterOfMassAssociation.h"
#include "ParticleJetTools/JetParticleShrinkingConeAssociation.h"
#include "ParticleJetTools/JetTruthLabelingTool.h"
#include "ParticleJetTools/JetPartonTruthLabel.h"
#include "ParticleJetTools/JetConeLabeling.h"
#include "ParticleJetTools/JetQuarkLabel.h"
#endif
<lcgdict>
<class name="CopyTruthParticles" />
<class name="CopyBosonTopLabelTruthParticles" />
<class name="CopyTruthPartons" />
<class name="CopyFlavorLabelTruthParticles" />
<class name="CopyTruthJetParticles" />
<class name="ParticleJetDeltaRLabelTool" />
<class name="JetParticleAssociationAlg" />
<class name="JetParticleAssociation" />
<class name="JetParticleShrinkingConeAssociation" />
<class name="JetParticleCenterOfMassAssociation" />
<class name="JetTruthLabelingTool" />
<namespace name="Analysis"/>
<class name="Analysis::JetPartonTruthLabel" />
<class name="Analysis::JetConeLabeling" />
<class name="Analysis::JetQuarkLabel" />
<class name="CopyTruthParticles" />
<class name="CopyBosonTopLabelTruthParticles" />
<class name="CopyTruthPartons" />
<class name="CopyFlavorLabelTruthParticles" />
<class name="CopyTruthJetParticles" />
<class name="ParticleJetDeltaRLabelTool" />
<class name="JetParticleAssociationAlg" />
<class name="JetParticleAssociation" />
<class name="JetParticleShrinkingConeAssociation" />
<class name="JetParticleCenterOfMassAssociation" />
<class name="JetTruthLabelingTool" />
</lcgdict>
......@@ -12,16 +12,18 @@ from AthenaCommon import Logging
jrtlog = Logging.logging.getLogger('ParticleJetToolsConfig')
from AthenaConfiguration.ComponentFactory import CompFactory
from JetRecConfig.JetRecConfig import isAnalysisRelease
# Putting MCTruthClassifier here as we needn't stick jet configs in really foreign packages
def getMCTruthClassifier():
def getMCTruthClassifier():
# Assume mc15 value
firstSimCreatedBarcode = 200000
truthclassif = CompFactory.MCTruthClassifier(
"JetMCTruthClassifier",
barcodeG4Shift=firstSimCreatedBarcode,
xAODTruthLinkVector=""
)
if not isAnalysisRelease() :
truthclassif.xAODTruthLinkVector= ""
# Config neessary only for Athena releases
import os
if "AtlasProject" in os.environ.keys():
......
......@@ -29,12 +29,6 @@ namespace EL
// public interface
//
/// \brief test the invariant of this object
/// \par Guarantee
/// no-fail
public:
void testInvariant () const;
/// \brief standard constructor
/// \par Guarantee
......
......@@ -29,12 +29,6 @@ namespace EL
// public interface
//
/// \brief test the invariant of this object
/// \par Guarantee
/// no-fail
public:
void testInvariant () const;
/// \brief standard constructor
/// \par Guarantee
......
......@@ -18,12 +18,13 @@ else()
atlas_add_library( AnaAlgorithmLib
AnaAlgorithm/Global.h
AnaAlgorithm/AnaAlgorithm.h AnaAlgorithm/AnaAlgorithm.icc
Root/AnaAlgorithm.cxx
AnaAlgorithm/AnaReentrantAlgorithm.h
Root/AnaAlgorithm.cxx Root/AnaReentrantAlgorithm.cxx
AnaAlgorithm/MessageCheck.h Root/MessageCheck.cxx
PUBLIC_HEADERS AnaAlgorithm
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES AsgMessagingLib GaudiKernel AthenaBaseComps AsgTools StoreGateLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} RootCoreUtils )
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
endif()
# Dictionary for the package's types:
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/// @author Nils Krumnack
......@@ -13,7 +13,6 @@
#include <AnaAlgorithm/AnaAlgorithm.h>
#include <AsgMessaging/MessageCheck.h>
#include <RootCoreUtils/Assert.h>
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/// @author Nils Krumnack
......@@ -16,7 +16,6 @@
#include <AnaAlgorithm/AlgorithmWorkerData.h>
#include <AnaAlgorithm/MessageCheck.h>
#include <AsgTools/AsgTool.h>
#include <RootCoreUtils/Assert.h>
//
// method implementations
......@@ -24,18 +23,12 @@
namespace EL
{
void AnaAlgorithmConfig ::
testInvariant () const
{
RCU_INVARIANT (this != nullptr);
}
AnaAlgorithmConfig ::
AnaAlgorithmConfig ()
{
RCU_NEW_INVARIANT (this);
}
......@@ -44,7 +37,6 @@ namespace EL
AnaAlgorithmConfig (const std::string& val_typeAndName)
: AsgComponentConfig (val_typeAndName)
{
RCU_NEW_INVARIANT (this);
}
......@@ -52,7 +44,6 @@ namespace EL
bool AnaAlgorithmConfig ::
useXAODs () const noexcept
{
RCU_READ_INVARIANT (this);
return m_useXAODs;
}
......@@ -61,7 +52,6 @@ namespace EL
void AnaAlgorithmConfig ::
setUseXAODs (bool val_useXAODs) noexcept
{
RCU_CHANGE_INVARIANT (this);
m_useXAODs = val_useXAODs;
}
......@@ -70,7 +60,6 @@ namespace EL
bool AnaAlgorithmConfig ::
isPublicTool () const noexcept
{
RCU_READ_INVARIANT (this);
return m_isPublicTool;
}
......@@ -79,7 +68,6 @@ namespace EL
void AnaAlgorithmConfig ::
setIsPublicTool (bool val_isPublicTool) noexcept
{
RCU_CHANGE_INVARIANT (this);
m_isPublicTool = val_isPublicTool;
}
......@@ -89,7 +77,6 @@ namespace EL
makeAlgorithm (std::unique_ptr<AnaAlgorithm>& algorithm,
const AlgorithmWorkerData& workerData) const
{
RCU_READ_INVARIANT (this);
using namespace msgAlgorithmConfig;
if (m_isPublicTool == false)
......
......@@ -5,15 +5,13 @@
/// @author Nils Krumnack
//
// includes
//
#include <AnaAlgorithm/AnaAlgorithmWrapper.h>
#include <AnaAlgorithm/MessageCheck.h>
#include <RootCoreUtils/Assert.h>
#include "RootCoreUtils/Assert.h"
//
// method implementations
......
......@@ -13,7 +13,6 @@
#include <AnaAlgorithm/AnaReentrantAlgorithm.h>
#include <AsgMessaging/MessageCheck.h>
#include <RootCoreUtils/Assert.h>
#include <stdexcept>
#ifdef XAOD_STANDALONE
......
......@@ -16,7 +16,6 @@
#include <AnaAlgorithm/AlgorithmWorkerData.h>
#include <AnaAlgorithm/MessageCheck.h>
#include <AsgTools/AsgTool.h>
#include <RootCoreUtils/Assert.h>
//
// method implementations
......@@ -24,17 +23,12 @@
namespace EL
{
void AnaReentrantAlgorithmConfig ::
testInvariant () const
{
}
AnaReentrantAlgorithmConfig ::
AnaReentrantAlgorithmConfig ()
{
RCU_NEW_INVARIANT (this);
}
......@@ -43,7 +37,6 @@ namespace EL
AnaReentrantAlgorithmConfig (const std::string& val_typeAndName)
: AsgComponentConfig (val_typeAndName)
{
RCU_NEW_INVARIANT (this);
}
......@@ -52,7 +45,6 @@ namespace EL
makeAlgorithm (std::unique_ptr<AnaReentrantAlgorithm>& algorithm,
const AlgorithmWorkerData& workerData) const
{
RCU_READ_INVARIANT (this);
using namespace msgAlgorithmConfig;
ANA_CHECK (makeComponentExpert (algorithm, "new %1% (\"%2%\", nullptr)", true, ""));
......
......@@ -14,7 +14,9 @@
#include <AnaAlgorithm/MessageCheck.h>
#include <AsgTools/CurrentContext.h>
#include <RootCoreUtils/Assert.h>
#include "RootCoreUtils/Assert.h"
//
// method implementations
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/// @author Nils Krumnack
......@@ -12,7 +12,6 @@
#include <AnaAlgorithm/MessageCheck.h>
#include <RootCoreUtils/Assert.h>
//
// method implementations
......
......@@ -218,6 +218,7 @@
#+ Tracking/TrkExtrapolation/TrkExUtils
#+ Tracking/TrkTools/TrkToolInterfaces
+ PhysicsAnalysis/MCTruthClassifier
+ PhysicsAnalysis/D3PDTools/AnaAlgorithm
# Ignore everything else
- .*
......@@ -12,18 +12,21 @@ atlas_add_library( EventShapeToolsLib
src/*.cxx
PUBLIC_HEADERS EventShapeTools
INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS}
LINK_LIBRARIES ${FASTJET_LIBRARIES} AsgTools EventShapeInterface JetRecLib JetInterface xAODEventShape
PRIVATE_LINK_LIBRARIES AthenaBaseComps JetEDM )
LINK_LIBRARIES ${FASTJET_LIBRARIES} AsgTools EventShapeInterface JetRecLib JetInterface xAODEventShape AsgDataHandlesLib AnaAlgorithmLib
PRIVATE_LINK_LIBRARIES JetEDM )
if( NOT XAOD_STANDALONE )
atlas_add_component( EventShapeTools
src/components/*.cxx
LINK_LIBRARIES EventShapeToolsLib )
LINK_LIBRARIES EventShapeToolsLib AthenaBaseComps)
endif()
if( XAOD_STANDALONE )
atlas_add_dictionary( EventShapeToolsDict
EventShapeTools/EventShapeToolsDict.h
EventShapeTools/selection.xml
LINK_LIBRARIES EventShapeToolsLib )
LINK_LIBRARIES EventShapeToolsLib )
endif()
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
///////////////////////// -*- C++ -*- /////////////////////////////
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/// \class EventDensityAthAlg
......@@ -15,20 +15,21 @@
#include <string>
// FrameWork includes
#include "AthenaBaseComps/AthReentrantAlgorithm.h"
#include <AnaAlgorithm/AnaReentrantAlgorithm.h>
#include "EventShapeInterface/IEventShapeTool.h"
#include "AsgTools/ToolHandle.h"
class EventDensityAthAlg : public AthReentrantAlgorithm {
class EventDensityAthAlg : public EL::AnaReentrantAlgorithm {
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/// Using base-class constructor
using AthReentrantAlgorithm::AthReentrantAlgorithm;
// Can't use "using ctor" because of incompatiblity with pyroot in AnalysisBase
EventDensityAthAlg(const std::string & n, ISvcLocator* l) : EL::AnaReentrantAlgorithm(n,l) {}
// Athena algorithm's Hooks
virtual StatusCode initialize() override;
......
......@@ -36,6 +36,8 @@
#include "JetRec/PseudoJetContainer.h"
#include "EventShapeInterface/IEventShapeTool.h"
#include "xAODEventShape/EventShape.h"
#include "AsgDataHandles/ReadHandleKey.h"
#include "AsgDataHandles/WriteHandleKey.h"
// Temporarily included until trigger jet-finding properly moves to DH
// Unfortunately, depending on the trigger PJG interface introduces
......
// EventDensityTool.h -*- C++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
......@@ -28,6 +28,8 @@
#include "AsgTools/AsgTool.h"
#include "EventShapeInterface/IEventShapeTool.h"
#include "AsgDataHandles/ReadHandleKey.h"
#include "AsgDataHandles/WriteHandleKey.h"
class EventShapeCopier :
public asg::AsgTool,
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef EVENTSHAPETOOLS_EVENTSHAPETOOLSDICT_H
#define EVENTSHAPETOOLS_EVENTSHAPETOOLSDICT_H
#include "EventShapeTools/EventDensityTool.h"
#include "EventShapeTools/EventDensityAthAlg.h"
#endif //EVENTSHAPETOOLS_EVENTSHAPETOOLSDICT_H
<lcgdict>
<class name="EventDensityTool" />
<class name="EventDensityAthAlg" />
</lcgdict>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment