CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalFenixPeakFinder Class Reference

calculates the peak for Fenix strip, barrel input : 18 bits output: boolean More...

#include <EcalFenixPeakFinder.h>

Public Member Functions

 EcalFenixPeakFinder ()
 
 EcalFenixPeakFinder ()
 
virtual std::vector< int > process (std::vector< int > &filtout, std::vector< int > &output)
 
virtual std::vector< int > process (std::vector< int > &filtout, std::vector< int > &output)
 
virtual ~EcalFenixPeakFinder ()
 
virtual ~EcalFenixPeakFinder ()
 

Private Member Functions

int process ()
 
int process ()
 
int setInput (int input)
 
int setInput (int input)
 

Private Attributes

int buffer_ [3]
 
bool disabled
 
int inputsAlreadyIn_
 

Detailed Description

calculates the peak for Fenix strip, barrel input : 18 bits output: boolean

\ class EcalFenixPeakFinder —>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() [1/2]

EcalFenixPeakFinder::EcalFenixPeakFinder ( )

Definition at line 4 of file EcalFenixPeakFinder.cc.

4 : inputsAlreadyIn_(0) {}

◆ ~EcalFenixPeakFinder() [1/2]

EcalFenixPeakFinder::~EcalFenixPeakFinder ( )
virtual

Definition at line 6 of file EcalFenixPeakFinder.cc.

6 {}

◆ EcalFenixPeakFinder() [2/2]

EcalFenixPeakFinder::EcalFenixPeakFinder ( )

◆ ~EcalFenixPeakFinder() [2/2]

virtual EcalFenixPeakFinder::~EcalFenixPeakFinder ( )
virtual

Member Function Documentation

◆ process() [1/4]

int EcalFenixPeakFinder::process ( )
private

Definition at line 23 of file EcalFenixPeakFinder.cc.

23  {
24  if (inputsAlreadyIn_ < 3)
25  return 0;
26  if (buffer_[1] > buffer_[0] && buffer_[1] > buffer_[2])
27  return 1;
28  else
29  return 0;
30 }

References buffer_, and inputsAlreadyIn_.

Referenced by process(), EcalFenixStrip::process_part1(), and EcalEBTrigPrimTestAlgo::run().

◆ process() [2/4]

int EcalFenixPeakFinder::process ( )
private

◆ process() [3/4]

std::vector< int > EcalFenixPeakFinder::process ( std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual

Definition at line 32 of file EcalFenixPeakFinder.cc.

32  {
33  // FIXME: 3
34  inputsAlreadyIn_ = 0;
35  for (unsigned int i = 0; i < 3; i++)
36  buffer_[i] = 0;
37 
38  // std::vector<int> output;
39 
40  //std::cout << " EcalFenixPeakFinder::process( " << filtout.size() << std::endl;
41  // attention, we have to shift by one, because the peak is found one too late
42  for (unsigned int i = 0; i < filtout.size(); i++) {
43  setInput(filtout[i]);
44  for (unsigned int i = 0; i < 3; i++) {
45  // std::cout << " buffer_ " << buffer_[i];
46  }
47  //std::cout << " " << std::endl;
48 
49  if (i > 0) {
50  // int outone = process();
51  // output.push_back(outone);
52  output[i - 1] = process();
53  }
54  }
55  // output.resize(filtout.size());
56 
57  return output;
58 }

References buffer_, mps_fire::i, inputsAlreadyIn_, convertSQLitetoXML_cfg::output, process(), and setInput().

◆ process() [4/4]

virtual std::vector<int> EcalFenixPeakFinder::process ( std::vector< int > &  filtout,
std::vector< int > &  output 
)
virtual

◆ setInput() [1/2]

int EcalFenixPeakFinder::setInput ( int  input)
private

Definition at line 8 of file EcalFenixPeakFinder.cc.

8  {
9  if (inputsAlreadyIn_ < 3) {
10  //std::cout << " EcalFenixPeakFinder::setInput inputsAlreadyIn_<3 input " << input << std::endl;
13  } else {
14  for (int i = 0; i < 2; i++) {
15  buffer_[i] = buffer_[i + 1];
16  //std::cout << " EcalFenixPeakFinder::setInput inputsAlreadyIn buffer " << buffer_[i] << std::endl;
17  }
18  buffer_[2] = input;
19  }
20  return 1;
21 }

References buffer_, mps_fire::i, input, and inputsAlreadyIn_.

Referenced by process().

◆ setInput() [2/2]

int EcalFenixPeakFinder::setInput ( int  input)
private

Member Data Documentation

◆ buffer_

int EcalFenixPeakFinder::buffer_
private

Definition at line 23 of file EcalFenixPeakFinder.h.

Referenced by process(), and setInput().

◆ disabled

bool EcalFenixPeakFinder::disabled
private

Definition at line 18 of file EcalFenixPeakFinder.h.

◆ inputsAlreadyIn_

int EcalFenixPeakFinder::inputsAlreadyIn_
private

Definition at line 22 of file EcalFenixPeakFinder.h.

Referenced by process(), and setInput().

mps_fire.i
i
Definition: mps_fire.py:355
input
static const std::string input
Definition: EdmProvDump.cc:48
EcalFenixPeakFinder::process
int process()
Definition: EcalFenixPeakFinder.cc:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
EcalFenixPeakFinder::inputsAlreadyIn_
int inputsAlreadyIn_
Definition: EcalFenixPeakFinder.h:22
EcalFenixPeakFinder::buffer_
int buffer_[3]
Definition: EcalFenixPeakFinder.h:23
EcalFenixPeakFinder::setInput
int setInput(int input)
Definition: EcalFenixPeakFinder.cc:8