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 PPSPixelTopology &ppt)
 
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, const PPSPixelTopology *ppt)
 
 ~RPixDetDigitizer ()
 

Private Attributes

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

Detailed Description

Definition at line 28 of file RPixDetDigitizer.h.

Constructor & Destructor Documentation

◆ RPixDetDigitizer()

RPixDetDigitizer::RPixDetDigitizer ( const edm::ParameterSet params,
CLHEP::HepRandomEngine &  eng,
uint32_t  det_id,
const PPSPixelTopology ppt 
)

Definition at line 3 of file RPixDetDigitizer.cc.

References det_id_, links_persistence_, noNoise, submitPVValidationJobs::params, theNoiseInElectrons, thePixelThresholdInE, theRPixDummyROCSimulator, theRPixHitChargeConverter, theRPixPileUpSignals, and verbosity_.

7  : det_id_(det_id) {
8  verbosity_ = params.getParameter<int>("RPixVerbosity");
9  theNoiseInElectrons = params.getParameter<double>("RPixEquivalentNoiseCharge");
10  thePixelThresholdInE = params.getParameter<double>("RPixDummyROCThreshold");
11  noNoise = params.getParameter<bool>("RPixNoNoise");
12 
13  links_persistence_ = params.getParameter<bool>("CTPPSPixelDigiSimHitRelationsPersistence");
14 
15  theRPixPileUpSignals = std::make_unique<RPixPileUpSignals>(params, det_id_);
16  theRPixDummyROCSimulator = std::make_unique<RPixDummyROCSimulator>(params, det_id_);
17  theRPixHitChargeConverter = std::make_unique<RPixHitChargeConverter>(params, eng, det_id_, ppt);
18 }
std::unique_ptr< RPixHitChargeConverter > theRPixHitChargeConverter
std::unique_ptr< RPixDummyROCSimulator > theRPixDummyROCSimulator
std::unique_ptr< RPixPileUpSignals > theRPixPileUpSignals

◆ ~RPixDetDigitizer()

RPixDetDigitizer::~RPixDetDigitizer ( )

Definition at line 20 of file RPixDetDigitizer.cc.

20 {}

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,
const PPSPixelTopology ppt 
)

Definition at line 22 of file RPixDetDigitizer.cc.

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

27  {
28  if (verbosity_)
29  edm::LogInfo("PPS") << "RPixDetDigitizer " << det_id_ << " received input.size()=" << input.size();
30  theRPixPileUpSignals->reset();
31  bool links_persistence_checked = links_persistence_ && input_links.size() == input.size();
32  int input_size = input.size();
33  for (int i = 0; i < input_size; ++i) {
34  std::map<unsigned short, double> the_pixel_charge_map;
35  the_pixel_charge_map = theRPixHitChargeConverter->processHit(input[i], *pixelTopology);
36 
37  if (verbosity_)
38  edm::LogInfo("PPS") << "RPixDetDigitizer " << det_id_ << " returned hits=" << the_pixel_charge_map.size();
39  if (links_persistence_checked)
40  theRPixPileUpSignals->add(the_pixel_charge_map, input_links[i]);
41  else
42  theRPixPileUpSignals->add(the_pixel_charge_map, 0);
43  }
44  const std::map<unsigned short, double> &theSignal = theRPixPileUpSignals->dumpSignal();
45  std::map<unsigned short, std::vector<std::pair<int, double> > > &theSignalProvenance =
46  theRPixPileUpSignals->dumpLinks();
47  std::map<unsigned short, double> afterNoise;
48  afterNoise = theSignal;
49  theRPixDummyROCSimulator->ConvertChargeToHits(
50  afterNoise, theSignalProvenance, output_digi, output_digi_links, pcalibrations);
51 }
static std::string const input
Definition: EdmProvDump.cc:47
std::unique_ptr< RPixHitChargeConverter > theRPixHitChargeConverter
std::unique_ptr< RPixDummyROCSimulator > theRPixDummyROCSimulator
Log< level::Info, false > LogInfo
std::unique_ptr< RPixPileUpSignals > theRPixPileUpSignals

Member Data Documentation

◆ det_id_

uint32_t RPixDetDigitizer::det_id_
private

Definition at line 52 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ links_persistence_

bool RPixDetDigitizer::links_persistence_
private

Definition at line 55 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ misalignment_simulation_on_

bool RPixDetDigitizer::misalignment_simulation_on_
private

Definition at line 53 of file RPixDetDigitizer.h.

◆ noNoise

bool RPixDetDigitizer::noNoise
private

Definition at line 51 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ theNoiseInElectrons

double RPixDetDigitizer::theNoiseInElectrons
private

Definition at line 49 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ thePixelThresholdInE

double RPixDetDigitizer::thePixelThresholdInE
private

Definition at line 50 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

◆ theRPixDummyROCSimulator

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

Definition at line 47 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ theRPixHitChargeConverter

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

Definition at line 46 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ theRPixPileUpSignals

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

Definition at line 45 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

◆ verbosity_

int RPixDetDigitizer::verbosity_
private

Definition at line 54 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().