Belle II Software  release-05-02-19
CDCDedxCosineCor Class Reference

dE/dx wire gain calibration constants More...

#include <CDCDedxCosineCor.h>

Inheritance diagram for CDCDedxCosineCor:
Collaboration diagram for CDCDedxCosineCor:

Public Member Functions

 CDCDedxCosineCor ()
 Default constructor.
 
 CDCDedxCosineCor (const std::vector< double > &cosgains)
 Constructor.
 
 ~CDCDedxCosineCor ()
 Destructor.
 
CDCDedxCosineCoroperator*= (CDCDedxCosineCor const &rhs)
 Combine payloads.
 
unsigned int getSize () const
 Get the number of bins for the cosine correction.
 
std::vector< double > getCosCor () const
 Get the cosine correction.
 
void setCosCor (int bin, double value)
 Set the cosine correction.
 
double getMean (unsigned int bin) const
 Return dE/dx mean value for the given bin. More...
 
double getMean (double costh) const
 Return dE/dx mean value for given cos(theta) More...
 

Private Member Functions

 ClassDef (CDCDedxCosineCor, 8)
 ClassDef.
 

Private Attributes

std::vector< double > m_cosgains
 dE/dx gains in cos(theta) bins
 

Detailed Description

dE/dx wire gain calibration constants

Definition at line 36 of file CDCDedxCosineCor.h.

Member Function Documentation

◆ getMean() [1/2]

double getMean ( double  costh) const
inline

Return dE/dx mean value for given cos(theta)

Parameters
costhfor const with costh theta value

Definition at line 99 of file CDCDedxCosineCor.h.

104  {
105  thisbin = bin + 1; nextbin = bin + 2;
106  } else {
107  if ((costh - 1) > -1.0 * (binsize / 2) || (costh < 0 && std::fabs(costh) < (binsize / 2))) {
108  thisbin = bin - 1; nextbin = bin;
109  }
110  }
111  double frac = ((costh - 0.5 * binsize + 1.0) / binsize) - thisbin;
112 
113  if (thisbin < 0 || (unsigned)nextbin >= m_cosgains.size()) {
114  B2WARNING("Problem with extrapolation of CDC dE/dx cosine correction");
115  return 1.0;
116  }
117  return ((m_cosgains[nextbin] - m_cosgains[thisbin]) * frac + m_cosgains[thisbin]);
118  };
119 
120  private:
121  std::vector<double> m_cosgains;
124  };
126 } // end namespace Belle2

◆ getMean() [2/2]

double getMean ( unsigned int  bin) const
inline

Return dE/dx mean value for the given bin.

Parameters
binfor const with cosine bin

Definition at line 90 of file CDCDedxCosineCor.h.


The documentation for this class was generated from the following file:
Belle2::CDCDedxCosineCor::m_cosgains
std::vector< double > m_cosgains
dE/dx gains in cos(theta) bins
Definition: CDCDedxCosineCor.h:126
Belle2::CDCDedxCosineCor::CDCDedxCosineCor
CDCDedxCosineCor()
Default constructor.
Definition: CDCDedxCosineCor.h:43
Belle2::CDCDedxCosineCor::ClassDef
ClassDef(CDCDedxCosineCor, 8)
ClassDef.