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.

References castorShape_, and computeCastorShape().

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

Member Function Documentation

◆ castorShape()

const Shape& CastorPulseShapes::castorShape ( ) const
inline

Definition at line 30 of file CastorPulseShapes.h.

References castorShape_.

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

30 { return castorShape_; }

◆ computeCastorShape()

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

Definition at line 9 of file CastorPulseShapes.cc.

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

Referenced by CastorPulseShapes().

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 }
void setShapeBin(int i, float f)

Member Data Documentation

◆ castorShape_

Shape CastorPulseShapes::castorShape_
private

Definition at line 33 of file CastorPulseShapes.h.

Referenced by CastorPulseShapes(), and castorShape().