ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloRec
src
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
10
#include "
CaloEvent/CaloClusterCellLink.h
"
11
12
#include <memory>
13
14
class
CaloProtoCluster
{
15
16
public
:
18
CaloProtoCluster
() =
delete
;
19
21
CaloProtoCluster
(
const
CaloCellContainer
* cellCont);
22
24
CaloProtoCluster
(
const
DataLink<CaloCellContainer>
& cellCont);
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
53
CaloClusterCellLink
*
releaseCellLinks
() {
54
return
m_cellLinks
.release();
55
}
56
58
CaloClusterCellLink
*
getCellLinks
() {
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
CaloClusterCellLink.h
CaloCellContainer
Container class for CaloCell.
Definition
CaloCellContainer.h:55
CaloClusterCellLink
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
Definition
CaloClusterCellLink.h:24
CaloClusterCellLink::weight_t
double weight_t
Definition
CaloClusterCellLink.h:27
CaloProtoCluster::m_et
double m_et
Definition
CaloProtoCluster.h:74
CaloProtoCluster::m_e
double m_e
Definition
CaloProtoCluster.h:73
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::size
size_t size()
Get the size of the underlying CaloClusterCellLink object.
Definition
CaloProtoCluster.h:63
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
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::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::getKine
void getKine()
update m_e and m_et
Definition
CaloProtoCluster.cxx:32
DataLink
Object reference supporting deferred reading from StoreGate.
Definition
AthLinks/DataLink.h:93
Generated on
for ATLAS Offline Software by
1.17.0