CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

CastorPulseShapes Class Reference

#include <CastorPulseShapes.h>

List of all members.

Classes

class  Shape

Public Member Functions

 CastorPulseShapes ()
const ShapecastorShape () const

Private Member Functions

void computeCastorShape (Shape &s)

Private Attributes

Shape castorShape_

Detailed Description

Author:
P. Katsas - Univ. of Athens

Definition at line 10 of file CastorPulseShapes.h.


Constructor & Destructor Documentation

CastorPulseShapes::CastorPulseShapes ( )

Definition at line 4 of file CastorPulseShapes.cc.

References castorShape_, and computeCastorShape().

                                     {
  //  computeHPDShape(hpdShape_);
  computeCastorShape(castorShape_);
}

Member Function Documentation

const Shape& CastorPulseShapes::castorShape ( ) const [inline]

Definition at line 29 of file CastorPulseShapes.h.

References castorShape_.

Referenced by RecoFCcorFactorAlgo< S >::RecoFCcorFactorAlgo().

{ return castorShape_; }
void CastorPulseShapes::computeCastorShape ( CastorPulseShapes::Shape sh) [private]

Definition at line 10 of file CastorPulseShapes.cc.

References funct::exp(), j, CastorPulseShapes::Shape::setNBin(), and CastorPulseShapes::Shape::setShapeBin().

Referenced by CastorPulseShapes().

                                                                     {

  //  cout << endl << " ===== computeShapeHF  !!! " << endl << endl;

  const float ts = 3.0;           // time constant in   t * exp(-(t/ts)**2)

  // first create pulse shape over a range of time 0 ns to 255 ns in 1 ns steps
  int nbin = 256;
  sh.setNBin(nbin);
  std::vector<float> ntmp(nbin,0.0);  // 

  int j;
  float norm;

  // CASTOR SHAPE
  norm = 0.0;
  for( j = 0; j < 3 * ts && j < nbin; j++){
    ntmp[j] = ((float)j)*exp(-((float)(j*j))/(ts*ts));
    norm += ntmp[j];
  }
  // normalize pulse area to 1.0
  for( j = 0; j < 3 * ts && j < nbin; j++){
    ntmp[j] /= norm;

    //    cout << " nt [" << j << "] = " <<  ntmp[j] << endl;
    sh.setShapeBin(j,ntmp[j]);
  }
}

Member Data Documentation

Definition at line 32 of file CastorPulseShapes.h.

Referenced by CastorPulseShapes(), and castorShape().