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(const std::string& xml_dir);
25  void load(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  void configure(
30  int verbose,
31  int ptLUTVersion, bool readPtLUTFile, bool fixMode15HighPt,
32  bool bug9BitDPhi, bool bugMode7CLCT, bool bugNegPt
33  );
34 
35  void configure_details();
36 
37  const PtAssignmentEngineAux& aux() const;
38 
39  virtual float scale_pt (const float pt, const int mode = 15) const;
40  virtual float unscale_pt(const float pt, const int mode = 15) const;
41 
42  virtual address_t calculate_address(const EMTFTrack& track) const { return 0; }
43 
44  virtual float calculate_pt(const address_t& address) const;
45  virtual float calculate_pt(const EMTFTrack& track) const;
46 
47  virtual float calculate_pt_lut(const address_t& address) const;
48  virtual float calculate_pt_xml(const address_t& address) const { return 0.; }
49  virtual float calculate_pt_xml(const EMTFTrack& track) const { return 0.; }
50 
51  inline int readPtLUTFile() { return readPtLUTFile_; }
52  inline void set_ptLUTVersion( int ptLUTVersion ) { ptLUTVersion_ = ptLUTVersion; }
53 
54 protected:
55  std::vector<int> allowedModes_;
56  std::array<emtf::Forest, 16> forests_;
58 
59  int verbose_;
60 
64 };
65 
66 #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 load(const L1TMuonEndCapForest *payload)
void configure(int verbose, int ptLUTVersion, bool readPtLUTFile, bool fixMode15HighPt, bool bug9BitDPhi, bool bugMode7CLCT, bool bugNegPt)
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
std::array< emtf::Forest, 16 > forests_
unsigned long long uint64_t
Definition: Time.h:15
void read(const std::string &xml_dir)
virtual float unscale_pt(const float pt, const int mode=15) const
std::vector< int > allowedModes_
void set_ptLUTVersion(int ptLUTVersion)