CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Friends
FastLinearCMNSubtractor Class Reference

#include <FastLinearCMNSubtractor.h>

Inheritance diagram for FastLinearCMNSubtractor:
SiStripCommonModeNoiseSubtractor

Public Member Functions

void subtract (uint32_t detId, uint16_t firstAPV, std::vector< int16_t > &digis) override
 
void subtract (uint32_t detId, uint16_t firstAPV, std::vector< float > &digis) override
 
- Public Member Functions inherited from SiStripCommonModeNoiseSubtractor
const std::vector< std::pair< short, float > > & getAPVsCM () const
 
virtual void init (const edm::EventSetup &es)
 
virtual ~SiStripCommonModeNoiseSubtractor ()
 

Private Member Functions

 FastLinearCMNSubtractor ()
 
template<typename T >
void subtract_ (uint32_t detId, uint16_t firstAPV, std::vector< T > &digis)
 

Friends

class SiStripRawProcessingFactory
 

Additional Inherited Members

- Protected Member Functions inherited from SiStripCommonModeNoiseSubtractor
template<typename T >
float median (std::vector< T > &)
 
 SiStripCommonModeNoiseSubtractor ()
 
- Protected Attributes inherited from SiStripCommonModeNoiseSubtractor
std::vector< std::pair< short, float > > _vmedians
 

Detailed Description

Definition at line 5 of file FastLinearCMNSubtractor.h.

Constructor & Destructor Documentation

FastLinearCMNSubtractor::FastLinearCMNSubtractor ( )
inlineprivate

Definition at line 15 of file FastLinearCMNSubtractor.h.

15 {};

Member Function Documentation

void FastLinearCMNSubtractor::subtract ( uint32_t  detId,
uint16_t  firstAPV,
std::vector< int16_t > &  digis 
)
overridevirtual

Implements SiStripCommonModeNoiseSubtractor.

Definition at line 3 of file FastLinearCMNSubtractor.cc.

References subtract_().

3  {
4  subtract_(detId, firstAPV, digis);
5 }
void subtract_(uint32_t detId, uint16_t firstAPV, std::vector< T > &digis)
void FastLinearCMNSubtractor::subtract ( uint32_t  detId,
uint16_t  firstAPV,
std::vector< float > &  digis 
)
overridevirtual

Implements SiStripCommonModeNoiseSubtractor.

Definition at line 6 of file FastLinearCMNSubtractor.cc.

References subtract_().

6  {
7  subtract_(detId, firstAPV, digis);
8 }
void subtract_(uint32_t detId, uint16_t firstAPV, std::vector< T > &digis)
template<typename T >
void FastLinearCMNSubtractor::subtract_ ( uint32_t  detId,
uint16_t  firstAPV,
std::vector< T > &  digis 
)
inlineprivate

Definition at line 11 of file FastLinearCMNSubtractor.cc.

References end, LaserClient_cfi::high, LaserClient_cfi::low, SiStripCommonModeNoiseSubtractor::median(), hltrates_dqm_sourceclient-live_cfg::offset, slope, digitizers_cfi::strip, and createJobs::tmp.

Referenced by subtract().

11  {
12  std::vector<T> tmp;
13  tmp.reserve(128);
14  typename std::vector<T>::iterator strip(digis.begin()), end(digis.end()), endAPV, high, low;
15 
16  while (strip < end) {
17  endAPV = strip + 128;
18  tmp.clear();
19  tmp.insert(tmp.end(), strip, endAPV);
20  const float offset = median(tmp);
21 
22  low = strip;
23  high = strip + 64;
24  tmp.clear();
25  while (high < endAPV)
26  tmp.push_back(*high++ - *low++);
27  const float slope = median(tmp) / 64.;
28 
29  while (strip < endAPV) {
30  *strip = static_cast<T>(*strip - (offset + slope * (65 - (endAPV - strip))));
31  strip++;
32  }
33  }
34 }
static const double slope[3]
#define end
Definition: vmac.h:39
tmp
align.sh
Definition: createJobs.py:716
long double T

Friends And Related Function Documentation

friend class SiStripRawProcessingFactory
friend

Definition at line 6 of file FastLinearCMNSubtractor.h.