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 12 of file SiStripRawProcessingFactory.h.

Member Function Documentation

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

Definition at line 15 of file SiStripRawProcessingFactory.cc.

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

16 {
17  return std::unique_ptr<SiStripRawProcessingAlgorithms>(
21  create_Suppressor(conf),
22  create_Restorer(conf),
23  conf.getParameter<bool>("doAPVRestore"),
24  conf.getParameter<bool>("useCMMeanMap")
25  ));
26 }
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 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));
89  }
90 }
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 36 of file SiStripRawProcessingFactory.cc.

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

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

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

Definition at line 29 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

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

30 {
31  return std::unique_ptr<SiStripPedestalsSubtractor>(new SiStripPedestalsSubtractor(
32  conf.getParameter<bool>("PedestalSubtractionFedMode")));
33 }
T getParameter(std::string const &) const
std::unique_ptr< SiStripFedZeroSuppression > SiStripRawProcessingFactory::create_Suppressor ( const edm::ParameterSet conf)
static

Definition at line 67 of file SiStripRawProcessingFactory.cc.

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

Referenced by create().

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