CMS 3D CMS Logo

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().

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

Definition at line 21 of file CastorAlgoUtils.cc.

Referenced by CSCSegment::time().

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