Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:22

0001 #ifndef SimCalorimetry_EcalEBTrigPrimAlgos_EcalEBFenixTcpFormat_h
0002 #define SimCalorimetry_EcalEBTrigPrimAlgos_EcalEBFenixTcpFormat_h
0003 
0004 #include "DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h"
0005 #include <vector>
0006 
0007 class EcalTPGLutGroup;
0008 class EcalTPGLutIdMap;
0009 class EcalTPGTowerStatus;
0010 class EcalTPGSpike;
0011 
0012 /** 
0013     \class EcalEBFenixTcpFormat
0014     \brief Formatting for Fenix Tcp
0015     *  input 10 bits from Ettot 
0016     *         1 bit from fgvb
0017     *         3 bits TriggerTowerFlag 
0018     *  output: 16 bits
0019     *  simple formatting
0020     *  
0021     */
0022 class EcalEBFenixTcpFormat {
0023 public:
0024   EcalEBFenixTcpFormat(bool tccFormat, bool debug, bool famos, int binOfMax);
0025   virtual ~EcalEBFenixTcpFormat();
0026 
0027   void process(std::vector<int> &, std::vector<int> &);
0028   void process(std::vector<int> &Et,
0029                std::vector<int> &fgvb,
0030                std::vector<int> &sfgvb,
0031                int eTTotShift,
0032                std::vector<EcalEBTriggerPrimitiveSample> &out,
0033                std::vector<EcalEBTriggerPrimitiveSample> &outTcc,
0034                bool isInInnerRings);
0035   void setParameters(uint32_t towid,
0036                      const EcalTPGLutGroup *ecaltpgLutGroup,
0037                      const EcalTPGLutIdMap *ecaltpgLut,
0038                      const EcalTPGTowerStatus *ecaltpgbadTT,
0039                      const EcalTPGSpike *ecaltpgSpike);
0040 
0041 private:
0042   const unsigned int *lut_;
0043   const uint16_t *badTTStatus_;
0044   uint16_t status_;
0045   bool tcpFormat_;
0046   bool debug_;
0047   bool famos_;
0048   unsigned int binOfMax_;
0049   uint16_t spikeZeroThresh_;
0050 };
0051 
0052 #endif