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 
24 #include <memory>
25 
27 public:
28  // Enum class used for determining prediction behaviour in setL1TrackQuality
29  enum class QualityAlgorithm { Cut, GBDT, NN, None };
30 
31  //Default Constructor
33 
34  L1TrackQuality(const edm::ParameterSet& qualityParams);
35 
36  //Default Destructor
37  ~L1TrackQuality() = default;
38 
39  // Controls the conversion between TTTrack features and ML model training features
40  std::vector<float> featureTransform(TTTrack<Ref_Phase2TrackerDigi_>& aTrack,
41  std::vector<std::string> const& featureNames);
42 
43  // Passed by reference a track without MVA filled, method fills the track's MVA field
45 
46  // To set private member data
47  void setCutParameters(std::string const& AlgorithmString,
48  float maxZ0,
49  float maxEta,
50  float chi2dofMax,
51  float bendchi2Max,
52  float minPt,
53  int nStubmin);
54 
55  void setONNXModel(std::string const& AlgorithmString,
58  std::vector<std::string> const& featureNames);
59 
60  void setBonusFeatures(std::vector<float> bonusFeatures);
61 
62 private:
63  // Private Member Data
67  std::vector<std::string> featureNames_;
68  float maxZ0_;
69  float maxEta_;
70  float chi2dofMax_;
71  float bendchi2Max_;
72  float minPt_;
74  bool useHPH_;
75  std::vector<float> bonusFeatures_;
76  std::unique_ptr<cms::Ort::ONNXRuntime> runTime_;
77 };
78 #endif
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_
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::vector< float > bonusFeatures_
std::unique_ptr< cms::Ort::ONNXRuntime > runTime_
std::vector< std::string > featureNames_
edm::FileInPath ONNXmodel_
std::string ONNXInputName_
void setBonusFeatures(std::vector< float > bonusFeatures)
~L1TrackQuality()=default