Skip to content
Snippets Groups Projects
Commit b519a595 authored by Scott Snyder's avatar Scott Snyder Committed by Graeme Stewart
Browse files

Fix forgotten commit. (AssociationComps-00-01-23)

	* Tagging AssociationComps-00-01-23.
	* Fix forgotten commit.

2016-05-20  scott snyder  <snyder@bnl.gov>

	* Tagging AssociationComps-00-01-22.
	* DataModel -> AthContainers, AthLinks.
	* Tagging AssociationComps-00-01-21.
	* Remove dependency on AssociationUtils by copying needed pieces
	here.
	* Tagging AssociationComps-00-01-20.
	* Avoid division by FP constants.


Former-commit-id: 4a21890394af6cbc56303006841bc23092ce2da2
parent 21e75fae
No related merge requests found
Showing
with 394 additions and 20 deletions
......@@ -9,7 +9,8 @@ atlas_subdir( AssociationComps )
atlas_depends_on_subdirs( PRIVATE
Calorimeter/CaloEvent
Control/AthenaBaseComps
Control/DataModel
Control/AthContainers
Control/AthLinks
Control/Navigation
Control/StoreGate
Event/EventKernel
......@@ -17,7 +18,6 @@ atlas_depends_on_subdirs( PRIVATE
Event/NavFourMom
GaudiKernel
PhysicsAnalysis/AssociationBuilder/AssociationKernel
PhysicsAnalysis/AssociationBuilder/AssociationUtils
Reconstruction/Jet/JetEvent
Reconstruction/MuonIdentification/muonEvent
Reconstruction/egamma/egammaEvent
......@@ -36,7 +36,7 @@ atlas_add_component( AssociationComps
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaBaseComps DataModel Navigation StoreGateLib SGtests EventKernel FourMomUtils NavFourMom GaudiKernel AssociationKernel AssociationUtils JetEvent muonEvent egammaEvent tauEvent TrigObjectMatchingLib TrigCaloEvent TrigMuonEvent TrigParticle )
LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent AthenaBaseComps AthContainers AthLinks Navigation StoreGateLib SGtests EventKernel FourMomUtils NavFourMom GaudiKernel AssociationKernel JetEvent muonEvent egammaEvent tauEvent TrigObjectMatchingLib TrigCaloEvent TrigMuonEvent TrigParticle )
# Install files from the package:
atlas_install_joboptions( share/*.py )
......
......@@ -8,12 +8,12 @@ use AtlasPolicy AtlasPolicy-*
private
use AssociationKernel AssociationKernel-* PhysicsAnalysis/AssociationBuilder
use AssociationUtils AssociationUtils-* PhysicsAnalysis/AssociationBuilder
use AthenaBaseComps AthenaBaseComps-* Control
use AtlasBoost AtlasBoost-* External
use AtlasCLHEP AtlasCLHEP-* External
use CaloEvent CaloEvent-* Calorimeter
use DataModel DataModel-* Control
use AthContainers AthContainers-* Control
use AthLinks AthLinks-* Control
use EventKernel EventKernel-* Event
use FourMomUtils FourMomUtils-* Event
use GaudiInterface GaudiInterface-* External
......
......@@ -19,7 +19,7 @@
#include "StoreGate/StoreGateSvc.h"
// CLHEP includes
#include "CLHEP/Units/SystemOfUnits.h"
#include "AthenaKernel/Units.h"
// FourMom includes
#include "FourMomUtils/P4Helpers.h"
......@@ -34,7 +34,7 @@
// AssociationComps includes
#include "AssocBuilder.h"
using namespace CLHEP;
using Athena::Units::GeV;
///////////////////////////////////////////////////////////////////
// Public methods:
......
......@@ -23,7 +23,7 @@
#include "StoreGate/StoreGateSvc.h"
// CLHEP includes
#include "CLHEP/Units/SystemOfUnits.h"
#include "AthenaKernel/Units.h"
// NavFourMom includes
#include "NavFourMom/INav4MomAssocs.h"
......@@ -34,7 +34,7 @@
// AssociationComps includes
#include "AssocDumper.h"
using namespace CLHEP;
using Athena::Units::GeV;
namespace {
struct ToLower
......
......@@ -38,8 +38,8 @@
#include "Navigation/IAthenaBarCode.h"
// The needed ElementLink stuff
#include "DataModel/DataVector.h"
#include "DataModel/ElementLink.h"
#include "AthContainers/DataVector.h"
#include "AthLinks/ElementLink.h"
......
......@@ -39,8 +39,8 @@
#include "Navigation/IAthenaBarCode.h"
// The needed ElementLink stuff
#include "DataModel/DataVector.h"
#include "DataModel/ElementLink.h"
#include "AthContainers/DataVector.h"
#include "AthLinks/ElementLink.h"
......
......@@ -46,8 +46,8 @@
#include "Navigation/IAthenaBarCode.h"
// The needed ElementLink stuff
#include "DataModel/DataVector.h"
#include "DataModel/ElementLink.h"
#include "AthContainers/DataVector.h"
#include "AthLinks/ElementLink.h"
using namespace CLHEP;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// DeltaROverlapFilter.cxx
// Implementation file for class DeltaROverlapFilter
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
// STL includes
#include <cfloat>
// FourMomUtils includes
#include "FourMomUtils/P4Helpers.h"
// AssociationUtils includes
#include "DeltaROverlapFilter.h"
namespace AssociationComps {
///////////////////////////////////////////////////////////////////
/// Public methods:
///////////////////////////////////////////////////////////////////
// Constructors
////////////////
DeltaROverlapFilter::DeltaROverlapFilter() :
IOverlapFilter( ),
m_minDeltaR ( 0. ),
m_maxDeltaR ( DBL_MAX )
{}
DeltaROverlapFilter::DeltaROverlapFilter( const DeltaROverlapFilter& rhs ) :
IOverlapFilter( rhs ),
m_minDeltaR( rhs.m_minDeltaR ),
m_maxDeltaR( rhs.m_maxDeltaR )
{}
DeltaROverlapFilter&
DeltaROverlapFilter::operator=( const DeltaROverlapFilter& rhs )
{
if ( this != &rhs ) {
IOverlapFilter::operator=( rhs );
m_minDeltaR = rhs.m_minDeltaR;
m_maxDeltaR = rhs.m_maxDeltaR;
}
return *this;
}
DeltaROverlapFilter::DeltaROverlapFilter( double maxDeltaR ) :
IOverlapFilter( ),
m_minDeltaR( 0. ),
m_maxDeltaR( maxDeltaR )
{}
DeltaROverlapFilter::DeltaROverlapFilter( double minDeltaR,
double maxDeltaR ) :
IOverlapFilter( ),
m_minDeltaR( minDeltaR ),
m_maxDeltaR( maxDeltaR )
{}
// Destructor
///////////////
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
bool DeltaROverlapFilter::hasOverlap( const INavigable4Momentum& obj1,
const INavigable4Momentum& obj2 ) const
{
const double deltaR = P4Helpers::deltaR( obj1, obj2 );
return ( m_minDeltaR <= deltaR ) && ( deltaR < m_maxDeltaR );
}
///////////////////////////////////////////////////////////////////
// Non-const methods:
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// Protected methods:
///////////////////////////////////////////////////////////////////
} // namespace AssociationComps
///////////////////////// -*- C++ -*- /////////////////////////////
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// DeltaROverlapFilter.h
// Header file for class DeltaROverlapFilter
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef ASSOCIATIONCOMPS_DELTAROVERLAPFILTER_H
#define ASSOCIATIONCOMPS_DELTAROVERLAPFILTER_H
// STL includes
#include <functional>
// EventKernel includes
#include "EventKernel/INavigable4Momentum.h"
// AssociationUtils includes
#include "IOverlapFilter.h"
// Forward declaration
namespace AssociationComps {
class DeltaROverlapFilter : public IOverlapFilter
{
public:
using IOverlapFilter::hasOverlap;
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Default constructor:
*/
DeltaROverlapFilter();
/** Copy constructor:
*/
DeltaROverlapFilter( const DeltaROverlapFilter& rhs );
/** Assignment operator:
*/
DeltaROverlapFilter& operator=( const DeltaROverlapFilter& rhs );
/** Constructor with parameters:
*/
DeltaROverlapFilter( double maxDeltaR );
/** Constructor with parameters:
*/
DeltaROverlapFilter( double minDeltaR, double maxDeltaR );
/** Destructor:
*/
virtual ~DeltaROverlapFilter();
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
/** @brief Filtering method. If true then objects overlap.
*/
bool hasOverlap( const INavigable4Momentum& obj1,
const INavigable4Momentum& obj2 ) const;
/** @brief Retrieve the defined lowest value cut for the $\Delta R$
*/
double minDeltaR() const;
/** @brief Retrieve the defined highest value cut for the $\Delta R$
*/
double maxDeltaR() const;
///////////////////////////////////////////////////////////////////
// Non-const methods:
///////////////////////////////////////////////////////////////////
void setMinDeltaR( double minDeltaR );
void setMaxDeltaR( double maxDeltaR );
void setDeltaR( double minDeltaR, double maxDeltaR );
///////////////////////////////////////////////////////////////////
// Protected data:
///////////////////////////////////////////////////////////////////
protected:
/** Inner crown limit for delta-R check
*/
double m_minDeltaR;
/** Outer crown limit for delta-R check
*/
double m_maxDeltaR;
};
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
inline DeltaROverlapFilter::~DeltaROverlapFilter()
{}
inline double DeltaROverlapFilter::minDeltaR() const
{
return m_minDeltaR;
}
inline double DeltaROverlapFilter::maxDeltaR() const
{
return m_maxDeltaR;
}
inline void DeltaROverlapFilter::setMinDeltaR( double minDeltaR )
{
m_minDeltaR = minDeltaR;
}
inline void DeltaROverlapFilter::setMaxDeltaR( double maxDeltaR )
{
m_maxDeltaR = maxDeltaR;
}
inline
void DeltaROverlapFilter::setDeltaR( double minDeltaR, double maxDeltaR )
{
m_minDeltaR = minDeltaR;
m_maxDeltaR = maxDeltaR;
}
} // namespace AssociationComps
#endif //> ASSOCIATIONCOMPS_DELTAROVERLAPFILTER_H
......@@ -16,7 +16,7 @@
// HepMC / CLHEP includes
// AssociationUtils includes
#include "AssociationUtils/DeltaROverlapFilter.h"
#include "DeltaROverlapFilter.h"
// AssociationComps includes
#include "OverlapBaseTool.h"
......@@ -85,7 +85,7 @@ class DeltaROverlapTool : public OverlapBaseTool
/** DeltaR-Overlap predicate
*/
DeltaROverlapFilter m_filter;
AssociationComps::DeltaROverlapFilter m_filter;
/** Minimum delta-R for the overlap filter
*/
......@@ -106,7 +106,7 @@ class DeltaROverlapTool : public OverlapBaseTool
inline void DeltaROverlapTool::setupDeltaR( Property& /*maxDeltaR*/ )
{
m_filter = DeltaROverlapFilter( m_minDeltaR.value(), m_maxDeltaR.value() );
m_filter = AssociationComps::DeltaROverlapFilter( m_minDeltaR.value(), m_maxDeltaR.value() );
return;
}
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// IOverlapFilter.cxx
// Implementation file for class IOverlapFilter
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
// STL includes
// AssociationUtils includes
#include "IOverlapFilter.h"
namespace AssociationComps {
///////////////////////////////////////////////////////////////////
/// Public methods:
///////////////////////////////////////////////////////////////////
// Constructors
////////////////
// Destructor
///////////////
IOverlapFilter::~IOverlapFilter()
{}
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// Non-const methods:
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// Protected methods:
///////////////////////////////////////////////////////////////////
} // namespace AssociationComps
///////////////////////// -*- C++ -*- /////////////////////////////
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// IOverlapFilter.h
// Header file for class IOverlapFilter
// Author: S.Binet<binet@cern.ch>
///////////////////////////////////////////////////////////////////
#ifndef ASSOCIATIONCOMPS_IOVERLAPFILTER_H
#define ASSOCIATIONCOMPS_IOVERLAPFILTER_H
// STL includes
#include <functional>
// EventKernel includes
#include "EventKernel/INavigable4Momentum.h"
// Forward declaration
namespace AssociationComps {
class IOverlapFilter : public std::binary_function<
const INavigable4Momentum*,
const INavigable4Momentum*,
bool
>
{
///////////////////////////////////////////////////////////////////
// Public methods:
///////////////////////////////////////////////////////////////////
public:
/** Destructor:
*/
virtual ~IOverlapFilter();
///////////////////////////////////////////////////////////////////
// Const methods:
///////////////////////////////////////////////////////////////////
/** @brief Filtering method.
* Return true if objects overlap.
*/
virtual bool hasOverlap( const INavigable4Momentum& obj1,
const INavigable4Momentum& obj2 ) const = 0;
/** @brief Filtering method.
* Return true if objects overlap ( forwards to @c hasOverlap )
*/
bool hasOverlap( const INavigable4Momentum* obj1,
const INavigable4Momentum* obj2 ) const;
/** @brief Filtering method.
* Return true if objects overlap ( forwards to @c hasOverlap )
*/
bool operator()( const INavigable4Momentum& obj1,
const INavigable4Momentum& obj2 ) const;
/** @brief Filtering method.
* Return true if objects overlap ( forwards to @c hasOverlap )
*/
bool operator()( const INavigable4Momentum* obj1,
const INavigable4Momentum* obj2 ) const;
///////////////////////////////////////////////////////////////////
// Non-const methods:
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// Protected data:
///////////////////////////////////////////////////////////////////
protected:
};
///////////////////////////////////////////////////////////////////
/// Inline methods:
///////////////////////////////////////////////////////////////////
inline bool
IOverlapFilter::hasOverlap( const INavigable4Momentum* obj1,
const INavigable4Momentum* obj2 ) const
{
return hasOverlap(*obj1, *obj2);
}
inline bool IOverlapFilter::operator()( const INavigable4Momentum& obj1,
const INavigable4Momentum& obj2 ) const
{
return hasOverlap(obj1, obj2);
}
inline bool IOverlapFilter::operator()( const INavigable4Momentum* obj1,
const INavigable4Momentum* obj2 ) const
{
return hasOverlap(*obj1, *obj2);
}
} // namespace AssociationComps
#endif //> ASSOCIATIONCOMPS_IOVERLAPFILTER_H
......@@ -61,8 +61,8 @@
#include "TrigObjectMatching/TrigMatchTool.h"
// The needed ElementLink stuff
#include "DataModel/DataVector.h"
#include "DataModel/ElementLink.h"
#include "AthContainers/DataVector.h"
#include "AthLinks/ElementLink.h"
......
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