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 
16 
18 public:
19  explicit PtAssignmentEngine();
20  virtual ~PtAssignmentEngine();
21 
23 
24  void read(int pt_lut_version, const std::string& xml_dir);
25  void load(int pt_lut_version, const L1TMuonEndCapForest *payload);
26  const std::array<emtf::Forest, 16>& getForests(void) const { return forests_; }
27  const std::vector<int>& getAllowedModes(void) const { return allowedModes_; }
28 
29  int get_pt_lut_version() const { return ptLUTVersion_; }
30 
31  void configure(
32  int verbose,
33  bool readPtLUTFile, bool fixMode15HighPt,
34  bool bug9BitDPhi, bool bugMode7CLCT, bool bugNegPt
35  );
36 
37  void configure_details();
38 
39  const PtAssignmentEngineAux& aux() const;
40 
41  virtual float scale_pt (const float pt, const int mode = 15) const;
42  virtual float unscale_pt(const float pt, const int mode = 15) const;
43 
44  virtual address_t calculate_address(const EMTFTrack& track) const { return 0; }
45 
46  virtual float calculate_pt(const address_t& address) const;
47  virtual float calculate_pt(const EMTFTrack& track) const;
48 
49  virtual float calculate_pt_lut(const address_t& address) const;
50  virtual float calculate_pt_xml(const address_t& address) const { return 0.; }
51  virtual float calculate_pt_xml(const EMTFTrack& track) const { return 0.; }
52 
53 protected:
54  std::vector<int> allowedModes_;
55  std::array<emtf::Forest, 16> forests_;
57 
58  int verbose_;
59 
60  int ptLUTVersion_; // init: 0xFFFFFFFF
63 };
64 
65 #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)
virtual float calculate_pt_lut(const address_t &address) const
virtual float scale_pt(const float pt, const int mode=15) 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:15
virtual float unscale_pt(const float pt, const int mode=15) const
std::vector< int > allowedModes_
void read(int pt_lut_version, const std::string &xml_dir)