CMS 3D CMS Logo

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 
19 class EcalFenixLinearizer {
20 
21 private:
22  bool famos_;
24  int gainID_;
25  int base_;
26  int mult_;
27  int shift_;
28  int strip_;
29  bool init_;
30 
32  const EcalTPGPedestal *peds_;
34 
35  std::vector<const EcalTPGCrystalStatusCode *> vectorbadXStatus_;
36 
37  int setInput(const EcalMGPASample &RawSam);
38  int process();
39 
40 public:
41  EcalFenixLinearizer(bool famos);
42  virtual ~EcalFenixLinearizer();
43 
44  template <class T> void process(const T &, std::vector<int> &);
45  void setParameters(uint32_t raw, const EcalTPGPedestals *ecaltpPed,
46  const EcalTPGLinearizationConst *ecaltpLin,
47  const EcalTPGCrystalStatus *ecaltpBadX);
48 };
49 
50 template <class T>
51 void EcalFenixLinearizer::process(const T &df,
52  std::vector<int> &output_percry) {
53 
54  // We know a tower numbering is:
55  // S1 S2 S3 S4 S5
56  //
57  // 4 5 14 15 24
58  // 3 6 13 16 23
59  // 2 7 12 17 22
60  // 1 8 11 18 21
61  // 0 9 10 19 20
62  for (int i = 0; i < df.size(); i++) {
63  setInput(df[i]);
64  output_percry[i] = process();
65  }
66 
67  return;
68 }
69 
70 #endif
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