CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EcalUncalibRecHitMaxSampleAlgo< C > Class Template Reference

#include <EcalUncalibRecHitMaxSampleAlgo.h>

Inheritance diagram for EcalUncalibRecHitMaxSampleAlgo< C >:
EcalUncalibRecHitRecAbsAlgo< C >

Public Member Functions

EcalUncalibratedRecHit makeRecHit (const C &dataFrame, const double *pedestals, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalWeightSet::EcalChi2WeightMatrix **chi2Matrix) override
 compute rechits More...
 
 ~EcalUncalibRecHitMaxSampleAlgo () override
 
- Public Member Functions inherited from EcalUncalibRecHitRecAbsAlgo< C >
virtual ~EcalUncalibRecHitRecAbsAlgo ()=default
 Constructor. More...
 

Private Attributes

int16_t amplitude_
 
double chi2_
 
int16_t gainId_
 
int16_t jitter_
 
int16_t pedestal_
 
int16_t sampleAdc_
 

Additional Inherited Members

- Public Types inherited from EcalUncalibRecHitRecAbsAlgo< C >
enum  { nWeightsRows = 3, iAmplitude = 0, iPedestal = 1, iTime = 2 }
 

Detailed Description

template<class C>
class EcalUncalibRecHitMaxSampleAlgo< C >

Amplitude reconstucted by the difference MAX_adc - min_adc jitter is sample number of MAX_adc, pedestal is min_adc

Author
G. Franzoni, E. Di Marco

Definition at line 15 of file EcalUncalibRecHitMaxSampleAlgo.h.

Constructor & Destructor Documentation

◆ ~EcalUncalibRecHitMaxSampleAlgo()

template<class C>
EcalUncalibRecHitMaxSampleAlgo< C >::~EcalUncalibRecHitMaxSampleAlgo ( )
inlineoverride

Definition at line 17 of file EcalUncalibRecHitMaxSampleAlgo.h.

17 {}

Member Function Documentation

◆ makeRecHit()

template<class C>
EcalUncalibratedRecHit EcalUncalibRecHitMaxSampleAlgo< C >::makeRecHit ( const C &  dataFrame,
const double *  pedestals,
const double *  gainRatios,
const EcalWeightSet::EcalWeightMatrix **  weights,
const EcalWeightSet::EcalChi2WeightMatrix **  chi2Matrix 
)
overridevirtual

compute rechits

Implements EcalUncalibRecHitRecAbsAlgo< C >.

Definition at line 31 of file EcalUncalibRecHitMaxSampleAlgo.h.

Referenced by EcalUncalibRecHitWorkerMaxSample::run().

36  {
38  pedestal_ = 4095;
39  jitter_ = -1;
40  chi2_ = -1;
41  //bool isSaturated = 0;
42  uint32_t flags = 0;
43  for (int16_t iSample = 0; iSample < C::MAXSAMPLES; iSample++) {
44  gainId_ = dataFrame.sample(iSample).gainId();
45 
46  if (gainId_ == 0) {
48  }
49 
50  // ampli gain 12
51  if (gainId_ == 1) {
52  sampleAdc_ = dataFrame.sample(iSample).adc();
53  }
54 
55  else {
56  if (gainId_ == 2) { // ampli gain 6
57  sampleAdc_ = 200 + (dataFrame.sample(iSample).adc() - 200) * 2;
58  } else { // accounts for gainId_==3 or 0 - ampli gain 1 and gain0
59  sampleAdc_ = 200 + (dataFrame.sample(iSample).adc() - 200) * 12;
60  }
61  }
62 
63  if (sampleAdc_ > amplitude_) {
65  jitter_ = iSample;
66  } // if statement
67 
68  if (sampleAdc_ < pedestal_)
70 
71  } // loop on samples
72 
73  return EcalUncalibratedRecHit(dataFrame.id(),
74  static_cast<double>(amplitude_ - pedestal_),
75  static_cast<double>(pedestal_),
76  static_cast<double>(jitter_ - 5),
77  chi2_,
78  flags);
79 }
static constexpr int MAXSAMPLES

Member Data Documentation

◆ amplitude_

template<class C>
int16_t EcalUncalibRecHitMaxSampleAlgo< C >::amplitude_
private

Definition at line 25 of file EcalUncalibRecHitMaxSampleAlgo.h.

◆ chi2_

template<class C>
double EcalUncalibRecHitMaxSampleAlgo< C >::chi2_
private

Definition at line 26 of file EcalUncalibRecHitMaxSampleAlgo.h.

◆ gainId_

template<class C>
int16_t EcalUncalibRecHitMaxSampleAlgo< C >::gainId_
private

Definition at line 25 of file EcalUncalibRecHitMaxSampleAlgo.h.

◆ jitter_

template<class C>
int16_t EcalUncalibRecHitMaxSampleAlgo< C >::jitter_
private

Definition at line 25 of file EcalUncalibRecHitMaxSampleAlgo.h.

◆ pedestal_

template<class C>
int16_t EcalUncalibRecHitMaxSampleAlgo< C >::pedestal_
private

Definition at line 25 of file EcalUncalibRecHitMaxSampleAlgo.h.

◆ sampleAdc_

template<class C>
int16_t EcalUncalibRecHitMaxSampleAlgo< C >::sampleAdc_
private

Definition at line 25 of file EcalUncalibRecHitMaxSampleAlgo.h.