CMS 3D CMS Logo

RPixHitChargeConverter.cc
Go to the documentation of this file.
2 
4  CLHEP::HepRandomEngine &eng,
5  uint32_t det_id,
6  const PPSPixelTopology &ppt)
7  : det_id_(det_id) {
8  verbosity_ = params.getParameter<int>("RPixVerbosity");
9  theRPixChargeDivider = std::make_unique<RPixLinearChargeDivider>(params, eng, det_id);
10  theRPixChargeCollectionDrifter = std::make_unique<RPixLinearChargeCollectionDrifter>(params, det_id, ppt);
11  theRPixChargeShare = std::make_unique<RPixChargeShare>(params, det_id, ppt);
12 }
13 
14 std::map<unsigned short, double> RPixHitChargeConverter::processHit(const PSimHit &hit, const PPSPixelTopology &ppt) {
15  std::vector<RPixEnergyDepositUnit> ions_along_path = theRPixChargeDivider->divide(hit);
16  if (verbosity_)
17  edm::LogInfo("PPS") << "RPixHitChargeConverter " << det_id_
18  << " clouds no generated on the path=" << ions_along_path.size();
19  return theRPixChargeShare->Share(theRPixChargeCollectionDrifter->Drift(ions_along_path), ppt);
20 }
std::unique_ptr< RPixLinearChargeCollectionDrifter > theRPixChargeCollectionDrifter
RPixHitChargeConverter(const edm::ParameterSet &params_, CLHEP::HepRandomEngine &eng, uint32_t det_id, const PPSPixelTopology &ppt)
std::map< unsigned short, double > processHit(const PSimHit &hit, const PPSPixelTopology &ppt)
Log< level::Info, false > LogInfo
std::unique_ptr< RPixLinearChargeDivider > theRPixChargeDivider
std::unique_ptr< RPixChargeShare > theRPixChargeShare