CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
HGCalUncalibRecHitRecWeightsAlgo< C > Class Template Reference

#include <HGCalUncalibRecHitRecWeightsAlgo.h>

Public Member Functions

virtual HGCUncalibratedRecHit makeRecHit (const C &dataFrame)
 Compute parameters. More...
 
virtual ~HGCalUncalibRecHitRecWeightsAlgo ()
 

Detailed Description

template<class C>
class HGCalUncalibRecHitRecWeightsAlgo< C >

Template used to produce fast-track HGCAL Reco, weight=1

Author
Valeri Andreev

Definition at line 16 of file HGCalUncalibRecHitRecWeightsAlgo.h.

Constructor & Destructor Documentation

template<class C>
virtual HGCalUncalibRecHitRecWeightsAlgo< C >::~HGCalUncalibRecHitRecWeightsAlgo ( )
inlinevirtual

Definition at line 20 of file HGCalUncalibRecHitRecWeightsAlgo.h.

20 { };

Member Function Documentation

template<class C>
virtual HGCUncalibratedRecHit HGCalUncalibRecHitRecWeightsAlgo< C >::makeRecHit ( const C &  dataFrame)
inlinevirtual

Compute parameters.

Definition at line 23 of file HGCalUncalibRecHitRecWeightsAlgo.h.

Referenced by HGCalUncalibRecHitWorkerWeights::run1(), HGCalUncalibRecHitWorkerWeights::run2(), and HGCalUncalibRecHitWorkerWeights::run3().

23  {
24  double amplitude_(-1.), pedestal_(-1.), jitter_(-1.), chi2_(-1.);
25  uint32_t flag = 0;
26  double energy = 0;
27 
28  for (int iSample = 0 ; iSample < dataFrame.size(); ++iSample) {
29  energy += double(dataFrame.sample(iSample).adc());
30  }
31 
32  amplitude_ = energy; // fast-track simhits propagation
33 
34  return HGCUncalibratedRecHit( dataFrame.id(), amplitude_,
35  pedestal_, jitter_, chi2_, flag);
36  }