|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef MUONHOUGHPATTERNEVENT_MUONHOUGHHISTO2D_H
6 #define MUONHOUGHPATTERNEVENT_MUONHOUGHHISTO2D_H
61 std::pair<int, double>
getMax()
const;
63 std::pair<int, double>
getMaximumBin(
unsigned int maximum_number = 0);
70 bool checkIfMaximum(
int binnumber,
double& maximum,
int& maxbin)
const;
76 double getMaximum(
unsigned int maximum_number = 0);
78 int getMaxBin(
unsigned int maximum_number = 0);
86 std::pair<double, double>
binnumberToCoords(
int binnumber,
int printlevel = 0)
const;
236 #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHHISTO2D_H
double getBinContent(int binnumber) const
returns x axis
double m_invbinwidthx
inv binwidth x axis used for cpu speedup
void setBinContent(int binx, int biny, double value)
set bin content of binnumber corresponding to coordinates
double m_ymax
maximum y coordinate
double m_binwidthy
binwidth y axis
std::pair< int, double > getMax() const
returns binnumber and maximum of histogram (doesn't use m_bins_above_threshold)
void findMaxima()
find maxima in histogram
int getNbinsX() const
returns number of bins x coordinate
void setMaximumIsValid(bool flag)
double binnumberToXCoord(int binnumber) const
gives x-coordinate for certain binnumber
int distanceBins(int binnumber1, int binnumber2) const
calculates the distance in binwidths between two binnumbers ("Manhattan metric")
std::unique_ptr< unsigned int[]> m_histBuffer
actual storage of bin values
unsigned int m_size
size of array
int coordToBiny(double y) const
converts y-coordinates to biny
void init()
initialises private members, called in constructor
bool m_maxima_found
check if search for maxima already performed
std::vector< int > m_maximumbins
binnumbers found as maxima
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
int coordToBinx(double x) const
converts x-coordinates to binx
const int m_distance_to_next_maximum
minimum distance for a maximum to be away from another maximum
int coordToBinnumber(double x, double y) const
converts coordinates to a binnumber
bool checkIfMaximum(int binnumber, double &maximum, int &maxbin) const
check if binnumber is a maximum
unsigned int m_nbinsy
number of y bins
double m_ymin
minimum y coordinate
double getBinWidthX() const
return binwidth x axis
double content_Bin_Area(int binnumber) const
return the total content of binarea (default: content of bin)
bool checkIfMaximumAlreadyUsed(int binnumber) const
check when searching for several maxima if binnumber is close to an earlier found maximum
void reset()
clears histogram and bins_above_threshold
Class to provide easy MsgStream access and capabilities.
MuonHoughHisto2D & operator=(const MuonHoughHisto2D &right)
unsigned int m_nbinsx
number of x bins
std::pair< double, double > binnumberToCoords(int binnumber, int printlevel=0) const
gives coordinates for certain binnumber
void resetHisto()
resets histogram
int binInHistogram(unsigned int bin) const
checks if bin is in histogram or if it is an under/overflow bin (unused) 0 is in histo 1 x underflow ...
double binnumberToYCoord(int binnumber) const
gives y-coordinate for certain binnumber
double m_xmin
minimum x coordinate
int getMaxBin(unsigned int maximum_number=0)
return maximum binnumber
void setBinContent(int binnumber, double value)
set bin content of binnumber
double m_xmax
maximum x coordinate
double getXmax() const
returns max x axis
int getNbinsY() const
returns number of bins y coordinate
void setThreshold(double threshold)
set threshold for maxima in histogram
std::pair< int, double > getMaximumBin(unsigned int maximum_number=0)
returns binnumber and maximum of maximum number maximum_number
double getMaximum(unsigned int maximum_number=0)
return value of maximum bin
unsigned int m_nbinsy_plus2
number of y bins + 2 , used for cpu speedup
std::set< int > m_bins_above_threshold
set of bins that are above threshold used for speeding up searching for maxima
double m_invbinwidthy
inv binwidth y axis used for cpu speedup
int fill(double x, double y, double weight=1.)
fill 2d histogram with point (x,y) with weight w, return binnumber filled
const int m_number_of_maxima
number of maxima to be searched for
std::pair< double, double > getCoordsMaximum(unsigned int maximum_number=0)
returns coords of maximum number maximum_number
double getXmin() const
returns min x axis
double getThreshold() const
returns threshold for maxima in histogram
~MuonHoughHisto2D()=default
destructor
double getBinWidthY() const
return binwidth y axis
unsigned int m_scale
threshold for minimum content for a maximum
unsigned int m_nbinsx_plus2
number of x bins + 2 , used for cpu speedup
std::unique_ptr< TH2F > bookAndFillRootHistogram(const std::string &hname) const
intialises a root histogram of MuonHoughHisto2D and fill it, used for debugging purposes
Histogram class, similar to Root's TH2D.
double m_binwidthx
binwidth x axis
MuonHoughHisto2D(const MuonHoughHisto2D &)
MuonHoughHisto2D(int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, int number_of_maxima=1)
constructor