CMS 3D CMS Logo

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

#include <RPixLinearChargeCollectionDrifter.h>

Public Member Functions

std::vector< RPixSignalPointDrift (const std::vector< RPixEnergyDepositUnit > &energy_deposition)
 
 RPixLinearChargeCollectionDrifter (const edm::ParameterSet &params, uint32_t det_id)
 

Private Member Functions

double getSigma_ (double z)
 

Private Attributes

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

Detailed Description

Definition at line 8 of file RPixLinearChargeCollectionDrifter.h.

Constructor & Destructor Documentation

RPixLinearChargeCollectionDrifter::RPixLinearChargeCollectionDrifter ( const edm::ParameterSet params,
uint32_t  det_id 
)

Definition at line 6 of file RPixLinearChargeCollectionDrifter.cc.

References charge_cloud_sigmas_vect_, det_id_, det_thickness_, CTPPSPixelTopology::detThickness(), edm::ParameterSet::getParameter(), GeV_per_electron_, and verbosity_.

6  {
7  verbosity_ = params.getParameter<int>("RPixVerbosity");
8 
9  GeV_per_electron_ = params.getParameter<double>("RPixGeVPerElectron");
10  charge_cloud_sigmas_vect_ = params.getParameter<std::vector<double> >("RPixInterSmearing");
12  det_id_ = det_id;
13 }
T getParameter(std::string const &) const
double detThickness() const
Geometrical and topological information on RPix silicon detector. Uses coordinate a frame with origin...

Member Function Documentation

std::vector< RPixSignalPoint > RPixLinearChargeCollectionDrifter::Drift ( const std::vector< RPixEnergyDepositUnit > &  energy_deposition)

Definition at line 15 of file RPixLinearChargeCollectionDrifter.cc.

References det_id_, EcalCondDBWriter_cfi::Energy, getSigma_(), GeV_per_electron_, mps_fire::i, temp_, verbosity_, x, y, and z.

16  {
17  // convert an energy deposit in a point and in a charge of electrons n=E/3.61 (eV)
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(getSigma_(energy_deposition[i].Position().z()));
22  temp_[i].setCharge(energy_deposition[i].Energy() / GeV_per_electron_);
23  if (verbosity_ > 1) {
24  edm::LogInfo("RPixLinearChargeCollectionDrifter")
25  << det_id_ << " :" << temp_[i].Position() << " " << temp_[i].Sigma() << " " << temp_[i].Charge();
26  }
27  }
28  return temp_;
29 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
double RPixLinearChargeCollectionDrifter::getSigma_ ( double  z)
private

Definition at line 30 of file RPixLinearChargeCollectionDrifter.cc.

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

Referenced by Drift().

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

Member Data Documentation

std::vector<double> RPixLinearChargeCollectionDrifter::charge_cloud_sigmas_vect_
private
uint32_t RPixLinearChargeCollectionDrifter::det_id_
private

Definition at line 20 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPixLinearChargeCollectionDrifter().

double RPixLinearChargeCollectionDrifter::det_thickness_
private
double RPixLinearChargeCollectionDrifter::GeV_per_electron_
private

Definition at line 17 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPixLinearChargeCollectionDrifter().

std::vector<RPixSignalPoint> RPixLinearChargeCollectionDrifter::temp_
private

Definition at line 14 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift().

int RPixLinearChargeCollectionDrifter::verbosity_
private

Definition at line 18 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPixLinearChargeCollectionDrifter().