5#ifndef CALOCONDITIONS_CALOLOCALHADCOEFF_H
6#define CALOCONDITIONS_CALOLOCALHADCOEFF_H
251 void addArea(LocalHadArea & theArea);
254 void setArea(
const int n_area,
const LocalHadArea & theArea);
257 const LocalHadArea *
getArea(
int n_area)
const;
284 int getBin(
const int n_area, std::vector<float> &vars)
const;
287 int getBin(
const int n_area, std::vector<int> &v_indexes)
const;
290 int bin2indexes(
const int iBin, std::vector<int> &v_dim_indx)
const;
293 bool isNeighbour(
const int iBinx, std::vector<int> &v_indx)
const;
296 bool isFilled(
const int iBin)
const;
300 bool getInterpArrays(
const int n_area,
const std::vector<int> &dim, std::vector<float> &
x,
301 std::vector<double> &xadj, std::vector<unsigned int> &gbin)
const;
317#include "AthenaKernel/CondCont.h"
#define CONDCONT_DEF(...)
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
int getDimLoc(int i_dim) const
get dimension locator coefficient
const CaloLocalHadCoeff::LocalHadDimension * getDimension(int n_dim) const
to get dimension
LocalHadArea & operator=(const LocalHadArea &other)=default
std::vector< LocalHadDimension > m_dims
vector of defined dimensions
int getLength() const
return area length
const std::string & getTitle() const
return name
int m_offset
offset for the data in global vector (if more than one area is defined)
unsigned int m_type
area type
LocalHadArea()
Default Constructor.
int m_length
length of area data block (product of m_nbins over all dimensions defined)
LocalHadArea(const char *title, int typ, int npars)
Constructor.
void setLength(int length)
set area length
std::string m_title
area title
int getNdim() const
get number of dimensions
int getNpars() const
return number of parameters
int m_npars
number of correction parameters
std::vector< int > m_dims_loc
locator index for dimensions
LocalHadArea(const LocalHadArea &other)=default
Copy constructor.
int getOffset() const
return area offset
void addDimension(LocalHadDimension &dim)
to add new dimension
unsigned int getType() const
return area type
void setOffset(int offset)
set area offset
LocalHadArea(LocalHadArea &&other) noexcept=default
Class defines binning for user dimension.
float m_xmin
minimum value for the first bin
LocalHadDimension()
Default Constructor.
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
LocalHadDimension(const char *title, unsigned int typ, int nbins, float xmin, float xmax)
Constructor to define equidistant binning.
std::string m_title
dimensions title (e.g. "eta", "energy", "lambda", "blabla", etc)
float getDx() const
return size of bin
int m_nbins
number of bins
const std::string & getTitle() const
return dimension name
int getNbins() const
return number of bins
float getXmax() const
return maximum value for the last bin
LocalHadDimension(const LocalHadDimension &other)=default
Copy constructor.
LocalHadDimension(const char *title, unsigned int typ, std::vector< float > &xbins)
Constructor to define arbitrary binning.
float getXmin() const
return minimum value for the first bin
float m_xmax
maximum value for the last bin
int getBin(float &x) const
return bin number
LocalHadDimension(LocalHadDimension &&) noexcept=default
Move constructor.
LocalHadDimension & operator=(const LocalHadDimension &other)=default
int getBinAdjusted(float &x, float &xadj) const
unsigned int m_type
dimension type
unsigned int getType() const
return dimension type
Hold binned correction data for local hadronic calibration procedure.
CaloLocalHadCoeff()
Default constructor.
const LocalHadCoeff * getCoeff(const int &iBin) const
get data for given general bin number
bool isFilled(const int iBin) const
check if general bin is filled
const LocalHadArea * getArea(int n_area) const
return area
void addArea(LocalHadArea &theArea)
add new area
bool isNeighbour(const int iBinx, std::vector< int > &v_indx) const
are this bins is neighbour to this indexes vector (any of their indexes differ per one ?...
void setCoeff(const int iBin, const LocalHadCoeff &theCoeff)
set new data
void setTitle(const std::string &title)
set name
CaloLocalHadCoeff(const CaloLocalHadCoeff &other)=default
Copy constructor.
int bin2indexes(const int iBin, std::vector< int > &v_dim_indx) const
expand general bin into vector of bins for defined dimensions
int getSizeCoeffSet() const
return total number of coefficient sets
const LocalHadArea * getAreaFromBin(int iBin) const
return area defined for given general iBin
void setArea(const int n_area, const LocalHadArea &theArea)
replace existing area with another one
CaloLocalHadCoeff & operator=(const CaloLocalHadCoeff &other)=default
int getBin(const int n_area, std::vector< float > &vars) const
calculate general bin from vector of input cluster variables
bool getInterpArrays(const int n_area, const std::vector< int > &dim, std::vector< float > &x, std::vector< double > &xadj, std::vector< unsigned int > &gbin) const
for interpolation, build the vector of relative x, and global bins for interpolated array for area n_...
const std::string & getTitle() const
return name
std::vector< float > LocalHadCoeff
Correction parameters for one general bin.
std::vector< LocalHadArea > m_AreaSet
vector of correction areas
CaloLocalHadCoeff(CaloLocalHadCoeff &&) noexcept=default
std::vector< LocalHadCoeff > m_CoeffSet
vector of correction coefficients
std::string m_title
title of data set
int getSizeAreaSet() const
return number of areas defined for this data set