CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< RPixDummyROCSimulator
theRPixDummyROCSimulator
 
std::unique_ptr
< RPixHitChargeConverter
theRPixHitChargeConverter
 
std::unique_ptr
< RPixPileUpSignals
theRPixPileUpSignals
 
int verbosity_
 

Detailed Description

Definition at line 28 of file RPixDetDigitizer.h.

Constructor & Destructor Documentation

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_, edm::ParameterSet::getParameter(), 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
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< RPixPileUpSignals > theRPixPileUpSignals
RPixDetDigitizer::~RPixDetDigitizer ( )

Definition at line 20 of file RPixDetDigitizer.cc.

20 {}

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

Definition at line 22 of file RPixDetDigitizer.cc.

References det_id_, mps_fire::i, 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

uint32_t RPixDetDigitizer::det_id_
private

Definition at line 52 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

bool RPixDetDigitizer::links_persistence_
private

Definition at line 55 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

bool RPixDetDigitizer::misalignment_simulation_on_
private

Definition at line 53 of file RPixDetDigitizer.h.

bool RPixDetDigitizer::noNoise
private

Definition at line 51 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

double RPixDetDigitizer::theNoiseInElectrons
private

Definition at line 49 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

double RPixDetDigitizer::thePixelThresholdInE
private

Definition at line 50 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer().

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

Definition at line 47 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

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

Definition at line 46 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

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

Definition at line 45 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().

int RPixDetDigitizer::verbosity_
private

Definition at line 54 of file RPixDetDigitizer.h.

Referenced by RPixDetDigitizer(), and run().