CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
HcalAlgoUtils.h File Reference
#include "CalibFormats/HcalObjects/interface/HcalDbService.h"
#include "CondFormats/HcalObjects/interface/HcalQIECoder.h"

Go to the source code of this file.

Functions

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

Function Documentation

void getLinearizedADC ( const HcalQIEShape shape,
const HcalQIECoder coder,
int  bins,
int  capid,
float &  lo,
float &  hi 
)

Definition at line 4 of file HcalAlgoUtils.cc.

References HcalQIECoder::charge(), and relval_parameters_module::step.

8  {
9 
10  float low = coder->charge(shape,0,capid);
11  float high = coder->charge(shape,bins-1,capid);
12  float step = (high-low)/(bins-1);
13  low -= step/2.0; high += step/2.0;
14  lo = low; hi = high;
15  return;
16 }
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:22
float maxDiff ( float  one,
float  two,
float  three,
float  four 
)

Definition at line 21 of file CastorAlgoUtils.cc.

References bookConverter::max, and min().

Referenced by CSCSegment::time().

21  {
22  float max=-1000; float min = 1000;
23  if(one>max) max = one; if(one<min) min = one;
24  if(two>max) max = two; if(two<min) min = two;
25  if(three>max) max = three; if(three<min) min = three;
26  if(four>max) max = four; if(four<min) min = four;
27  return fabs(max-min);
28  }
T min(T a, T b)
Definition: MathUtil.h:58