CMS 3D CMS Logo

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::CastorPulseShapes ( )

Definition at line 4 of file CastorPulseShapes.cc.

4  {
5  // computeHPDShape(hpdShape_);
7 }

References castorShape_, and computeCastorShape().

Member Function Documentation

◆ castorShape()

const Shape& CastorPulseShapes::castorShape ( ) const
inline

Definition at line 30 of file CastorPulseShapes.h.

30 { return castorShape_; }

References castorShape_.

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

◆ computeCastorShape()

void CastorPulseShapes::computeCastorShape ( CastorPulseShapes::Shape sh)
private

Definition at line 9 of file CastorPulseShapes.cc.

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

References JetChargeProducer_cfi::exp, dqmMemoryStats::float, dqmiolumiharvest::j, CastorPulseShapes::Shape::setNBin(), and CastorPulseShapes::Shape::setShapeBin().

Referenced by CastorPulseShapes().

Member Data Documentation

◆ castorShape_

Shape CastorPulseShapes::castorShape_
private

Definition at line 33 of file CastorPulseShapes.h.

Referenced by CastorPulseShapes(), and castorShape().

CastorPulseShapes::Shape::setNBin
void setNBin(int n)
Definition: CastorPulseShapes.cc:42
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
CastorPulseShapes::computeCastorShape
void computeCastorShape(Shape &s)
Definition: CastorPulseShapes.cc:9
CastorPulseShapes::Shape::setShapeBin
void setShapeBin(int i, float f)
Definition: CastorPulseShapes.cc:47
CastorPulseShapes::castorShape_
Shape castorShape_
Definition: CastorPulseShapes.h:33
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6