ATLAS Offline Software
ClusterFilterTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5 ClusterFilterTool.h - Description
6 -------------------
7 begin : February 2017
8 authors : Noemi Calace
9 ***************************************************************************/
10 #ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_CLUSTERFILTERTOOL_H
11 #define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_CLUSTERFILTERTOOL_H
12 
14 #include "GaudiKernel/ToolHandle.h"
15 #include "GaudiKernel/ServiceHandle.h"
17 
20 
21 class ClusterFilterTool : virtual public IClusterFilterTool, public AthAlgTool {
22  public:
23  ClusterFilterTool(const std::string&,const std::string&,const IInterface*);
24  virtual ~ClusterFilterTool();
25 
26  virtual StatusCode initialize();
27  virtual StatusCode finalize();
28 
35  bool rejectCluster(const xAOD::CaloCluster& cluster) const final;
36 
37  private:
38  // Get a data container; implementation at end of this header file
39  template<class T> const T* getContainer( const std::string & containerName) const ;
40 
41  std::string m_caloEntryMapName;
42 
43  ToolHandle<CP::ITrackVertexAssociationTool> m_loosetrackvertexassoTool;
44 
47 
48  // cone size value
49  double m_coneSize;
50 
51  // pt fraction at PV0
52  double m_ptFractionPV0;
53 
54 };
55 
56 template<class T>
57 inline const T* ClusterFilterTool::getContainer(const std::string & containerName) const{
58  const T * ptr = evtStore()->retrieve< const T >( containerName );
59  if (!ptr) {
60  ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
61  }
62  return ptr;
63 }
64 
65 
66 #endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_CLUSTERFILTERTOOL_H
ClusterFilterTool::finalize
virtual StatusCode finalize()
Definition: ClusterFilterTool.cxx:34
IClusterFilterTool
Interface for extending Particles with calo intersections.
Definition: IClusterFilterTool.h:16
ClusterFilterTool::m_trackParticleCollectionName
std::string m_trackParticleCollectionName
Definition: ClusterFilterTool.h:50
IClusterFilterTool.h
ClusterFilterTool::m_vertexCollectionName
std::string m_vertexCollectionName
Definition: ClusterFilterTool.h:51
ClusterFilterTool::initialize
virtual StatusCode initialize()
Definition: ClusterFilterTool.cxx:28
ClusterFilterTool::m_ptFractionPV0
double m_ptFractionPV0
Definition: ClusterFilterTool.h:57
ClusterFilterTool::rejectCluster
bool rejectCluster(const xAOD::CaloCluster &cluster) const final
Method to check if a given cluster has to be rejected or not based on primary vertices requirements.
Definition: ClusterFilterTool.cxx:39
ClusterFilterTool::~ClusterFilterTool
virtual ~ClusterFilterTool()
ClusterFilterTool::m_loosetrackvertexassoTool
ToolHandle< CP::ITrackVertexAssociationTool > m_loosetrackvertexassoTool
Definition: ClusterFilterTool.h:48
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ClusterFilterTool::m_coneSize
double m_coneSize
Definition: ClusterFilterTool.h:54
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
ITrackVertexAssociationTool.h
ClusterFilterTool::m_caloEntryMapName
std::string m_caloEntryMapName
Definition: ClusterFilterTool.h:46
ClusterFilterTool
Definition: ClusterFilterTool.h:21
ClusterFilterTool::ClusterFilterTool
ClusterFilterTool(const std::string &, const std::string &, const IInterface *)
Definition: ClusterFilterTool.cxx:12
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloClusterContainer.h
AthAlgTool
Definition: AthAlgTool.h:26
ClusterFilterTool::getContainer
const T * getContainer(const std::string &containerName) const
Definition: ClusterFilterTool.h:57
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35