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