ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
MuonCalib::CalibFunc Class Referenceabstract

generic interface for a calibration function. More...

#include <CalibFunc.h>

Inheritance diagram for MuonCalib::CalibFunc:
Collaboration diagram for MuonCalib::CalibFunc:

Public Types

using ParVec = std::vector< double >
 

Public Member Functions

 CalibFunc (const ParVec &vec)
 
virtual ~CalibFunc ()=default
 
unsigned int nPar () const
 
const ParVecparameters () const
 
double par (unsigned int index) const
 
virtual std::string typeName () const =0
 
virtual std::string name () const =0
 

Private Attributes

ParVec m_parameters {}
 

Detailed Description

generic interface for a calibration function.

The class caches the parameters and offers routines to access them. All correction functions using parametrisations should inherit from them.

Two functions have to be implemented by the user: typeName(): returning a string with the type of function. The default is to use the name of the interface. For example: The implementation of the slewing correction

IMdtSlewCorFunc::typeName() { return "IMdtSlewCorFunc"; }

name(): returning the name of the concrete implementation

        MdtSlewCorFunc0::name() { return "MdtSlewCorFunc0"; }

typeName() and name() are used to uniquely indentify the correction function. This is needed from communication with the database.

Definition at line 33 of file CalibFunc.h.

Member Typedef Documentation

◆ ParVec

using MuonCalib::CalibFunc::ParVec = std::vector<double>

Definition at line 35 of file CalibFunc.h.

Constructor & Destructor Documentation

◆ CalibFunc()

MuonCalib::CalibFunc::CalibFunc ( const ParVec vec)
inlineexplicit

Definition at line 36 of file CalibFunc.h.

36  :
37  m_parameters{vec} {}

◆ ~CalibFunc()

virtual MuonCalib::CalibFunc::~CalibFunc ( )
virtualdefault

Member Function Documentation

◆ name()

virtual std::string MuonCalib::CalibFunc::name ( ) const
pure virtual

◆ nPar()

unsigned int MuonCalib::CalibFunc::nPar ( ) const
inline

Definition at line 39 of file CalibFunc.h.

39 { return m_parameters.size(); }

◆ par()

double MuonCalib::CalibFunc::par ( unsigned int  index) const
inline

Definition at line 41 of file CalibFunc.h.

41  {
42  if (index < nPar())
43  return m_parameters[index];
44  else
45  return 0.;
46  }

◆ parameters()

const ParVec& MuonCalib::CalibFunc::parameters ( ) const
inline

Definition at line 40 of file CalibFunc.h.

40 { return m_parameters; }

◆ typeName()

virtual std::string MuonCalib::CalibFunc::typeName ( ) const
pure virtual

Member Data Documentation

◆ m_parameters

ParVec MuonCalib::CalibFunc::m_parameters {}
private

Definition at line 51 of file CalibFunc.h.


The documentation for this class was generated from the following file:
index
Definition: index.py:1
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
DeMoScan.index
string index
Definition: DeMoScan.py:364
MuonCalib::CalibFunc::m_parameters
ParVec m_parameters
Definition: CalibFunc.h:51
MuonCalib::CalibFunc::nPar
unsigned int nPar() const
Definition: CalibFunc.h:39