13 #include <framework/logging/Logger.h>
53 }
else if (side > 0) {
56 B2ERROR(
"CDCDedxCosineEdge:choose >0 for forward and <0 for backward side");
66 double getMean(
int side,
unsigned int ibin)
const
69 std::vector<double> temp;
72 }
else if (side > 0) {
75 B2ERROR(
"CDCDedxCosineEdge:choose > 0 for forward and <0 for backward side");
79 if (ibin >= temp.size()) {
80 B2WARNING(
"CDCDedxADCNonLinearity:returning (1.0) uncorrected ADC as bin: " << ibin <<
" is not in range");
91 double coslow = 0.0, coshigh = 0.0;
92 std::vector<double> temp;
95 coslow = -0.870; coshigh = -0.850;
96 }
else if (costh > 0) {
98 coslow = 0.950; coshigh = 0.960;
100 B2ERROR(
"CDCDedxCosineEdge:choose > 0 for forward and <0 for backward side");
105 if (costh < coslow || costh > coshigh) {
106 B2WARNING(
"CDCDedxCosineEdge:outside range (" << costh <<
")choose in between " << coslow <<
" and " << coshigh);
110 double bw = abs(coshigh - coslow) / temp.size();
111 unsigned int ibin = int((costh - coslow) / bw);
113 if (ibin >= temp.size()) {
114 B2WARNING(
"CDCDedxCosineEdge:no constants for bin ## " << ibin <<
" as it is not in range");
119 if (temp[ibin] <= 0.0)
return 1.0;
131 std::vector<double> temp;
132 double coslow = 0.0, coshigh = 0.0;
135 coslow = -0.870; coshigh = -0.850;
136 }
else if (side > 0) {
138 coslow = 0.950; coshigh = 0.960;
140 B2ERROR(
"CDCDedxCosineEdge:choose > 0 for forward and <0 for backward side");
144 if (ibin >= temp.size()) {
145 B2ERROR(
"CDCDedxCosineEdge:Problem with bin index: choose 0 and " << temp.size() - 1);
149 if (temp.size() == 0)
return -99.0;
150 double bw = abs(coshigh - coslow) / temp.size();
151 double bc = coslow + (0.5 + ibin) * bw;
152 std::cout <<
"Par # " << ibin <<
", costh bin centre = " << bc <<
", const =" << temp[ibin] << std::endl;
162 std::vector<double> temp;
163 double coslow = 0.0, coshigh = 0.0;
166 coslow = -0.870; coshigh = -0.850;
167 }
else if (side > 0) {
169 coslow = 0.950; coshigh = 0.960;
171 B2ERROR(
"CDCDedxCosineEdge:choose > 0 for forward and <0 for backward side");
175 if (temp.size() == 0)
return;
176 double bw = abs(coshigh - coslow) / temp.size();
177 B2INFO(
"Printing parameters (0=backward and 1=forward): " << side <<
", nPars = " << temp.size());
178 for (
unsigned int ibin = 0; ibin < temp.size(); ibin++) {
179 double bc = coslow + (0.5 + ibin) * bw;
180 std::cout <<
"Par # " << ibin <<
", costh bin centre = " << bc <<
", const = " << temp[ibin] << std::endl;
196 }
else if (side > 0) {
199 B2ERROR(
"CDCDedxCosineEdge:choose >0 for forward and <0 for backward side");
204 B2ERROR(
"CDCDedxCosineEdge:Problem with bin index: choose 0 and " <<
m_largeCos[iside].size() - 1);
209 std::cout <<
"Par # " << ibin <<
", const = " <<
m_largeCos[iside][ibin] << std::endl;
dE/dx special large cosine calibration to fix bending shoulder at large costh
CDCDedxCosineEdge()
Default constructor.
ClassDef(CDCDedxCosineEdge, 1)
ClassDef.
~CDCDedxCosineEdge()
Destructor.
double getCosEdgePar(int side, unsigned int ibin) const
return specific large cosine constants on give side
void setCosthEdgePar(int side, unsigned int ibin, double value)
set specific hadron parameter
double getMean(int side, unsigned int ibin) const
return calibration constant for given side and bin #
double getMean(double costh) const
return calibration constant for cosine value
void printCosEdgePars(int side)
print large cosine constants array on requested side
CDCDedxCosineEdge(const std::vector< std::vector< double >> &largecosth)
Constructor.
std::vector< std::vector< double > > m_largeCos
ADC vs corrected ADC mapping.
int getSize(const int side) const
Get the number of bins of requested side.
Abstract base class for different kinds of events.