ATLAS Offline Software
Reconstruction
Jet
JetUtils
JetUtils
JetCellAccessor.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
// emacs this is -*-C++-*-
6
#ifndef XAOD_ANALYSIS
7
8
#ifndef JETUTILS_JETCELLACCESSOR_H
9
#define JETUTILS_JETCELLACCESSOR_H
10
#include "
xAODJet/Jet.h
"
30
31
#include "
CaloEvent/CaloClusterCellLink.h
"
32
#include "
CaloEvent/CaloPrefetch.h
"
33
34
namespace
jet
{
35
class
JetCellAccessor
{
36
public
:
37
JetCellAccessor
(
const
xAOD::Jet
*
jet
) ;
38
39
typedef
CaloClusterCellLink::const_iterator
cell_iterator
;
40
typedef
std::vector< ElementLink<xAOD::IParticleContainer> >
::const_iterator
constit_iterator
;
41
typedef
double
weight_t
;
42
43
class
const_iterator
{
44
friend
class
JetCellAccessor
;
45
protected
:
46
const_iterator
(
constit_iterator
constIt,
constit_iterator
constItE,
bool
endIt=
false
) ;
47
48
public
:
49
const
CaloCell
*
operator*
()
const
{
return
(*
m_cellIt
);}
50
const
CaloCell
*
operator->
()
const
{
return
(*
m_cellIt
);}
51
54
weight_t
weight
()
const
{
return
m_cellIt
.
weight
();}
55
58
unsigned
index
()
const
{
return
m_cellIt
.
index
();}
59
60
const_iterator
&
operator++
() {++
m_cellIt
; ;
prefetchCell
() ;
return
*
this
;}
61
const_iterator
&
operator--
() {--
m_cellIt
;
prefetchCell
() ;
return
*
this
;}
62
const_iterator
&
operator++
(
int
) {++
m_cellIt
;
prefetchCell
() ;
return
*
this
;}
63
const_iterator
&
operator--
(
int
) {--
m_cellIt
;
prefetchCell
() ;
return
*
this
;}
64
bool
operator==
(
const
const_iterator
&
b
)
const
{
return
m_cellIt
==
b
.m_cellIt;}
65
bool
operator!=
(
const
const_iterator
&
b
)
const
{
return
m_cellIt
!=
b
.m_cellIt;}
66
67
protected
:
68
69
inline
void
prefetchCell
() {
70
if
(
m_cellIt
==
m_endCellItinConstit
)
nextConstituent
();
else
CaloPrefetch::nextDDE
(
m_cellIt
,
m_endCellItinConstit
);
71
}
72
void
nextConstituent
();
73
bool
setCellIteratorFromConstit
(
const
xAOD::IParticle
*
p
);
74
75
cell_iterator
m_cellIt
;
76
cell_iterator
m_endCellItinConstit
;
77
constit_iterator
m_constitIt
;
78
constit_iterator
m_constitItE
;
79
80
};
81
82
83
static
const_iterator
begin
(
const
xAOD::Jet
*
jet
);
84
static
const_iterator
end
(
const
xAOD::Jet
*
jet
);
85
86
};
87
88
}
89
#endif
90
91
#endif
jet::JetCellAccessor::const_iterator::const_iterator
const_iterator(constit_iterator constIt, constit_iterator constItE, bool endIt=false)
Definition:
JetCellAccessor.cxx:17
jet::JetCellAccessor::end
static const_iterator end(const xAOD::Jet *jet)
Definition:
JetCellAccessor.cxx:81
Jet.h
CaloPrefetch.h
jet::JetCellAccessor::const_iterator
Definition:
JetCellAccessor.h:43
jet::JetCellAccessor::const_iterator::m_endCellItinConstit
cell_iterator m_endCellItinConstit
Definition:
JetCellAccessor.h:76
jet::JetCellAccessor::const_iterator::operator--
const_iterator & operator--(int)
Definition:
JetCellAccessor.h:63
jet::JetCellAccessor::const_iterator::m_constitItE
constit_iterator m_constitItE
Definition:
JetCellAccessor.h:78
jet::JetCellAccessor::const_iterator::setCellIteratorFromConstit
bool setCellIteratorFromConstit(const xAOD::IParticle *p)
Definition:
JetCellAccessor.cxx:46
jet::JetCellAccessor::const_iterator::operator==
bool operator==(const const_iterator &b) const
Definition:
JetCellAccessor.h:64
jet::JetCellAccessor::const_iterator::operator*
const CaloCell * operator*() const
Definition:
JetCellAccessor.h:49
CaloClusterCellLink::const_iterator::index
unsigned index() const
Accessor for the index of the cell in the CaloCellContainer.
Definition:
CaloClusterCellLink.h:86
jet::JetCellAccessor::JetCellAccessor
JetCellAccessor(const xAOD::Jet *jet)
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition:
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
CaloClusterCellLink::const_iterator::weight
weight_t weight() const
Accessor for weight associated to this cell.
Definition:
CaloClusterCellLink.h:82
jet::JetCellAccessor::const_iterator::operator++
const_iterator & operator++()
Definition:
JetCellAccessor.h:60
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
jet::JetCellAccessor::cell_iterator
CaloClusterCellLink::const_iterator cell_iterator
Definition:
JetCellAccessor.h:39
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
jet::JetCellAccessor::weight_t
double weight_t
Definition:
JetCellAccessor.h:41
jet::JetCellAccessor::const_iterator::operator!=
bool operator!=(const const_iterator &b) const
Definition:
JetCellAccessor.h:65
jet::JetCellAccessor::const_iterator::operator++
const_iterator & operator++(int)
Definition:
JetCellAccessor.h:62
jet::JetCellAccessor::const_iterator::index
unsigned index() const
Accessor for the index of the cell in the original CaloCellContainer.
Definition:
JetCellAccessor.h:58
jet::JetCellAccessor
Definition:
JetCellAccessor.h:35
jet::JetCellAccessor::begin
static const_iterator begin(const xAOD::Jet *jet)
Definition:
JetCellAccessor.cxx:76
jet::JetCellAccessor::const_iterator::nextConstituent
void nextConstituent()
Definition:
JetCellAccessor.cxx:61
plotBeamSpotMon.b
b
Definition:
plotBeamSpotMon.py:77
jet::JetCellAccessor::const_iterator::m_cellIt
cell_iterator m_cellIt
Definition:
JetCellAccessor.h:75
xAOD::Jet_v1
Class describing a jet.
Definition:
Jet_v1.h:57
CaloCell
Data object for each calorimeter readout cell.
Definition:
CaloCell.h:57
jet::JetCellAccessor::constit_iterator
std::vector< ElementLink< xAOD::IParticleContainer > >::const_iterator constit_iterator
Definition:
JetCellAccessor.h:40
CaloClusterCellLink.h
jet::JetCellAccessor::const_iterator::prefetchCell
void prefetchCell()
Definition:
JetCellAccessor.h:69
jet::JetCellAccessor::const_iterator::weight
weight_t weight() const
Accessor for weight associated to this cell.
Definition:
JetCellAccessor.h:54
jet::JetCellAccessor::const_iterator::m_constitIt
constit_iterator m_constitIt
Definition:
JetCellAccessor.h:77
jet::JetCellAccessor::const_iterator::operator->
const CaloCell * operator->() const
Definition:
JetCellAccessor.h:50
CaloClusterCellLink::const_iterator
const_iterator to loop over cells belonging to a cluster
Definition:
CaloClusterCellLink.h:57
jet::JetCellAccessor::const_iterator::operator--
const_iterator & operator--()
Definition:
JetCellAccessor.h:61
CaloPrefetch::nextDDE
void nextDDE(Iter iter, Iter endIter)
Prefetch next CaloDDE.
Definition:
CaloPrefetch.h:47
Generated on Sun Dec 22 2024 21:12:23 for ATLAS Offline Software by
1.8.18