#include <FastLinearCMNSubtractor.h>
Public Member Functions | |
void | subtract (const uint32_t &, const uint16_t &, std::vector< int16_t > &) |
void | subtract (const uint32_t &, const uint16_t &, std::vector< float > &) |
Private Member Functions | |
FastLinearCMNSubtractor () | |
template<typename T > | |
void | subtract_ (const uint32_t &, const uint16_t &, std::vector< T > &) |
Friends | |
class | SiStripRawProcessingFactory |
Definition at line 5 of file FastLinearCMNSubtractor.h.
FastLinearCMNSubtractor::FastLinearCMNSubtractor | ( | ) | [inline, private] |
Definition at line 17 of file FastLinearCMNSubtractor.h.
{};
void FastLinearCMNSubtractor::subtract | ( | const uint32_t & | detId, |
const uint16_t & | firstAPV, | ||
std::vector< int16_t > & | digis | ||
) | [virtual] |
Implements SiStripCommonModeNoiseSubtractor.
Definition at line 3 of file FastLinearCMNSubtractor.cc.
References subtract_().
{ subtract_(detId, firstAPV, digis);}
void FastLinearCMNSubtractor::subtract | ( | const uint32_t & | detId, |
const uint16_t & | firstAPV, | ||
std::vector< float > & | digis | ||
) | [virtual] |
Implements SiStripCommonModeNoiseSubtractor.
Definition at line 4 of file FastLinearCMNSubtractor.cc.
References subtract_().
{ subtract_(detId, firstAPV, digis);}
void FastLinearCMNSubtractor::subtract_ | ( | const uint32_t & | detId, |
const uint16_t & | firstAPV, | ||
std::vector< T > & | digis | ||
) | [inline, private] |
Definition at line 9 of file FastLinearCMNSubtractor.cc.
References end, SiStripCommonModeNoiseSubtractor::median(), evf::evtn::offset(), slope, strip(), and tmp.
Referenced by subtract().
{ std::vector<T> tmp; tmp.reserve(128); typename std::vector<T>::iterator strip( digis.begin() ), end( digis.end() ), endAPV, high, low; while( strip < end ) { endAPV = strip+128; tmp.clear(); tmp.insert(tmp.end(),strip,endAPV); const float offset = median(tmp); low = strip; high = strip+64; tmp.clear(); while( high < endAPV) tmp.push_back( *high++ - *low++ ); const float slope = median(tmp)/64.; while (strip < endAPV) { *strip = static_cast<T>( *strip - (offset + slope*(65 - (endAPV-strip) ) ) ); strip++; } } }
friend class SiStripRawProcessingFactory [friend] |
Reimplemented from SiStripCommonModeNoiseSubtractor.
Definition at line 7 of file FastLinearCMNSubtractor.h.