ATLAS Offline Software
Loading...
Searching...
No Matches
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
29#include "xAODJet/Jet.h"
30
33
34namespace jet{
36 public:
38
40 typedef std::vector< ElementLink<xAOD::IParticleContainer> >::const_iterator constit_iterator;
41 typedef double weight_t;
42
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;}
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
72 void nextConstituent();
74
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
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
bool operator==(const const_iterator &b) const
const CaloCell * operator*() const
bool setCellIteratorFromConstit(const xAOD::IParticle *p)
unsigned index() const
Accessor for the index of the cell in the original CaloCellContainer.
bool operator!=(const const_iterator &b) const
const_iterator(constit_iterator constIt, constit_iterator constItE, bool endIt=false)
const CaloCell * operator->() const
weight_t weight() const
Accessor for weight associated to this cell.
JetCellAccessor(const xAOD::Jet *jet)
static const_iterator begin(const xAOD::Jet *jet)
static const_iterator end(const xAOD::Jet *jet)
CaloClusterCellLink::const_iterator cell_iterator
std::vector< ElementLink< xAOD::IParticleContainer > >::const_iterator constit_iterator
Class providing the definition of the 4-vector interface.
void nextDDE(Iter iter, Iter endIter)
Prefetch next CaloDDE.
Jet_v1 Jet
Definition of the current "jet version".