ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
CaloLocalHadCoeff::LocalHadArea Class Reference

Definition of correction area. More...

#include <CaloLocalHadCoeff.h>

Collaboration diagram for CaloLocalHadCoeff::LocalHadArea:

Public Member Functions

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

Private Attributes

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

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) {};

◆ 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  };

◆ 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; }

◆ setOffset()

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

set area offset

Definition at line 186 of file CaloLocalHadCoeff.h.

186 { m_offset = offset; }

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:
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
CaloLocalHadCoeff::LocalHadArea::m_dims
std::vector< LocalHadDimension > m_dims
vector of defined dimensions
Definition: CaloLocalHadCoeff.h:211
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
CaloLocalHadCoeff::LocalHadArea::m_dims_loc
std::vector< int > m_dims_loc
locator index for dimensions
Definition: CaloLocalHadCoeff.h:214
lumiFormat.i
int i
Definition: lumiFormat.py:85
covarianceTool.title
title
Definition: covarianceTool.py:542
CaloLocalHadCoeff::LocalHadArea::m_type
unsigned int m_type
area type
Definition: CaloLocalHadCoeff.h:199
CaloLocalHadCoeff::LocalHadArea::m_offset
int m_offset
offset for the data in global vector (if more than one area is defined)
Definition: CaloLocalHadCoeff.h:205
CaloLocalHadCoeff::LocalHadArea::m_npars
int m_npars
number of correction parameters
Definition: CaloLocalHadCoeff.h:202
CaloLocalHadCoeff::LocalHadArea::m_length
int m_length
length of area data block (product of m_nbins over all dimensions defined)
Definition: CaloLocalHadCoeff.h:208
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
CaloLocalHadCoeff::LocalHadArea::m_title
std::string m_title
area title
Definition: CaloLocalHadCoeff.h:196