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 }
33 
34 //-------------------------------------------------------------------------------------
36  for (int i=0;i<nbMaxXtals_;i++) delete linearizer_[i];
37  delete adder_;
38  delete amplitude_filter_;
39  delete peak_finder_;
40  delete fenixFormatterEB_;
41  delete fenixFormatterEE_;
42  delete fgvbEE_;
43 }
44 
45 //----------------------------------------------------------------------------------
46 void EcalFenixStrip::process_part2_barrel(uint32_t stripid,const EcalTPGSlidingWindow * ecaltpgSlidW) {
47 
48  // call formatter
49  this->getFormatterEB()->setParameters(stripid,ecaltpgSlidW) ;
51  //this is a test:
52  if (debug_) {
53  std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl;
54  std::cout<< "value : "<<std::endl;
55  for (unsigned int i =0; i<format_out_.size();i++){
56  std::cout <<" "<<format_out_[i];
57  }
58  std::cout<<std::endl;
59 
60  }
61  return;
62 
63 }
64 //-------------------------------------------------------------------------------------
65 void EcalFenixStrip::process_part2_endcap(uint32_t stripid,const EcalTPGSlidingWindow * ecaltpgSlidW,const EcalTPGFineGrainStripEE * ecaltpgFgStripEE) {
66 
67  // call Fgvb
68  this->getFGVB()->setParameters(stripid,ecaltpgFgStripEE);
70 
71  // call formatter
72  this->getFormatterEE()->setParameters(stripid,ecaltpgSlidW) ;
73 
75 
76  //this is a test:
77  if (debug_) {
78  std::cout<< "output of formatter is a vector of size: "<<format_out_.size()<<std::endl;
79  std::cout<< "value : "<<std::endl;
80  for (unsigned int i =0; i<format_out_.size();i++){
81  std::cout <<" "<<std::dec<<format_out_[i];
82  }
83  std::cout<<std::endl;
84  }
85 
86  return;
87 }
EcalFenixStripFgvbEE * fgvbEE_
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > lin_out_
std::vector< int > add_out_
void process_part2_barrel(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW)
std::vector< EcalFenixLinearizer * > linearizer_
EcalFenixStripFormatEB * fenixFormatterEB_
void process_part2_endcap(uint32_t stripid, const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE)
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 ...
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()
EcalFenixStripFgvbEE * getFGVB() const
EcalFenixPeakFinder * peak_finder_
calculates .... for Fenix strip, barrel input: 18 bits output: 18 bits
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 *&)
void process(std::vector< std::vector< int > > &lin_out, std::vector< int > &output)
std::vector< int > format_out_
EcalFenixStripFormatEE * getFormatterEE() const
tuple cout
Definition: gather_cfg.py:41
EcalFenixAmplitudeFilter * amplitude_filter_
EcalFenixStripFormatEE * fenixFormatterEE_
std::vector< int > peak_out_
#define debug
Definition: MEtoEDMFormat.h:34
void setParameters(uint32_t id, const EcalTPGFineGrainStripEE *)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
mathSSE::Vec4< T > v
void setParameters(uint32_t id, const EcalTPGSlidingWindow *&)
EcalFenixEtStrip * adder_
EcalFenixStrip(const edm::EventSetup &setup, const EcalElectronicsMapping *theMapping, bool debug, bool famos, int maxNrSamples, int nbMaxXtals)