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

◆ create()

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

Definition at line 13 of file SiStripRawProcessingFactory.cc.

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 }

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

◆ create_Restorer()

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

Definition at line 77 of file SiStripRawProcessingFactory.cc.

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 }

References edm::ParameterSet::exists().

Referenced by create().

◆ create_SubtractorCMN()

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

Definition at line 29 of file SiStripRawProcessingFactory.cc.

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 }

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

Referenced by create().

◆ create_SubtractorPed()

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

Definition at line 23 of file SiStripRawProcessingFactory.cc.

24  {
25  return std::unique_ptr<SiStripPedestalsSubtractor>(
26  new SiStripPedestalsSubtractor(conf.getParameter<bool>("PedestalSubtractionFedMode")));
27 }

References edm::ParameterSet::getParameter().

Referenced by create().

◆ create_Suppressor()

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

Definition at line 59 of file SiStripRawProcessingFactory.cc.

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 }

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

Referenced by create().

SiStripRawProcessingFactory::create_SubtractorPed
static std::unique_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &)
Definition: SiStripRawProcessingFactory.cc:23
SiStripRawProcessingAlgorithms
Definition: SiStripRawProcessingAlgorithms.h:15
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
MedianCMNSubtractor
Definition: MedianCMNSubtractor.h:5
SiStripRawProcessingFactory::create_Suppressor
static std::unique_ptr< SiStripFedZeroSuppression > create_Suppressor(const edm::ParameterSet &)
Definition: SiStripRawProcessingFactory.cc:59
TT6CMNSubtractor
Definition: TT6CMNSubtractor.h:9
SiStripRawProcessingFactory::create_Restorer
static std::unique_ptr< SiStripAPVRestorer > create_Restorer(const edm::ParameterSet &)
Definition: SiStripRawProcessingFactory.cc:77
SiStripPedestalsSubtractor
Definition: SiStripPedestalsSubtractor.h:12
IteratedMedianCMNSubtractor
Definition: IteratedMedianCMNSubtractor.h:11
SiStripFedZeroSuppression
Definition: SiStripFedZeroSuppression.h:16
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
edm::LogError
Definition: MessageLogger.h:183
SiStripRawProcessingFactory::create_SubtractorCMN
static std::unique_ptr< SiStripCommonModeNoiseSubtractor > create_SubtractorCMN(const edm::ParameterSet &)
Definition: SiStripRawProcessingFactory.cc:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PercentileCMNSubtractor
Definition: PercentileCMNSubtractor.h:5
SiStripAPVRestorer
Definition: SiStripAPVRestorer.h:25
FastLinearCMNSubtractor
Definition: FastLinearCMNSubtractor.h:5
pileupReCalc_HLTpaths.trunc
trunc
Definition: pileupReCalc_HLTpaths.py:144