CMS 3D CMS Logo

AlgoSettings.h
Go to the documentation of this file.
1 #ifndef __L1Trigger_VertexFinder_AlgoSettings_h__
2 #define __L1Trigger_VertexFinder_AlgoSettings_h__
3 
4 #include <vector>
5 #include <string>
6 
10 
11 namespace l1tVertexFinder {
12 
13  enum class Algorithm {
14  fastHisto,
19  DBSCAN,
20  PVR,
22  HPV,
23  Kmeans,
25  };
26 
27  enum class Precision { Simulation, Emulation };
28 
29  class AlgoSettings {
30  public:
31  AlgoSettings(const edm::ParameterSet& iConfig);
33 
34  //=== Vertex Reconstruction configuration
35  // Vertex Reconstruction algo
36  Algorithm vx_algo() const { return vx_algo_; }
37  Precision vx_precision() const { return vx_precision_; }
38  // For agglomerative cluster algorithm, select a definition of distance between clusters
39  unsigned int vx_distanceType() const { return vx_distanceType_; }
40  // Assumed Vertex Distance
41  float vx_distance() const { return vx_distance_; }
42  // Assumed Vertex Resolution
43  float vx_resolution() const { return vx_resolution_; }
44  // Minimum number of tracks to accept vertex
45  unsigned int vx_minTracks() const { return vx_minTracks_; }
46  // Compute the z0 position of the vertex with a mean weighted with track momenta
47  unsigned int vx_weightedmean() const { return vx_weightedmean_; }
48  // Chi2 cut for the adaptive Vertex Recostruction Algorithm
49  float vx_chi2cut() const { return vx_chi2cut_; }
50  // Do track quality cuts in emulation algorithms
51  bool vx_DoQualityCuts() const { return vx_DoQualityCuts_; }
52  // Window size of the sliding window
53  unsigned int vx_windowSize() const { return vx_windowSize_; }
54  // fastHisto histogram parameters (min, max, width)
55  std::vector<double> vx_histogram_parameters() const { return vx_histogram_parameters_; }
56  double vx_histogram_min() const { return vx_histogram_parameters_.at(0); }
57  double vx_histogram_max() const { return vx_histogram_parameters_.at(1); }
58  double vx_histogram_binwidth() const { return vx_histogram_parameters_.at(2); }
59  int vx_histogram_numbins() const {
61  }
62  // fastHisto assumed vertex width
63  float vx_width() const { return vx_width_; }
64  // fastHisto track selection control
65  bool vx_DoPtComp() const { return vx_DoPtComp_; }
66  bool vx_DoTightChi2() const { return vx_DoTightChi2_; }
67  // Number of vertices to return for fastHisto
68  unsigned int vx_nvtx() const { return vx_nvtx_; }
69  float vx_dbscan_pt() const { return vx_dbscan_pt_; }
70  unsigned int vx_dbscan_mintracks() const { return vx_dbscan_mintracks_; }
71 
72  unsigned int vx_kmeans_iterations() const { return vx_kmeans_iterations_; }
73  unsigned int vx_kmeans_nclusters() const { return vx_kmeans_nclusters_; }
74  float vx_TrackMinPt() const { return vx_TrackMinPt_; }
75  float vx_TrackMaxPt() const { return vx_TrackMaxPt_; }
77  float vx_TrackMaxChi2() const { return vx_TrackMaxChi2_; }
78  unsigned int vx_NStubMin() const { return vx_NStubMin_; }
79  unsigned int vx_NStubPSMin() const { return vx_NStubPSMin_; }
80 
81  // Functions for NN:
84 
85  //=== Debug printout
86  unsigned int debug() const { return debug_; }
87 
88  //=== Hard-wired constants
89  // EJC Check this. Found stub at r = 109.504 with flat geometry in 81X, so increased tracker radius for now.
90  double trackerOuterRadius() const { return 120.2; } // max. occuring stub radius.
91  // EJC Check this. Found stub at r = 20.664 with flat geometry in 81X, so decreased tracker radius for now.
92  double trackerInnerRadius() const { return 20; } // min. occuring stub radius.
93  double trackerHalfLength() const { return 270.; } // half-length of tracker.
94  double layerIDfromRadiusBin() const {
95  return 6.;
96  } // When counting stubs in layers, actually histogram stubs in distance from beam-line with this bin size.
97 
98  private:
99  static const std::map<std::string, Algorithm> algoNameMap;
100  static const std::map<Algorithm, Precision> algoPrecisionMap;
101 
102  // Parameter sets for differents types of configuration parameter.
104 
105  // Vertex Reconstruction configuration
110  unsigned int vx_distanceType_;
111  unsigned int vx_minTracks_;
112  unsigned int vx_weightedmean_;
113  float vx_chi2cut_;
117  std::vector<double> vx_histogram_parameters_;
118  unsigned int vx_nvtx_;
119  float vx_width_;
120  unsigned int vx_windowSize_;
125  unsigned int vx_NStubMin_;
126  unsigned int vx_NStubPSMin_;
129  unsigned int vx_kmeans_iterations_;
130  unsigned int vx_kmeans_nclusters_;
131  edm::FileInPath vx_trkw_graph_; //For NNVtx (TrackWeight)
132  edm::FileInPath vx_pattrec_graph_; //For NNVtx (PatternRec)
133  // Debug printout
134  unsigned int debug_;
135  };
136 
137 } // end namespace l1tVertexFinder
138 
139 #endif
std::vector< double > vx_histogram_parameters_
Definition: AlgoSettings.h:117
double trackerInnerRadius() const
Definition: AlgoSettings.h:92
float vx_TrackMaxPtBehavior() const
Definition: AlgoSettings.h:76
double trackerOuterRadius() const
Definition: AlgoSettings.h:90
double trackerHalfLength() const
Definition: AlgoSettings.h:93
std::string fullPath() const
Definition: FileInPath.cc:161
unsigned int vx_NStubPSMin() const
Definition: AlgoSettings.h:79
unsigned int vx_dbscan_mintracks() const
Definition: AlgoSettings.h:70
double layerIDfromRadiusBin() const
Definition: AlgoSettings.h:94
edm::FileInPath vx_pattrec_graph_
Definition: AlgoSettings.h:132
static const std::map< Algorithm, Precision > algoPrecisionMap
Definition: AlgoSettings.h:100
unsigned int vx_kmeans_nclusters() const
Definition: AlgoSettings.h:73
unsigned int debug() const
Definition: AlgoSettings.h:86
unsigned int vx_weightedmean() const
Definition: AlgoSettings.h:47
double vx_histogram_binwidth() const
Definition: AlgoSettings.h:58
std::string vx_trkw_graph() const
Definition: AlgoSettings.h:82
std::string vx_pattrec_graph() const
Definition: AlgoSettings.h:83
AlgoSettings(const edm::ParameterSet &iConfig)
=== Get configuration parameters
Definition: AlgoSettings.cc:7
unsigned int vx_NStubMin() const
Definition: AlgoSettings.h:78
Precision vx_precision() const
Definition: AlgoSettings.h:37
double vx_histogram_min() const
Definition: AlgoSettings.h:56
double vx_histogram_max() const
Definition: AlgoSettings.h:57
unsigned int vx_kmeans_iterations() const
Definition: AlgoSettings.h:72
std::vector< double > vx_histogram_parameters() const
Definition: AlgoSettings.h:55
unsigned int vx_distanceType() const
Definition: AlgoSettings.h:39
unsigned int vx_minTracks() const
Definition: AlgoSettings.h:45
Algorithm vx_algo() const
Definition: AlgoSettings.h:36
unsigned int vx_windowSize() const
Definition: AlgoSettings.h:53
edm::FileInPath vx_trkw_graph_
Definition: AlgoSettings.h:131
unsigned int vx_nvtx() const
Definition: AlgoSettings.h:68
static const std::map< std::string, Algorithm > algoNameMap
Definition: AlgoSettings.h:99