CMS 3D CMS Logo

EcalFenixTcp.h
Go to the documentation of this file.
1 #ifndef ECAL_FENIX_TCP_H
2 #define ECAL_FENIX_TCP_H
3 
11 
15 
17 
18 #include <iostream>
19 #include <vector>
20 
22 class EcalTPGLutGroup;
23 class EcalTPGLutIdMap;
26 class EcalTrigTowerDetId;
27 class EcalTPGTowerStatus;
28 
33 class EcalFenixTcp {
34 private:
35  bool debug_;
36 
38 
40  std::vector<EcalFenixBypassLin *> bypasslin_;
45 
47 
48  // permanent data structures
49  std::vector<std::vector<int>> bypasslin_out_;
50  std::vector<int> adder_out_;
51  std::vector<int> maxOf2_out_;
52  std::vector<int> fgvb_out_;
53  std::vector<int> strip_fgvb_out_;
54 
55 public:
56  // temporary, for timing tests
57  void setPointers(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
58  const EcalTPGLutGroup *ecaltpgLutGroup,
59  const EcalTPGLutIdMap *ecaltpgLut,
60  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
61  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
62  const EcalTPGTowerStatus *ecaltpgBadTT,
63  const EcalTPGSpike *ecaltpgSpike) {
64  ecaltpgFgEBGroup_ = ecaltpgFgEBGroup;
65  ecaltpgLutGroup_ = ecaltpgLutGroup;
66  ecaltpgLut_ = ecaltpgLut;
67  ecaltpgFineGrainEB_ = ecaltpgFineGrainEB;
68  ecaltpgFineGrainTowerEE_ = ecaltpgFineGrainTowerEE;
69  ecaltpgBadTT_ = ecaltpgBadTT;
70  ecaltpgSpike_ = ecaltpgSpike;
71  }
72  // end temporary, for timing tests
73 
75  bool tcpFormat,
76  bool debug,
77  bool famos,
78  int binOfMax,
79  int maxNrSamples,
80  int nbMaxStrips);
81  virtual ~EcalFenixTcp();
82 
83  void process(const edm::EventSetup &setup,
84  std::vector<EBDataFrame> &bid, // dummy argument for template call
85  std::vector<std::vector<int>> &tpframetow,
86  int nStr,
87  std::vector<EcalTriggerPrimitiveSample> &tptow,
88  std::vector<EcalTriggerPrimitiveSample> &tptow2,
89  bool isInInnerRings,
90  EcalTrigTowerDetId thisTower);
91  void process(const edm::EventSetup &setup,
92  std::vector<EEDataFrame> &bid, // dummy argument for template call
93  std::vector<std::vector<int>> &tpframetow,
94  int nStr,
95  std::vector<EcalTriggerPrimitiveSample> &tptow,
96  std::vector<EcalTriggerPrimitiveSample> &tptow2,
97  bool isInInnerRings,
98  EcalTrigTowerDetId thisTower);
99 
100  void process_part1(std::vector<std::vector<int>> &tpframetow, int nStr, int bitMask);
101 
102  void process_part2_barrel(std::vector<std::vector<int>> &,
103  int nStr,
104  int bitMask,
105  const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
106  const EcalTPGLutGroup *ecaltpgLutGroup,
107  const EcalTPGLutIdMap *ecaltpgLut,
108  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
109  const EcalTPGTowerStatus *ecaltpgBadTT,
110  const EcalTPGSpike *ecaltpgSpike,
111  std::vector<EcalTriggerPrimitiveSample> &tptow,
112  std::vector<EcalTriggerPrimitiveSample> &tptow2,
113  EcalTrigTowerDetId towid);
114 
115  void process_part2_endcap(std::vector<std::vector<int>> &,
116  int nStr,
117  int bitMask,
118  const EcalTPGLutGroup *ecaltpgLutGroup,
119  const EcalTPGLutIdMap *ecaltpgLut,
120  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
121  const EcalTPGTowerStatus *ecaltpgBadTT,
122  std::vector<EcalTriggerPrimitiveSample> &tptow,
123  std::vector<EcalTriggerPrimitiveSample> &tptow2,
124  bool isInInnerRings,
125  EcalTrigTowerDetId towid);
126 
127  EcalFenixBypassLin *getBypasslin(int i) const { return bypasslin_[i]; }
128  EcalFenixEtTot *getAdder() const { return adder_; }
129  EcalFenixMaxof2 *getMaxOf2() const { return maxOf2_; }
131  EcalFenixFgvbEB *getFGVBEB() const { return fgvbEB_; }
132  EcalFenixTcpFgvbEE *getFGVBEE() const { return fgvbEE_; }
134 
142 };
143 
144 #endif
void process_part2_barrel(std::vector< std::vector< int >> &, int nStr, int bitMask, 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)
const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB_
Definition: EcalFenixTcp.h:138
class for calculation of Et for Fenix tcp calculates the sum
EcalFenixTcpsFgvbEB * sfgvbEB_
Definition: EcalFenixTcp.h:44
EcalFenixMaxof2 * maxOf2_
Definition: EcalFenixTcp.h:39
EcalFenixTcpFormat * formatter_
Definition: EcalFenixTcp.h:46
calculation of Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel
void process(const edm::EventSetup &setup, 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:54
EcalFenixFgvbEB * getFGVBEB() const
Definition: EcalFenixTcp.h:131
EcalFenixMaxof2 * getMaxOf2() const
Definition: EcalFenixTcp.h:129
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:127
std::vector< int > fgvb_out_
Definition: EcalFenixTcp.h:52
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
void process_part1(std::vector< std::vector< int >> &tpframetow, int nStr, int bitMask)
void setPointers(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, const EcalTPGSpike *ecaltpgSpike)
Definition: EcalFenixTcp.h:57
const EcalTPGLutIdMap * ecaltpgLut_
Definition: EcalFenixTcp.h:137
const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE_
Definition: EcalFenixTcp.h:139
EcalFenixTcpsFgvbEB * getsFGVBEB() const
Definition: EcalFenixTcp.h:133
EcalFenixEtTot * getAdder() const
Definition: EcalFenixTcp.h:128
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 > maxOf2_out_
Definition: EcalFenixTcp.h:51
std::vector< int > strip_fgvb_out_
Definition: EcalFenixTcp.h:53
EcalFenixTcpFormat * getFormatter() const
Definition: EcalFenixTcp.h:130
class representing the Fenix chip, format strip
Definition: EcalFenixTcp.h:33
const EcalTPGLutGroup * ecaltpgLutGroup_
Definition: EcalFenixTcp.h:136
std::vector< std::vector< int > > bypasslin_out_
Definition: EcalFenixTcp.h:49
EcalFenixEtTot * adder_
Definition: EcalFenixTcp.h:41
std::vector< int > adder_out_
Definition: EcalFenixTcp.h:50
EcalFenixTcp(const edm::EventSetup &setup, bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples, int nbMaxStrips)
Definition: EcalFenixTcp.cc:14
Linearisation for Tcp input: 16 bits output: 12 bits +1 going to fgvb (???)
void process_part2_endcap(std::vector< std::vector< int >> &, int nStr, int bitMask, const EcalTPGLutGroup *ecaltpgLutGroup, const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGTowerStatus *ecaltpgBadTT, std::vector< EcalTriggerPrimitiveSample > &tptow, std::vector< EcalTriggerPrimitiveSample > &tptow2, bool isInInnerRings, EcalTrigTowerDetId towid)
calculation of strip Fgvb for Fenix Tcp, format barrel calculates fgvb for the barrel ...