ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloUtils
CaloUtils
CaloCellList.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef CaloCellList_H
6
#define CaloCellList_H
7
8
/* Selecting Cells from a Container of CaloCells
9
H. Ma Sept 2000
10
The constructor takes a pointer to ObjectVector<CaloCell>
11
Two selection implemented:
12
delta_eta, delta_phi around a fix eta,phi, and
13
a cone of size dR around a fixed eta,phi
14
An optional sampling layer requirement.
15
Using the templated method, Tselect, user can write a
16
function object with the operator()(CaloCell*) to select
17
the wanted cells.
18
Each select call clears previous selection.
19
methods et() and energy() return et and energy.
20
list of cells can also be accessed through iterators.
21
22
Mod 17 Jun 2004 David Rousseau: work off big CaloCellContainer
23
24
Mod 21 Sep 2004 Damir Lelas: -speeding up using "CaloDetDescr/CaloDetDescrManager" class.
25
-vector of cells added to an exsisting list of cells
26
27
Mod 11 Oct 2004 Damir Lelas: -new method "select_nstrips" added; possibility to get number
28
of strips around given (eta,phi) direction for
29
(ncell_eta,ncell_phi) specified. The List of cells replaced
30
by the Vector of cells.
31
32
*/
33
34
class
CaloCellContainer
;
35
class
CaloCell
;
36
#include "
CaloDetDescr/CaloDetDescrManager.h
"
37
#include "
CaloIdentifier/CaloCell_ID.h
"
38
39
class
CaloCellList
40
{
41
42
public
:
43
typedef
std::vector<const CaloCell*>
vector_type
;
44
typedef
vector_type::const_iterator
list_iterator
;
45
CaloCellList
() =
delete
;
46
CaloCellList
(
const
CaloDetDescrManager
* mgr,
const
CaloCellContainer
* cell_container);
47
CaloCellList
(
const
CaloDetDescrManager
& mgr,
const
CaloCellContainer
& cell_container);
48
CaloCellList
(
const
CaloDetDescrManager
* mgr,
const
CaloCellContainer
* cell_container,
const
CaloCell_ID::SUBCALO
caloNum);
49
CaloCellList
(
const
CaloDetDescrManager
* mgr,
const
CaloCellContainer
* cell_container,
const
std::vector<CaloCell_ID::SUBCALO>& caloNums);
50
CaloCellList
(
const
CaloSuperCellDetDescrManager
* mgr,
const
CaloCellContainer
* cell_container);
51
52
~CaloCellList
() =
default
;
53
54
// deta/dphi are the half-widths of the window.
55
// That is, we select cells within eta-deta .. eta+deta and similarly for
56
// phi.
57
58
void
select
(
double
eta
,
double
phi
,
double
deta,
double
dphi);
//
59
void
select
(
double
eta
,
double
phi
,
double
deta,
double
dphi,
int
sam);
//
60
void
select
(
double
eta
,
double
phi
,
double
dR);
//
61
void
select
(
double
eta
,
double
phi
,
double
dR,
int
sam);
62
63
list_iterator
begin
()
const
;
64
list_iterator
end
()
const
;
65
66
double
energy
()
const
;
// returns the energy of the selected cells
67
double
et
()
const
;
// returns the et of the selected cells
68
int
ncells
()
const
;
// returns the number of cells
69
unsigned
short
nBadT
(
int
i)
const
;
// returns the number of bad timed cell in Tile (0, 1 for sampling 0 and 1+2)
70
71
private
:
72
void
doSelect
(
double
eta
,
73
double
phi
,
74
double
deta,
75
double
dphi,
76
double
dR,
77
CaloCell_ID::CaloSample
sam = CaloCell_ID::Unknown);
78
79
const
CaloCellContainer
&
m_cellcont
;
80
const
CaloDetDescrManager_Base
&
m_mgr
;
81
std::vector<CaloCell_ID::SUBCALO>
m_caloNums
;
82
vector_type
m_theCellVector
;
83
double
m_energy
;
84
double
m_et
;
85
unsigned
short
m_nBadT0
= 0U,
m_nBadT12
= 0U;
86
};
87
88
inline
CaloCellList::list_iterator
89
CaloCellList::begin
()
const
90
{
91
return
m_theCellVector
.begin();
92
}
93
94
inline
CaloCellList::list_iterator
95
CaloCellList::end
()
const
96
{
97
return
m_theCellVector
.end();
98
}
99
100
inline
double
101
CaloCellList::energy
()
const
102
{
103
return
m_energy
;
104
}
105
106
inline
double
107
CaloCellList::et
()
const
108
{
109
return
m_et
;
110
}
111
112
inline
int
113
CaloCellList::ncells
()
const
114
{
115
return
m_theCellVector
.size();
116
}
117
118
inline
unsigned
short
119
CaloCellList::nBadT
(
int
i)
const
120
{
121
return
(i == 0 ?
m_nBadT0
:
m_nBadT12
);
122
}
123
124
#endif
125
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
CaloCell_ID.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
CaloCellContainer
Container class for CaloCell.
Definition
CaloCellContainer.h:55
CaloCellList::doSelect
void doSelect(double eta, double phi, double deta, double dphi, double dR, CaloCell_ID::CaloSample sam=CaloCell_ID::Unknown)
Definition
CaloCellList.cxx:113
CaloCellList::nBadT
unsigned short nBadT(int i) const
Definition
CaloCellList.h:119
CaloCellList::energy
double energy() const
Definition
CaloCellList.h:101
CaloCellList::m_theCellVector
vector_type m_theCellVector
Definition
CaloCellList.h:82
CaloCellList::m_nBadT0
unsigned short m_nBadT0
Definition
CaloCellList.h:85
CaloCellList::CaloCellList
CaloCellList()=delete
CaloCellList::~CaloCellList
~CaloCellList()=default
CaloCellList::m_cellcont
const CaloCellContainer & m_cellcont
Definition
CaloCellList.h:79
CaloCellList::m_mgr
const CaloDetDescrManager_Base & m_mgr
Definition
CaloCellList.h:80
CaloCellList::end
list_iterator end() const
Definition
CaloCellList.h:95
CaloCellList::select
void select(double eta, double phi, double deta, double dphi)
Definition
CaloCellList.cxx:89
CaloCellList::et
double et() const
Definition
CaloCellList.h:107
CaloCellList::m_nBadT12
unsigned short m_nBadT12
Definition
CaloCellList.h:85
CaloCellList::m_energy
double m_energy
Definition
CaloCellList.h:83
CaloCellList::ncells
int ncells() const
Definition
CaloCellList.h:113
CaloCellList::m_et
double m_et
Definition
CaloCellList.h:84
CaloCellList::begin
list_iterator begin() const
Definition
CaloCellList.h:89
CaloCellList::m_caloNums
std::vector< CaloCell_ID::SUBCALO > m_caloNums
Definition
CaloCellList.h:81
CaloCellList::list_iterator
vector_type::const_iterator list_iterator
Definition
CaloCellList.h:44
CaloCellList::vector_type
std::vector< const CaloCell * > vector_type
Definition
CaloCellList.h:43
CaloCell_ID::SUBCALO
CaloCell_Base_ID::SUBCALO SUBCALO
Definition
CaloCell_ID.h:50
CaloCell_ID::CaloSample
CaloSampling::CaloSample CaloSample
Definition
CaloCell_ID.h:53
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
CaloDetDescrManager_Base
Definition
CaloDetDescrManager.h:145
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition
CaloDetDescrManager.h:469
CaloSuperCellDetDescrManager
Definition
CaloDetDescrManager.h:486
Generated on
for ATLAS Offline Software by
1.17.0