CMS 3D CMS Logo

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
EcalFenixTcp::process_part2_barrel
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)
Definition: EcalFenixTcp.cc:129
EcalFenixBypassLin
Linearisation for Tcp input: 16 bits output: 12 bits +1 going to fgvb (???)
Definition: EcalFenixBypassLin.h:16
mps_fire.i
i
Definition: mps_fire.py:428
EcalTPGTPMode
Definition: EcalTPGTPMode.h:12
EcalFenixTcp::adder_odd_out_
std::vector< int > adder_odd_out_
Definition: EcalFenixTcp.h:52
EcalFenixMaxof2
Definition: EcalFenixMaxof2.h:20
EcalTPGSpike
Definition: EcalTPGSpike.h:9
EcalFenixTcp::ecaltpgFgEBGroup_
const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup_
Definition: EcalFenixTcp.h:135
EcalFenixTcp::tpInfoPrintout_
bool tpInfoPrintout_
Definition: EcalFenixTcp.h:37
EcalFenixTcp::getsFGVBEB
EcalFenixTcpsFgvbEB * getsFGVBEB() const
Definition: EcalFenixTcp.h:133
EcalTPGFineGrainEBIdMap
Definition: EcalTPGFineGrainEBIdMap.h:10
EcalFenixTcp::setPointers
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
EcalFenixTcp::nbMaxStrips_
int nbMaxStrips_
Definition: EcalFenixTcp.h:36
EcalFenixTcp::maxOf2_out_
std::vector< int > maxOf2_out_
Definition: EcalFenixTcp.h:53
EcalFenixTcpFormatEB
Definition: EcalFenixTcpFormatEB.h:24
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
EcalFenixFgvbEB
calculation of Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel
Definition: EcalFenixFgvbEB.h:23
EcalFenixTcp::adder_even_out_
std::vector< int > adder_even_out_
Definition: EcalFenixTcp.h:51
EcalTPGLutGroup
Definition: EcalTPGLutGroup.h:13
EcalFenixTcpsFgvbEB
calculation of strip Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel
Definition: EcalFenixTcpsFgvbEB.h:15
EcalFenixTcp::getBypasslin
EcalFenixBypassLin * getBypasslin(int i) const
Definition: EcalFenixTcp.h:126
EcalFenixTcpFormatEB.h
EcalFenixEtTot.h
EcalTPGFineGrainTowerEE
Definition: EcalTPGFineGrainTowerEE.h:9
debug
#define debug
Definition: HDRShower.cc:19
EcalFenixTcp::ecaltpgLutGroup_
const EcalTPGLutGroup * ecaltpgLutGroup_
Definition: EcalFenixTcp.h:136
EcalFenixTcp::getFGVBEB
EcalFenixFgvbEB * getFGVBEB() const
Definition: EcalFenixTcp.h:131
EcalFenixTcp::debug_
bool debug_
Definition: EcalFenixTcp.h:35
EcalFenixTcp::getAdder
EcalFenixEtTot * getAdder() const
Definition: EcalFenixTcp.h:127
EcalTPGLutIdMap
Definition: EcalTPGLutIdMap.h:10
EcalFenixTcp::process_part1
void process_part1(std::vector< std::vector< int >> &tpframetow, int nStr, int bitMask, int bitOddEven)
Definition: EcalFenixTcp.cc:108
EcalFenixTcp::fgvb_out_
std::vector< int > fgvb_out_
Definition: EcalFenixTcp.h:54
EcalFenixTcp::bypasslin_out_
std::vector< std::vector< int > > bypasslin_out_
Definition: EcalFenixTcp.h:50
EcalFenixTcp::adder_
EcalFenixEtTot * adder_
Definition: EcalFenixTcp.h:41
EcalFenixTcp::formatter_EB_
EcalFenixTcpFormatEB * formatter_EB_
Definition: EcalFenixTcp.h:46
EcalFenixBypassLin.h
EcalFenixTcpFormatEE.h
EcalFenixTcp::~EcalFenixTcp
virtual ~EcalFenixTcp()
Definition: EcalFenixTcp.cc:41
EcalTPGFineGrainEBGroup
Definition: EcalTPGFineGrainEBGroup.h:13
EcalFenixTcp::ecaltpgSpike_
const EcalTPGSpike * ecaltpgSpike_
Definition: EcalFenixTcp.h:141
EcalFenixTcp::getFGVBEE
EcalFenixTcpFgvbEE * getFGVBEE() const
Definition: EcalFenixTcp.h:132
EcalFenixTcp::ecaltpgFineGrainEB_
const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB_
Definition: EcalFenixTcp.h:138
EcalFenixTcpFgvbEE
calculation of Fgvb for Fenix Tcp, format endcap calculates fgvb for the endcap
Definition: EcalFenixTcpFgvbEE.h:24
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
EcalFenixTcp::getFormatterEB
EcalFenixTcpFormatEB * getFormatterEB() const
Definition: EcalFenixTcp.h:129
EBDataFrame.h
EcalFenixTcp::getFormatterEE
EcalFenixTcpFormatEE * getFormatterEE() const
Definition: EcalFenixTcp.h:130
EcalFenixTcp::process
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:53
EcalFenixTcpFormatEE
Definition: EcalFenixTcpFormatEE.h:23
EcalFenixTcp::sfgvbEB_
EcalFenixTcpsFgvbEB * sfgvbEB_
Definition: EcalFenixTcp.h:44
EEDataFrame.h
EcalFenixEtTot
class for calculation of Et for Fenix tcp calculates the sum. As in the firmware the Et sum is splitt...
Definition: EcalFenixEtTot.h:28
EcalTriggerPrimitiveSample.h
EcalTPGTowerStatus
Definition: EcalTPGTowerStatus.h:9
EcalFenixTcp::formatter_EE_
EcalFenixTcpFormatEE * formatter_EE_
Definition: EcalFenixTcp.h:47
EcalFenixTcp::EcalFenixTcp
EcalFenixTcp(bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples, int nbMaxStrips, bool TPinfoPrintout)
Definition: EcalFenixTcp.cc:14
EcalFenixTcp::ecaltpgFineGrainTowerEE_
const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE_
Definition: EcalFenixTcp.h:139
EcalFenixFgvbEB.h
EcalFenixTcpFgvbEE.h
EcalFenixTcp::ecaltpgLut_
const EcalTPGLutIdMap * ecaltpgLut_
Definition: EcalFenixTcp.h:137
EcalFenixTcp::fgvbEB_
EcalFenixFgvbEB * fgvbEB_
Definition: EcalFenixTcp.h:42
EcalFenixMaxof2.h
EcalFenixTcp
class representing the Fenix chip, format strip
Definition: EcalFenixTcp.h:33
EcalFenixTcp::process_part2_endcap
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)
Definition: EcalFenixTcp.cc:200
EcalFenixTcp::ecaltpgTPMode_
const EcalTPGTPMode * ecaltpgTPMode_
Definition: EcalFenixTcp.h:142
EcalFenixTcp::ecaltpgBadTT_
const EcalTPGTowerStatus * ecaltpgBadTT_
Definition: EcalFenixTcp.h:140
EcalFenixTcp::getMaxOf2
EcalFenixMaxof2 * getMaxOf2() const
Definition: EcalFenixTcp.h:128
EcalFenixTcp::bypasslin_
std::vector< EcalFenixBypassLin * > bypasslin_
Definition: EcalFenixTcp.h:40
EcalFenixTcpsFgvbEB.h
EcalFenixTcp::strip_fgvb_out_
std::vector< int > strip_fgvb_out_
Definition: EcalFenixTcp.h:55
EcalFenixTcp::maxOf2_
EcalFenixMaxof2 * maxOf2_
Definition: EcalFenixTcp.h:39
EcalFenixTcp::fgvbEE_
EcalFenixTcpFgvbEE * fgvbEE_
Definition: EcalFenixTcp.h:43