ATLAS Offline Software
Loading...
Searching...
No Matches
TrigHisto2D_v1.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 xAODTrigMinBias_TrigHisto2D_V1_H
6#define xAODTrigMinBias_TrigHisto2D_V1_H
7
9
10namespace xAOD {
11
21// class MsgStream;
22
24 public:
26
29
31 TrigHisto2D_v1(unsigned int nbins_x, float min_x, float max_x, unsigned int nbins_y, float min_y, float max_y);
33
36 const std::vector<float>& contents() const;
37
38 unsigned int nbinsX() const;
39
41 float minX()const ;
42
44 float maxX() const;
45
48 unsigned int nbinsY() const;
49
51 float minY() const;
52
54 float maxY() const;
55
57 void initialize(unsigned int nbins_x, float min_x, float max_x, unsigned int nbins_y, float min_y, float max_y);
58
60 void fill(float value_x, float value_y, float weight);
61
63 //double sumEntries(float value_x, float value_y, int cutType);
64
66 // it's not very efficient ;/
67 std::vector<float> profileX() const;
68
70 std::vector<float> profileY() const;
71
73 double sumEntries(float value_x, float value_y, int cutType) const;
74
76 void clear();
77
79 void dump();
80
81// void setMsgStream(MsgStream&);
82
84 void setContents(const std::vector<float> &cont);
85
86 void setMinX(float val);
87
88 void setMaxX(float val);
89
91 void setNbinsX(unsigned int nx);
92
93 void setMinY(float val);
94
95 void setMaxY(float val);
96
98 void setNbinsY(unsigned int ny);
99
100 private:
102 unsigned int findBinX(float val) const;
103
105 unsigned int findBinY(float val) const;
106
108 static const int EXTRA_BINS=2;
109
110 /*width of x bins*/
111 float m_binWidthX = 0.0F;
112
113 /*width of y bins*/
114 float m_binWidthY = 0.0F;
115 };
116
117}
118
119#endif
Base class for elements of a container that can have aux data.
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
void setNbinsX(unsigned int nx)
NbinsX setter.
double sumEntries(float value_x, float value_y, int cutType) const
Sum the number of entries within the cut range.
const std::vector< float > & contents() const
Fill a 2D histogram.
unsigned int findBinY(float val) const
returns y bin index
float maxY() const
Return the maximum along the y-axis.
unsigned int nbinsY() const
Return the number of bins along the y-axis, not including the under and overflow.
void setMaxY(float val)
float maxX() const
Return the maximum along the x-axis.
void fill(float value_x, float value_y, float weight)
fill histogram
std::vector< float > profileY() const
Collapse the x-axis and return a profile from the y-axis.
~TrigHisto2D_v1()
Destructor.
void setContents(const std::vector< float > &cont)
contents setter
void clear()
clear m_contents vector
void dump()
dump() function, for testing
void setMinY(float val)
static const int EXTRA_BINS
additional bins for underflow and overflow bins
unsigned int findBinX(float val) const
returns x bin index
void setMaxX(float val)
float minX() const
Return the minimum along the x-axis.
std::vector< float > profileX() const
Sum the number of entries within the cut range.
float minY() const
Return the minimum along the y-axis.
void setMinX(float val)
void setNbinsY(unsigned int ny)
NbinsY setter.
unsigned int nbinsX() const
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
void initialize()