Go to the documentation of this file.00001 #include "CalibCalorimetry/HcalAlgos/interface/HcalAlgoUtils.h"
00002 #include <math.h>
00003
00004 void getLinearizedADC(const HcalQIEShape& shape,
00005 const HcalQIECoder* coder,
00006 int bins,int capid,
00007 float& lo,
00008 float& hi){
00009
00010 float low = coder->charge(shape,0,capid);
00011 float high = coder->charge(shape,bins-1,capid);
00012 float step = (high-low)/(bins-1);
00013 low -= step/2.0; high += step/2.0;
00014 lo = low; hi = high;
00015 return;
00016 }
00017
00018 float maxDiff(float one, float two, float three, float four){
00019 float max=-1000; float min = 1000;
00020 if(one>max) max = one; if(one<min) min = one;
00021 if(two>max) max = two; if(two<min) min = two;
00022 if(three>max) max = three; if(three<min) min = three;
00023 if(four>max) max = four; if(four<min) min = four;
00024 return fabs(max-min);
00025 }