CMS 3D CMS Logo

CastorAlgoUtils.cc File Reference

#include "CalibCalorimetry/CastorCalib/interface/CastorAlgoUtils.h"
#include <math.h>

Go to the source code of this file.

Functions

void getLinearizedADC (const CastorQIEShape &shape, const CastorQIECoder *coder, int bins, int capid, float &lo, float &hi)
float maxDiff (float one, float two, float three, float four)


Function Documentation

void getLinearizedADC ( const CastorQIEShape shape,
const CastorQIECoder coder,
int  bins,
int  capid,
float &  lo,
float &  hi 
)

Definition at line 4 of file CastorAlgoUtils.cc.

References CastorQIECoder::charge(), WenuSkim_TriggerBit_cff::high, and cmsRelvalreportInput::step.

00008                                 {
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 }

float maxDiff ( float  one,
float  two,
float  three,
float  four 
)

Definition at line 18 of file CastorAlgoUtils.cc.

00018                                                             {
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 }


Generated on Tue Jun 9 17:50:58 2009 for CMSSW by  doxygen 1.5.4