CMS 3D CMS Logo

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

#include <RPDetDigitizer.h>

Public Member Functions

 RPDetDigitizer (const edm::ParameterSet &params, CLHEP::HepRandomEngine &eng, RPDetId det_id, const edm::EventSetup &iSetup)
 
void run (const std::vector< PSimHit > &input, const std::vector< int > &input_links, std::vector< TotemRPDigi > &output_digi, simromanpot::DigiPrimaryMapType &output_digi_links)
 

Private Attributes

RPDetId det_id_
 
bool links_persistence_
 
bool misalignment_simulation_on_
 
bool noNoise_
 
int numStrips_
 
double theNoiseInElectrons
 
std::unique_ptr< RPDisplacementGeneratortheRPDisplacementGenerator
 
std::unique_ptr< RPGaussianTailNoiseAddertheRPGaussianTailNoiseAdder
 
std::unique_ptr< RPHitChargeConvertertheRPHitChargeConverter
 
std::unique_ptr< RPPileUpSignalstheRPPileUpSignals
 
std::unique_ptr< RPVFATSimulatortheRPVFATSimulator
 
double theStripThresholdInE
 
int verbosity_
 

Detailed Description

Definition at line 24 of file RPDetDigitizer.h.

Constructor & Destructor Documentation

◆ RPDetDigitizer()

RPDetDigitizer::RPDetDigitizer ( const edm::ParameterSet params,
CLHEP::HepRandomEngine &  eng,
RPDetId  det_id,
const edm::EventSetup iSetup 
)

Definition at line 9 of file RPDetDigitizer.cc.

References det_id_, RPTopology::DetStripNo(), links_persistence_, misalignment_simulation_on_, noNoise_, numStrips_, submitPVValidationJobs::params, theNoiseInElectrons, theRPDisplacementGenerator, theRPGaussianTailNoiseAdder, theRPHitChargeConverter, theRPPileUpSignals, theRPVFATSimulator, theStripThresholdInE, and verbosity_.

13  : det_id_(det_id) {
14  verbosity_ = params.getParameter<int>("RPVerbosity");
16  theNoiseInElectrons = params.getParameter<double>("RPEquivalentNoiseCharge300um");
17  theStripThresholdInE = params.getParameter<double>("RPVFATThreshold");
18  noNoise_ = params.getParameter<bool>("RPNoNoise");
19  misalignment_simulation_on_ = params.getParameter<bool>("RPDisplacementOn");
20  links_persistence_ = params.getParameter<bool>("RPDigiSimHitRelationsPresistence");
21 
22  theRPGaussianTailNoiseAdder = std::make_unique<RPGaussianTailNoiseAdder>(
24  theRPPileUpSignals = std::make_unique<RPPileUpSignals>(params, det_id_);
25  theRPVFATSimulator = std::make_unique<RPVFATSimulator>(params, det_id_);
26  theRPHitChargeConverter = std::make_unique<RPHitChargeConverter>(params, eng, det_id_);
27  theRPDisplacementGenerator = std::make_unique<RPDisplacementGenerator>(params, det_id_, iSetup);
28 }
double theNoiseInElectrons
std::unique_ptr< RPPileUpSignals > theRPPileUpSignals
double theStripThresholdInE
std::unique_ptr< RPGaussianTailNoiseAdder > theRPGaussianTailNoiseAdder
std::unique_ptr< RPHitChargeConverter > theRPHitChargeConverter
std::unique_ptr< RPVFATSimulator > theRPVFATSimulator
bool misalignment_simulation_on_
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:19
std::unique_ptr< RPDisplacementGenerator > theRPDisplacementGenerator
unsigned short DetStripNo() const
Definition: RPTopology.h:42

Member Function Documentation

◆ run()

void RPDetDigitizer::run ( const std::vector< PSimHit > &  input,
const std::vector< int > &  input_links,
std::vector< TotemRPDigi > &  output_digi,
simromanpot::DigiPrimaryMapType output_digi_links 
)

Definition at line 30 of file RPDetDigitizer.cc.

References det_id_, mps_fire::i, input, links_persistence_, LogDebug, misalignment_simulation_on_, noNoise_, theRPDisplacementGenerator, theRPGaussianTailNoiseAdder, theRPHitChargeConverter, theRPPileUpSignals, theRPVFATSimulator, and verbosity_.

33  {
34  if (verbosity_)
35  LogDebug("RPDetDigitizer ") << det_id_ << " received input.size()=" << input.size() << "\n";
36  theRPPileUpSignals->reset();
37 
38  bool links_persistence_checked = links_persistence_ && input_links.size() == input.size();
39 
40  int input_size = input.size();
41  for (int i = 0; i < input_size; ++i) {
42  simromanpot::strip_charge_map the_strip_charge_map;
44  the_strip_charge_map = theRPHitChargeConverter->processHit(theRPDisplacementGenerator->displace(input[i]));
45  else
46  the_strip_charge_map = theRPHitChargeConverter->processHit(input[i]);
47 
48  if (verbosity_)
49  LogDebug("RPHitChargeConverter ") << det_id_ << " returned hits=" << the_strip_charge_map.size() << "\n";
50  if (links_persistence_checked)
51  theRPPileUpSignals->add(the_strip_charge_map, input_links[i]);
52  else
53  theRPPileUpSignals->add(the_strip_charge_map, 0);
54  }
55 
56  const simromanpot::strip_charge_map &theSignal = theRPPileUpSignals->dumpSignal();
57  simromanpot::strip_charge_map_links_type &theSignalProvenance = theRPPileUpSignals->dumpLinks();
59  if (noNoise_)
60  afterNoise = theSignal;
61  else
62  afterNoise = theRPGaussianTailNoiseAdder->addNoise(theSignal);
63 
64  theRPVFATSimulator->ConvertChargeToHits(afterNoise, theSignalProvenance, output_digi, output_digi_links);
65 }
std::unique_ptr< RPPileUpSignals > theRPPileUpSignals
std::map< unsigned short, std::vector< std::pair< int, double > > > strip_charge_map_links_type
Definition: RPSimTypes.h:28
static std::string const input
Definition: EdmProvDump.cc:47
std::unique_ptr< RPGaussianTailNoiseAdder > theRPGaussianTailNoiseAdder
std::unique_ptr< RPHitChargeConverter > theRPHitChargeConverter
std::unique_ptr< RPVFATSimulator > theRPVFATSimulator
bool misalignment_simulation_on_
std::map< unsigned short, double > strip_charge_map
Definition: RPSimTypes.h:14
std::unique_ptr< RPDisplacementGenerator > theRPDisplacementGenerator
#define LogDebug(id)

Member Data Documentation

◆ det_id_

RPDetId RPDetDigitizer::det_id_
private

Definition at line 47 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ links_persistence_

bool RPDetDigitizer::links_persistence_
private

Definition at line 50 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ misalignment_simulation_on_

bool RPDetDigitizer::misalignment_simulation_on_
private

Definition at line 48 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ noNoise_

bool RPDetDigitizer::noNoise_
private

Definition at line 46 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ numStrips_

int RPDetDigitizer::numStrips_
private

Definition at line 43 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer().

◆ theNoiseInElectrons

double RPDetDigitizer::theNoiseInElectrons
private

Definition at line 44 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer().

◆ theRPDisplacementGenerator

std::unique_ptr<RPDisplacementGenerator> RPDetDigitizer::theRPDisplacementGenerator
private

Definition at line 40 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ theRPGaussianTailNoiseAdder

std::unique_ptr<RPGaussianTailNoiseAdder> RPDetDigitizer::theRPGaussianTailNoiseAdder
private

Definition at line 36 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ theRPHitChargeConverter

std::unique_ptr<RPHitChargeConverter> RPDetDigitizer::theRPHitChargeConverter
private

Definition at line 38 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ theRPPileUpSignals

std::unique_ptr<RPPileUpSignals> RPDetDigitizer::theRPPileUpSignals
private

Definition at line 37 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ theRPVFATSimulator

std::unique_ptr<RPVFATSimulator> RPDetDigitizer::theRPVFATSimulator
private

Definition at line 39 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().

◆ theStripThresholdInE

double RPDetDigitizer::theStripThresholdInE
private

Definition at line 45 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer().

◆ verbosity_

int RPDetDigitizer::verbosity_
private

Definition at line 49 of file RPDetDigitizer.h.

Referenced by RPDetDigitizer(), and run().