test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
CastorPulseShapes Class Reference

#include <CastorPulseShapes.h>

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

4  {
5  // computeHPDShape(hpdShape_);
7 }
void computeCastorShape(Shape &s)

Member Function Documentation

const Shape& CastorPulseShapes::castorShape ( ) const
inline

Definition at line 29 of file CastorPulseShapes.h.

References castorShape_.

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

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

Definition at line 10 of file CastorPulseShapes.cc.

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

Referenced by CastorPulseShapes().

10  {
11 
12  // cout << endl << " ===== computeShapeHF !!! " << endl << endl;
13 
14  const float ts = 3.0; // time constant in t * exp(-(t/ts)**2)
15 
16  // first create pulse shape over a range of time 0 ns to 255 ns in 1 ns steps
17  int nbin = 256;
18  sh.setNBin(nbin);
19  std::vector<float> ntmp(nbin,0.0); //
20 
21  int j;
22  float norm;
23 
24  // CASTOR SHAPE
25  norm = 0.0;
26  for( j = 0; j < 3 * ts && j < nbin; j++){
27  ntmp[j] = ((float)j)*exp(-((float)(j*j))/(ts*ts));
28  norm += ntmp[j];
29  }
30  // normalize pulse area to 1.0
31  for( j = 0; j < 3 * ts && j < nbin; j++){
32  ntmp[j] /= norm;
33 
34  // cout << " nt [" << j << "] = " << ntmp[j] << endl;
35  sh.setShapeBin(j,ntmp[j]);
36  }
37 }
void setShapeBin(int i, float f)
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

Shape CastorPulseShapes::castorShape_
private

Definition at line 32 of file CastorPulseShapes.h.

Referenced by CastorPulseShapes(), and castorShape().