shaper for Castor More...
#include <CastorShape.h>
Public Member Functions | |
CastorShape () | |
CastorShape (const CastorShape &d) | |
virtual double | operator() (double time) const |
virtual double | timeToRise () const |
virtual | ~CastorShape () |
Private Member Functions | |
void | computeShapeCastor () |
Private Attributes | |
int | nbin_ |
std::vector< float > | nt_ |
shaper for Castor
Definition at line 16 of file CastorShape.h.
CastorShape::CastorShape | ( | ) |
Definition at line 4 of file CastorShape.cc.
References computeShapeCastor().
: nbin_(256), nt_(nbin_, 0.) { computeShapeCastor(); }
CastorShape::CastorShape | ( | const CastorShape & | d | ) |
Definition at line 12 of file CastorShape.cc.
: CaloVShape(d), nbin_(d.nbin_), nt_(d.nt_) { }
virtual CastorShape::~CastorShape | ( | ) | [inline, virtual] |
Definition at line 23 of file CastorShape.h.
{}
void CastorShape::computeShapeCastor | ( | ) | [private] |
Definition at line 20 of file CastorShape.cc.
References funct::exp(), j, nbin_, lumiNorm::norm, and nt_.
Referenced by CastorShape().
{ // cout << endl << " ===== computeShapeCastor !!! " << endl << endl; const float ts = 3.0; // time constant in t * exp(-(t/ts)**2) int j; float norm; // HF SHAPE norm = 0.0; for( j = 0; j < 3 * ts && j < nbin_; j++){ //nt_[j] = ((float)j)*exp(-((float)(j*j))/(ts*ts)); nt_[j] = j * exp(-(j*j)/(ts*ts)); norm += nt_[j]; } // normalize pulse area to 1.0 for( j = 0; j < 3 * ts && j < nbin_; j++){ nt_[j] /= norm; } }
double CastorShape::operator() | ( | double | time | ) | const [virtual] |
Implements CaloVShape.
Definition at line 44 of file CastorShape.cc.
double CastorShape::timeToRise | ( | ) | const [virtual] |
int CastorShape::nbin_ [private] |
Definition at line 31 of file CastorShape.h.
Referenced by computeShapeCastor(), and operator()().
std::vector<float> CastorShape::nt_ [private] |
Definition at line 32 of file CastorShape.h.
Referenced by computeShapeCastor(), and operator()().