CMS 3D CMS Logo

EcalFenixStrip.cc
Go to the documentation of this file.
5 
7 
9 
10 //-------------------------------------------------------------------------------------
12  const EcalElectronicsMapping *theMapping,
13  bool debug, bool famos, int maxNrSamples,
14  int nbMaxXtals)
15  : theMapping_(theMapping), debug_(debug), famos_(famos),
16  nbMaxXtals_(nbMaxXtals) {
17  linearizer_.resize(nbMaxXtals_);
18  for (int i = 0; i < nbMaxXtals_; i++)
20  adder_ = new EcalFenixEtStrip();
26 
27  // prepare data storage for all events
28  std::vector<int> v;
29  v.resize(maxNrSamples);
30  lin_out_.resize(nbMaxXtals_);
31  for (int i = 0; i < 5; i++)
32  lin_out_[i] = v;
33  add_out_.resize(maxNrSamples);
34  filt_out_.resize(maxNrSamples);
35  peak_out_.resize(maxNrSamples);
36  format_out_.resize(maxNrSamples);
37  fgvb_out_.resize(maxNrSamples);
38  fgvb_out_temp_.resize(maxNrSamples);
39 }
40 
41 //-------------------------------------------------------------------------------------
43  for (int i = 0; i < nbMaxXtals_; i++)
44  delete linearizer_[i];
45  delete adder_;
46  delete amplitude_filter_;
47  delete peak_finder_;
48  delete fenixFormatterEB_;
49  delete fenixFormatterEE_;
50  delete fgvbEE_;
51 }
52 
53 //----------------------------------------------------------------------------------
55  uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW,
56  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE) {
57 
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: "
68  << format_out_.size() << std::endl;
69  std::cout << "value : " << std::endl;
70  for (unsigned int i = 0; i < format_out_.size(); i++) {
71  std::cout << " " << format_out_[i];
72  }
73  std::cout << std::endl;
74  }
75  return;
76 }
77 //-------------------------------------------------------------------------------------
79  uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW,
80  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE,
81  const EcalTPGStripStatus *ecaltpgStripStatus) {
82 
83  // call Fgvb
84  // this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
85  // this->getFGVB()->process(lin_out_,fgvb_out_);
86 
87  // call formatter
88  this->getFormatterEE()->setParameters(stripid, ecaltpgSlidW,
89  ecaltpgStripStatus);
90 
92 
93  // this is a test:
94  if (debug_) {
95  std::cout << "output of formatter is a vector of size: "
96  << format_out_.size() << std::endl;
97  std::cout << "value : " << std::endl;
98  for (unsigned int i = 0; i < format_out_.size(); i++) {
99  std::cout << " " << std::dec << format_out_[i];
100  }
101  std::cout << std::endl;
102  }
103 
104  return;
105 }
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)
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
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_