Belle II Software  release-08-01-10
CDCTimeWalks Class Reference

Database object for time-walk. More...

#include <CDCTimeWalks.h>

Inheritance diagram for CDCTimeWalks:
Collaboration diagram for CDCTimeWalks:

Public Member Functions

 CDCTimeWalks ()
 Default constructor.
 
void setTwParamMode (unsigned short mode)
 Set tw parameterization mode mode=0: tw (in ns) = p0/sqrt(FADCsum); mode=1: tw( in ns) = p0*exp(-p1*FADCsum).
 
void setTimeWalkParams (unsigned short boardID, const std::vector< float > &params)
 Set the time-walk coefficients in the list. More...
 
void addTimeWalks (unsigned short boardID, const std::vector< float > &deltas)
 Update the time-walk coefficients in the list. More...
 
unsigned short getTwParamMode () const
 Get tw parameterization mode.
 
unsigned short getEntries () const
 Get the no. More...
 
std::map< unsigned short, std::vector< float > > getTimeWalkParams () const
 Get the whole list.
 
const std::vector< float > & getTimeWalkParams (unsigned short boardID) const
 Get the time-walk coefficients for the board. More...
 
void dump () const
 Print all contents.
 
void outputToFile (std::string fileName) const
 Output the contents in text file format.
 
double getGlobalParam (unsigned short element, unsigned short i) const
 Get global parameter.
 
void setGlobalParam (double value, unsigned short element, unsigned short i)
 Set global parameter.
 
std::vector< std::pair< unsigned short, unsigned short > > listGlobalParams () const
 list stored global parameters
 

Static Public Member Functions

static unsigned short getGlobalUniqueID ()
 Get global unique id.
 

Private Member Functions

 ClassDef (CDCTimeWalks, 2)
 ClassDef.
 

Private Attributes

unsigned short m_twParamMode
 Mode for tw parameterization; the initial value should be the one for classdef=1; do not modify it. More...
 
unsigned short m_nTwParams
 No. More...
 
std::map< unsigned short, std::vector< float > > m_tws
 tw list
 

Detailed Description

Database object for time-walk.

Definition at line 25 of file CDCTimeWalks.h.

Member Function Documentation

◆ addTimeWalks()

void addTimeWalks ( unsigned short  boardID,
const std::vector< float > &  deltas 
)
inline

Update the time-walk coefficients in the list.

Parameters
boardIDfront-end board id.
deltasdelta-coefficients

Definition at line 59 of file CDCTimeWalks.h.

60  {
61  std::map<unsigned short, std::vector<float>>::iterator it = m_tws.find(boardID);
62  if (it != m_tws.end()) {
63  for (unsigned short i = 0; i < m_nTwParams; ++i) {
64  (it->second)[i] += deltas[i];
65  }
66  } else {
67  B2FATAL("Specified tw params not found in addTimeWalks !");
68  }
69  }
unsigned short m_nTwParams
No.
Definition: CDCTimeWalks.h:186
std::map< unsigned short, std::vector< float > > m_tws
tw list
Definition: CDCTimeWalks.h:188

◆ getEntries()

unsigned short getEntries ( ) const
inline

Get the no.

of entries in the list

Definition at line 83 of file CDCTimeWalks.h.

◆ getTimeWalkParams()

const std::vector<float>& getTimeWalkParams ( unsigned short  boardID) const
inline

Get the time-walk coefficients for the board.

Parameters
boardIDfront-end board id.
Returns
time-walk coefficients for the board id.

Definition at line 101 of file CDCTimeWalks.h.

◆ setTimeWalkParams()

void setTimeWalkParams ( unsigned short  boardID,
const std::vector< float > &  params 
)
inline

Set the time-walk coefficients in the list.

Parameters
boardIDfront-end board id.
paramscoefficients for the time-walk corr. term

Definition at line 48 of file CDCTimeWalks.h.

Member Data Documentation

◆ m_nTwParams

unsigned short m_nTwParams
private
Initial value:
=
2

No.

of tw parameters; the initial value should be the one for classdef=1; do not modify it.

Definition at line 186 of file CDCTimeWalks.h.

◆ m_twParamMode

unsigned short m_twParamMode
private
Initial value:
=
1

Mode for tw parameterization; the initial value should be the one for classdef=1; do not modify it.

Definition at line 184 of file CDCTimeWalks.h.


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