Database object for time-walk.
More...
#include <CDCTimeWalks.h>
|
| 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 > ¶ms) |
| 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
|
|
|
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
|
|
Database object for time-walk.
Definition at line 25 of file CDCTimeWalks.h.
◆ addTimeWalks()
void addTimeWalks |
( |
unsigned short |
boardID, |
|
|
const std::vector< float > & |
deltas |
|
) |
| |
|
inline |
Update the time-walk coefficients in the list.
- Parameters
-
boardID | front-end board id. |
deltas | delta-coefficients |
Definition at line 59 of file CDCTimeWalks.h.
61 std::map<unsigned short, std::vector<float>>::iterator it =
m_tws.find(boardID);
62 if (it !=
m_tws.end()) {
64 (it->second)[i] += deltas[i];
67 B2FATAL(
"Specified tw params not found in addTimeWalks !");
unsigned short m_nTwParams
No.
std::map< unsigned short, std::vector< float > > m_tws
tw list
◆ 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
-
boardID | front-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
-
boardID | front-end board id. |
params | coefficients for the time-walk corr. term |
Definition at line 48 of file CDCTimeWalks.h.
◆ m_nTwParams
unsigned short m_nTwParams |
|
private |
Initial value:
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:
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: