ATLAS Offline Software
TrigHisto.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 #ifndef TRIGINDETEVENT_TRIGHISTO_H
6 #define TRIGINDETEVENT_TRIGHISTO_H
7 
8 #include <vector>
9 
10 //---------------------------------------------------------------
11 
12 namespace TrigHistoCutType {
13  enum CutTypeEnum {
20 }
21 
22 //---------------------------------------------------------------
23 
32 class TrigHisto {
33  public:
34  TrigHisto(void);
35  virtual ~TrigHisto(void);
36 
38  void clear(void);
39 
42  unsigned int nbins_x(void) const {
43  return m_nbins_x;
44  }
45 
47  float min_x(void) const {
48  return m_min_x;
49  }
50 
52  float max_x(void) const {
53  return m_max_x;
54  }
55 
58  const std::vector<float>& contents(void) const {
59  return m_contents;
60  }
61 
62  protected:
67  unsigned int findBin(unsigned int nbins,
68  float h_min, float h_max, float binSize,
69  float value) const;
70 
71  std::vector<float> m_contents; //<! A vector to contain the contents of the histogram.
74 
75  // Histogram limits
76  unsigned int m_nbins_x;
77  unsigned int m_underflowBin_x;
78  unsigned int m_overflowBin_x;
79  float m_min_x;
80  float m_max_x;
81  float m_binSize_x;
82 };
83 
84 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TrigHisto::m_overflowBin_x
unsigned int m_overflowBin_x
Definition: TrigHisto.h:78
TrigHisto::min_x
float min_x(void) const
Return the minimum along the x-axis.
Definition: TrigHisto.h:47
TrigHisto::m_nbins_x
unsigned int m_nbins_x
Definition: TrigHisto.h:76
athena.value
value
Definition: athena.py:122
TrigHistoCutType::ABOVE_X_ABOVE_Y
@ ABOVE_X_ABOVE_Y
Definition: TrigHisto.h:19
TrigHisto
The base class for TrigHisto1D and TrigHisto2D. This class should never be stored or used directly.
Definition: TrigHisto.h:32
TrigHisto::m_itr_end
std::vector< float >::iterator m_itr_end
Definition: TrigHisto.h:73
TrigHisto::TrigHisto
TrigHisto(void)
Definition: TrigHisto.cxx:9
TrigHisto::max_x
float max_x(void) const
Return the maximum along the x-axis.
Definition: TrigHisto.h:52
TrigHisto::m_contents
std::vector< float > m_contents
Definition: TrigHisto.h:71
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
TrigHisto::m_itr
std::vector< float >::iterator m_itr
Definition: TrigHisto.h:72
TrigHisto::m_min_x
float m_min_x
Definition: TrigHisto.h:79
TrigHistoCutType
Definition: TrigHisto.h:12
TrigHistoCutType::BELOW_X
@ BELOW_X
Definition: TrigHisto.h:14
TrigHisto::contents
const std::vector< float > & contents(void) const
Return the bin contents of the histogram, including the under and overflow bins.
Definition: TrigHisto.h:58
TrigHisto::clear
void clear(void)
Zero all histogram bins.
Definition: TrigHisto.cxx:24
TrigHistoCutType::ABOVE_X_BELOW_Y
@ ABOVE_X_BELOW_Y
Definition: TrigHisto.h:17
TrigHisto::~TrigHisto
virtual ~TrigHisto(void)
Definition: TrigHisto.cxx:19
TrigHisto::findBin
unsigned int findBin(unsigned int nbins, float h_min, float h_max, float binSize, float value) const
Definition: TrigHisto.cxx:33
TrigHistoCutType::ABOVE_X
@ ABOVE_X
Definition: TrigHisto.h:15
TrigHistoCutType::CutTypeEnum
CutTypeEnum
Definition: TrigHisto.h:13
TrigHistoCutType::BELOW_X_BELOW_Y
@ BELOW_X_BELOW_Y
Definition: TrigHisto.h:16
TrigHistoCutType::BELOW_X_ABOVE_Y
@ BELOW_X_ABOVE_Y
Definition: TrigHisto.h:18
TrigHisto::m_binSize_x
float m_binSize_x
Definition: TrigHisto.h:81
TrigHisto::m_underflowBin_x
unsigned int m_underflowBin_x
Definition: TrigHisto.h:77
TrigHisto::m_max_x
float m_max_x
Definition: TrigHisto.h:80
TrigHisto::nbins_x
unsigned int nbins_x(void) const
Return the number of bins along the y-axis, not including the under and overflow.
Definition: TrigHisto.h:42