CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_2_9/src/CalibCalorimetry/HcalAlgos/interface/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 launcher::step.

                                {
  
  float low = coder->charge(shape,0,capid); 
  float high = coder->charge(shape,bins-1,capid);
  float step = (high-low)/(bins-1);
  low -= step/2.0; high += step/2.0;
  lo = low; hi = high;
  return;
}
float maxDiff ( float  one,
float  two,
float  three,
float  four 
)

Definition at line 21 of file CastorAlgoUtils.cc.

References max(), and min.

Referenced by CSCSegment::time().

                                                                {
      float max=-1000; float min = 1000;
      if(one>max) max = one;      if(one<min) min = one;
      if(two>max) max = two;      if(two<min) min = two;
      if(three>max) max = three;  if(three<min) min = three;
      if(four>max) max = four;    if(four<min) min = four;
      return fabs(max-min);
    }