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
EcalUncalibRecHitMaxSampleAlgo< C > Class Template Reference

#include <EcalUncalibRecHitMaxSampleAlgo.h>

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

Public Member Functions

virtual EcalUncalibratedRecHit makeRecHit (const C &dataFrame, const double *pedestals, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalWeightSet::EcalChi2WeightMatrix **chi2Matrix)
 compute rechits More...
 
virtual ~EcalUncalibRecHitMaxSampleAlgo ()
 

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

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

Definition at line 20 of file EcalUncalibRecHitMaxSampleAlgo.h.

20 { };

Member Function Documentation

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

compute rechits

Implements EcalUncalibRecHitRecAbsAlgo< C >.

Definition at line 34 of file EcalUncalibRecHitMaxSampleAlgo.h.

References flags, EcalUncalibratedRecHit::kSaturated, and bookConverter::min.

Referenced by EcalUncalibRecHitWorkerMaxSample::run().

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

Member Data Documentation

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

Definition at line 27 of file EcalUncalibRecHitMaxSampleAlgo.h.

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

Definition at line 28 of file EcalUncalibRecHitMaxSampleAlgo.h.

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

Definition at line 27 of file EcalUncalibRecHitMaxSampleAlgo.h.

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

Definition at line 27 of file EcalUncalibRecHitMaxSampleAlgo.h.

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

Definition at line 27 of file EcalUncalibRecHitMaxSampleAlgo.h.

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

Definition at line 27 of file EcalUncalibRecHitMaxSampleAlgo.h.