ATLAS Offline Software
CaloTopoSplitterHashCluster.h
Go to the documentation of this file.
1 // Yo emacs, this is -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 //-----------------------------------------------------------------------
8 // File and Version Information:
9 // $Id: CaloTopoSplitterHashCluster.h,v 1.5 2008-12-23 02:57:16 ssnyder Exp $
10 //
11 // Description: temporary Cluster Container for topological cluster splitter
12 //
13 // Environment:
14 // Software developed for the ATLAS Detector at the CERN LHC
15 //
16 // Author List:
17 // Sven Menke
18 //
19 //-----------------------------------------------------------------------
20 
21 #ifndef CALOTOPOSPLITTERHASHCLUSTER_H
22 #define CALOTOPOSPLITTERHASHCLUSTER_H
23 
26 #include <CLHEP/Matrix/Vector.h>
27 #include <CLHEP/Geometry/Vector3D.h>
28 #include <optional>
29 
30 class CaloCluster;
33  : public CaloTopoTmpHashClusterBase<CaloTopoSplitterClusterCell>
34 {
37 
38 private:
39 
40  // Data members
43  float m_energy = 0;
44  bool m_hasValidEnergy = false;
45  bool m_containsLocalMax = false;
46  std::optional<HepGeom::Vector3D<double> > m_centroid;
47 
48 public:
49 
50  // Constructors
52  : Base (pool)
53  {}
54 
55  // Destructors
57 
58  // Operators
59 
60  // Selectors
61 
62  inline const xAOD::CaloCluster * getParentCluster() const
63  {
64  return m_parentCluster;
65  }
66 
67  inline size_t getParentClusterIndex() const
68  {
69  return m_parentClusterIndex;
70  }
71 
72  void removeAll()
73  {
75  m_parentCluster = 0;
76  m_energy = 0;
77  m_hasValidEnergy = false;
78  m_containsLocalMax = false;
79  }
80 
81  void add(HashCell& hashCell);
82 
83  void remove(const HashCell& hashCell);
84 
85  void add(CaloTopoSplitterHashCluster& hashCluster);
86 
87  float getEnergy();
88 
89  const HepGeom::Vector3D<double>& getCentroid();
90 
91  inline bool getContainsLocalMax() const
92  {
93  return m_containsLocalMax;
94  }
95 
96  inline void setContainsLocalMax()
97  {
98  m_containsLocalMax = true;
99  }
100 
101  private:
102 
103  void calcEnergy();
104 
105  void calcCentroid();
106 
107 };
108 
109 
110 #endif // CALOTOPOSPLITTERHASHCLUSTER_H
111 
CaloTopoSplitterHashCluster::getContainsLocalMax
bool getContainsLocalMax() const
Definition: CaloTopoSplitterHashCluster.h:91
CaloTopoSplitterHashCluster::m_energy
float m_energy
Definition: CaloTopoSplitterHashCluster.h:43
CaloTopoSplitterHashCluster::getEnergy
float getEnergy()
Definition: CaloTopoSplitterHashCluster.cxx:78
CaloTopoSplitterHashCluster::getParentClusterIndex
size_t getParentClusterIndex() const
Definition: CaloTopoSplitterHashCluster.h:67
CaloTopoSplitterHashCluster::setContainsLocalMax
void setContainsLocalMax()
Definition: CaloTopoSplitterHashCluster.h:96
CaloTopoTmpHashCell
Definition: CaloTopoTmpHashCell.h:22
CaloTopoSplitterHashCluster::getCentroid
const HepGeom::Vector3D< double > & getCentroid()
Definition: CaloTopoSplitterHashCluster.cxx:85
CaloTopoSplitterHashCluster::calcEnergy
void calcEnergy()
Definition: CaloTopoSplitterHashCluster.cxx:92
pool
pool namespace
Definition: libname.h:15
CaloTopoSplitterHashCluster
Definition: CaloTopoSplitterHashCluster.h:34
CaloTopoTmpHashClusterBase< CaloTopoSplitterClusterCell >::removeAll
void removeAll()
Definition: CaloTopoTmpHashClusterBase.h:102
CaloTopoSplitterHashCluster::getParentCluster
const xAOD::CaloCluster * getParentCluster() const
Definition: CaloTopoSplitterHashCluster.h:62
CaloTopoSplitterHashCluster::~CaloTopoSplitterHashCluster
~CaloTopoSplitterHashCluster()=default
CaloTopoSplitterClusterCell
Definition: CaloTopoSplitterClusterCell.h:29
CaloTopoSplitterHashCluster::m_parentClusterIndex
size_t m_parentClusterIndex
Definition: CaloTopoSplitterHashCluster.h:42
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CaloTopoSplitterHashCluster::add
void add(HashCell &hashCell)
Definition: CaloTopoSplitterHashCluster.cxx:29
CaloCluster.h
CaloTopoSplitterHashCluster::CaloTopoSplitterHashCluster
CaloTopoSplitterHashCluster(pool_type &pool)
Definition: CaloTopoSplitterHashCluster.h:51
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
CaloTopoSplitterHashCluster::m_containsLocalMax
bool m_containsLocalMax
Definition: CaloTopoSplitterHashCluster.h:45
CxxUtils::pointer_list::allocator
Allocator for pointer_list, specialized for NELT.
Definition: pointer_list.h:256
CaloTopoSplitterHashCluster::m_hasValidEnergy
bool m_hasValidEnergy
Definition: CaloTopoSplitterHashCluster.h:44
CaloTopoSplitterHashCluster::m_centroid
std::optional< HepGeom::Vector3D< double > > m_centroid
Definition: CaloTopoSplitterHashCluster.h:46
CaloTopoSplitterHashCluster::removeAll
void removeAll()
Definition: CaloTopoSplitterHashCluster.h:72
CaloTopoTmpHashClusterBase.h
CaloTopoSplitterHashCluster::calcCentroid
void calcCentroid()
Definition: CaloTopoSplitterHashCluster.cxx:113
CaloTopoTmpHashClusterBase
Definition: CaloTopoTmpHashClusterBase.h:29
CaloTopoSplitterHashCluster::m_parentCluster
const xAOD::CaloCluster * m_parentCluster
Definition: CaloTopoSplitterHashCluster.h:41
CaloTopoSplitterHashCluster::Base
CaloTopoTmpHashClusterBase< CaloTopoSplitterClusterCell > Base
Definition: CaloTopoSplitterHashCluster.h:35
CaloTopoSplitterHashCluster::HashCell
CaloTopoTmpHashCell< CaloTopoSplitterClusterCell > HashCell
Definition: CaloTopoSplitterHashCluster.h:36
CaloTopoSplitterHashCluster::remove
void remove(const HashCell &hashCell)
Definition: CaloTopoSplitterHashCluster.cxx:42