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, const PPSPixelTopology &ppt)
 

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 9 of file RPixLinearChargeCollectionDrifter.h.

Constructor & Destructor Documentation

◆ RPixLinearChargeCollectionDrifter()

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

Definition at line 3 of file RPixLinearChargeCollectionDrifter.cc.

5  {
6  verbosity_ = params.getParameter<int>("RPixVerbosity");
7 
8  GeV_per_electron_ = params.getParameter<double>("RPixGeVPerElectron");
9  charge_cloud_sigmas_vect_ = params.getParameter<std::vector<double> >("RPixInterSmearing");
11  det_id_ = det_id;
12 }

References charge_cloud_sigmas_vect_, det_id_, det_thickness_, PPSPixelTopology::getThickness(), GeV_per_electron_, CalibrationSummaryClient_cfi::params, and verbosity_.

Member Function Documentation

◆ Drift()

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

Definition at line 14 of file RPixLinearChargeCollectionDrifter.cc.

15  {
16  // convert an energy deposit in a point and in a charge of electrons n=E/3.61 (eV)
17  temp_.resize(energy_deposition.size());
18  for (unsigned int i = 0; i < energy_deposition.size(); i++) {
19  temp_[i].setPosition(LocalPoint(energy_deposition[i].Position().x(), energy_deposition[i].Position().y()));
20  temp_[i].setSigma(getSigma_(energy_deposition[i].Position().z()));
21  temp_[i].setCharge(energy_deposition[i].Energy() / GeV_per_electron_);
22  if (verbosity_ > 1) {
23  edm::LogInfo("PPS") << "RPixLinearChargeCollectionDrifter " << det_id_ << " :" << temp_[i].Position() << " "
24  << temp_[i].Sigma() << " " << temp_[i].Charge();
25  }
26  }
27  return temp_;
28 }

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

◆ getSigma_()

double RPixLinearChargeCollectionDrifter::getSigma_ ( double  z)
private

Definition at line 29 of file RPixLinearChargeCollectionDrifter.cc.

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

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> RPixLinearChargeCollectionDrifter::charge_cloud_sigmas_vect_
private

◆ det_id_

uint32_t RPixLinearChargeCollectionDrifter::det_id_
private

Definition at line 21 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPixLinearChargeCollectionDrifter().

◆ det_thickness_

double RPixLinearChargeCollectionDrifter::det_thickness_
private

◆ GeV_per_electron_

double RPixLinearChargeCollectionDrifter::GeV_per_electron_
private

Definition at line 18 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPixLinearChargeCollectionDrifter().

◆ temp_

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

Definition at line 15 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift().

◆ verbosity_

int RPixLinearChargeCollectionDrifter::verbosity_
private

Definition at line 19 of file RPixLinearChargeCollectionDrifter.h.

Referenced by Drift(), and RPixLinearChargeCollectionDrifter().

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
DDAxes::x
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
RPixLinearChargeCollectionDrifter::GeV_per_electron_
double GeV_per_electron_
Definition: RPixLinearChargeCollectionDrifter.h:18
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
DDAxes::z
PPSPixelTopology::getThickness
double getThickness() const
Definition: PPSPixelTopology.cc:230
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
RPixLinearChargeCollectionDrifter::charge_cloud_sigmas_vect_
std::vector< double > charge_cloud_sigmas_vect_
Definition: RPixLinearChargeCollectionDrifter.h:17
PixelTestBeamValidation_cfi.Position
Position
Definition: PixelTestBeamValidation_cfi.py:75
RPixLinearChargeCollectionDrifter::det_id_
uint32_t det_id_
Definition: RPixLinearChargeCollectionDrifter.h:21
createfilelist.int
int
Definition: createfilelist.py:10
RPixLinearChargeCollectionDrifter::det_thickness_
double det_thickness_
Definition: RPixLinearChargeCollectionDrifter.h:20
RPixLinearChargeCollectionDrifter::verbosity_
int verbosity_
Definition: RPixLinearChargeCollectionDrifter.h:19
RPixLinearChargeCollectionDrifter::getSigma_
double getSigma_(double z)
Definition: RPixLinearChargeCollectionDrifter.cc:29
RPixLinearChargeCollectionDrifter::temp_
std::vector< RPixSignalPoint > temp_
Definition: RPixLinearChargeCollectionDrifter.h:15