ATLAS Offline Software
CaloProtoCluster.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //Dear emacs, this is -*-c++-*-
6 #ifndef CALOPROTOCLUSTER
7 #define CALOPROTOCLUSTER
8 
9 
11 
12 #include <memory>
13 
15 
16  public:
18  CaloProtoCluster() = delete;
19 
21  CaloProtoCluster(const CaloCellContainer* cellCont);
22 
25 
26 
31  CaloProtoCluster(const CaloClusterCellLink* cellLink);
32 
34  double e() {
35  if (!m_haveKine) getKine();
36  return m_e;
37  }
38 
40  double et() {
41  if (!m_haveKine) getKine();
42  return m_et;
43  }
44 
46  void addCell(const unsigned cellIdx, const CaloClusterCellLink::weight_t weight=1.0) {
47  m_cellLinks->addCell(cellIdx,weight);
48  m_haveKine=false;
49  }
50 
51 
54  return m_cellLinks.release();
55  }
56 
59  return m_cellLinks.get();
60  }
61 
63  size_t size() {
64  return m_cellLinks->size();
65  }
66 
67  private:
69  void getKine();
70 
71  std::unique_ptr<CaloClusterCellLink> m_cellLinks;
72  bool m_haveKine;
73  double m_e;
74  double m_et;
75 
76 };
77 
78 
79 
80 
81 #endif
CaloProtoCluster::e
double e()
Return the weighted energy sum of the list of cells.
Definition: CaloProtoCluster.h:34
CaloProtoCluster::m_haveKine
bool m_haveKine
Definition: CaloProtoCluster.h:72
CaloProtoCluster::CaloProtoCluster
CaloProtoCluster()=delete
No default constructor, always need a CaloCellContainer to work with.
CaloProtoCluster::m_e
double m_e
Definition: CaloProtoCluster.h:73
CaloProtoCluster
Definition: CaloProtoCluster.h:14
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
CaloProtoCluster::getCellLinks
CaloClusterCellLink * getCellLinks()
Get a pointer to the underlying CaloClusterCellLink object.
Definition: CaloProtoCluster.h:58
CaloProtoCluster::m_cellLinks
std::unique_ptr< CaloClusterCellLink > m_cellLinks
Definition: CaloProtoCluster.h:71
CaloProtoCluster::addCell
void addCell(const unsigned cellIdx, const CaloClusterCellLink::weight_t weight=1.0)
Add a cell (forward to underlying CaloClusterCellLink)
Definition: CaloProtoCluster.h:46
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloProtoCluster::et
double et()
Return the weighted Et of the list of cells.
Definition: CaloProtoCluster.h:40
CaloProtoCluster::releaseCellLinks
CaloClusterCellLink * releaseCellLinks()
Hand over ownership of CaloClusterCellLink to client.
Definition: CaloProtoCluster.h:53
CaloProtoCluster::size
size_t size()
Get the size of the underlying CaloClusterCellLink object.
Definition: CaloProtoCluster.h:63
CaloProtoCluster::m_et
double m_et
Definition: CaloProtoCluster.h:74
CaloProtoCluster::getKine
void getKine()
update m_e and m_et
Definition: CaloProtoCluster.cxx:32