11#include <framework/logging/Logger.h>
69 if (ring > 1) B2ERROR(
"wrong index for injection ring ");
78 if (ring < 0 || ring > 1) B2ERROR(
"wrong index for injection ring ");
87 if (ring > 1) B2ERROR(
"wrong index for injection ring ");
95 unsigned int getTimeBin(
const std::vector<unsigned int>& array,
unsigned int value)
const
97 int nabove, nbelow, middle;
98 nabove = array.size() + 1;
100 while (nabove - nbelow > 1) {
101 middle = (nabove + nbelow) / 2;
102 if (value == array[middle - 1])
return middle - 1;
103 if (value < array[middle - 1]) nabove = middle;
104 else nbelow = middle;
114 double getCorrection(std::string svar,
unsigned int ring,
unsigned int time)
const;
dE/dx injection time calibration constants
unsigned int getTimeBin(const std::vector< unsigned int > &array, unsigned int value) const
Return time bin for the given time array.
CDCDedxInjectionTime(const std::vector< std::vector< double > > &vinjcalib)
Constructor.
std::vector< std::vector< double > > getConstVector() const
Return vector of all constant vector of payload.
std::vector< double > getMeanVector(const int ring) const
Return dedx mean vector.
std::vector< double > getResoVector(const unsigned int ring) const
Return dedx reso vector.
~CDCDedxInjectionTime()
Destructor.
std::vector< double > getTimeVector(const unsigned int ring) const
Return time vector.
CDCDedxInjectionTime()
Default constructor.
void printCorrection(std::string svar, std::string sfx) const
Return dE/dx mean or norm-reso value for the given time and ring.
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.
ClassDef(CDCDedxInjectionTime, 1)
ClassDef.
std::vector< std::vector< double > > m_injectionvar
CDC dE/dx injection time payloads for dEdx mean and reso.
Abstract base class for different kinds of events.