CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StripClusterizerAlgorithmFactory.cc
Go to the documentation of this file.
2 
7 
8 std::auto_ptr<StripClusterizerAlgorithm> StripClusterizerAlgorithmFactory::
10  std::string algorithm = conf.getParameter<std::string>("Algorithm");
11 
12  bool setDetId=false;
13  if (conf.exists("setDetId"))
14  setDetId = conf.getParameter<bool>("setDetId");
15  if(algorithm == "ThreeThresholdAlgorithm") {
16  return std::auto_ptr<StripClusterizerAlgorithm>(
18  conf.getParameter<double>("ChannelThreshold"),
19  conf.getParameter<double>("SeedThreshold"),
20  conf.getParameter<double>("ClusterThreshold"),
21  conf.getParameter<unsigned>("MaxSequentialHoles"),
22  conf.getParameter<unsigned>("MaxSequentialBad"),
23  conf.getParameter<unsigned>("MaxAdjacentBad"),
24  conf.getParameter<std::string>("QualityLabel"),
25  setDetId,
26  conf.getParameter<bool>("RemoveApvShots"),
27  conf.existsAs<double>("minGoodCharge") ? conf.getParameter<double>("minGoodCharge") : -2069.
28  ));
29  }
30 
31  if(algorithm == "OldThreeThresholdAlgorithm") {
32  return std::auto_ptr<StripClusterizerAlgorithm>(
34  conf.getParameter<double>("ChannelThreshold"),
35  conf.getParameter<double>("SeedThreshold"),
36  conf.getParameter<double>("ClusterThreshold"),
37  conf.getParameter<unsigned>("MaxSequentialHoles"),
38  conf.getParameter<std::string>("QualityLabel"),
39  setDetId));
40  }
41 
42  throw cms::Exception("[StripClusterizerAlgorithmFactory] Unregistered Algorithm")
43  << algorithm << " is not a registered StripClusterizerAlgorithm";
44 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
bool exists(std::string const &parameterName) const
checks if a parameter exists
static std::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
tuple conf
Definition: dbtoconf.py:185