CMS 3D CMS Logo

ComparatorCodeLUT.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_ComparatorCodeLUT
2 #define L1Trigger_CSCTriggerPrimitives_ComparatorCodeLUT
3 
19 
20 #include <vector>
21 #include <string>
22 
23 class CSCCLCTDigi;
24 
26 public:
27  typedef std::array<std::array<int, 3>, CSCConstants::NUM_LAYERS> pattern;
28 
29  // constructor
31 
32  // runs the CCLUT procedure
33  void run(CSCCLCTDigi& digi, unsigned numCFEBs) const;
34 
35 private:
36  //calculates the id based on location of hits
37  int calculateComparatorCode(const pattern& halfStripPattern) const;
38 
39  unsigned convertSlopeToRun2Pattern(const unsigned slope) const;
40 
41  // sets the 1/4 and 1/8 strip bits given a floating point position offset
42  void assignPositionCC(const unsigned offset, std::tuple<int16_t, bool, bool>& returnValue) const;
43 
44  // actual LUT used
46 
47  std::vector<std::string> positionLUTFiles_;
48  std::vector<std::string> slopeLUTFiles_;
49  std::vector<std::string> patternConversionLUTFiles_;
50 
51  // unique pointers to the luts
52  std::array<std::unique_ptr<CSCLUTReader>, CSCConstants::NUM_CLCT_PATTERNS_RUN3> lutpos_;
53  std::array<std::unique_ptr<CSCLUTReader>, CSCConstants::NUM_CLCT_PATTERNS_RUN3> lutslope_;
54  std::array<std::unique_ptr<CSCLUTReader>, CSCConstants::NUM_CLCT_PATTERNS_RUN3> lutpatconv_;
55 
56  // verbosity level
57  unsigned infoV_;
58 };
59 
60 #endif
ComparatorCodeLUT::run
void run(CSCCLCTDigi &digi, unsigned numCFEBs) const
Definition: ComparatorCodeLUT.cc:18
ComparatorCodeLUT::calculateComparatorCode
int calculateComparatorCode(const pattern &halfStripPattern) const
Definition: ComparatorCodeLUT.cc:113
CSCConstants::NUM_CLCT_PATTERNS_RUN3
Definition: CSCConstants.h:115
CSCCLCTDigi
Definition: CSCCLCTDigi.h:17
ComparatorCodeLUT::lutpatconv_
std::array< std::unique_ptr< CSCLUTReader >, CSCConstants::NUM_CLCT_PATTERNS_RUN3 > lutpatconv_
Definition: ComparatorCodeLUT.h:54
ComparatorCodeLUT::lutslope_
std::array< std::unique_ptr< CSCLUTReader >, CSCConstants::NUM_CLCT_PATTERNS_RUN3 > lutslope_
Definition: ComparatorCodeLUT.h:53
CSCConstants::NUM_LAYERS
Definition: CSCConstants.h:103
CSCConstants.h
ComparatorCodeLUT::positionLUTFiles_
std::vector< std::string > positionLUTFiles_
Definition: ComparatorCodeLUT.h:47
ComparatorCodeLUT::lutpos_
std::array< std::unique_ptr< CSCLUTReader >, CSCConstants::NUM_CLCT_PATTERNS_RUN3 > lutpos_
Definition: ComparatorCodeLUT.h:52
CSCLUTReader.h
ComparatorCodeLUT::ComparatorCodeLUT
ComparatorCodeLUT(const edm::ParameterSet &conf)
Definition: ComparatorCodeLUT.cc:4
ComparatorCodeLUT::slopeLUTFiles_
std::vector< std::string > slopeLUTFiles_
Definition: ComparatorCodeLUT.h:48
edm::ParameterSet
Definition: ParameterSet.h:47
ComparatorCodeLUT::clct_pattern_
CSCPatternBank::LCTPatterns clct_pattern_
Definition: ComparatorCodeLUT.h:45
CSCPatternBank.h
ComparatorCodeLUT::infoV_
unsigned infoV_
Definition: ComparatorCodeLUT.h:57
ComparatorCodeLUT::assignPositionCC
void assignPositionCC(const unsigned offset, std::tuple< int16_t, bool, bool > &returnValue) const
Definition: ComparatorCodeLUT.cc:154
CSCPatternBank::LCTPatterns
std::vector< LCTPattern > LCTPatterns
Definition: CSCPatternBank.h:15
Frameworkfwd.h
CSCCLCTDigi.h
ComparatorCodeLUT::convertSlopeToRun2Pattern
unsigned convertSlopeToRun2Pattern(const unsigned slope) const
Definition: ComparatorCodeLUT.cc:148
ComparatorCodeLUT
Definition: ComparatorCodeLUT.h:25
ComparatorCodeLUT::patternConversionLUTFiles_
std::vector< std::string > patternConversionLUTFiles_
Definition: ComparatorCodeLUT.h:49
ParameterSet.h
ComparatorCodeLUT::pattern
std::array< std::array< int, 3 >, CSCConstants::NUM_LAYERS > pattern
Definition: ComparatorCodeLUT.h:27
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82