File indexing completed on 2024-04-06 12:29:28
0001 #ifndef SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALFENIXTCP_H
0002 #define SIMCALORIMETRY_ECALTRIGPRIMALGOS_ECALFENIXTCP_H
0003
0004 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixBypassLin.h>
0005 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixEtTot.h>
0006 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixFgvbEB.h>
0007 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixMaxof2.h>
0008 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcpFgvbEE.h>
0009 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcpFormatEE.h>
0010 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcpFormatEB.h>
0011 #include <SimCalorimetry/EcalTrigPrimAlgos/interface/EcalFenixTcpsFgvbEB.h>
0012
0013 #include <DataFormats/EcalDigi/interface/EBDataFrame.h>
0014 #include <DataFormats/EcalDigi/interface/EEDataFrame.h>
0015 #include <DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h>
0016
0017 #include <iostream>
0018 #include <vector>
0019
0020 class EcalTPGFineGrainEBGroup;
0021 class EcalTPGLutGroup;
0022 class EcalTPGLutIdMap;
0023 class EcalTPGFineGrainEBIdMap;
0024 class EcalTPGFineGrainTowerEE;
0025 class EcalTrigTowerDetId;
0026 class EcalTPGTowerStatus;
0027 class EcalTPGTPMode;
0028
0029
0030
0031
0032
0033 class EcalFenixTcp {
0034 private:
0035 bool debug_;
0036 int nbMaxStrips_;
0037 bool tpInfoPrintout_;
0038
0039 EcalFenixMaxof2 *maxOf2_;
0040 std::vector<EcalFenixBypassLin *> bypasslin_;
0041 EcalFenixEtTot *adder_;
0042 EcalFenixFgvbEB *fgvbEB_;
0043 EcalFenixTcpFgvbEE *fgvbEE_;
0044 EcalFenixTcpsFgvbEB *sfgvbEB_;
0045
0046 EcalFenixTcpFormatEB *formatter_EB_;
0047 EcalFenixTcpFormatEE *formatter_EE_;
0048
0049
0050 std::vector<std::vector<int>> bypasslin_out_;
0051 std::vector<int> adder_even_out_;
0052 std::vector<int> adder_odd_out_;
0053 std::vector<int> maxOf2_out_;
0054 std::vector<int> fgvb_out_;
0055 std::vector<int> strip_fgvb_out_;
0056
0057 public:
0058
0059 void setPointers(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
0060 const EcalTPGLutGroup *ecaltpgLutGroup,
0061 const EcalTPGLutIdMap *ecaltpgLut,
0062 const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
0063 const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
0064 const EcalTPGTowerStatus *ecaltpgBadTT,
0065 const EcalTPGSpike *ecaltpgSpike,
0066 const EcalTPGTPMode *ecaltpgTPMode) {
0067 ecaltpgFgEBGroup_ = ecaltpgFgEBGroup;
0068 ecaltpgLutGroup_ = ecaltpgLutGroup;
0069 ecaltpgLut_ = ecaltpgLut;
0070 ecaltpgFineGrainEB_ = ecaltpgFineGrainEB;
0071 ecaltpgFineGrainTowerEE_ = ecaltpgFineGrainTowerEE;
0072 ecaltpgBadTT_ = ecaltpgBadTT;
0073 ecaltpgSpike_ = ecaltpgSpike;
0074 ecaltpgTPMode_ = ecaltpgTPMode;
0075 }
0076
0077
0078 EcalFenixTcp(
0079 bool tcpFormat, bool debug, bool famos, int binOfMax, int maxNrSamples, int nbMaxStrips, bool TPinfoPrintout);
0080 virtual ~EcalFenixTcp();
0081
0082 void process(std::vector<EBDataFrame> &bid,
0083 std::vector<std::vector<int>> &tpframetow,
0084 int nStr,
0085 std::vector<EcalTriggerPrimitiveSample> &tptow,
0086 std::vector<EcalTriggerPrimitiveSample> &tptow2,
0087 bool isInInnerRings,
0088 EcalTrigTowerDetId thisTower);
0089 void process(std::vector<EEDataFrame> &bid,
0090 std::vector<std::vector<int>> &tpframetow,
0091 int nStr,
0092 std::vector<EcalTriggerPrimitiveSample> &tptow,
0093 std::vector<EcalTriggerPrimitiveSample> &tptow2,
0094 bool isInInnerRings,
0095 EcalTrigTowerDetId thisTower);
0096
0097 void process_part1(std::vector<std::vector<int>> &tpframetow, int nStr, int bitMask, int bitOddEven);
0098
0099 void process_part2_barrel(std::vector<std::vector<int>> &,
0100 int nStr,
0101 int bitMask,
0102 int bitOddEven,
0103 const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
0104 const EcalTPGLutGroup *ecaltpgLutGroup,
0105 const EcalTPGLutIdMap *ecaltpgLut,
0106 const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB,
0107 const EcalTPGTowerStatus *ecaltpgBadTT,
0108 const EcalTPGSpike *ecaltpgSpike,
0109 std::vector<EcalTriggerPrimitiveSample> &tptow,
0110 std::vector<EcalTriggerPrimitiveSample> &tptow2,
0111 EcalTrigTowerDetId towid);
0112
0113 void process_part2_endcap(std::vector<std::vector<int>> &,
0114 int nStr,
0115 int bitMask,
0116 int bitOddEven,
0117 const EcalTPGLutGroup *ecaltpgLutGroup,
0118 const EcalTPGLutIdMap *ecaltpgLut,
0119 const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
0120 const EcalTPGTowerStatus *ecaltpgBadTT,
0121 std::vector<EcalTriggerPrimitiveSample> &tptow,
0122 std::vector<EcalTriggerPrimitiveSample> &tptow2,
0123 bool isInInnerRings,
0124 EcalTrigTowerDetId towid);
0125
0126 EcalFenixBypassLin *getBypasslin(int i) const { return bypasslin_[i]; }
0127 EcalFenixEtTot *getAdder() const { return adder_; }
0128 EcalFenixMaxof2 *getMaxOf2() const { return maxOf2_; }
0129 EcalFenixTcpFormatEB *getFormatterEB() const { return formatter_EB_; }
0130 EcalFenixTcpFormatEE *getFormatterEE() const { return formatter_EE_; }
0131 EcalFenixFgvbEB *getFGVBEB() const { return fgvbEB_; }
0132 EcalFenixTcpFgvbEE *getFGVBEE() const { return fgvbEE_; }
0133 EcalFenixTcpsFgvbEB *getsFGVBEB() const { return sfgvbEB_; }
0134
0135 const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup_;
0136 const EcalTPGLutGroup *ecaltpgLutGroup_;
0137 const EcalTPGLutIdMap *ecaltpgLut_;
0138 const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB_;
0139 const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE_;
0140 const EcalTPGTowerStatus *ecaltpgBadTT_;
0141 const EcalTPGSpike *ecaltpgSpike_;
0142 const EcalTPGTPMode *ecaltpgTPMode_;
0143 };
0144
0145 #endif