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 }
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
EcalFenixStrip::debug_
bool debug_
Definition: EcalFenixStrip.h:44
mps_fire.i
i
Definition: mps_fire.py:428
EcalFenixStripFormatEB.h
EcalFenixStripFgvbEE.h
EcalFenixStrip.h
EcalFenixStrip::add_out_
std::vector< int > add_out_
Definition: EcalFenixStrip.h:64
EcalFenixStrip::~EcalFenixStrip
virtual ~EcalFenixStrip()
Definition: EcalFenixStrip.cc:43
EcalTPGFineGrainStripEE
Definition: EcalTPGFineGrainStripEE.h:9
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalFenixStripFormatEE.h
EcalFenixStrip::amplitude_filter_
EcalFenixAmplitudeFilter * amplitude_filter_
Definition: EcalFenixStrip.h:50
EcalFenixPeakFinder
calculates the peak for Fenix strip, barrel input : 18 bits output: boolean
Definition: EcalFenixPeakFinder.h:16
EcalFenixStrip::process_part2_endcap
void process_part2_endcap(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE, const EcalTPGStripStatus *ecaltpgStripStatus)
Definition: EcalFenixStrip.cc:77
EcalFenixStripFormatEE::process
int process()
Definition: EcalFenixStripFormatEE.cc:24
EcalFenixStrip::EcalFenixStrip
EcalFenixStrip(const edm::EventSetup &setup, const EcalElectronicsMapping *theMapping, bool debug, bool famos, int maxNrSamples, int nbMaxXtals)
Definition: EcalFenixStrip.cc:11
EcalFenixStrip::getFormatterEE
EcalFenixStripFormatEE * getFormatterEE() const
Definition: EcalFenixStrip.h:124
findQualityFiles.v
v
Definition: findQualityFiles.py:179
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
EcalFenixStrip::fgvb_out_temp_
std::vector< int > fgvb_out_temp_
Definition: EcalFenixStrip.h:69
EcalTPGSlidingWindow
Definition: EcalTPGSlidingWindow.h:9
debug
#define debug
Definition: HDRShower.cc:19
EcalFenixStrip::fenixFormatterEB_
EcalFenixStripFormatEB * fenixFormatterEB_
Definition: EcalFenixStrip.h:54
EcalFenixStrip::famos_
bool famos_
Definition: EcalFenixStrip.h:45
EcalFenixStripFormatEB::setParameters
void setParameters(uint32_t &, const EcalTPGSlidingWindow *&)
Definition: EcalFenixStripFormatEB.cc:51
EcalFenixStrip::nbMaxXtals_
int nbMaxXtals_
Definition: EcalFenixStrip.h:46
EcalFenixStrip::adder_
EcalFenixEtStrip * adder_
Definition: EcalFenixStrip.h:58
EcalFenixStrip::format_out_
std::vector< int > format_out_
Definition: EcalFenixStrip.h:67
EcalFenixEtStrip
Definition: EcalFenixEtStrip.h:20
EcalFenixStrip::fgvbEE_
EcalFenixStripFgvbEE * fgvbEE_
Definition: EcalFenixStrip.h:60
EcalFenixStrip::getFormatterEB
EcalFenixStripFormatEB * getFormatterEB() const
Definition: EcalFenixStrip.h:123
EcalFenixStripFormatEE
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
Definition: EcalFenixStripFormatEE.h:19
EcalFenixStrip::process_part2_barrel
void process_part2_barrel(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE)
Definition: EcalFenixStrip.cc:55
EcalElectronicsMapping.h
EcalFenixLinearizer
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits.
Definition: EcalFenixLinearizer.h:19
EcalFenixStripFgvbEE
calculation of Fgvb for the endcap in Fenix Strip calculates fgvb for the endcap in Fenix Strip
Definition: EcalFenixStripFgvbEE.h:21
edm::EventSetup
Definition: EventSetup.h:57
EcalFenixStrip::filt_out_
std::vector< int > filt_out_
Definition: EcalFenixStrip.h:65
EcalFenixStrip::lin_out_
std::vector< std::vector< int > > lin_out_
Definition: EcalFenixStrip.h:63
EcalTriggerPrimitiveSample.h
EcalFenixStrip::peak_out_
std::vector< int > peak_out_
Definition: EcalFenixStrip.h:66
EcalFenixStrip::linearizer_
std::vector< EcalFenixLinearizer * > linearizer_
Definition: EcalFenixStrip.h:48
EcalFenixAmplitudeFilter
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
Definition: EcalFenixAmplitudeFilter.h:17
EcalFenixStrip::fenixFormatterEE_
EcalFenixStripFormatEE * fenixFormatterEE_
Definition: EcalFenixStrip.h:56
EcalTPGStripStatus
Definition: EcalTPGStripStatus.h:9
EcalFenixStripFormatEB::process
int process()
Definition: EcalFenixStripFormatEB.cc:16
EcalFenixStripFormatEE::setParameters
void setParameters(uint32_t id, const EcalTPGSlidingWindow *&, const EcalTPGStripStatus *)
Definition: EcalFenixStripFormatEE.cc:62
EcalFenixStrip::fgvb_out_
std::vector< int > fgvb_out_
Definition: EcalFenixStrip.h:68
EcalFenixStripFormatEB
Formatting for Fenix strip input: 18 bits + 3x 1bit (fgvb, gapflagbit, output from peakfinder) output...
Definition: EcalFenixStripFormatEB.h:18
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
EcalFenixStrip::peak_finder_
EcalFenixPeakFinder * peak_finder_
Definition: EcalFenixStrip.h:52