CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCalUncalibRecHitRecWeightsAlgo.h
Go to the documentation of this file.
1 #ifndef RecoLocalCalo_HGCalRecAlgos_HGCalUncalibRecHitRecWeightsAlgo_HH
2 #define RecoLocalCalo_HGCalRecAlgos_HGCalUncalibRecHitRecWeightsAlgo_HH
3 
14 #include <vector>
15 
16 template<class C> class HGCalUncalibRecHitRecWeightsAlgo
17 {
18  public:
19  // destructor
21 
23  virtual HGCUncalibratedRecHit makeRecHit( const C& dataFrame ) {
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  }
37 };
38 #endif
virtual HGCUncalibratedRecHit makeRecHit(const C &dataFrame)
Compute parameters.