#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixPeakFinder.h>
Public Member Functions | |
EcalFenixPeakFinder () | |
virtual std::vector< int > | process (std::vector< int > &filtout, std::vector< int > &output) |
virtual | ~EcalFenixPeakFinder () |
Private Member Functions | |
int | process () |
int | setInput (int input) |
Private Attributes | |
int | buffer_ [3] |
bool | disabled |
int | inputsAlreadyIn_ |
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
--->gets the sample where the value is max. the value is 1 for this max sample, 0 for the others .needs 3 samples to proceed. ----> do we really need caloVShape?
Definition at line 16 of file EcalFenixPeakFinder.h.
EcalFenixPeakFinder::EcalFenixPeakFinder | ( | ) |
EcalFenixPeakFinder::~EcalFenixPeakFinder | ( | ) | [virtual] |
std::vector< int > EcalFenixPeakFinder::process | ( | std::vector< int > & | filtout, | |
std::vector< int > & | output | |||
) | [virtual] |
Definition at line 35 of file EcalFenixPeakFinder.cc.
References buffer_, i, inputsAlreadyIn_, process(), and setInput().
00036 { 00037 00038 // FIXME: 3 00039 inputsAlreadyIn_=0; 00040 for (unsigned int i =0;i<3;i++) buffer_[i]=0; 00041 00042 // std::vector<int> output; 00043 00044 // attention, we have to shift by one, because the peak is found one too late 00045 for (unsigned int i =0;i<filtout.size();i++){ 00046 00047 setInput(filtout[i]); 00048 if (i>0) { 00049 // int outone = process(); 00050 // output.push_back(outone); 00051 output[i-1]= process(); 00052 } 00053 } 00054 // output.resize(filtout.size()); 00055 00056 return output; 00057 }
int EcalFenixPeakFinder::process | ( | ) | [private] |
Definition at line 26 of file EcalFenixPeakFinder.cc.
References buffer_, and inputsAlreadyIn_.
Referenced by process(), and EcalFenixStrip::process_part1().
00027 { 00028 00029 if(inputsAlreadyIn_<3) return 0; 00030 if(buffer_[1]>buffer_[0] && buffer_[1]>buffer_[2]) return 1; 00031 else return 0; 00032 00033 }
Definition at line 11 of file EcalFenixPeakFinder.cc.
References buffer_, i, and inputsAlreadyIn_.
Referenced by process().
00012 { 00013 if(inputsAlreadyIn_<3) 00014 { 00015 buffer_[inputsAlreadyIn_]=input; 00016 inputsAlreadyIn_++; 00017 } 00018 else 00019 { 00020 for(int i=0; i<2; i++) buffer_[i]=buffer_[i+1]; 00021 buffer_[2]=input; 00022 } 00023 return 1; 00024 }
int EcalFenixPeakFinder::buffer_[3] [private] |
bool EcalFenixPeakFinder::disabled [private] |
Definition at line 19 of file EcalFenixPeakFinder.h.
int EcalFenixPeakFinder::inputsAlreadyIn_ [private] |