ATLAS Offline Software
SlidingWindowFinder.icc
Go to the documentation of this file.
1 // Yo emacs, this is -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: SlidingWindowFinder.icc,v 1.1 2006-12-15 17:30:25 ssnyder Exp $
8 /**
9  * @file SlidingWindowFinder.icc
10  * @author H. Ma, S. Rajagopalan, scott snyder <snyder@bnl.gov>
11  * @date Jan 2000
12  * @brief Sliding window cluster finder, inline implementations.
13  */
14 
15 
16 /**
17  * @brief Return the eta position of the last cluster found.
18  */
19 inline int SlidingWindowFinder::eta() const
20 {
21  assert(m_found);
22  return m_ieta;
23 }
24 
25 
26 /**
27  * @brief Return the phi position of the last cluster found.
28  */
29 inline int SlidingWindowFinder::phi() const
30 {
31  assert(m_found);
32  return m_iphi;
33 }
34 
35 
36 /**
37  * @brief Return a starting iterator over the cells in the last found cluster.
38  */
39 inline
40 SlidingWindowFinder::data_iterator SlidingWindowFinder::cell_begin() const
41 {
42  assert(m_found);
43  return m_cells.begin();
44 }
45 
46 
47 /**
48  * @brief Return an ending iterator over the cells in the last found cluster.
49  */
50 inline
51 SlidingWindowFinder::data_iterator SlidingWindowFinder::cell_end() const
52 {
53  assert(m_found);
54  return m_cells.end();
55 }
56 
57 
58 /**
59  * @brief Return the cell pointer from a cell iterator.
60  */
61 inline const CaloCell*
62 SlidingWindowFinder::getCell(const data_iterator& iter) const
63 {
64  return (*(this->getCellContainer(iter)))[this->getCellIndex(iter)];
65 }
66 
67 
68 /**
69  * @brief Return the container pointer from a cell iterator.
70  */
71 inline const CaloCellContainer*
72 SlidingWindowFinder::getCellContainer(const data_iterator& iter) const
73 {
74  return iter->first;
75 }
76 
77 
78 /**
79  * @brief Return the cell index from a cell iterator.
80  */
81 inline size_t
82 SlidingWindowFinder::getCellIndex(const data_iterator& iter) const
83 {
84  return iter->second;
85 }