CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalFenixTcp.h
Go to the documentation of this file.
1 #ifndef SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALFENIXTCP_H
2 #define SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALFENIXTCP_H
3 
12 
16 
17 #include <iostream>
18 #include <vector>
19 
21 class EcalTPGLutGroup;
22 class EcalTPGLutIdMap;
25 class EcalTrigTowerDetId;
26 class EcalTPGTowerStatus;
27 class EcalTPGTPMode;
28 
33 class EcalFenixTcp {
34 private:
35  bool debug_;
38 
40  std::vector<EcalFenixBypassLin *> bypasslin_;
45 
48 
49  // permanent data structures
50  std::vector<std::vector<int>> bypasslin_out_;
51  std::vector<int> adder_even_out_;
52  std::vector<int> adder_odd_out_;
53  std::vector<int> maxOf2_out_;
54  std::vector<int> fgvb_out_;
55  std::vector<int> strip_fgvb_out_;
56 
57 public:
58  // temporary, for timing tests
59  void setPointers(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
60  const EcalTPGLutGroup *ecaltpgLutGroup,
61  const EcalTPGLutIdMap *ecaltpgLut,
62  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
63  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
64  const EcalTPGTowerStatus *ecaltpgBadTT,
65  const EcalTPGSpike *ecaltpgSpike,
66  const EcalTPGTPMode *ecaltpgTPMode) {
67  ecaltpgFgEBGroup_ = ecaltpgFgEBGroup;
68  ecaltpgLutGroup_ = ecaltpgLutGroup;
69  ecaltpgLut_ = ecaltpgLut;
70  ecaltpgFineGrainEB_ = ecaltpgFineGrainEB;
71  ecaltpgFineGrainTowerEE_ = ecaltpgFineGrainTowerEE;
72  ecaltpgBadTT_ = ecaltpgBadTT;
73  ecaltpgSpike_ = ecaltpgSpike;
74  ecaltpgTPMode_ = ecaltpgTPMode;
75  }
76  // end temporary, for timing tests
77 
79  bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples, int nbMaxStrips, bool TPinfoPrintout);
80  virtual ~EcalFenixTcp();
81 
82  void process(std::vector<EBDataFrame> &bid, // dummy argument for template call
83  std::vector<std::vector<int>> &tpframetow,
84  int nStr,
85  std::vector<EcalTriggerPrimitiveSample> &tptow,
86  std::vector<EcalTriggerPrimitiveSample> &tptow2,
87  bool isInInnerRings,
88  EcalTrigTowerDetId thisTower);
89  void process(std::vector<EEDataFrame> &bid, // dummy argument for template call
90  std::vector<std::vector<int>> &tpframetow,
91  int nStr,
92  std::vector<EcalTriggerPrimitiveSample> &tptow,
93  std::vector<EcalTriggerPrimitiveSample> &tptow2,
94  bool isInInnerRings,
95  EcalTrigTowerDetId thisTower);
96 
97  void process_part1(std::vector<std::vector<int>> &tpframetow, int nStr, int bitMask, int bitOddEven);
98 
99  void process_part2_barrel(std::vector<std::vector<int>> &,
100  int nStr,
101  int bitMask,
102  int bitOddEven,
103  const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
104  const EcalTPGLutGroup *ecaltpgLutGroup,
105  const EcalTPGLutIdMap *ecaltpgLut,
106  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
107  const EcalTPGTowerStatus *ecaltpgBadTT,
108  const EcalTPGSpike *ecaltpgSpike,
109  std::vector<EcalTriggerPrimitiveSample> &tptow,
110  std::vector<EcalTriggerPrimitiveSample> &tptow2,
111  EcalTrigTowerDetId towid);
112 
113  void process_part2_endcap(std::vector<std::vector<int>> &,
114  int nStr,
115  int bitMask,
116  int bitOddEven,
117  const EcalTPGLutGroup *ecaltpgLutGroup,
118  const EcalTPGLutIdMap *ecaltpgLut,
119  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
120  const EcalTPGTowerStatus *ecaltpgBadTT,
121  std::vector<EcalTriggerPrimitiveSample> &tptow,
122  std::vector<EcalTriggerPrimitiveSample> &tptow2,
123  bool isInInnerRings,
124  EcalTrigTowerDetId towid);
125 
126  EcalFenixBypassLin *getBypasslin(int i) const { return bypasslin_[i]; }
127  EcalFenixEtTot *getAdder() const { return adder_; }
128  EcalFenixMaxof2 *getMaxOf2() const { return maxOf2_; }
131  EcalFenixFgvbEB *getFGVBEB() const { return fgvbEB_; }
132  EcalFenixTcpFgvbEE *getFGVBEE() const { return fgvbEE_; }
134 
143 };
144 
145 #endif
void process_part2_endcap(std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId towid)
const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB_
Definition: EcalFenixTcp.h:138
class for calculation of Et for Fenix tcp calculates the sum. As in the firmware the Et sum is splitt...
EcalFenixTcpFormatEB * getFormatterEB() const
Definition: EcalFenixTcp.h:129
EcalFenixTcpsFgvbEB * sfgvbEB_
Definition: EcalFenixTcp.h:44
EcalFenixMaxof2 * maxOf2_
Definition: EcalFenixTcp.h:39
const EcalTPGTPMode * ecaltpgTPMode_
Definition: EcalFenixTcp.h:142
calculation of Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel
EcalFenixFgvbEB * getFGVBEB() const
Definition: EcalFenixTcp.h:131
void process(std::vector< EBDataFrame > &bid, std::vector< std::vector< int >> &tpframetow, int nStr, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId thisTower)
Definition: EcalFenixTcp.cc:55
EcalFenixTcp(bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples, int nbMaxStrips, bool TPinfoPrintout)
Definition: EcalFenixTcp.cc:16
void process_part1(std::vector< std::vector< int >> &tpframetow, int nStr, int bitMask, int bitOddEven)
EcalFenixMaxof2 * getMaxOf2() const
Definition: EcalFenixTcp.h:128
virtual ~EcalFenixTcp()
Definition: EcalFenixTcp.cc:43
const EcalTPGSpike * ecaltpgSpike_
Definition: EcalFenixTcp.h:141
EcalFenixTcpFgvbEE * getFGVBEE() const
Definition: EcalFenixTcp.h:132
EcalFenixBypassLin * getBypasslin(int i) const
Definition: EcalFenixTcp.h:126
std::vector< int > fgvb_out_
Definition: EcalFenixTcp.h:54
const EcalTPGTowerStatus * ecaltpgBadTT_
Definition: EcalFenixTcp.h:140
EcalFenixTcpFgvbEE * fgvbEE_
Definition: EcalFenixTcp.h:43
std::vector< EcalFenixBypassLin * > bypasslin_
Definition: EcalFenixTcp.h:40
const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup_
Definition: EcalFenixTcp.h:135
const EcalTPGLutIdMap * ecaltpgLut_
Definition: EcalFenixTcp.h:137
const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE_
Definition: EcalFenixTcp.h:139
EcalFenixTcpFormatEE * formatter_EE_
Definition: EcalFenixTcp.h:47
EcalFenixTcpsFgvbEB * getsFGVBEB() const
Definition: EcalFenixTcp.h:133
EcalFenixEtTot * getAdder() const
Definition: EcalFenixTcp.h:127
std::vector< int > adder_odd_out_
Definition: EcalFenixTcp.h:52
EcalFenixFgvbEB * fgvbEB_
Definition: EcalFenixTcp.h:42
#define debug
Definition: HDRShower.cc:19
calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap
std::vector< int > adder_even_out_
Definition: EcalFenixTcp.h:51
std::vector< int > maxOf2_out_
Definition: EcalFenixTcp.h:53
EcalFenixTcpFormatEE * getFormatterEE() const
Definition: EcalFenixTcp.h:130
std::vector< int > strip_fgvb_out_
Definition: EcalFenixTcp.h:55
void process_part2_barrel(std::vector< std::vector< int >> &, int nStr, int bitMask, int bitOddEven, const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, EcalTrigTowerDetId towid)
class representing the Fenix chip, format strip
Definition: EcalFenixTcp.h:33
EcalFenixTcpFormatEB * formatter_EB_
Definition: EcalFenixTcp.h:46
void setPointers(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike, const EcalTPGTPMode *ecaltpgTPMode)
Definition: EcalFenixTcp.h:59
const EcalTPGLutGroup * ecaltpgLutGroup_
Definition: EcalFenixTcp.h:136
bool tpInfoPrintout_
Definition: EcalFenixTcp.h:37
std::vector< std::vector< int > > bypasslin_out_
Definition: EcalFenixTcp.h:50
EcalFenixEtTot * adder_
Definition: EcalFenixTcp.h:41
Linearisation for Tcp input: 16 bits output: 12 bits +1 going to fgvb (???)
calculation of strip Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel ...