test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalFenixStrip.cc
Go to the documentation of this file.
5 
7 
9 
10 //-------------------------------------------------------------------------------------
11 EcalFenixStrip::EcalFenixStrip(const edm::EventSetup & setup, const EcalElectronicsMapping* theMapping,bool debug, bool famos,int maxNrSamples, int nbMaxXtals): theMapping_(theMapping), debug_(debug), famos_(famos), nbMaxXtals_(nbMaxXtals)
12 {
13  linearizer_.resize(nbMaxXtals_);
14  for (int i=0;i<nbMaxXtals_;i++) linearizer_[i] = new EcalFenixLinearizer(famos_);
15  adder_ = new EcalFenixEtStrip();
21 
22  // prepare data storage for all events
23  std::vector <int> v;
24  v.resize(maxNrSamples);
25  lin_out_.resize(nbMaxXtals_);
26  for (int i=0;i<5;i++) lin_out_[i]=v;
27  add_out_.resize(maxNrSamples);
28  filt_out_.resize(maxNrSamples);
29  peak_out_.resize(maxNrSamples);
30  format_out_.resize(maxNrSamples);
31  fgvb_out_.resize(maxNrSamples);
32  fgvb_out_temp_.resize(maxNrSamples);
33 }
34 
35 //-------------------------------------------------------------------------------------
37  for (int i=0;i<nbMaxXtals_;i++) delete linearizer_[i];
38  delete adder_;
39  delete amplitude_filter_;
40  delete peak_finder_;
41  delete fenixFormatterEB_;
42  delete fenixFormatterEE_;
43  delete fgvbEE_;
44 }
45 
46 //----------------------------------------------------------------------------------
47 void EcalFenixStrip::process_part2_barrel(uint32_t stripid,const EcalTPGSlidingWindow * ecaltpgSlidW,const EcalTPGFineGrainStripEE * ecaltpgFgStripEE) {
48 
49  // call Fgvb
50  //this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
51  //this->getFGVB()->process(lin_out_,fgvb_out_);
52 
53  // call formatter
54  this->getFormatterEB()->setParameters(stripid,ecaltpgSlidW) ;
56  //this is a test:
57  if (debug_) {
58  std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl;
59  std::cout<< "value : "<<std::endl;
60  for (unsigned int i =0; i<format_out_.size();i++){
61  std::cout <<" "<<format_out_[i];
62  }
63  std::cout<<std::endl;
64 
65  }
66  return;
67 
68 }
69 //-------------------------------------------------------------------------------------
70 void EcalFenixStrip::process_part2_endcap(uint32_t stripid,const EcalTPGSlidingWindow * ecaltpgSlidW,const EcalTPGFineGrainStripEE * ecaltpgFgStripEE,const EcalTPGStripStatus * ecaltpgStripStatus) {
71 
72  // call Fgvb
73  //this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
74  //this->getFGVB()->process(lin_out_,fgvb_out_);
75 
76  // call formatter
77  this->getFormatterEE()->setParameters(stripid,ecaltpgSlidW,ecaltpgStripStatus) ;
78 
80 
81  //this is a test:
82  if (debug_) {
83  std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl;
84  std::cout<< "value : "<<std::endl;
85  for (unsigned int i =0; i<format_out_.size();i++){
87  }
88  std::cout<<std::endl;
89  }
90 
91  return;
92 }
EcalFenixStripFgvbEE * fgvbEE_
int i
Definition: DBlmapReader.cc:9
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
tuple cout
Definition: gather_cfg.py:145
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_