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 ( const edm::ParameterSet params,
CLHEP::HepRandomEngine &  eng,
uint32_t  det_id,
const edm::EventSetup iSetup 
)

Definition at line 7 of file RPixDetDigitizer.cc.

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

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 }
T getParameter(std::string const &) const
std::unique_ptr< RPixHitChargeConverter > theRPixHitChargeConverter
std::unique_ptr< RPixDummyROCSimulator > theRPixDummyROCSimulator
Geometrical and topological information on RPix silicon detector. Uses coordinate a frame with origin...
unsigned short detPixelNo() const
std::unique_ptr< RPixPileUpSignals > theRPixPileUpSignals
RPixDetDigitizer::~RPixDetDigitizer ( )

Definition at line 25 of file RPixDetDigitizer.cc.

25 {}

Member Function Documentation

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.

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

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 }
static std::string const input
Definition: EdmProvDump.cc:48
std::unique_ptr< RPixHitChargeConverter > theRPixHitChargeConverter
std::unique_ptr< RPixDummyROCSimulator > theRPixDummyROCSimulator
std::unique_ptr< RPixPileUpSignals > theRPixPileUpSignals

Member Data Documentation

uint32_t RPixDetDigitizer::det_id_
private

Definition at line 56 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

bool RPixDetDigitizer::links_persistence_
private

Definition at line 59 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

bool RPixDetDigitizer::misalignment_simulation_on_
private

Definition at line 57 of file RPixDetDigitizer.h.

bool RPixDetDigitizer::noNoise
private

Definition at line 55 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

int RPixDetDigitizer::numPixels
private

Definition at line 52 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

double RPixDetDigitizer::theNoiseInElectrons
private

Definition at line 53 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

double RPixDetDigitizer::thePixelThresholdInE
private

Definition at line 54 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

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

Definition at line 50 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

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

Definition at line 49 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

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

Definition at line 48 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

int RPixDetDigitizer::verbosity_
private

Definition at line 58 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().