CMS 3D CMS Logo

EcalFenixPeakFinder Class Reference

\ class EcalFenixPeakFinder More...

#include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixPeakFinder.h>

List of all members.

Public Member Functions

 EcalFenixPeakFinder ()
virtual std::vector< intprocess (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_


Detailed Description

\ class EcalFenixPeakFinder

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.


Constructor & Destructor Documentation

EcalFenixPeakFinder::EcalFenixPeakFinder (  ) 

Definition at line 3 of file EcalFenixPeakFinder.cc.

00004   :inputsAlreadyIn_(0){ 
00005 }

EcalFenixPeakFinder::~EcalFenixPeakFinder (  )  [virtual]

Definition at line 8 of file EcalFenixPeakFinder.cc.

00008                                          {
00009 }


Member Function Documentation

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 }

int EcalFenixPeakFinder::setInput ( int  input  )  [private]

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 }


Member Data Documentation

int EcalFenixPeakFinder::buffer_[3] [private]

Definition at line 24 of file EcalFenixPeakFinder.h.

Referenced by process(), and setInput().

bool EcalFenixPeakFinder::disabled [private]

Definition at line 19 of file EcalFenixPeakFinder.h.

int EcalFenixPeakFinder::inputsAlreadyIn_ [private]

Definition at line 23 of file EcalFenixPeakFinder.h.

Referenced by process(), and setInput().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:37 2009 for CMSSW by  doxygen 1.5.4