ATLAS Offline Software
Loading...
Searching...
No Matches
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
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;
73 double m_e;
74 double m_et;
75
76};
77
78
79
80
81#endif
Container class for CaloCell.
CaloClusterCellLink * getCellLinks()
Get a pointer to the underlying CaloClusterCellLink object.
std::unique_ptr< CaloClusterCellLink > m_cellLinks
size_t size()
Get the size of the underlying CaloClusterCellLink object.
void addCell(const unsigned cellIdx, const CaloClusterCellLink::weight_t weight=1.0)
Add a cell (forward to underlying CaloClusterCellLink)
double et()
Return the weighted Et of the list of cells.
CaloClusterCellLink * releaseCellLinks()
Hand over ownership of CaloClusterCellLink to client.
double e()
Return the weighted energy sum of the list of cells.
CaloProtoCluster()=delete
No default constructor, always need a CaloCellContainer to work with.
void getKine()
update m_e and m_et