Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-24 09:53:32

0001 #include "SimPPS/PPSPixelDigiProducer/interface/RPixHitChargeConverter.h"
0002 
0003 RPixHitChargeConverter::RPixHitChargeConverter(const edm::ParameterSet &params,
0004                                                CLHEP::HepRandomEngine &eng,
0005                                                uint32_t det_id,
0006                                                const PPSPixelTopology &ppt)
0007     : det_id_(det_id) {
0008   verbosity_ = params.getParameter<int>("RPixVerbosity");
0009   theRPixChargeDivider = std::make_unique<RPixLinearChargeDivider>(params, eng, det_id);
0010   theRPixChargeCollectionDrifter = std::make_unique<RPixLinearChargeCollectionDrifter>(params, det_id, ppt);
0011   theRPixChargeShare = std::make_unique<RPixChargeShare>(params, det_id, ppt);
0012 }
0013 
0014 std::map<unsigned short, double> RPixHitChargeConverter::processHit(const PSimHit &hit, const PPSPixelTopology &ppt) {
0015   std::vector<RPixEnergyDepositUnit> ions_along_path = theRPixChargeDivider->divide(hit);
0016   if (verbosity_)
0017     edm::LogInfo("PPS") << "RPixHitChargeConverter " << det_id_
0018                         << " clouds no generated on the path=" << ions_along_path.size();
0019   return theRPixChargeShare->Share(theRPixChargeCollectionDrifter->Drift(ions_along_path), ppt);
0020 }