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