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