CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
const std::array< emtf::Forest, 16 > & getForests(void) const
virtual address_t calculate_address(const EMTFTrack &track) const
virtual float calculate_pt_xml(const address_t &address) const
virtual float calculate_pt(const address_t &address) const
const std::vector< int > & getAllowedModes(void) const
const PtAssignmentEngineAux & aux() const
void configure(int verbose, bool readPtLUTFile, bool fixMode15HighPt, bool bug9BitDPhi, bool bugMode7CLCT, bool bugNegPt)
void load(int pt_lut_version, const L1TMuonEndCapForest *payload)
static constexpr int verbose
virtual float scale_pt(const float pt, const int mode=15) const =0
virtual float calculate_pt_lut(const address_t &address) const
virtual float calculate_pt_xml(const EMTFTrack &track) const
int get_pt_lut_version() const
std::array< emtf::Forest, 16 > forests_
unsigned long long uint64_t
Definition: Time.h:13
virtual float unscale_pt(const float pt, const int mode=15) const =0
std::vector< int > allowedModes_
void read(int pt_lut_version, const std::string &xml_dir)