ATLAS Offline Software
Loading...
Searching...
No Matches
CaloLocalHadCoeff::LocalHadArea Class Reference

Definition of correction area. More...

#include <CaloLocalHadCoeff.h>

Collaboration diagram for CaloLocalHadCoeff::LocalHadArea:

Public Member Functions

 LocalHadArea ()
 Default Constructor.
 LocalHadArea (const char *title, int typ, int npars)
 Constructor.
 LocalHadArea (const LocalHadArea &other)=default
 Copy constructor.
LocalHadAreaoperator= (const LocalHadArea &other)=default
 LocalHadArea (LocalHadArea &&other) noexcept=default
LocalHadAreaoperator= (LocalHadArea &&other) noexcept=default
unsigned int getType () const
 return area type
int getNpars () const
 return number of parameters
int getOffset () const
 return area offset
int getLength () const
 return area length
int getNdim () const
 get number of dimensions
int getDimLoc (int i_dim) const
 get dimension locator coefficient
const std::string & getTitle () const
 return name
void setOffset (int offset)
 set area offset
void setLength (int length)
 set area length
void addDimension (LocalHadDimension &dim)
 to add new dimension
const CaloLocalHadCoeff::LocalHadDimensiongetDimension (int n_dim) const
 to get dimension

Private Attributes

std::string m_title
 area title
unsigned int m_type
 area type
int m_npars
 number of correction parameters
int m_offset
 offset for the data in global vector (if more than one area is defined)
int m_length
 length of area data block (product of m_nbins over all dimensions defined)
std::vector< LocalHadDimensionm_dims
 vector of defined dimensions
std::vector< int > m_dims_loc
 locator index for dimensions

Detailed Description

Definition of correction area.

Definition at line 145 of file CaloLocalHadCoeff.h.

Constructor & Destructor Documentation

◆ LocalHadArea() [1/4]

CaloLocalHadCoeff::LocalHadArea::LocalHadArea ( )
inline

Default Constructor.

Definition at line 150 of file CaloLocalHadCoeff.h.

150: m_type(0), m_npars(0), m_offset(0), m_length(0) {};
int m_offset
offset for the data in global vector (if more than one area is defined)
int m_length
length of area data block (product of m_nbins over all dimensions defined)
int m_npars
number of correction parameters

◆ LocalHadArea() [2/4]

CaloLocalHadCoeff::LocalHadArea::LocalHadArea ( const char * title,
int typ,
int npars )
inline

Constructor.

Parameters
titleName of the area
typType of area
nparsNumber of correction parameters

Definition at line 157 of file CaloLocalHadCoeff.h.

157 : m_title(title), m_type(typ), m_npars(npars), m_offset(0), m_length(0)
158 {
159 m_dims.resize(0);
160 m_dims_loc.resize(0);
161 };
std::vector< LocalHadDimension > m_dims
vector of defined dimensions
std::vector< int > m_dims_loc
locator index for dimensions

◆ LocalHadArea() [3/4]

CaloLocalHadCoeff::LocalHadArea::LocalHadArea ( const LocalHadArea & other)
default

Copy constructor.

◆ LocalHadArea() [4/4]

CaloLocalHadCoeff::LocalHadArea::LocalHadArea ( LocalHadArea && other)
defaultnoexcept

Member Function Documentation

◆ addDimension()

void CaloLocalHadCoeff::LocalHadArea::addDimension ( CaloLocalHadCoeff::LocalHadDimension & dim)

to add new dimension

Definition at line 135 of file CaloLocalHadCoeff.cxx.

136{
137 m_dims.push_back(dim);
138 // recalculation of length of the area (product of bins numbers of each dimension)
139 m_length = 1;
140 int ndim = (int)m_dims.size();
141 for(int i=0; i<ndim; i++){
142 m_length = m_length*m_dims[i].getNbins();
143 }
144 // calculation of dimension locator coefficient for fast calculation of global bin number
145 m_dims_loc.resize(ndim, 0);
146 for(int i_dim=0; i_dim<ndim; i_dim++){
147 int xloc = 1;
148 for(int j=i_dim+1; j<ndim; j++){
149 xloc = xloc*m_dims[j].getNbins();
150 }
151 m_dims_loc[i_dim] = xloc;
152 }
153}

◆ getDimension()

const CaloLocalHadCoeff::LocalHadDimension * CaloLocalHadCoeff::LocalHadArea::getDimension ( int n_dim) const
inline

to get dimension

Definition at line 192 of file CaloLocalHadCoeff.h.

192{ return &(m_dims[n_dim]); }

◆ getDimLoc()

int CaloLocalHadCoeff::LocalHadArea::getDimLoc ( int i_dim) const
inline

get dimension locator coefficient

Definition at line 181 of file CaloLocalHadCoeff.h.

181{ return m_dims_loc[i_dim]; }

◆ getLength()

int CaloLocalHadCoeff::LocalHadArea::getLength ( ) const
inline

return area length

Definition at line 177 of file CaloLocalHadCoeff.h.

177{ return m_length; }

◆ getNdim()

int CaloLocalHadCoeff::LocalHadArea::getNdim ( ) const
inline

get number of dimensions

Definition at line 179 of file CaloLocalHadCoeff.h.

179{ return (int) m_dims.size(); }

◆ getNpars()

int CaloLocalHadCoeff::LocalHadArea::getNpars ( ) const
inline

return number of parameters

Definition at line 173 of file CaloLocalHadCoeff.h.

173{ return m_npars; }

◆ getOffset()

int CaloLocalHadCoeff::LocalHadArea::getOffset ( ) const
inline

return area offset

Definition at line 175 of file CaloLocalHadCoeff.h.

175{ return m_offset; }

◆ getTitle()

const std::string & CaloLocalHadCoeff::LocalHadArea::getTitle ( ) const
inline

return name

Definition at line 183 of file CaloLocalHadCoeff.h.

183{return m_title;}

◆ getType()

unsigned int CaloLocalHadCoeff::LocalHadArea::getType ( ) const
inline

return area type

Definition at line 171 of file CaloLocalHadCoeff.h.

171{ return m_type; }

◆ operator=() [1/2]

LocalHadArea & CaloLocalHadCoeff::LocalHadArea::operator= ( const LocalHadArea & other)
default

◆ operator=() [2/2]

LocalHadArea & CaloLocalHadCoeff::LocalHadArea::operator= ( LocalHadArea && other)
defaultnoexcept

◆ setLength()

void CaloLocalHadCoeff::LocalHadArea::setLength ( int length)
inline

set area length

Definition at line 188 of file CaloLocalHadCoeff.h.

188{ m_length = length; }
double length(const pvec &v)

◆ setOffset()

void CaloLocalHadCoeff::LocalHadArea::setOffset ( int offset)
inline

set area offset

Definition at line 186 of file CaloLocalHadCoeff.h.

Member Data Documentation

◆ m_dims

std::vector<LocalHadDimension > CaloLocalHadCoeff::LocalHadArea::m_dims
private

vector of defined dimensions

Definition at line 211 of file CaloLocalHadCoeff.h.

◆ m_dims_loc

std::vector<int > CaloLocalHadCoeff::LocalHadArea::m_dims_loc
private

locator index for dimensions

Definition at line 214 of file CaloLocalHadCoeff.h.

◆ m_length

int CaloLocalHadCoeff::LocalHadArea::m_length
private

length of area data block (product of m_nbins over all dimensions defined)

Definition at line 208 of file CaloLocalHadCoeff.h.

◆ m_npars

int CaloLocalHadCoeff::LocalHadArea::m_npars
private

number of correction parameters

Definition at line 202 of file CaloLocalHadCoeff.h.

◆ m_offset

int CaloLocalHadCoeff::LocalHadArea::m_offset
private

offset for the data in global vector (if more than one area is defined)

Definition at line 205 of file CaloLocalHadCoeff.h.

◆ m_title

std::string CaloLocalHadCoeff::LocalHadArea::m_title
private

area title

Definition at line 196 of file CaloLocalHadCoeff.h.

◆ m_type

unsigned int CaloLocalHadCoeff::LocalHadArea::m_type
private

area type

Definition at line 199 of file CaloLocalHadCoeff.h.


The documentation for this class was generated from the following files: