CMS 3D CMS Logo

EcalFenixStrip.cc
Go to the documentation of this file.
5 
7 
9 
10 //-------------------------------------------------------------------------------------
12  const EcalElectronicsMapping *theMapping,
13  bool debug,
14  bool famos,
15  int maxNrSamples,
16  int nbMaxXtals)
17  : theMapping_(theMapping), debug_(debug), famos_(famos), nbMaxXtals_(nbMaxXtals) {
18  linearizer_.resize(nbMaxXtals_);
19  for (int i = 0; i < nbMaxXtals_; i++)
21  adder_ = new EcalFenixEtStrip();
27 
28  // prepare data storage for all events
29  std::vector<int> v;
30  v.resize(maxNrSamples);
31  lin_out_.resize(nbMaxXtals_);
32  for (int i = 0; i < 5; i++)
33  lin_out_[i] = v;
34  add_out_.resize(maxNrSamples);
35  filt_out_.resize(maxNrSamples);
36  peak_out_.resize(maxNrSamples);
37  format_out_.resize(maxNrSamples);
38  fgvb_out_.resize(maxNrSamples);
39  fgvb_out_temp_.resize(maxNrSamples);
40 }
41 
42 //-------------------------------------------------------------------------------------
44  for (int i = 0; i < nbMaxXtals_; i++)
45  delete linearizer_[i];
46  delete adder_;
47  delete amplitude_filter_;
48  delete peak_finder_;
49  delete fenixFormatterEB_;
50  delete fenixFormatterEE_;
51  delete fgvbEE_;
52 }
53 
54 //----------------------------------------------------------------------------------
56  const EcalTPGSlidingWindow *ecaltpgSlidW,
57  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE) {
58  // call Fgvb
59  // this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
60  // this->getFGVB()->process(lin_out_,fgvb_out_);
61 
62  // call formatter
63  this->getFormatterEB()->setParameters(stripid, ecaltpgSlidW);
65  // this is a test:
66  if (debug_) {
67  std::cout << "output of formatter is a vector of size: " << format_out_.size() << std::endl;
68  std::cout << "value : " << std::endl;
69  for (unsigned int i = 0; i < format_out_.size(); i++) {
70  std::cout << " " << format_out_[i];
71  }
72  std::cout << std::endl;
73  }
74  return;
75 }
76 //-------------------------------------------------------------------------------------
78  const EcalTPGSlidingWindow *ecaltpgSlidW,
79  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE,
80  const EcalTPGStripStatus *ecaltpgStripStatus) {
81  // call Fgvb
82  // this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
83  // this->getFGVB()->process(lin_out_,fgvb_out_);
84 
85  // call formatter
86  this->getFormatterEE()->setParameters(stripid, ecaltpgSlidW, ecaltpgStripStatus);
87 
89 
90  // this is a test:
91  if (debug_) {
92  std::cout << "output of formatter is a vector of size: " << format_out_.size() << std::endl;
93  std::cout << "value : " << std::endl;
94  for (unsigned int i = 0; i < format_out_.size(); i++) {
95  std::cout << " " << std::dec << format_out_[i];
96  }
97  std::cout << std::endl;
98  }
99 
100  return;
101 }
EcalFenixStripFgvbEE * fgvbEE_
std::vector< std::vector< int > > lin_out_
std::vector< int > add_out_
std::vector< EcalFenixLinearizer * > linearizer_
EcalFenixStripFormatEB * fenixFormatterEB_
void process_part2_barrel(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE)
void setParameters(uint32_t id, const EcalTPGSlidingWindow *&, const EcalTPGStripStatus *)
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip ...
void process_part2_endcap(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGStripStatus *ecaltpgStripStatus)
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
std::vector< int > filt_out_
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits...
virtual ~EcalFenixStrip()
EcalFenixPeakFinder * peak_finder_
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
#define debug
Definition: HDRShower.cc:19
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
std::vector< int > fgvb_out_
EcalFenixStripFormatEB * getFormatterEB() const
void setParameters(uint32_t &, const EcalTPGSlidingWindow *&)
std::vector< int > format_out_
EcalFenixStripFormatEE * getFormatterEE() const
EcalFenixAmplitudeFilter * amplitude_filter_
EcalFenixStripFormatEE * fenixFormatterEE_
std::vector< int > peak_out_
EcalFenixEtStrip * adder_
EcalFenixStrip(const edm::EventSetup &setup, const EcalElectronicsMapping *theMapping, bool debug, bool famos, int maxNrSamples, int nbMaxXtals)
std::vector< int > fgvb_out_temp_