CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
QieShape Class Reference

#include <QieShape.h>

Public Member Functions

double binSize (int fAdc) const
 
double linearization (int fAdc) const
 
 QieShape (const double fAdcShape[32], const double fAdcBin[32])
 

Private Attributes

double mBinSize [128]
 
double mLinearization [128]
 

Detailed Description

basic linearization function for HCAL/castor QIE $Author: ratnikov

basic linearization function for HCAL QIE $Author: ratnikov

Definition at line 9 of file QieShape.h.

Constructor & Destructor Documentation

QieShape::QieShape ( const double  fAdcShape[32],
const double  fAdcBin[32] 
)

Definition at line 11 of file QieShape.cc.

References newFWLiteAna::bin, i, mBinSize, mLinearization, and evf::evtn::offset().

11  {
12  for (int i = 0; i < 32; i++) { // initial settings
13  mLinearization [i] = fAdcShape [i];
14  mBinSize [i] = fAdcBin [i];
15  // std::cout << "QieShape::QieShape-> #/adc/bin: " << i << '/' << fAdcShape [i] << '/' << fAdcBin [i] << std::endl;
16  }
17  double factor = 1;
18  for (int range = 1; range < 4; range++) {
19  factor = factor * 5;
20  int offset = 32 * range;
21  mLinearization [offset] = mLinearization[offset-2]; // initial overlap
22  for (int bin = 1; bin < 32; bin++) {
23  mLinearization [offset+bin] = mLinearization [offset+bin-1] +
24  factor * (mLinearization [bin] - mLinearization [bin-1]); // scale initial curve
25  mBinSize [offset+bin] = factor * mBinSize [bin];
26  }
27  }
28 }
int i
Definition: DBlmapReader.cc:9
unsigned int offset(bool)
double mBinSize[128]
Definition: QieShape.h:18
double mLinearization[128]
Definition: QieShape.h:17

Member Function Documentation

double QieShape::binSize ( int  fAdc) const
inline

Definition at line 15 of file QieShape.h.

References mBinSize.

Referenced by HcalChannelCoder::adc().

15 {return mBinSize [fAdc];}
double mBinSize[128]
Definition: QieShape.h:18
double QieShape::linearization ( int  fAdc) const
inline

Definition at line 13 of file QieShape.h.

References mLinearization.

Referenced by HcalChannelCoder::adc(), and HcalChannelCoder::charge().

13 {return mLinearization [fAdc];}
double mLinearization[128]
Definition: QieShape.h:17

Member Data Documentation

double QieShape::mBinSize[128]
private

Definition at line 18 of file QieShape.h.

Referenced by binSize(), and QieShape().

double QieShape::mLinearization[128]
private

Definition at line 17 of file QieShape.h.

Referenced by linearization(), and QieShape().