CMS 3D CMS Logo

AlgoSettings.cc
Go to the documentation of this file.
2 
3 namespace l1tVertexFinder {
4 
6 
8  : vertex_(iConfig.getParameter<edm::ParameterSet>("VertexReconstruction")),
9  vx_distance_(vertex_.getParameter<double>("VertexDistance")),
10  vx_resolution_(vertex_.getParameter<double>("VertexResolution")),
11  vx_distanceType_(vertex_.getParameter<unsigned int>("DistanceType")),
12  vx_minTracks_(vertex_.getParameter<unsigned int>("MinTracks")),
13  vx_weightedmean_(vertex_.getParameter<unsigned int>("WeightedMean")),
14  vx_chi2cut_(vertex_.getParameter<double>("AVR_chi2cut")),
15  vx_DoPtComp_(vertex_.getParameter<bool>("FH_DoPtComp")),
16  vx_DoTightChi2_(vertex_.getParameter<bool>("FH_DoTightChi2")),
17  vx_histogram_parameters_(vertex_.getParameter<std::vector<double> >("FH_HistogramParameters")),
18  vx_nvtx_(vertex_.getParameter<unsigned int>("FH_NVtx")),
19  vx_width_(vertex_.getParameter<double>("FH_VertexWidth")),
20  vx_windowSize_(vertex_.getParameter<unsigned int>("FH_WindowSize")),
21  vx_TrackMinPt_(vertex_.getParameter<double>("VxMinTrackPt")),
22  vx_TrackMaxPt_(vertex_.getParameter<double>("VxMaxTrackPt")),
23  vx_TrackMaxPtBehavior_(vertex_.getParameter<int>("VxMaxTrackPtBehavior")),
24  vx_TrackMaxChi2_(vertex_.getParameter<double>("VxMaxTrackChi2")),
25  vx_NStubMin_(vertex_.getParameter<unsigned int>("VxMinNStub")),
26  vx_NStubPSMin_(vertex_.getParameter<unsigned int>("VxMinNStubPS")),
27  vx_dbscan_pt_(vertex_.getParameter<double>("DBSCANPtThreshold")),
28  vx_dbscan_mintracks_(vertex_.getParameter<unsigned int>("DBSCANMinDensityTracks")),
29  vx_kmeans_iterations_(vertex_.getParameter<unsigned int>("KmeansIterations")),
30  vx_kmeans_nclusters_(vertex_.getParameter<unsigned int>("KmeansNumClusters")),
31  // Debug printout
32  debug_(iConfig.getParameter<unsigned int>("debug")) {
34  const auto algoMapIt = algoNameMap.find(algoName);
35  if (algoMapIt != algoNameMap.end())
36  vx_algo_ = algoMapIt->second;
37  else {
38  std::ostringstream validAlgoNames;
39  for (auto it = algoNameMap.begin(); it != algoNameMap.end(); it++) {
40  validAlgoNames << '"' << it->first << '"';
41  if (it != (--algoNameMap.end()))
42  validAlgoNames << ", ";
43  }
44  throw cms::Exception("Invalid algo name '" + algoName +
45  "' specified for L1T vertex producer. Valid algo names are: " + validAlgoNames.str());
46  }
47  }
48 
49  const std::map<std::string, Algorithm> AlgoSettings::algoNameMap = {
50  {"FastHisto", Algorithm::FastHisto},
51  {"FastHistoLooseAssociation", Algorithm::FastHistoLooseAssociation},
52  {"GapClustering", Algorithm::GapClustering},
53  {"Agglomerative", Algorithm::AgglomerativeHierarchical},
54  {"DBSCAN", Algorithm::DBSCAN},
55  {"PVR", Algorithm::PVR},
56  {"Adaptive", Algorithm::AdaptiveVertexReconstruction},
57  {"HPV", Algorithm::HPV},
58  {"K-means", Algorithm::Kmeans}};
59 
60 } // end namespace l1tVertexFinder
l1tVertexFinder
Definition: AlgoSettings.h:10
l1tVertexFinder::AlgoSettings::AlgoSettings
AlgoSettings(const edm::ParameterSet &iConfig)
=== Get configuration parameters
Definition: AlgoSettings.cc:7
l1tVertexFinder::AlgoSettings::vertex_
edm::ParameterSet vertex_
Definition: AlgoSettings.h:87
electrons_cff.bool
bool
Definition: electrons_cff.py:366
edm
HLT enums.
Definition: AlignableModifier.h:19
MillePedeAlignmentAlgorithm_cfi.algoName
algoName
Definition: MillePedeAlignmentAlgorithm_cfi.py:10
edm::ParameterSet
Definition: ParameterSet.h:47
AlgoSettings.h
ParameterSet
Definition: Functions.h:16
createfilelist.int
int
Definition: createfilelist.py:10
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
l1tVertexFinder::AlgoSettings::algoNameMap
static const std::map< std::string, Algorithm > algoNameMap
Definition: AlgoSettings.h:84
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
std
Definition: JetResolutionObject.h:76
l1tVertexFinder::AlgoSettings::vx_algo_
Algorithm vx_algo_
Definition: AlgoSettings.h:90
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303