CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
virtual ~EBDataFrame ()
 
- 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 const int MAXSAMPLES = 10
 

Detailed Description

Definition at line 13 of file EBDataFrame.h.

Member Typedef Documentation

Definition at line 17 of file EBDataFrame.h.

For the sorted collection.

Definition at line 16 of file EBDataFrame.h.

Constructor & Destructor Documentation

EBDataFrame::EBDataFrame ( )
inline

Definition at line 19 of file EBDataFrame.h.

19 {}
EBDataFrame::EBDataFrame ( edm::DataFrame const &  base)
inline

Definition at line 21 of file EBDataFrame.h.

21 : Base(base) {}
tuple base
Main Program
Definition: newFWLiteAna.py:91
EcalDataFrame Base
Definition: EBDataFrame.h:17
EBDataFrame::EBDataFrame ( EcalDataFrame const &  base)
inline

Definition at line 22 of file EBDataFrame.h.

22 : Base(base) {}
tuple base
Main Program
Definition: newFWLiteAna.py:91
EcalDataFrame Base
Definition: EBDataFrame.h:17
virtual EBDataFrame::~EBDataFrame ( )
inlinevirtual

Definition at line 29 of file EBDataFrame.h.

29 {}

Member Function Documentation

key_type EBDataFrame::id ( ) const
inline

Definition at line 31 of file EBDataFrame.h.

References EcalDataFrame::id().

Referenced by operator<<(), EcalFenixStripFormatEB::setParameters(), and EcalFenixStripFormatEE::setParameters().

31 { return Base::id(); }
DetId id() const
Definition: EcalDataFrame.h:24
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 ecalMGPA::adc(), EcalMGPASample::adc(), i, EcalDataFrame::sample(), and EcalDataFrame::size().

6 {
7  if ( size() != 10 ) {
8  edm::LogError("InvalidNumberOfSamples") << "This method only applies to signals sampled 10 times ("
9  << size() << " samples found)";
10  return 10.;
11  }
12  // skip faulty channels
13  if ( sample(5).adc() == 0 ) 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 ) return 10.;
24  float ped = 1./3. * (sample(0).adc() + sample(1).adc() + sample(2).adc());
25  return 0.18*(sample(4).adc()-ped)/(sample(5).adc()-ped) + (sample(6).adc()-ped)/(sample(5).adc()-ped);
26 }
int adc(sample_type sample)
get the ADC sample (12 bits)
int i
Definition: DBlmapReader.cc:9
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
int size() const
Definition: EcalDataFrame.h:26
int adc() const
get the ADC sample (12 bits)