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)
 

Detailed Description

Definition at line 15 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 16 of file SiStripRawProcessingFactory.cc.

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

17  {
18  return std::unique_ptr<SiStripRawProcessingAlgorithms>(
20  create_SubtractorPed(conf, iC),
21  create_SubtractorCMN(conf, iC),
22  create_Suppressor(conf, iC),
23  create_Restorer(conf, iC),
24  conf.getParameter<bool>("doAPVRestore"),
25  conf.getParameter<bool>("useCMMeanMap")));
26 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 82 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::exists().

Referenced by create().

83  {
84  if (!conf.exists("APVRestoreMode")) {
85  return std::unique_ptr<SiStripAPVRestorer>(nullptr);
86  } else {
87  return std::unique_ptr<SiStripAPVRestorer>(new SiStripAPVRestorer(conf, iC));
88  }
89 }
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 34 of file SiStripRawProcessingFactory.cc.

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

Referenced by create().

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

References edm::ParameterSet::getParameter().

Referenced by create().

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

◆ create_Suppressor()

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

Definition at line 64 of file SiStripRawProcessingFactory.cc.

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

Referenced by create().

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