CMS 3D CMS Logo

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

#include <SiStripRawProcessingFactory.h>

Static Public Member Functions

static std::unique_ptr< SiStripRawProcessingAlgorithmscreate (const edm::ParameterSet &, edm::ConsumesCollector)
 
static std::unique_ptr< SiStripAPVRestorercreate_Restorer (const edm::ParameterSet &, edm::ConsumesCollector)
 
static std::unique_ptr< SiStripCommonModeNoiseSubtractorcreate_SubtractorCMN (const edm::ParameterSet &, edm::ConsumesCollector)
 
static std::unique_ptr< SiStripPedestalsSubtractorcreate_SubtractorPed (const edm::ParameterSet &, edm::ConsumesCollector)
 
static std::unique_ptr< SiStripFedZeroSuppressioncreate_Suppressor (const edm::ParameterSet &, edm::ConsumesCollector)
 
static void fillDescriptions (edm::ParameterSetDescription &algorithms)
 

Detailed Description

Definition at line 16 of file SiStripRawProcessingFactory.h.

Member Function Documentation

◆ create()

std::unique_ptr< SiStripRawProcessingAlgorithms > SiStripRawProcessingFactory::create ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)
static

Definition at line 17 of file SiStripRawProcessingFactory.cc.

References create_Restorer(), create_SubtractorCMN(), create_SubtractorPed(), create_Suppressor(), and edm::ParameterSet::getParameter().

18  {
19  return std::unique_ptr<SiStripRawProcessingAlgorithms>(
21  create_SubtractorPed(conf, iC),
22  create_SubtractorCMN(conf, iC),
23  create_Suppressor(conf, iC),
24  create_Restorer(conf, iC),
25  conf.getParameter<bool>("doAPVRestore"),
26  conf.getParameter<bool>("useCMMeanMap")));
27 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static std::unique_ptr< SiStripFedZeroSuppression > create_Suppressor(const edm::ParameterSet &, edm::ConsumesCollector)
static std::unique_ptr< SiStripAPVRestorer > create_Restorer(const edm::ParameterSet &, edm::ConsumesCollector)
static std::unique_ptr< SiStripCommonModeNoiseSubtractor > create_SubtractorCMN(const edm::ParameterSet &, edm::ConsumesCollector)
static std::unique_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &, edm::ConsumesCollector)

◆ create_Restorer()

std::unique_ptr< SiStripAPVRestorer > SiStripRawProcessingFactory::create_Restorer ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)
static

Definition at line 83 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::exists().

Referenced by create().

84  {
85  if (!conf.exists("APVRestoreMode")) {
86  return std::unique_ptr<SiStripAPVRestorer>(nullptr);
87  } else {
88  return std::unique_ptr<SiStripAPVRestorer>(new SiStripAPVRestorer(conf, iC));
89  }
90 }
bool exists(std::string const &parameterName) const
checks if a parameter exists

◆ create_SubtractorCMN()

std::unique_ptr< SiStripCommonModeNoiseSubtractor > SiStripRawProcessingFactory::create_SubtractorCMN ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)
static

Definition at line 35 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by create().

36  {
37  const std::string mode = conf.getParameter<std::string>("CommonModeNoiseSubtractionMode");
38 
39  if (mode == "Median")
40  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new MedianCMNSubtractor());
41 
42  if (mode == "Percentile") {
43  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(
44  new PercentileCMNSubtractor(conf.getParameter<double>("Percentile")));
45  }
46 
47  if (mode == "IteratedMedian") {
48  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new IteratedMedianCMNSubtractor(
49  conf.getParameter<double>("CutToAvoidSignal"), conf.getParameter<int>("Iterations"), iC));
50  }
51 
52  if (mode == "FastLinear")
53  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new FastLinearCMNSubtractor());
54 
55  if (mode == "TT6") {
56  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(
57  new TT6CMNSubtractor(conf.getParameter<double>("CutToAvoidSignal"), iC));
58  }
59 
60  edm::LogError("SiStripRawProcessingFactory::create_SubtractorCMN")
61  << "Unregistered Algorithm: " << mode << ". Use one of {Median, Percentile, IteratedMedian, FastLinear, TT6}";
62  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new MedianCMNSubtractor());
63 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Log< level::Error, false > LogError

◆ create_SubtractorPed()

std::unique_ptr< SiStripPedestalsSubtractor > SiStripRawProcessingFactory::create_SubtractorPed ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)
static

Definition at line 29 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

Referenced by create().

30  {
31  return std::unique_ptr<SiStripPedestalsSubtractor>(
32  new SiStripPedestalsSubtractor(conf.getParameter<bool>("PedestalSubtractionFedMode"), iC));
33 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307

◆ create_Suppressor()

std::unique_ptr< SiStripFedZeroSuppression > SiStripRawProcessingFactory::create_Suppressor ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)
static

Definition at line 65 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, and pileupReCalc_HLTpaths::trunc.

Referenced by create().

66  {
67  const uint32_t mode = conf.getParameter<uint32_t>("SiStripFedZeroSuppressionMode");
68  const bool trunc = conf.getParameter<bool>("TruncateInSuppressor");
69  const bool trunc10bits = conf.getParameter<bool>("Use10bitsTruncation");
70  switch (mode) {
71  case 1:
72  case 2:
73  case 3:
74  case 4:
75  return std::make_unique<SiStripFedZeroSuppression>(mode, &iC, trunc, trunc10bits);
76  default:
77  edm::LogError("SiStripRawProcessingFactory::createSuppressor")
78  << "Unregistered mode: " << mode << ". Use one of {1,2,3,4}.";
79  return std::make_unique<SiStripFedZeroSuppression>(4, &iC, true, trunc10bits);
80  }
81 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Log< level::Error, false > LogError

◆ fillDescriptions()

void SiStripRawProcessingFactory::fillDescriptions ( edm::ParameterSetDescription algorithms)
static

Definition at line 92 of file SiStripRawProcessingFactory.cc.

References ppsStraightTrackAligner_cfi::algorithms, SiStripAPVRestorer::fillDescriptions(), AlCaHLTBitMon_QueryRunRegistry::string, and mitigatedMETSequence_cff::U.

Referenced by SiStripClusterizerFromRaw::fillDescriptions().

92  {
93  algorithms.add<std::string>("CommonModeNoiseSubtractionMode", "Median");
94  algorithms.add("useCMMeanMap", false);
95  algorithms.add("TruncateInSuppressor", true);
96  algorithms.add("doAPVRestore", false);
97  algorithms.add("SiStripFedZeroSuppressionMode", 4U);
98  algorithms.add("PedestalSubtractionFedMode", true);
99  algorithms.add("Use10bitsTruncation", false);
100  algorithms.add("Percentile", 25.0);
101  algorithms.add("CutToAvoidSignal", 2.0);
102  algorithms.add("Iterations", 3);
104 }
static void fillDescriptions(edm::ParameterSetDescription &desc)