CMS 3D CMS Logo

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

#include <HGCalUncalibRecHitRecWeightsAlgo.h>

Public Member Functions

virtual HGCUncalibratedRecHit makeRecHit (const C &dataFrame)
 Compute parameters. More...
 
virtual void set_ADCLSB (const double adclsb)
 
virtual void set_isSiFESim (const bool isSiFE)
 
virtual void set_TDCLSB (const double tdclsb)
 
virtual void set_tdcOnsetfC (const double tdcOnset)
 
virtual void set_toaLSBToNS (const double lsb2ns)
 
virtual ~HGCalUncalibRecHitRecWeightsAlgo ()
 

Private Attributes

double adcLSB_
 
double fCToMIP_
 
bool isSiFESim_
 
double tdcLSB_
 
double tdcOnsetfC_
 
double toaLSBToNS_
 

Detailed Description

template<class C>
class HGCalUncalibRecHitRecWeightsAlgo< C >

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

Author
Valeri Andreev

Definition at line 20 of file HGCalUncalibRecHitRecWeightsAlgo.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file HGCalUncalibRecHitRecWeightsAlgo.h.

24 { };

Member Function Documentation

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

Compute parameters.

Definition at line 36 of file HGCalUncalibRecHitRecWeightsAlgo.h.

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

36  {
37  double amplitude_(-1.), pedestal_(-1.), jitter_(-1.), chi2_(-1.);
38  uint32_t flag = 0;
39 
40  constexpr int iSample=2; //only in-time sample
41  const auto& sample = dataFrame.sample(iSample);
42 
43  // are we using the SiFE Simulation?
44  if( isSiFESim_ ) {
45  // mode == true means TDC readout was activated
46  if( sample.mode() ) {
47  flag = !sample.threshold(); //raise flag if busy cell
48  // LG (23/06/2015):
49  //to get a continuous energy spectrum we must add here the maximum value in fC ever
50  //reported by the ADC. Namely: floor(tdcOnset/adcLSB_) * adcLSB_
51  // need to increment by one so TDC doesn't overlap with ADC last bin
52  amplitude_ = ( std::floor(tdcOnsetfC_/adcLSB_) + 1.0 )* adcLSB_ + double(sample.data()) * tdcLSB_;
53  jitter_ = double(sample.toa()) * toaLSBToNS_;
54  LogDebug("HGCUncalibratedRecHit") << "TDC+: set the energy to: " << amplitude_ << ' ' << sample.data()
55  << ' ' << tdcLSB_ << std::endl
56  << "TDC+: set the jitter to: " << jitter_ << ' '
57  << sample.toa() << ' ' << toaLSBToNS_ << ' '
58  << " flag=" << flag << std::endl;
59  }
60  else {
61  amplitude_ = double(sample.data()) * adcLSB_;
62  LogDebug("HGCUncalibratedRecHit") << "ADC+: set the energy to: " << amplitude_ << ' ' << sample.data()
63  << ' ' << adcLSB_ << ' ' << std::endl;
64  }
65  }
66  else {
67  amplitude_ = double(sample.data()) * adcLSB_;
68  LogDebug("HGCUncalibratedRecHit") << "ADC+: set the energy to: " << amplitude_ << ' ' << sample.data()
69  << ' ' << adcLSB_ << ' ' << std::endl;
70  }
71 
72  LogDebug("HGCUncalibratedRecHit") << "Final uncalibrated amplitude : " << amplitude_ << std::endl;
73  return HGCUncalibratedRecHit( dataFrame.id(), amplitude_, pedestal_, jitter_, chi2_, flag);
74  }
#define LogDebug(id)
#define constexpr
template<class C>
virtual void HGCalUncalibRecHitRecWeightsAlgo< C >::set_ADCLSB ( const double  adclsb)
inlinevirtual
template<class C>
virtual void HGCalUncalibRecHitRecWeightsAlgo< C >::set_isSiFESim ( const bool  isSiFE)
inlinevirtual
template<class C>
virtual void HGCalUncalibRecHitRecWeightsAlgo< C >::set_TDCLSB ( const double  tdclsb)
inlinevirtual
template<class C>
virtual void HGCalUncalibRecHitRecWeightsAlgo< C >::set_tdcOnsetfC ( const double  tdcOnset)
inlinevirtual
template<class C>
virtual void HGCalUncalibRecHitRecWeightsAlgo< C >::set_toaLSBToNS ( const double  lsb2ns)
inlinevirtual

Member Data Documentation

template<class C>
double HGCalUncalibRecHitRecWeightsAlgo< C >::adcLSB_
private
template<class C>
double HGCalUncalibRecHitRecWeightsAlgo< C >::fCToMIP_
private

Definition at line 77 of file HGCalUncalibRecHitRecWeightsAlgo.h.

template<class C>
bool HGCalUncalibRecHitRecWeightsAlgo< C >::isSiFESim_
private
template<class C>
double HGCalUncalibRecHitRecWeightsAlgo< C >::tdcLSB_
private
template<class C>
double HGCalUncalibRecHitRecWeightsAlgo< C >::tdcOnsetfC_
private
template<class C>
double HGCalUncalibRecHitRecWeightsAlgo< C >::toaLSBToNS_
private