File indexing completed on 2024-07-24 04:45:01
0001 #ifndef L1Trigger_CSCTriggerPrimitives_ComparatorCodeLUT
0002 #define L1Trigger_CSCTriggerPrimitives_ComparatorCodeLUT
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "DataFormats/CSCDigi/interface/CSCConstants.h"
0016 #include "DataFormats/CSCDigi/interface/CSCCLCTDigi.h"
0017 #include "L1Trigger/CSCTriggerPrimitives/interface/CSCPatternBank.h"
0018 #include "CondFormats/CSCObjects/interface/CSCL1TPLookupTableCCLUT.h"
0019
0020 #include <vector>
0021 #include <string>
0022
0023 class CSCCLCTDigi;
0024
0025 class ComparatorCodeLUT {
0026 public:
0027 typedef std::array<std::array<int, 3>, CSCConstants::NUM_LAYERS> pattern;
0028
0029
0030 ComparatorCodeLUT(const edm::ParameterSet& conf);
0031
0032
0033 void run(CSCCLCTDigi& digi, unsigned numCFEBs, const CSCL1TPLookupTableCCLUT* lookupTableCCLUT) const;
0034
0035 private:
0036
0037 int calculateComparatorCode(const pattern& halfStripPattern) const;
0038
0039 unsigned convertSlopeToRun2Pattern(const unsigned slope) const;
0040
0041
0042 void assignPositionCC(const unsigned offset, std::tuple<int16_t, bool, bool>& returnValue) const;
0043
0044
0045 CSCPatternBank::LCTPatterns clct_pattern_ = {};
0046
0047
0048 unsigned infoV_ = 0;
0049 };
0050
0051 #endif