ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigHisto2D.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_TRIGHISTO2D_H
6#define TRIGINDETEVENT_TRIGHISTO2D_H
7
9
10#include "TrigHisto.h"
11#include "TrigHisto1D.h"
12
24class TrigHisto2D: public TrigHisto {
25 public:
26
28 TrigHisto2D(void);
29
31 TrigHisto2D(unsigned int nbins_x, float min_x, float max_x,
32 unsigned int nbins_y, float min_y, float max_y);
33
34 TrigHisto2D(unsigned int nbins_x, float min_x, float max_x,
35 unsigned int nbins_y, float min_y, float max_y,
36 const std::vector<float>& contents);
37
39 virtual ~TrigHisto2D(void);
40
42 TrigHisto2D(const TrigHisto2D& trigHisto);
43 TrigHisto2D(TrigHisto2D&& trigHisto);
44
46 TrigHisto2D& operator=(const TrigHisto2D& trigHisto);
47 TrigHisto2D& operator=(TrigHisto2D&& trigHisto);
48
50 void fill(float value_x, float value_y, float weight);
51
53 double sumEntries(float value_x, float value_y, int cutType) const;
54
56 TrigHisto1D profileX(void) const;
57
59 TrigHisto1D profileY(void) const;
60
63 unsigned int nbins_y(void) const {
64 return m_nbins_y;
65 }
66
68 float min_y(void) const {
69 return m_min_y;
70 }
71
73 float max_y(void) const {
74 return m_max_y;
75 }
76
77
78 protected:
79 // The other dimension of histogram limits
80 unsigned int m_nbins_y;
81 unsigned int m_underflowBin_y;
82 unsigned int m_overflowBin_y;
83 float m_min_y;
84 float m_max_y;
86};
87
88
89// obtained using clid -m "TrigHisto2D"
90CLASS_DEF( TrigHisto2D , 10655800 , 1 )
91
92
93#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
A very basic one dimensional histogram to provide storage of HLT distributions, allowing constraints ...
Definition TrigHisto1D.h:23
A very basic two dimensional histogram to provide storage of HLT distributions, allowing constraints ...
TrigHisto2D(void)
Default constructor used by T/P converters.
float min_y(void) const
Return the minimum along the y-axis.
unsigned int nbins_y(void) const
Return the number of bins along the y-axis, not including the under and overflow.
TrigHisto1D profileY(void) const
Collapse the x-axis and return a profile from the y-axis.
double sumEntries(float value_x, float value_y, int cutType) const
Sum the number of entries within the cut range.
TrigHisto1D profileX(void) const
Collapse the y-axis and return a profile from the x-axis.
void fill(float value_x, float value_y, float weight)
Fill a 2D histogram.
TrigHisto2D & operator=(const TrigHisto2D &trigHisto)
Assignment operator.
float max_y(void) const
Return the maximum along the y-axis.
virtual ~TrigHisto2D(void)
Destructor.
TrigHisto(void)
Definition TrigHisto.cxx:9
float max_x(void) const
Return the maximum along the x-axis.
Definition TrigHisto.h:52
float min_x(void) const
Return the minimum along the x-axis.
Definition TrigHisto.h:47
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
const std::vector< float > & contents(void) const
Return the bin contents of the histogram, including the under and overflow bins.
Definition TrigHisto.h:58