CMS 3D CMS Logo

L1TrackQuality.h
Go to the documentation of this file.
1 /*
2 Track Quality Header file
3 
4 C.Brown 28/07/20
5 */
6 
7 #ifndef L1Trigger_TrackTrigger_interface_L1TrackQuality_h
8 #define L1Trigger_TrackTrigger_interface_L1TrackQuality_h
9 
10 #include <iostream>
11 #include <set>
12 #include <vector>
13 #include <memory>
14 #include <string>
15 
25 #include <memory>
26 
28 public:
29  // Enum class used for determining prediction behaviour in setL1TrackQuality
30  enum class QualityAlgorithm { Cut, GBDT, NN, None };
31 
32  //Default Constructor
34 
35  L1TrackQuality(const edm::ParameterSet& qualityParams);
36 
37  //Default Destructor
38  ~L1TrackQuality() = default;
39 
40  // Controls the conversion between TTTrack features and ML model training features
41  std::vector<float> featureTransform(TTTrack<Ref_Phase2TrackerDigi_>& aTrack,
42  std::vector<std::string> const& featureNames);
43 
44  // Passed by reference a track without MVA filled, method fills the track's MVA field
46 
47  // To set private member data
48  void setCutParameters(std::string const& AlgorithmString,
49  float maxZ0,
50  float maxEta,
51  float chi2dofMax,
52  float bendchi2Max,
53  float minPt,
54  int nStubmin);
55 
56  void setONNXModel(std::string const& AlgorithmString,
59  std::vector<std::string> const& featureNames);
60 
61  void beginRun(const hph::Setup* setup);
62 
63 private:
64  // Private Member Data
68  std::vector<std::string> featureNames_;
69  float maxZ0_;
70  float maxEta_;
71  float chi2dofMax_;
72  float bendchi2Max_;
73  float minPt_;
76  bool useHPH_;
77  std::unique_ptr<cms::Ort::ONNXRuntime> runTime_;
78 };
79 #endif
const hph::Setup * setupHPH_
void setL1TrackQuality(TTTrack< Ref_Phase2TrackerDigi_ > &aTrack)
void setCutParameters(std::string const &AlgorithmString, float maxZ0, float maxEta, float chi2dofMax, float bendchi2Max, float minPt, int nStubmin)
minPt
Definition: PV_cfg.py:223
void setONNXModel(std::string const &AlgorithmString, edm::FileInPath const &ONNXmodel, std::string const &ONNXInputName, std::vector< std::string > const &featureNames)
QualityAlgorithm qualityAlgorithm_
void beginRun(const hph::Setup *setup)
std::vector< float > featureTransform(TTTrack< Ref_Phase2TrackerDigi_ > &aTrack, std::vector< std::string > const &featureNames)
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
std::unique_ptr< cms::Ort::ONNXRuntime > runTime_
std::vector< std::string > featureNames_
edm::FileInPath ONNXmodel_
std::string ONNXInputName_
~L1TrackQuality()=default