00001 #ifndef xAODTrigMinBias_TrigHisto2D_V1_H
00002 #define xAODTrigMinBias_TrigHisto2D_V1_H
00003
00004 #include "AthContainers/AuxElement.h"
00005
00006 namespace xAOD {
00007
00008 namespace TrigHistoCutType {
00009 enum CutTypeEnum {
00010 BELOW_X,
00011 ABOVE_X,
00012 BELOW_X_BELOW_Y,
00013 ABOVE_X_BELOW_Y,
00014 BELOW_X_ABOVE_Y,
00015 ABOVE_X_ABOVE_Y};
00016 }
00017
00018
00019 class TrigHisto2D_v1 : public SG::AuxElement {
00020 public:
00021 TrigHisto2D_v1();
00022
00024 ~TrigHisto2D_v1();
00025
00027 TrigHisto2D_v1(unsigned int nbins_x, float min_x, float max_x, unsigned int nbins_y, float min_y, float max_y);
00032 const std::vector<float>& contents() const;
00033
00034 unsigned int nbinsX() const;
00035
00037 float minX()const ;
00038
00040 float maxX() const;
00041
00044 unsigned int nbinsY() const;
00045
00047 float minY() const;
00048
00050 float maxY() const;
00051
00053 void initialize(unsigned int nbins_x, float min_x, float max_x, unsigned int nbins_y, float min_y, float max_y);
00054
00056 void fill(float value_x, float value_y, float weight);
00057
00059
00060
00062
00063 std::vector<float> profileX() const;
00064
00066 std::vector<float> profileY() const;
00067
00069 double sumEntries(float value_x, float value_y, int cutType) const;
00070
00072 void clear();
00073
00075 void dump();
00076
00077
00078
00080 void setContents(const std::vector<float> &cont);
00081
00082 void setMinX(float val);
00083
00084 void setMaxX(float val);
00085
00087 void setNbinsX(unsigned int nx);
00088
00089 void setMinY(float val);
00090
00091 void setMaxY(float val);
00092
00094 void setNbinsY(unsigned int ny);
00095
00096 private:
00098 unsigned int findBinX(float val) const;
00099
00101 unsigned int findBinY(float val) const;
00102
00104 static const int EXTRA_BINS=2;
00105
00106
00107 float m_binWidthX;
00108
00109
00110 float m_binWidthY;
00111 };
00112
00113 }
00114
00115 #endif