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(), 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 reco::castor::maxDiff ( float  one,
float  two,
float  three,
float  four 
)

Definition at line 21 of file CastorAlgoUtils.cc.

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);
    }