CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RPixDetDigitizer Class Reference

#include <RPixDetDigitizer.h>

Public Member Functions

 RPixDetDigitizer (const edm::ParameterSet &params, CLHEP::HepRandomEngine &eng, uint32_t det_id, const edm::EventSetup &iSetup)
 
void run (const std::vector< PSimHit > &input, const std::vector< int > &input_links, std::vector< CTPPSPixelDigi > &output_digi, std::vector< std::vector< std::pair< int, double > > > &output_digi_links, const CTPPSPixelGainCalibrations *pcalibration)
 
 ~RPixDetDigitizer ()
 

Private Attributes

uint32_t det_id_
 
bool links_persistence_
 
bool misalignment_simulation_on_
 
bool noNoise
 
int numPixels
 
double theNoiseInElectrons
 
double thePixelThresholdInE
 
std::unique_ptr< RPixDummyROCSimulatortheRPixDummyROCSimulator
 
std::unique_ptr< RPixHitChargeConvertertheRPixHitChargeConverter
 
std::unique_ptr< RPixPileUpSignalstheRPixPileUpSignals
 
int verbosity_
 

Detailed Description

Definition at line 32 of file RPixDetDigitizer.h.

Constructor & Destructor Documentation

◆ RPixDetDigitizer()

RPixDetDigitizer::RPixDetDigitizer ( const edm::ParameterSet params,
CLHEP::HepRandomEngine &  eng,
uint32_t  det_id,
const edm::EventSetup iSetup 
)

Definition at line 7 of file RPixDetDigitizer.cc.

11  : det_id_(det_id) {
12  verbosity_ = params.getParameter<int>("RPixVerbosity");
14  theNoiseInElectrons = params.getParameter<double>("RPixEquivalentNoiseCharge");
15  thePixelThresholdInE = params.getParameter<double>("RPixDummyROCThreshold");
16  noNoise = params.getParameter<bool>("RPixNoNoise");
17 
18  links_persistence_ = params.getParameter<bool>("CTPPSPixelDigiSimHitRelationsPersistence");
19 
20  theRPixPileUpSignals = std::make_unique<RPixPileUpSignals>(params, det_id_);
21  theRPixDummyROCSimulator = std::make_unique<RPixDummyROCSimulator>(params, det_id_);
22  theRPixHitChargeConverter = std::make_unique<RPixHitChargeConverter>(params, eng, det_id_);
23 }

References det_id_, CTPPSPixelTopology::detPixelNo(), links_persistence_, noNoise, numPixels, CalibrationSummaryClient_cfi::params, theNoiseInElectrons, thePixelThresholdInE, theRPixDummyROCSimulator, theRPixHitChargeConverter, theRPixPileUpSignals, and verbosity_.

◆ ~RPixDetDigitizer()

RPixDetDigitizer::~RPixDetDigitizer ( )

Definition at line 25 of file RPixDetDigitizer.cc.

25 {}

Member Function Documentation

◆ run()

void RPixDetDigitizer::run ( const std::vector< PSimHit > &  input,
const std::vector< int > &  input_links,
std::vector< CTPPSPixelDigi > &  output_digi,
std::vector< std::vector< std::pair< int, double > > > &  output_digi_links,
const CTPPSPixelGainCalibrations pcalibration 
)

Definition at line 27 of file RPixDetDigitizer.cc.

31  {
32  if (verbosity_)
33  edm::LogInfo("RPixDetDigitizer") << det_id_ << " received input.size()=" << input.size();
34  theRPixPileUpSignals->reset();
35  bool links_persistence_checked = links_persistence_ && input_links.size() == input.size();
36  int input_size = input.size();
37  for (int i = 0; i < input_size; ++i) {
38  std::map<unsigned short, double> the_pixel_charge_map;
39  the_pixel_charge_map = theRPixHitChargeConverter->processHit(input[i]);
40 
41  if (verbosity_)
42  edm::LogInfo("RPixDetDigitizer") << det_id_ << " returned hits=" << the_pixel_charge_map.size();
43  if (links_persistence_checked)
44  theRPixPileUpSignals->add(the_pixel_charge_map, input_links[i]);
45  else
46  theRPixPileUpSignals->add(the_pixel_charge_map, 0);
47  }
48  const std::map<unsigned short, double> &theSignal = theRPixPileUpSignals->dumpSignal();
49  std::map<unsigned short, std::vector<std::pair<int, double> > > &theSignalProvenance =
50  theRPixPileUpSignals->dumpLinks();
51  std::map<unsigned short, double> afterNoise;
52  afterNoise = theSignal;
53  theRPixDummyROCSimulator->ConvertChargeToHits(
54  afterNoise, theSignalProvenance, output_digi, output_digi_links, pcalibrations);
55 }

References det_id_, mps_fire::i, input, links_persistence_, theRPixDummyROCSimulator, theRPixHitChargeConverter, theRPixPileUpSignals, and verbosity_.

Member Data Documentation

◆ det_id_

uint32_t RPixDetDigitizer::det_id_
private

Definition at line 56 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ links_persistence_

bool RPixDetDigitizer::links_persistence_
private

Definition at line 59 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ misalignment_simulation_on_

bool RPixDetDigitizer::misalignment_simulation_on_
private

Definition at line 57 of file RPixDetDigitizer.h.

◆ noNoise

bool RPixDetDigitizer::noNoise
private

Definition at line 55 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ numPixels

int RPixDetDigitizer::numPixels
private

Definition at line 52 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ theNoiseInElectrons

double RPixDetDigitizer::theNoiseInElectrons
private

Definition at line 53 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ thePixelThresholdInE

double RPixDetDigitizer::thePixelThresholdInE
private

Definition at line 54 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ theRPixDummyROCSimulator

std::unique_ptr<RPixDummyROCSimulator> RPixDetDigitizer::theRPixDummyROCSimulator
private

Definition at line 50 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ theRPixHitChargeConverter

std::unique_ptr<RPixHitChargeConverter> RPixDetDigitizer::theRPixHitChargeConverter
private

Definition at line 49 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ theRPixPileUpSignals

std::unique_ptr<RPixPileUpSignals> RPixDetDigitizer::theRPixPileUpSignals
private

Definition at line 48 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ verbosity_

int RPixDetDigitizer::verbosity_
private

Definition at line 58 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

mps_fire.i
i
Definition: mps_fire.py:355
RPixDetDigitizer::verbosity_
int verbosity_
Definition: RPixDetDigitizer.h:58
input
static const std::string input
Definition: EdmProvDump.cc:48
RPixDetDigitizer::theRPixDummyROCSimulator
std::unique_ptr< RPixDummyROCSimulator > theRPixDummyROCSimulator
Definition: RPixDetDigitizer.h:50
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::LogInfo
Definition: MessageLogger.h:254
CTPPSPixelTopology
Geometrical and topological information on RPix silicon detector. Uses coordinate a frame with origin...
Definition: CTPPSPixelTopology.h:10
RPixDetDigitizer::theRPixPileUpSignals
std::unique_ptr< RPixPileUpSignals > theRPixPileUpSignals
Definition: RPixDetDigitizer.h:48
RPixDetDigitizer::links_persistence_
bool links_persistence_
Definition: RPixDetDigitizer.h:59
RPixDetDigitizer::det_id_
uint32_t det_id_
Definition: RPixDetDigitizer.h:56
RPixDetDigitizer::noNoise
bool noNoise
Definition: RPixDetDigitizer.h:55
RPixDetDigitizer::theRPixHitChargeConverter
std::unique_ptr< RPixHitChargeConverter > theRPixHitChargeConverter
Definition: RPixDetDigitizer.h:49
CTPPSPixelTopology::detPixelNo
unsigned short detPixelNo() const
Definition: CTPPSPixelTopology.h:32
RPixDetDigitizer::thePixelThresholdInE
double thePixelThresholdInE
Definition: RPixDetDigitizer.h:54
RPixDetDigitizer::numPixels
int numPixels
Definition: RPixDetDigitizer.h:52
RPixDetDigitizer::theNoiseInElectrons
double theNoiseInElectrons
Definition: RPixDetDigitizer.h:53