CMS 3D CMS Logo

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

◆ getLinearizedADC()

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

Definition at line 4 of file HcalAlgoUtils.cc.

4  {
5  float low = coder->charge(shape, 0, capid);
6  float high = coder->charge(shape, bins - 1, capid);
7  float step = (high - low) / (bins - 1);
8  low -= step / 2.0;
9  high += step / 2.0;
10  lo = low;
11  hi = high;
12  return;
13 }

References trigObjTnPSource_cfi::bins, HcalQIECoder::charge(), LaserClient_cfi::high, and LaserClient_cfi::low.

◆ maxDiff()

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

Definition at line 19 of file CastorAlgoUtils.cc.

19  {
20  float max = -1000;
21  float min = 1000;
22  if (one > max)
23  max = one;
24  if (one < min)
25  min = one;
26  if (two > max)
27  max = two;
28  if (two < min)
29  min = two;
30  if (three > max)
31  max = three;
32  if (three < min)
33  min = three;
34  if (four > max)
35  max = four;
36  if (four < min)
37  min = four;
38  return fabs(max - min);
39  }

References SiStripPI::max, min(), SiPixelPI::one, and SiPixelPI::two.

Referenced by JanAlignmentAlgorithm::analyze(), gainCalibHelper::gainCalibPI::fillDiffAndRatio(), tmtt::DupFitTrkKiller::filterAlg1(), JanAlignmentAlgorithm::solve(), and CSCSegment::time().

SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
step
step
Definition: StallMonitor.cc:94
HcalQIECoder::charge
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:20
min
T min(T a, T b)
Definition: MathUtil.h:58
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
hi
Definition: EPCuts.h:4
SiPixelPI::two
Definition: SiPixelPayloadInspectorHelper.h:39
LaserClient_cfi.high
high
Definition: LaserClient_cfi.py:50
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
LaserClient_cfi.low
low
Definition: LaserClient_cfi.py:52