CMS 3D CMS Logo

List of all members | Static Public Member Functions
StripClusterizerAlgorithmFactory Class Reference

#include <StripClusterizerAlgorithmFactory.h>

Static Public Member Functions

static std::unique_ptr< StripClusterizerAlgorithmcreate (edm::ConsumesCollector &&, const edm::ParameterSet &)
 
static void fillDescriptions (edm::ParameterSetDescription &clusterizer)
 

Detailed Description

Definition at line 13 of file StripClusterizerAlgorithmFactory.h.

Member Function Documentation

◆ create()

std::unique_ptr< StripClusterizerAlgorithm > StripClusterizerAlgorithmFactory::create ( edm::ConsumesCollector &&  iC,
const edm::ParameterSet conf 
)
static

Definition at line 9 of file StripClusterizerAlgorithmFactory.cc.

References qcdUeDQM_cfi::algorithm, clusterChargeCut(), Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and mitigatedMETSequence_cff::U.

10  {
11  std::string algorithm = conf.getParameter<std::string>("Algorithm");
12 
13  if (algorithm == "ThreeThresholdAlgorithm") {
14  return std::unique_ptr<StripClusterizerAlgorithm>(new ThreeThresholdAlgorithm(
16  edm::ESInputTag{"", conf.getParameter<std::string>("ConditionsLabel")}),
17  conf.getParameter<double>("ChannelThreshold"),
18  conf.getParameter<double>("SeedThreshold"),
19  conf.getParameter<double>("ClusterThreshold"),
20  conf.getParameter<unsigned>("MaxSequentialHoles"),
21  conf.getParameter<unsigned>("MaxSequentialBad"),
22  conf.getParameter<unsigned>("MaxAdjacentBad"),
23  // existsAs test should be removed once MaxClusterSize is in the HLT config
24  conf.existsAs<unsigned>("MaxClusterSize") ? conf.getParameter<unsigned>("MaxClusterSize") : 3U * 256U,
25  conf.getParameter<bool>("RemoveApvShots"),
26  clusterChargeCut(conf)));
27  }
28 
29  if (algorithm == "OldThreeThresholdAlgorithm") {
30  throw cms::Exception("[StripClusterizerAlgorithmFactory] obsolete") << algorithm << " Obsolete since 7_3_0";
31  }
32 
33  throw cms::Exception("[StripClusterizerAlgorithmFactory] Unregistered Algorithm")
34  << algorithm << " is not a registered StripClusterizerAlgorithm";
35 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:172

◆ fillDescriptions()

void StripClusterizerAlgorithmFactory::fillDescriptions ( edm::ParameterSetDescription clusterizer)
static

Definition at line 37 of file StripClusterizerAlgorithmFactory.cc.

References HLT_2023v12_cff::clusterizer, getConfigurationDescription4CCC(), CCC::kNone, AlCaHLTBitMon_QueryRunRegistry::string, and mitigatedMETSequence_cff::U.

Referenced by SiStripClusterizerFromRawGPU::fillDescriptions(), and SiStripClusterizerFromRaw::fillDescriptions().

37  {
38  clusterizer.add<std::string>("Algorithm", "ThreeThresholdAlgorithm");
39  clusterizer.add<std::string>("ConditionsLabel", "");
40  clusterizer.add("ChannelThreshold", 2.0);
41  clusterizer.add("SeedThreshold", 3.0);
42  clusterizer.add("ClusterThreshold", 5.0);
43  clusterizer.add("MaxSequentialHoles", 0U);
44  clusterizer.add("MaxSequentialBad", 1U);
45  clusterizer.add("MaxAdjacentBad", 0U);
46  clusterizer.addOptional("MaxClusterSize", 3U * 256U); // eventually should be add()
47  clusterizer.add("RemoveApvShots", true);
48  clusterizer.add("setDetId", true);
49  clusterizer.add("clusterChargeCut", getConfigurationDescription4CCC(CCC::kNone));
50 }
edm::ParameterSetDescription getConfigurationDescription4CCC(const CCC::OP &op)