dE/dx injection time calibration constants
More...
#include <CDCDedxInjectionTime.h>
|
| CDCDedxInjectionTime () |
| Default constructor.
|
|
| CDCDedxInjectionTime (const std::vector< std::vector< double >> &vinjcalib) |
| Constructor.
|
|
| ~CDCDedxInjectionTime () |
| Destructor.
|
|
void | printCorrection (std::string svar, std::string sfx) const |
| Return dE/dx mean or norm-reso value for the given time and ring. More...
|
|
std::vector< std::vector< double > > | getConstVector () const |
| Return vector of all constant vector of payload.
|
|
std::vector< double > | getTimeVector (const unsigned int ring) const |
| Return time vector. More...
|
|
std::vector< double > | getMeanVector (const int ring) const |
| Return dedx mean vector. More...
|
|
std::vector< double > | getResoVector (const unsigned int ring) const |
| Return dedx reso vector. More...
|
|
unsigned int | getTimeBin (const std::vector< unsigned int > &array, unsigned int value) const |
| Return time bin for the given time array. More...
|
|
double | getCorrection (std::string svar, unsigned int ring, unsigned int time) const |
| Return dE/dx mean or norm-reso value for the given time and ring. More...
|
|
dE/dx injection time calibration constants
Definition at line 29 of file CDCDedxInjectionTime.h.
◆ getCorrection()
double getCorrection |
( |
std::string |
svar, |
|
|
unsigned int |
ring, |
|
|
unsigned int |
time |
|
) |
| const |
Return dE/dx mean or norm-reso value for the given time and ring.
- Parameters
-
svar | is option for mean and reso calibration factor |
ring | is injection ring number (0/1 for LER/HER) |
time | is injection time (large 0-20sec range) |
Definition at line 80 of file CDCDedxInjectionTime.cc.
82 if (svar !=
"mean" && svar !=
"reso") {
83 B2ERROR(
"wrong var input, choose mean or reso");
87 if (std::isnan(ring) || std::isnan(time))
return 1.0;
90 B2ERROR(
"wrong ring input, choose 0 or 1");
94 unsigned int iv = ring * 3 + 1 ;
95 if (svar ==
"reso") iv = ring * 3 + 2 ;
99 if (sizet == 0 || sizev == 0) {
100 B2ERROR(
"calibration vectors are empty");
104 std::vector<unsigned int> tedges(sizet);
107 if (time >= 5e6)time = 5e6 - 10;
115 int thisbin = it, nextbin = it;
116 if (center != time && it > 0) {
121 if (it < sizet - 2)nextbin = it + 1;
122 else thisbin = it - 1;
129 if (it == 1) nextbin = it;
130 else nextbin = it + 1;
147 if (thisbin != nextbin)
148 newdedx = thisdedx + ((nextdedx - thisdedx) / (nexttime - thistime)) * (time - thistime);
unsigned int getTimeBin(const std::vector< unsigned int > &array, unsigned int value) const
Return time bin for the given time array.
std::vector< std::vector< double > > m_injectionvar
CDC dE/dx injection time payloads for dEdx mean and reso.
◆ getMeanVector()
std::vector<double> getMeanVector |
( |
const int |
ring | ) |
const |
|
inline |
Return dedx mean vector.
- Parameters
-
ring | is injection ring number (0/1 for LER/HER) |
Definition at line 76 of file CDCDedxInjectionTime.h.
78 if (ring < 0 || ring > 1) B2ERROR(
"wrong index for injection ring ");
◆ getResoVector()
std::vector<double> getResoVector |
( |
const unsigned int |
ring | ) |
const |
|
inline |
Return dedx reso vector.
- Parameters
-
ring | is injection ring number (0/1 for LER/HER) |
Definition at line 85 of file CDCDedxInjectionTime.h.
◆ getTimeBin()
unsigned int getTimeBin |
( |
const std::vector< unsigned int > & |
array, |
|
|
unsigned int |
value |
|
) |
| const |
|
inline |
Return time bin for the given time array.
- Parameters
-
array | of time |
value | of input time |
Definition at line 95 of file CDCDedxInjectionTime.h.
◆ getTimeVector()
std::vector<double> getTimeVector |
( |
const unsigned int |
ring | ) |
const |
|
inline |
Return time vector.
- Parameters
-
ring | is injection ring number (0/1 for LER/HER) |
Definition at line 67 of file CDCDedxInjectionTime.h.
◆ printCorrection()
void printCorrection |
( |
std::string |
svar, |
|
|
std::string |
sfx |
|
) |
| const |
Return dE/dx mean or norm-reso value for the given time and ring.
- Parameters
-
svar | is option for printing mean and reso calibration |
sfx | to add suffix in file save |
Definition at line 13 of file CDCDedxInjectionTime.cc.
◆ m_injectionvar
std::vector<std::vector<double> > m_injectionvar |
|
private |
CDC dE/dx injection time payloads for dEdx mean and reso.
different for LER and HER vector to store payload values
Definition at line 122 of file CDCDedxInjectionTime.h.
The documentation for this class was generated from the following files: