CMS 3D CMS Logo

PtAssignmentEngine.h
Go to the documentation of this file.
1 #ifndef L1TMuonEndCap_PtAssignmentEngine_h
2 #define L1TMuonEndCap_PtAssignmentEngine_h
3 
4 #include <cstdint>
5 #include <cstdlib>
6 #include <cmath>
7 #include <string>
8 #include <vector>
9 #include <array>
10 
15 
17 public:
18  explicit PtAssignmentEngine();
19  virtual ~PtAssignmentEngine();
20 
22 
23  void read(int pt_lut_version, const std::string& xml_dir);
24  void load(int pt_lut_version, const L1TMuonEndCapForest* payload);
25  const std::array<emtf::Forest, 16>& getForests(void) const { return forests_; }
26  const std::vector<int>& getAllowedModes(void) const { return allowedModes_; }
27 
28  int get_pt_lut_version() const { return ptLUTVersion_; }
29 
30  void configure(
31  int verbose, bool readPtLUTFile, bool fixMode15HighPt, bool bug9BitDPhi, bool bugMode7CLCT, bool bugNegPt);
32 
33  void configure_details();
34 
35  const PtAssignmentEngineAux& aux() const;
36 
37  virtual float scale_pt(const float pt, const int mode = 15) const = 0;
38  virtual float unscale_pt(const float pt, const int mode = 15) const = 0;
39 
40  virtual address_t calculate_address(const EMTFTrack& track) const { return 0; }
41 
42  virtual float calculate_pt(const address_t& address) const;
43  virtual float calculate_pt(const EMTFTrack& track) const;
44 
45  virtual float calculate_pt_lut(const address_t& address) const;
46  virtual float calculate_pt_xml(const address_t& address) const { return 0.; }
47  virtual float calculate_pt_xml(const EMTFTrack& track) const { return 0.; }
48 
49 protected:
50  std::vector<int> allowedModes_;
51  std::array<emtf::Forest, 16> forests_;
53 
54  int verbose_;
55 
56  int ptLUTVersion_; // init: 0xFFFFFFFF
59 };
60 
61 #endif
PtAssignmentEngine::fixMode15HighPt_
bool fixMode15HighPt_
Definition: PtAssignmentEngine.h:57
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11776
PtAssignmentEngine::calculate_pt
virtual float calculate_pt(const address_t &address) const
Definition: PtAssignmentEngine.cc:100
PtAssignmentEngine::getAllowedModes
const std::vector< int > & getAllowedModes(void) const
Definition: PtAssignmentEngine.h:26
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
PtAssignmentEngine::bug9BitDPhi_
bool bug9BitDPhi_
Definition: PtAssignmentEngine.h:58
PtAssignmentEngine::calculate_pt_lut
virtual float calculate_pt_lut(const address_t &address) const
Definition: PtAssignmentEngine.cc:120
PtAssignmentEngine::ptLUTVersion_
int ptLUTVersion_
Definition: PtAssignmentEngine.h:56
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
PtAssignmentEngine
Definition: PtAssignmentEngine.h:16
PtAssignmentEngine::configure_details
void configure_details()
Definition: PtAssignmentEngine.cc:85
PtAssignmentEngine::~PtAssignmentEngine
virtual ~PtAssignmentEngine()
Definition: PtAssignmentEngine.cc:9
PtAssignmentEngine::scale_pt
virtual float scale_pt(const float pt, const int mode=15) const =0
PtLUTReader
Definition: PtLUTReader.h:8
PtAssignmentEngine::configure
void configure(int verbose, bool readPtLUTFile, bool fixMode15HighPt, bool bug9BitDPhi, bool bugMode7CLCT, bool bugNegPt)
Definition: PtAssignmentEngine.cc:72
PtAssignmentEngineAux
Definition: PtAssignmentEngineAux.h:13
PtAssignmentEngine::getForests
const std::array< emtf::Forest, 16 > & getForests(void) const
Definition: PtAssignmentEngine.h:25
PtAssignmentEngine::calculate_pt_xml
virtual float calculate_pt_xml(const EMTFTrack &track) const
Definition: PtAssignmentEngine.h:47
PtAssignmentEngine::bugMode7CLCT_
bool bugMode7CLCT_
Definition: PtAssignmentEngine.h:58
PtAssignmentEngine::address_t
uint64_t address_t
Definition: PtAssignmentEngine.h:21
PtAssignmentEngine::ptlut_reader_
PtLUTReader ptlut_reader_
Definition: PtAssignmentEngine.h:52
PtAssignmentEngine::calculate_address
virtual address_t calculate_address(const EMTFTrack &track) const
Definition: PtAssignmentEngine.h:40
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
jets_cff.payload
payload
Definition: jets_cff.py:32
Forest.h
l1t::EMTFTrack
Definition: EMTFTrack.h:42
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PtAssignmentEngine::calculate_pt_xml
virtual float calculate_pt_xml(const address_t &address) const
Definition: PtAssignmentEngine.h:46
PtAssignmentEngine::forests_
std::array< emtf::Forest, 16 > forests_
Definition: PtAssignmentEngine.h:51
PtAssignmentEngine::load
void load(int pt_lut_version, const L1TMuonEndCapForest *payload)
Definition: PtAssignmentEngine.cc:34
PtAssignmentEngineAux.h
PtAssignmentEngine::unscale_pt
virtual float unscale_pt(const float pt, const int mode=15) const =0
PtAssignmentEngine::aux
const PtAssignmentEngineAux & aux() const
Definition: PtAssignmentEngine.cc:95
PtAssignmentEngine::readPtLUTFile_
bool readPtLUTFile_
Definition: PtAssignmentEngine.h:57
Common.h
PtLUTReader.h
PtAssignmentEngine::allowedModes_
std::vector< int > allowedModes_
Definition: PtAssignmentEngine.h:50
PtAssignmentEngine::get_pt_lut_version
int get_pt_lut_version() const
Definition: PtAssignmentEngine.h:28
PtAssignmentEngine::read
void read(int pt_lut_version, const std::string &xml_dir)
Definition: PtAssignmentEngine.cc:14
PtAssignmentEngine::bugNegPt_
bool bugNegPt_
Definition: PtAssignmentEngine.h:58
L1TMuonEndCapForest
Definition: L1TMuonEndCapForest.h:15
PtAssignmentEngine::PtAssignmentEngine
PtAssignmentEngine()
Definition: PtAssignmentEngine.cc:6
PtAssignmentEngine::verbose_
int verbose_
Definition: PtAssignmentEngine.h:54
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13