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 
8 
9 std::auto_ptr<StripClusterizerAlgorithm> StripClusterizerAlgorithmFactory::
11  std::string algorithm = conf.getParameter<std::string>("Algorithm");
12 
13  bool setDetId=false;
14  if (conf.exists("setDetId"))
15  setDetId = conf.getParameter<bool>("setDetId");
16  if(algorithm == "ThreeThresholdAlgorithm") {
17  return std::auto_ptr<StripClusterizerAlgorithm>(
19  conf.getParameter<double>("ChannelThreshold"),
20  conf.getParameter<double>("SeedThreshold"),
21  conf.getParameter<double>("ClusterThreshold"),
22  conf.getParameter<unsigned>("MaxSequentialHoles"),
23  conf.getParameter<unsigned>("MaxSequentialBad"),
24  conf.getParameter<unsigned>("MaxAdjacentBad"),
25  conf.getParameter<std::string>("QualityLabel"),
26  setDetId,
27  conf.getParameter<bool>("RemoveApvShots"),
28  clusterChargeCut(conf)
29  ));
30  }
31 
32  if(algorithm == "OldThreeThresholdAlgorithm") {
33  return std::auto_ptr<StripClusterizerAlgorithm>(
35  conf.getParameter<double>("ChannelThreshold"),
36  conf.getParameter<double>("SeedThreshold"),
37  conf.getParameter<double>("ClusterThreshold"),
38  conf.getParameter<unsigned>("MaxSequentialHoles"),
39  conf.getParameter<std::string>("QualityLabel"),
40  setDetId));
41  }
42 
43  throw cms::Exception("[StripClusterizerAlgorithmFactory] Unregistered Algorithm")
44  << algorithm << " is not a registered StripClusterizerAlgorithm";
45 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
static std::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
tuple conf
Definition: dbtoconf.py:185