CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
SiStripCommonModeNoiseSubtractor Class Referenceabstract

#include <SiStripCommonModeNoiseSubtractor.h>

Inheritance diagram for SiStripCommonModeNoiseSubtractor:
FastLinearCMNSubtractor IteratedMedianCMNSubtractor MedianCMNSubtractor PercentileCMNSubtractor TT6CMNSubtractor

Public Member Functions

const std::vector< std::pair< short, float > > & getAPVsCM () const
 
virtual void init (const edm::EventSetup &es)
 
virtual void subtract (uint32_t detId, uint16_t firstStrip, std::vector< int16_t > &digis)=0
 
virtual void subtract (uint32_t detId, uint16_t firstStrip, std::vector< float > &digis)=0
 
virtual ~SiStripCommonModeNoiseSubtractor ()
 

Protected Member Functions

template<typename T >
float median (std::vector< T > &)
 
 SiStripCommonModeNoiseSubtractor ()
 

Protected Attributes

std::vector< std::pair< short, float > > _vmedians
 

Friends

class SiStripRawProcessingFactory
 

Detailed Description

Definition at line 9 of file SiStripCommonModeNoiseSubtractor.h.

Constructor & Destructor Documentation

◆ ~SiStripCommonModeNoiseSubtractor()

virtual SiStripCommonModeNoiseSubtractor::~SiStripCommonModeNoiseSubtractor ( )
inlinevirtual

Definition at line 13 of file SiStripCommonModeNoiseSubtractor.h.

13 {}

◆ SiStripCommonModeNoiseSubtractor()

SiStripCommonModeNoiseSubtractor::SiStripCommonModeNoiseSubtractor ( )
inlineprotected

Definition at line 21 of file SiStripCommonModeNoiseSubtractor.h.

21 {}

Member Function Documentation

◆ getAPVsCM()

const std::vector<std::pair<short, float> >& SiStripCommonModeNoiseSubtractor::getAPVsCM ( ) const
inline

Definition at line 18 of file SiStripCommonModeNoiseSubtractor.h.

References _vmedians.

18 { return _vmedians; }
std::vector< std::pair< short, float > > _vmedians

◆ init()

virtual void SiStripCommonModeNoiseSubtractor::init ( const edm::EventSetup es)
inlinevirtual

Reimplemented in IteratedMedianCMNSubtractor, and TT6CMNSubtractor.

Definition at line 14 of file SiStripCommonModeNoiseSubtractor.h.

14 {}

◆ median()

template<typename T >
float SiStripCommonModeNoiseSubtractor::median ( std::vector< T > &  sample)
inlineprotected

Definition at line 29 of file SiStripCommonModeNoiseSubtractor.h.

References ecalGpuTask_cfi::sample.

Referenced by FastLinearCMNSubtractor::subtract_(), and MedianCMNSubtractor::subtract_().

29  {
30  typename std::vector<T>::iterator mid = sample.begin() + sample.size() / 2;
31  std::nth_element(sample.begin(), mid, sample.end());
32  if (sample.size() & 1) //odd size
33  return *mid;
34  return (*std::max_element(sample.begin(), mid) + *mid) / 2.;
35 }

◆ subtract() [1/2]

virtual void SiStripCommonModeNoiseSubtractor::subtract ( uint32_t  detId,
uint16_t  firstStrip,
std::vector< int16_t > &  digis 
)
pure virtual

◆ subtract() [2/2]

virtual void SiStripCommonModeNoiseSubtractor::subtract ( uint32_t  detId,
uint16_t  firstStrip,
std::vector< float > &  digis 
)
pure virtual

Friends And Related Function Documentation

◆ SiStripRawProcessingFactory

friend class SiStripRawProcessingFactory
friend

Definition at line 10 of file SiStripCommonModeNoiseSubtractor.h.

Member Data Documentation

◆ _vmedians

std::vector<std::pair<short, float> > SiStripCommonModeNoiseSubtractor::_vmedians
protected