CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
virtual void init (const edm::EventSetup &es)
 
virtual void subtract (const uint32_t &, const uint16_t &, std::vector< int16_t > &)=0
 
virtual void subtract (const uint32_t &, const uint16_t &, std::vector< float > &)=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

virtual SiStripCommonModeNoiseSubtractor::~SiStripCommonModeNoiseSubtractor ( )
inlinevirtual

Definition at line 15 of file SiStripCommonModeNoiseSubtractor.h.

15 {};
SiStripCommonModeNoiseSubtractor::SiStripCommonModeNoiseSubtractor ( )
inlineprotected

Definition at line 24 of file SiStripCommonModeNoiseSubtractor.h.

24 {};

Member Function Documentation

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

Definition at line 20 of file SiStripCommonModeNoiseSubtractor.h.

References _vmedians.

20 {return _vmedians;}
std::vector< std::pair< short, float > > _vmedians
virtual void SiStripCommonModeNoiseSubtractor::init ( const edm::EventSetup es)
inlinevirtual

Reimplemented in IteratedMedianCMNSubtractor, and TT6CMNSubtractor.

Definition at line 16 of file SiStripCommonModeNoiseSubtractor.h.

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

Definition at line 36 of file SiStripCommonModeNoiseSubtractor.h.

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

36  {
37  typename std::vector<T>::iterator mid = sample.begin() + sample.size()/2;
38  std::nth_element(sample.begin(), mid, sample.end());
39  if( sample.size() & 1 ) //odd size
40  return *mid;
41  return ( *std::max_element(sample.begin(), mid) + *mid ) / 2.;
42 }
virtual void SiStripCommonModeNoiseSubtractor::subtract ( const uint32_t &  ,
const uint16_t &  ,
std::vector< int16_t > &   
)
pure virtual
virtual void SiStripCommonModeNoiseSubtractor::subtract ( const uint32_t &  ,
const uint16_t &  ,
std::vector< float > &   
)
pure virtual

Friends And Related Function Documentation

friend class SiStripRawProcessingFactory
friend

Definition at line 11 of file SiStripCommonModeNoiseSubtractor.h.

Member Data Documentation

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