CMS 3D CMS Logo

Public Types | Public Member Functions

EBDataFrame Class Reference

#include <EBDataFrame.h>

Inheritance diagram for EBDataFrame:
EcalDataFrame

List of all members.

Public Types

typedef EcalDataFrame Base
typedef EBDetId key_type
 For the sorted collection.

Public Member Functions

 EBDataFrame ()
 EBDataFrame (edm::DataFrame const &base)
 EBDataFrame (EcalDataFrame const &base)
key_type id () const
float spikeEstimator () const
virtual ~EBDataFrame ()

Detailed Description

Id:
EBDataFrame.h,v 1.7 2010/02/08 14:21:22 ferriff Exp

Definition at line 14 of file EBDataFrame.h.


Member Typedef Documentation

Definition at line 18 of file EBDataFrame.h.

For the sorted collection.

Definition at line 17 of file EBDataFrame.h.


Constructor & Destructor Documentation

EBDataFrame::EBDataFrame ( ) [inline]

Definition at line 20 of file EBDataFrame.h.

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

Definition at line 22 of file EBDataFrame.h.

: Base(base) {}
EBDataFrame::EBDataFrame ( EcalDataFrame const &  base) [inline]

Definition at line 23 of file EBDataFrame.h.

: Base(base) {}
virtual EBDataFrame::~EBDataFrame ( ) [inline, virtual]

Definition at line 30 of file EBDataFrame.h.

{}

Member Function Documentation

key_type EBDataFrame::id ( void  ) const [inline]
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().

{
        if ( size() != 10 ) {
                edm::LogError("InvalidNumberOfSamples") << "This method only applies to signals sampled 10 times ("
                        << size() << " samples found)";
                return 10.;
        }
        // skip faulty channels
        if ( sample(5).adc() == 0 ) return 10.;
        size_t imax = 0;
        int maxAdc = 0;
        for ( int i = 0; i < size(); ++i ) {
                if ( sample(i).adc() > maxAdc ) {
                        imax = i;
                        maxAdc = sample(i).adc();
                }
        }
        // skip early signals
        if ( imax < 4 ) return 10.;
        float ped = 1./3. * (sample(0).adc() + sample(1).adc() + sample(2).adc());
        return 0.18*(sample(4).adc()-ped)/(sample(5).adc()-ped) + (sample(6).adc()-ped)/(sample(5).adc()-ped);
}