CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/CalibFormats/HcalObjects/src/QieShape.cc

Go to the documentation of this file.
00001 
00009 #include <iostream>
00010 
00011 #include "CalibFormats/HcalObjects/interface/QieShape.h"
00012 
00013 QieShape::QieShape (const double fAdcShape [32], const double fAdcBin [32]) {
00014   for (int i = 0; i < 32; i++) {  // initial settings
00015     mLinearization [i] = fAdcShape [i];
00016     mBinSize [i] = fAdcBin [i];
00017     //    std::cout << "QieShape::QieShape-> #/adc/bin: " << i << '/' << fAdcShape [i] << '/' << fAdcBin [i] << std::endl;
00018   }
00019   double factor = 1;
00020   for (int range = 1; range < 4; range++) {
00021     factor = factor * 5;
00022     int offset = 32 * range;
00023     mLinearization [offset] = mLinearization[offset-2]; // initial overlap
00024     for (int bin = 1; bin < 32; bin++) {
00025       mLinearization [offset+bin] = mLinearization [offset+bin-1] +
00026         factor * (mLinearization [bin] - mLinearization [bin-1]); // scale initial curve
00027       mBinSize [offset+bin] = factor * mBinSize [bin];
00028     }
00029   }
00030 }