CMS 3D CMS Logo

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

#include <RPLinearChargeCollectionDrifter.h>

Public Member Functions

simromanpot::charge_induced_on_surface Drift (const simromanpot::energy_path_distribution &energy_deposition)
 
 RPLinearChargeCollectionDrifter (const edm::ParameterSet &params, RPDetId det_id)
 

Private Member Functions

double getSigma (double z)
 

Private Attributes

std::vector< double > charge_cloud_sigmas_vect_
 
RPDetId det_id_
 
double det_thickness_
 
double GeV_per_electron_
 
int verbosity_
 

Detailed Description

Definition at line 9 of file RPLinearChargeCollectionDrifter.h.

Constructor & Destructor Documentation

◆ RPLinearChargeCollectionDrifter()

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

Definition at line 7 of file RPLinearChargeCollectionDrifter.cc.

References charge_cloud_sigmas_vect_, det_id_, det_thickness_, RPTopology::DetThickness(), GeV_per_electron_, submitPVValidationJobs::params, and verbosity_.

7  {
8  verbosity_ = params.getParameter<int>("RPVerbosity");
9  GeV_per_electron_ = params.getParameter<double>("RPGeVPerElectron");
10  charge_cloud_sigmas_vect_ = params.getParameter<std::vector<double> >("RPInterStripSmearing");
12  det_id_ = det_id;
13 }
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:19
double DetThickness() const
Definition: RPTopology.h:40

Member Function Documentation

◆ Drift()

simromanpot::charge_induced_on_surface RPLinearChargeCollectionDrifter::Drift ( const simromanpot::energy_path_distribution energy_deposition)

Definition at line 15 of file RPLinearChargeCollectionDrifter.cc.

References det_id_, EcalCondDBWriter_cfi::Energy, getSigma(), GeV_per_electron_, mps_fire::i, PixelTestBeamValidation_cfi::Position, verbosity_, x, y, and z.

16  {
18  temp_.resize(energy_deposition.size());
19  for (unsigned int i = 0; i < energy_deposition.size(); i++) {
20  temp_[i].setPosition(LocalPoint(energy_deposition[i].Position().x(), energy_deposition[i].Position().y()));
21  temp_[i].setSigma(
22  getSigma(energy_deposition[i].Position().z())); //befor charge_cloud_sigma_ used, now a vector of sigmas;
23  temp_[i].setCharge(energy_deposition[i].Energy() / GeV_per_electron_);
24  if (verbosity_) {
25  edm::LogInfo("RPLinearChargeCollectionDrifter")
26  << det_id_ << " :" << temp_[i].Position() << " " << temp_[i].Sigma() << " " << temp_[i].Charge() << "\n";
27  }
28  }
29  return temp_;
30 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
std::vector< RPSignalPoint > charge_induced_on_surface
Definition: RPSimTypes.h:15
Log< level::Info, false > LogInfo

◆ getSigma()

double RPLinearChargeCollectionDrifter::getSigma ( double  z)
private

Definition at line 31 of file RPLinearChargeCollectionDrifter.cc.

References reco::ceil(), charge_cloud_sigmas_vect_, det_thickness_, DQMScaleToClient_cfi::factor, createfilelist::int, and z.

Referenced by Drift().

31  {
32  if (charge_cloud_sigmas_vect_.size() == 1)
33  return charge_cloud_sigmas_vect_[0];
34 
35  double factor = (z / det_thickness_) * (charge_cloud_sigmas_vect_.size() - 1);
36  double lo_i = floor(factor);
37  double hi_i = ceil(factor);
38  if (lo_i == hi_i) {
40  } else {
41  double lo_weight = hi_i - factor;
42  double hi_weight = factor - lo_i;
43 
44  return charge_cloud_sigmas_vect_[(int)lo_i] * lo_weight + charge_cloud_sigmas_vect_[(int)hi_i] * hi_weight;
45  }
46 }
constexpr int32_t ceil(float num)

Member Data Documentation

◆ charge_cloud_sigmas_vect_

std::vector<double> RPLinearChargeCollectionDrifter::charge_cloud_sigmas_vect_
private

Definition at line 15 of file RPLinearChargeCollectionDrifter.h.

Referenced by getSigma(), and RPLinearChargeCollectionDrifter().

◆ det_id_

RPDetId RPLinearChargeCollectionDrifter::det_id_
private

Definition at line 19 of file RPLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPLinearChargeCollectionDrifter().

◆ det_thickness_

double RPLinearChargeCollectionDrifter::det_thickness_
private

Definition at line 18 of file RPLinearChargeCollectionDrifter.h.

Referenced by getSigma(), and RPLinearChargeCollectionDrifter().

◆ GeV_per_electron_

double RPLinearChargeCollectionDrifter::GeV_per_electron_
private

Definition at line 16 of file RPLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPLinearChargeCollectionDrifter().

◆ verbosity_

int RPLinearChargeCollectionDrifter::verbosity_
private

Definition at line 17 of file RPLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPLinearChargeCollectionDrifter().