CMS 3D CMS Logo

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

#include <RPVFATSimulator.h>

Public Member Functions

void ConvertChargeToHits (const simromanpot::strip_charge_map &signals, simromanpot::strip_charge_map_links_type &theSignalProvenance, std::vector< TotemRPDigi > &output_digi, simromanpot::DigiPrimaryMapType &output_digi_links)
 
 RPVFATSimulator (const edm::ParameterSet &params, RPDetId det_id)
 

Private Types

typedef std::set< unsigned short, std::less< unsigned short > > dead_strip_set
 

Private Attributes

double dead_strip_probability_
 
dead_strip_set dead_strips_
 
bool dead_strips_simulation_on_
 
RPDetId det_id_
 
bool links_persistence_
 
const edm::ParameterSetparams_
 
unsigned short strips_no_
 
double threshold_
 
int verbosity_
 

Detailed Description

Definition at line 11 of file RPVFATSimulator.h.

Member Typedef Documentation

typedef std::set<unsigned short, std::less<unsigned short> > RPVFATSimulator::dead_strip_set
private

Definition at line 20 of file RPVFATSimulator.h.

Constructor & Destructor Documentation

RPVFATSimulator::RPVFATSimulator ( const edm::ParameterSet params,
RPDetId  det_id 
)

Definition at line 7 of file RPVFATSimulator.cc.

References dead_strip_probability_, dead_strips_simulation_on_, RPTopology::DetStripNo(), edm::ParameterSet::getParameter(), links_persistence_, strips_no_, threshold_, and verbosity_.

7  : params_(params), det_id_(det_id) {
8  threshold_ = params.getParameter<double>("RPVFATThreshold");
9  dead_strip_probability_ = params.getParameter<double>("RPDeadStripProbability");
10  dead_strips_simulation_on_ = params.getParameter<bool>("RPDeadStripSimulationOn");
12  verbosity_ = params.getParameter<int>("RPVerbosity");
13  links_persistence_ = params.getParameter<bool>("RPDigiSimHitRelationsPresistence");
14 }
T getParameter(std::string const &) const
unsigned short strips_no_
const edm::ParameterSet & params_
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:29
unsigned short DetStripNo() const
Definition: RPTopology.h:50
double dead_strip_probability_
bool dead_strips_simulation_on_

Member Function Documentation

void RPVFATSimulator::ConvertChargeToHits ( const simromanpot::strip_charge_map signals,
simromanpot::strip_charge_map_links_type theSignalProvenance,
std::vector< TotemRPDigi > &  output_digi,
simromanpot::DigiPrimaryMapType output_digi_links 
)

Definition at line 16 of file RPVFATSimulator.cc.

References dead_strips_, dead_strips_simulation_on_, mps_fire::i, links_persistence_, threshold_, and verbosity_.

19  {
20  for (simromanpot::strip_charge_map::const_iterator i = signals.begin(); i != signals.end(); ++i) {
21  //one threshold per hybrid
22  unsigned short strip_no = i->first;
23  if (i->second > threshold_ && (!dead_strips_simulation_on_ || dead_strips_.find(strip_no) == dead_strips_.end())) {
24  output_digi.push_back(TotemRPDigi(strip_no));
25  if (links_persistence_) {
26  output_digi_links.push_back(theSignalProvenance[strip_no]);
27  if (verbosity_) {
28  edm::LogInfo("RPVFatSimulator") << " digi links size=" << theSignalProvenance[strip_no].size() << "\n";
29  for (unsigned int u = 0; u < theSignalProvenance[strip_no].size(); ++u) {
30  edm::LogInfo("RPVFatSimulator")
31  << " digi: particle=" << theSignalProvenance[strip_no][u].first
32  << " energy [electrons]=" << theSignalProvenance[strip_no][u].second << "\n";
33  }
34  }
35  }
36  }
37  }
38 
39  if (verbosity_) {
40  for (unsigned int i = 0; i < output_digi.size(); ++i) {
41  edm::LogInfo("RPVFATSimulator") << output_digi[i].stripNumber() << "\n";
42  }
43  }
44 }
dead_strip_set dead_strips_
bool dead_strips_simulation_on_

Member Data Documentation

double RPVFATSimulator::dead_strip_probability_
private

Definition at line 23 of file RPVFATSimulator.h.

Referenced by RPVFATSimulator().

dead_strip_set RPVFATSimulator::dead_strips_
private

Definition at line 25 of file RPVFATSimulator.h.

Referenced by ConvertChargeToHits().

bool RPVFATSimulator::dead_strips_simulation_on_
private

Definition at line 24 of file RPVFATSimulator.h.

Referenced by ConvertChargeToHits(), and RPVFATSimulator().

RPDetId RPVFATSimulator::det_id_
private

Definition at line 22 of file RPVFATSimulator.h.

bool RPVFATSimulator::links_persistence_
private

Definition at line 30 of file RPVFATSimulator.h.

Referenced by ConvertChargeToHits(), and RPVFATSimulator().

const edm::ParameterSet& RPVFATSimulator::params_
private

Definition at line 21 of file RPVFATSimulator.h.

unsigned short RPVFATSimulator::strips_no_
private

Definition at line 28 of file RPVFATSimulator.h.

Referenced by RPVFATSimulator().

double RPVFATSimulator::threshold_
private

Definition at line 29 of file RPVFATSimulator.h.

Referenced by ConvertChargeToHits(), and RPVFATSimulator().

int RPVFATSimulator::verbosity_
private

Definition at line 26 of file RPVFATSimulator.h.

Referenced by ConvertChargeToHits(), and RPVFATSimulator().