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.

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 }

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

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.

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 }

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

◆ getSigma()

double RPLinearChargeCollectionDrifter::getSigma ( double  z)
private

Definition at line 31 of file RPLinearChargeCollectionDrifter.cc.

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 }

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

Referenced by Drift().

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().

DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:428
EcalCondDBWriter_cfi.Energy
Energy
Definition: EcalCondDBWriter_cfi.py:152
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
RPTopology::DetThickness
double DetThickness() const
Definition: RPTopology.h:45
RPLinearChargeCollectionDrifter::getSigma
double getSigma(double z)
Definition: RPLinearChargeCollectionDrifter.cc:31
DDAxes::x
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
RPLinearChargeCollectionDrifter::GeV_per_electron_
double GeV_per_electron_
Definition: RPLinearChargeCollectionDrifter.h:16
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
DDAxes::z
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
PixelTestBeamValidation_cfi.Position
Position
Definition: PixelTestBeamValidation_cfi.py:83
RPTopology
Geometrical and topological information on RP silicon detector. Uses coordinate a frame with origin i...
Definition: RPTopology.h:18
simromanpot::charge_induced_on_surface
std::vector< RPSignalPoint > charge_induced_on_surface
Definition: RPSimTypes.h:15
createfilelist.int
int
Definition: createfilelist.py:10
RPLinearChargeCollectionDrifter::verbosity_
int verbosity_
Definition: RPLinearChargeCollectionDrifter.h:17
RPLinearChargeCollectionDrifter::det_id_
RPDetId det_id_
Definition: RPLinearChargeCollectionDrifter.h:19
RPLinearChargeCollectionDrifter::charge_cloud_sigmas_vect_
std::vector< double > charge_cloud_sigmas_vect_
Definition: RPLinearChargeCollectionDrifter.h:15
RPLinearChargeCollectionDrifter::det_thickness_
double det_thickness_
Definition: RPLinearChargeCollectionDrifter.h:18