Class defines binning for user dimension.
More...
#include <CaloLocalHadCoeff.h>
|
| std::string | m_title |
| | dimensions title (e.g. "eta", "energy", "lambda", "blabla", etc)
|
| unsigned int | m_type |
| | dimension type
|
| int | m_nbins |
| | number of bins
|
| float | m_xmin |
| | minimum value for the first bin
|
| float | m_xmax |
| | maximum value for the last bin
|
| float | m_dx |
| | bin size (in the case of equidistant binning)
|
| std::vector< float > | m_xbins |
| | bins borders (if dimension has non-equidistant binning), vector of size m_nbins+1
|
Class defines binning for user dimension.
Definition at line 47 of file CaloLocalHadCoeff.h.
◆ LocalHadDimension() [1/5]
| CaloLocalHadCoeff::LocalHadDimension::LocalHadDimension |
( |
| ) |
|
|
inline |
Default Constructor.
Definition at line 52 of file CaloLocalHadCoeff.h.
float m_xmin
minimum value for the first bin
float m_dx
bin size (in the case of equidistant binning)
int m_nbins
number of bins
float m_xmax
maximum value for the last bin
unsigned int m_type
dimension type
◆ LocalHadDimension() [2/5]
| CaloLocalHadCoeff::LocalHadDimension::LocalHadDimension |
( |
const char * | title, |
|
|
unsigned int | typ, |
|
|
int | nbins, |
|
|
float | xmin, |
|
|
float | xmax ) |
|
inline |
Constructor to define equidistant binning.
- Parameters
-
| title | Dimension title |
| type | Dimension type |
| xmin | Minimum value for the first bin |
| xmax | Maximum value for the last bin |
Definition at line 61 of file CaloLocalHadCoeff.h.
61 :
63 {
66 }
std::vector< float > m_xbins
bins borders (if dimension has non-equidistant binning), vector of size m_nbins+1
std::string m_title
dimensions title (e.g. "eta", "energy", "lambda", "blabla", etc)
◆ LocalHadDimension() [3/5]
| CaloLocalHadCoeff::LocalHadDimension::LocalHadDimension |
( |
const char * | title, |
|
|
unsigned int | typ, |
|
|
std::vector< float > & | xbins ) |
|
inline |
Constructor to define arbitrary binning.
- Parameters
-
| title | Dimension title |
| type | Dimension type |
| xbins | Bins borders, vector of size m_nbins+1 |
Definition at line 74 of file CaloLocalHadCoeff.h.
◆ LocalHadDimension() [4/5]
| CaloLocalHadCoeff::LocalHadDimension::LocalHadDimension |
( |
const LocalHadDimension & | other | ) |
|
|
default |
◆ LocalHadDimension() [5/5]
◆ getBin()
| int CaloLocalHadCoeff::LocalHadDimension::getBin |
( |
float & | x | ) |
const |
return bin number
Definition at line 25 of file CaloLocalHadCoeff.cxx.
26{
28 return -1;
29 }
31 return -100;
32 }
33 int i_bin = -1;
36 }else{
37 for(i_bin=0; i_bin<(
int)
m_xbins.size(); i_bin++){
39 }
40 }
41 return i_bin;
42}
◆ getBinAdjusted()
| int CaloLocalHadCoeff::LocalHadDimension::getBinAdjusted |
( |
float & | x, |
|
|
float & | xadj ) const |
Definition at line 45 of file CaloLocalHadCoeff.cxx.
46{
48 xadj=0.;
49 return 0;
50 }
51
52
54
55 if(i_bin<-10) {
57 xadj=1.0;
58 } else if(i_bin<0) {
59 i_bin=0;
60 xadj=0.0;
61 }else{
63 if(xadj <= 0.5) {
64 if(i_bin > 0 ){
65 --i_bin;
66 xadj += 0.5;
67 } else {
68 xadj=0.;
69 }
70 }else{
71
72 xadj -= 0.5;
73
74 }
75 }
76 return i_bin;
77}
int getBin(float &x) const
return bin number
◆ getDx()
| float CaloLocalHadCoeff::LocalHadDimension::getDx |
( |
| ) |
const |
|
inline |
◆ getNbins()
| int CaloLocalHadCoeff::LocalHadDimension::getNbins |
( |
| ) |
const |
|
inline |
◆ getTitle()
| const std::string & CaloLocalHadCoeff::LocalHadDimension::getTitle |
( |
| ) |
const |
|
inline |
◆ getType()
| unsigned int CaloLocalHadCoeff::LocalHadDimension::getType |
( |
| ) |
const |
|
inline |
◆ getXmax()
| float CaloLocalHadCoeff::LocalHadDimension::getXmax |
( |
| ) |
const |
|
inline |
◆ getXmin()
| float CaloLocalHadCoeff::LocalHadDimension::getXmin |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ m_dx
| float CaloLocalHadCoeff::LocalHadDimension::m_dx |
|
private |
◆ m_nbins
| int CaloLocalHadCoeff::LocalHadDimension::m_nbins |
|
private |
◆ m_title
| std::string CaloLocalHadCoeff::LocalHadDimension::m_title |
|
private |
dimensions title (e.g. "eta", "energy", "lambda", "blabla", etc)
Definition at line 120 of file CaloLocalHadCoeff.h.
◆ m_type
| unsigned int CaloLocalHadCoeff::LocalHadDimension::m_type |
|
private |
◆ m_xbins
| std::vector<float > CaloLocalHadCoeff::LocalHadDimension::m_xbins |
|
private |
bins borders (if dimension has non-equidistant binning), vector of size m_nbins+1
Definition at line 138 of file CaloLocalHadCoeff.h.
◆ m_xmax
| float CaloLocalHadCoeff::LocalHadDimension::m_xmax |
|
private |
◆ m_xmin
| float CaloLocalHadCoeff::LocalHadDimension::m_xmin |
|
private |
The documentation for this class was generated from the following files: