CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalFenixLinearizer.h
Go to the documentation of this file.
1 #ifndef ECAL_FENIX_LINEARIZER_H
2 #define ECAL_FENIX_LINEARIZER_H
3 
8 
9 #include <vector>
10 
20 
21 
22  private:
23  bool famos_;
25  int gainID_;
26  int base_;
27  int mult_;
28  int shift_;
29  int strip_;
30  bool init_;
31 
35 
36  std::vector<const EcalTPGCrystalStatusCode *> vectorbadXStatus_;
37 
38  int setInput(const EcalMGPASample &RawSam) ;
39  int process() ;
40 
41 
42  public:
43  EcalFenixLinearizer(bool famos);
44  virtual ~EcalFenixLinearizer();
45 
46  template <class T>
47  void process(const T &, std::vector<int>&);
48  void setParameters(uint32_t raw, const EcalTPGPedestals * ecaltpPed,const EcalTPGLinearizationConst * ecaltpLin, const EcalTPGCrystalStatus * ecaltpBadX) ;
49 };
50 
51 template <class T>
52 void EcalFenixLinearizer::process(const T&df, std::vector<int> & output_percry)
53 {
54 
55  //We know a tower numbering is:
56 // S1 S2 S3 S4 S5
57 //
58 // 4 5 14 15 24
59 // 3 6 13 16 23
60 // 2 7 12 17 22
61 // 1 8 11 18 21
62 // 0 9 10 19 20
63 
64  //std::cout << " EcalFenixLinearizer::process(const .. DataFrame " << std::endl;
65  for (int i=0;i<df.size();i++) {
66  //std::cout << df[i] << " ";
67  }
68 
69  for (int i=0;i<df.size();i++) {
70  setInput(df[i]);
71  output_percry[i]=process();
72  }
73 
74  //std::cout << " EcalFenixLinearizer::process(const .. Final output " << std::endl;
75  for (int i=0;i<df.size();i++) {
76  //std::cout << " output_percry " << output_percry[i]<< " ";
77  }
78 
79  return;
80 }
81 
82 #endif
int i
Definition: DBlmapReader.cc:9
void setParameters(uint32_t raw, const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin, const EcalTPGCrystalStatus *ecaltpBadX)
EcalFenixLinearizer(bool famos)
Linearisation for Fenix strip input: 16 bits corresponding to input EBDataFrame output: 18 bits...
int setInput(const EcalMGPASample &RawSam)
const EcalTPGLinearizationConstant * linConsts_
const EcalTPGCrystalStatusCode * badXStatus_
std::vector< const EcalTPGCrystalStatusCode * > vectorbadXStatus_
const EcalTPGPedestal * peds_
long double T