CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QieShape.cc
Go to the documentation of this file.
1 
9 #include <iostream>
10 
12 
13 QieShape::QieShape (const double fAdcShape [32], const double fAdcBin [32]) {
14  for (int i = 0; i < 32; i++) { // initial settings
15  mLinearization [i] = fAdcShape [i];
16  mBinSize [i] = fAdcBin [i];
17  // std::cout << "QieShape::QieShape-> #/adc/bin: " << i << '/' << fAdcShape [i] << '/' << fAdcBin [i] << std::endl;
18  }
19  double factor = 1;
20  for (int range = 1; range < 4; range++) {
21  factor = factor * 5;
22  int offset = 32 * range;
23  mLinearization [offset] = mLinearization[offset-2]; // initial overlap
24  for (int bin = 1; bin < 32; bin++) {
25  mLinearization [offset+bin] = mLinearization [offset+bin-1] +
26  factor * (mLinearization [bin] - mLinearization [bin-1]); // scale initial curve
27  mBinSize [offset+bin] = factor * mBinSize [bin];
28  }
29  }
30 }
int i
Definition: DBlmapReader.cc:9
double mLinearization[128]
Definition: QieShape.h:19
QieShape(const double fAdcShape[32], const double fAdcBin[32])
Definition: QieShape.cc:13
unsigned int offset(bool)
double mBinSize[128]
Definition: QieShape.h:20