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 &)
 
static std::unique_ptr< SiStripAPVRestorercreate_Restorer (const edm::ParameterSet &)
 
static std::unique_ptr< SiStripCommonModeNoiseSubtractorcreate_SubtractorCMN (const edm::ParameterSet &)
 
static std::unique_ptr< SiStripPedestalsSubtractorcreate_SubtractorPed (const edm::ParameterSet &)
 
static std::unique_ptr< SiStripFedZeroSuppressioncreate_Suppressor (const edm::ParameterSet &)
 

Detailed Description

Definition at line 14 of file SiStripRawProcessingFactory.h.

Member Function Documentation

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

Definition at line 13 of file SiStripRawProcessingFactory.cc.

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

13  {
14  return std::unique_ptr<SiStripRawProcessingAlgorithms>(
17  create_Suppressor(conf),
18  create_Restorer(conf),
19  conf.getParameter<bool>("doAPVRestore"),
20  conf.getParameter<bool>("useCMMeanMap")));
21 }
T getParameter(std::string const &) const
static std::unique_ptr< SiStripAPVRestorer > create_Restorer(const edm::ParameterSet &)
static std::unique_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &)
static std::unique_ptr< SiStripFedZeroSuppression > create_Suppressor(const edm::ParameterSet &)
static std::unique_ptr< SiStripCommonModeNoiseSubtractor > create_SubtractorCMN(const edm::ParameterSet &)
std::unique_ptr< SiStripAPVRestorer > SiStripRawProcessingFactory::create_Restorer ( const edm::ParameterSet conf)
static

Definition at line 77 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::exists().

Referenced by create().

77  {
78  if (!conf.exists("APVRestoreMode")) {
79  return std::unique_ptr<SiStripAPVRestorer>(nullptr);
80  } else {
81  return std::unique_ptr<SiStripAPVRestorer>(new SiStripAPVRestorer(conf));
82  }
83 }
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::unique_ptr< SiStripCommonModeNoiseSubtractor > SiStripRawProcessingFactory::create_SubtractorCMN ( const edm::ParameterSet conf)
static

Definition at line 29 of file SiStripRawProcessingFactory.cc.

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

Referenced by create(), and SiStripProcessedRawDigiProducer::SiStripProcessedRawDigiProducer().

30  {
31  const std::string mode = conf.getParameter<std::string>("CommonModeNoiseSubtractionMode");
32 
33  if (mode == "Median")
34  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new MedianCMNSubtractor());
35 
36  if (mode == "Percentile") {
37  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(
38  new PercentileCMNSubtractor(conf.getParameter<double>("Percentile")));
39  }
40 
41  if (mode == "IteratedMedian") {
42  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new IteratedMedianCMNSubtractor(
43  conf.getParameter<double>("CutToAvoidSignal"), conf.getParameter<int>("Iterations")));
44  }
45 
46  if (mode == "FastLinear")
47  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new FastLinearCMNSubtractor());
48 
49  if (mode == "TT6") {
50  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(
51  new TT6CMNSubtractor(conf.getParameter<double>("CutToAvoidSignal")));
52  }
53 
54  edm::LogError("SiStripRawProcessingFactory::create_SubtractorCMN")
55  << "Unregistered Algorithm: " << mode << ". Use one of {Median, Percentile, IteratedMedian, FastLinear, TT6}";
56  return std::unique_ptr<SiStripCommonModeNoiseSubtractor>(new MedianCMNSubtractor());
57 }
T getParameter(std::string const &) const
std::unique_ptr< SiStripPedestalsSubtractor > SiStripRawProcessingFactory::create_SubtractorPed ( const edm::ParameterSet conf)
static

Definition at line 23 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

Referenced by create(), and SiStripProcessedRawDigiProducer::SiStripProcessedRawDigiProducer().

24  {
25  return std::unique_ptr<SiStripPedestalsSubtractor>(
26  new SiStripPedestalsSubtractor(conf.getParameter<bool>("PedestalSubtractionFedMode")));
27 }
T getParameter(std::string const &) const
std::unique_ptr< SiStripFedZeroSuppression > SiStripRawProcessingFactory::create_Suppressor ( const edm::ParameterSet conf)
static

Definition at line 59 of file SiStripRawProcessingFactory.cc.

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

Referenced by create().

60  {
61  const uint32_t mode = conf.getParameter<uint32_t>("SiStripFedZeroSuppressionMode");
62  const bool trunc = conf.getParameter<bool>("TruncateInSuppressor");
63  const bool trunc10bits = conf.getParameter<bool>("Use10bitsTruncation");
64  switch (mode) {
65  case 1:
66  case 2:
67  case 3:
68  case 4:
69  return std::unique_ptr<SiStripFedZeroSuppression>(new SiStripFedZeroSuppression(mode, trunc, trunc10bits));
70  default:
71  edm::LogError("SiStripRawProcessingFactory::createSuppressor")
72  << "Unregistered mode: " << mode << ". Use one of {1,2,3,4}.";
73  return std::unique_ptr<SiStripFedZeroSuppression>(new SiStripFedZeroSuppression(4, true, trunc10bits));
74  }
75 }
T getParameter(std::string const &) const