![]() |
![]() |
#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixMaxof2.h>
Public Member Functions | |
EcalFenixMaxof2 (int maxNrSamples, int nbMaxStrips) | |
void | process (std::vector< std::vector< int > > &, int nStr, std::vector< int > &out) |
virtual | ~EcalFenixMaxof2 () |
Private Attributes | |
int | nbMaxStrips_ |
std::vector< std::vector< int > > | sumby2_ |
input: 5x 12 bits (les 12 premiers bits sortant du bypasslin) output: 12 bits
computes 4 sums of 2 strips and gives the max max limited by 0xfff
Definition at line 18 of file EcalFenixMaxof2.h.
Definition at line 6 of file EcalFenixMaxof2.cc.
References nbMaxStrips_, and sumby2_.
00006 : nbMaxStrips_(nbMaxStrips) 00007 { 00008 std::vector<int> vec(maxNrSamples,0); 00009 for (int i2strip =0;i2strip<nbMaxStrips_-1;++i2strip) 00010 sumby2_.push_back(vec); 00011 }
EcalFenixMaxof2::~EcalFenixMaxof2 | ( | ) | [virtual] |
void EcalFenixMaxof2::process | ( | std::vector< std::vector< int > > & | bypasslinout, | |
int | nStr, | |||
std::vector< int > & | out | |||
) |
Definition at line 16 of file EcalFenixMaxof2.cc.
Referenced by EcalFenixTcp::process_part2_barrel().
00016 { 00017 for (int i2strip =0;i2strip<nstrip-1;++i2strip) 00018 for (unsigned int i=0;i<output.size();i++) sumby2_[i2strip][i]=0; 00019 00020 for (unsigned int i=0;i<output.size();i++){ 00021 if (nstrip-1==0){ 00022 output[i]=bypasslinout[0][i]; 00023 }else { 00024 for ( int i2strip=0; i2strip< nstrip-1;++i2strip){ 00025 sumby2_[i2strip][i]= bypasslinout[i2strip][i]+bypasslinout[i2strip+1][i]; 00026 if (sumby2_[i2strip][i]>output[i]){ 00027 output[i]=sumby2_[i2strip][i]; 00028 } 00029 } 00030 } 00031 } 00032 return; 00033 }
int EcalFenixMaxof2::nbMaxStrips_ [private] |
std::vector<std::vector<int> > EcalFenixMaxof2::sumby2_ [private] |