CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RPLinearChargeCollectionDrifter.cc
Go to the documentation of this file.
4 #include <iostream>
5 #include <vector>
6 
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 }
14 
16  const simromanpot::energy_path_distribution &energy_deposition) {
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 }
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)
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
float float float z
std::vector< RPSignalPoint > charge_induced_on_surface
Definition: RPSimTypes.h:16
RPLinearChargeCollectionDrifter(const edm::ParameterSet &params, RPDetId det_id)
simromanpot::charge_induced_on_surface Drift(const simromanpot::energy_path_distribution &energy_deposition)
uint32_t RPDetId
Definition: RPSimTypes.h:12
Log< level::Info, false > LogInfo
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
std::vector< RPEnergyDepositUnit > energy_path_distribution
Definition: RPSimTypes.h:17