CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
EBDataFrame Class Reference

#include <EBDataFrame.h>

Inheritance diagram for EBDataFrame:
EcalDataFrame

Public Types

typedef EcalDataFrame Base
 
typedef EBDetId key_type
 For the sorted collection. More...
 

Public Member Functions

 EBDataFrame ()
 
 EBDataFrame (edm::DataFrame const &base)
 
 EBDataFrame (EcalDataFrame const &base)
 
key_type id () const
 
float spikeEstimator () const
 
 ~EBDataFrame () override
 
- Public Member Functions inherited from EcalDataFrame
 EcalDataFrame ()
 
 EcalDataFrame (edm::DataFrame const &iframe)
 
edm::DataFrame const & frame () const
 
edm::DataFrameframe ()
 
bool hasSwitchToGain1 () const
 
bool hasSwitchToGain6 () const
 
DetId id () const
 
bool isSaturated () const
 
int lastUnsaturatedSample () const
 
EcalMGPASample operator[] (int i) const
 
EcalMGPASample sample (int i) const
 
void setSample (int i, EcalMGPASample sam)
 
void setSize (int)
 
int size () const
 
virtual ~EcalDataFrame ()
 

Additional Inherited Members

- Static Public Attributes inherited from EcalDataFrame
static constexpr int MAXSAMPLES = 10
 

Detailed Description

Definition at line 11 of file EBDataFrame.h.

Member Typedef Documentation

◆ Base

Definition at line 14 of file EBDataFrame.h.

◆ key_type

For the sorted collection.

Definition at line 13 of file EBDataFrame.h.

Constructor & Destructor Documentation

◆ EBDataFrame() [1/3]

EBDataFrame::EBDataFrame ( )
inline

Definition at line 16 of file EBDataFrame.h.

16 {}

◆ EBDataFrame() [2/3]

EBDataFrame::EBDataFrame ( edm::DataFrame const &  base)
inline

Definition at line 18 of file EBDataFrame.h.

18 : Base(base) {}
EcalDataFrame Base
Definition: EBDataFrame.h:14

◆ EBDataFrame() [3/3]

EBDataFrame::EBDataFrame ( EcalDataFrame const &  base)
inline

Definition at line 19 of file EBDataFrame.h.

19 : Base(base) {}
EcalDataFrame Base
Definition: EBDataFrame.h:14

◆ ~EBDataFrame()

EBDataFrame::~EBDataFrame ( )
inlineoverride

Definition at line 26 of file EBDataFrame.h.

26 {}

Member Function Documentation

◆ id()

key_type EBDataFrame::id ( ) const
inline

◆ spikeEstimator()

float EBDataFrame::spikeEstimator ( ) const

estimator for a signal being a spike based on ratios between 4th, 5th and 6th sample

Definition at line 5 of file EBDataFrame.cc.

References gpuClustering::adc, EcalMGPASample::adc(), mps_fire::i, QIE10Task_cfi::ped, EcalDataFrame::sample(), and EcalDataFrame::size().

5  {
6  if (size() != 10) {
7  edm::LogError("InvalidNumberOfSamples")
8  << "This method only applies to signals sampled 10 times (" << size() << " samples found)";
9  return 10.;
10  }
11  // skip faulty channels
12  if (sample(5).adc() == 0)
13  return 10.;
14  size_t imax = 0;
15  int maxAdc = 0;
16  for (int i = 0; i < size(); ++i) {
17  if (sample(i).adc() > maxAdc) {
18  imax = i;
19  maxAdc = sample(i).adc();
20  }
21  }
22  // skip early signals
23  if (imax < 4)
24  return 10.;
25  float ped = 1. / 3. * (sample(0).adc() + sample(1).adc() + sample(2).adc());
26  return 0.18 * (sample(4).adc() - ped) / (sample(5).adc() - ped) + (sample(6).adc() - ped) / (sample(5).adc() - ped);
27 }
Log< level::Error, false > LogError
int size() const
Definition: EcalDataFrame.h:26
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
int adc() const
get the ADC sample (12 bits)
uint16_t *__restrict__ uint16_t const *__restrict__ adc