CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
reco::castor Namespace Reference

Classes

class  QieShape
 

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 reco::castor::getLinearizedADC ( const CastorQIEShape shape,
const CastorQIECoder coder,
int  bins,
int  capid,
float &  lo,
float &  hi 
)

Definition at line 7 of file CastorAlgoUtils.cc.

References CastorQIECoder::charge().

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

Definition at line 19 of file CastorAlgoUtils.cc.

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

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  }
T min(T a, T b)
Definition: MathUtil.h:58