#include <EcalUncalibRecHitLeadingEdgeAlgo.h>
Public Member Functions | |
EcalUncalibRecHitLeadingEdgeAlgo () | |
int | getLeadingEdgeSample () |
std::vector< double > & | getPulseShape () |
virtual EcalUncalibratedRecHit | makeRecHit (const C &dataFrame, const double *pedestals, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalWeightSet::EcalChi2WeightMatrix **chi2Matrix) |
Compute parameters. | |
double | saturationCorrection (int unsaturatedSample) |
void | setLeadingEdgeSample (int isample) |
void | setPulseShape (std::vector< double > &shape) |
virtual | ~EcalUncalibRecHitLeadingEdgeAlgo () |
Private Attributes | |
int | leadingSample_ |
std::vector< double > | shape_ |
Template used to compute amplitude using the leading edge sample
$Id: EcalUncalibRecHitLeadingEdgeAlgo.h $Date: $Revision:
Definition at line 22 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
EcalUncalibRecHitLeadingEdgeAlgo< C >::EcalUncalibRecHitLeadingEdgeAlgo | ( | ) | [inline] |
Definition at line 25 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
: leadingSample_(0), shape_(0) { };
virtual EcalUncalibRecHitLeadingEdgeAlgo< C >::~EcalUncalibRecHitLeadingEdgeAlgo | ( | ) | [inline, virtual] |
Definition at line 26 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
{ };
int EcalUncalibRecHitLeadingEdgeAlgo< C >::getLeadingEdgeSample | ( | ) | [inline] |
Definition at line 29 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
{ return leadingSample_; }
std::vector<double>& EcalUncalibRecHitLeadingEdgeAlgo< C >::getPulseShape | ( | ) | [inline] |
Definition at line 32 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
{ return shape_; }
virtual EcalUncalibratedRecHit EcalUncalibRecHitLeadingEdgeAlgo< C >::makeRecHit | ( | const C & | dataFrame, |
const double * | pedestals, | ||
const double * | gainRatios, | ||
const EcalWeightSet::EcalWeightMatrix ** | weights, | ||
const EcalWeightSet::EcalChi2WeightMatrix ** | chi2Matrix | ||
) | [inline, virtual] |
Compute parameters.
Implements EcalUncalibRecHitRecAbsAlgo< C >.
Definition at line 35 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
Referenced by EcalUncalibRecHitWorkerGlobal::run().
{ double amplitude_(-1.), pedestal_(-1.), jitter_(-1.), chi2_(-1.); // compute amplitude amplitude_ = double (((double) (dataFrame.sample( leadingSample_ ).adc() - pedestals[ dataFrame.sample( leadingSample_ ).gainId() - 1]) * saturationCorrection( leadingSample_ ) * gainRatios[ dataFrame.sample( leadingSample_ ).gainId() - 1] )); return EcalUncalibratedRecHit(dataFrame.id(), amplitude_, pedestal_, jitter_, chi2_); }
double EcalUncalibRecHitLeadingEdgeAlgo< C >::saturationCorrection | ( | int | unsaturatedSample | ) | [inline] |
Definition at line 56 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
Referenced by EcalUncalibRecHitLeadingEdgeAlgo< EBDataFrame >::makeRecHit().
{ if ( unsaturatedSample > 0 && unsaturatedSample < (int)shape_.size() ) { return 1./ shape_[ unsaturatedSample ]; } else { edm::LogError("EcalUncalibRecHitLeadingEdgeAlgo") << "Invalid sample " << unsaturatedSample << " for a shape vector of size " << shape_.size(); return 0; } }
void EcalUncalibRecHitLeadingEdgeAlgo< C >::setLeadingEdgeSample | ( | int | isample | ) | [inline] |
Definition at line 28 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
Referenced by EcalUncalibRecHitWorkerGlobal::run().
{ leadingSample_ = isample; }
void EcalUncalibRecHitLeadingEdgeAlgo< C >::setPulseShape | ( | std::vector< double > & | shape | ) | [inline] |
Definition at line 31 of file EcalUncalibRecHitLeadingEdgeAlgo.h.
Referenced by EcalUncalibRecHitWorkerGlobal::run().
{ shape_ = shape; }
int EcalUncalibRecHitLeadingEdgeAlgo< C >::leadingSample_ [private] |
std::vector< double > EcalUncalibRecHitLeadingEdgeAlgo< C >::shape_ [private] |