Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:53

0001 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0002 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0003 #include "SimPPS/RPDigiProducer/plugins/RPLinearChargeDivider.h"
0004 #include "SimPPS/RPDigiProducer/plugins/RPHitChargeConverter.h"
0005 #include "SimPPS/RPDigiProducer/plugins/RPLinearChargeCollectionDrifter.h"
0006 #include "SimPPS/RPDigiProducer/plugins/RPLinearInduceChargeOnStrips.h"
0007 
0008 RPHitChargeConverter::RPHitChargeConverter(const edm::ParameterSet &params, CLHEP::HepRandomEngine &eng, RPDetId det_id)
0009     : det_id_(det_id) {
0010   verbosity_ = params.getParameter<int>("RPVerbosity");
0011   theRPChargeDivider = std::make_unique<RPLinearChargeDivider>(params, eng, det_id);
0012   theRPChargeCollectionDrifter = std::make_unique<RPLinearChargeCollectionDrifter>(params, det_id);
0013   theRPInduceChargeOnStrips = std::make_unique<RPLinearInduceChargeOnStrips>(params, det_id);
0014 }
0015 
0016 RPHitChargeConverter::~RPHitChargeConverter() {}
0017 
0018 simromanpot::strip_charge_map RPHitChargeConverter::processHit(const PSimHit &hit) {
0019   simromanpot::energy_path_distribution ions_along_path = theRPChargeDivider->divide(hit);
0020   if (verbosity_)
0021     edm::LogInfo("HitChargeConverter") << det_id_ << " clouds no generated on the path=" << ions_along_path.size()
0022                                        << "\n";
0023   return theRPInduceChargeOnStrips->Induce(theRPChargeCollectionDrifter->Drift(ions_along_path));
0024 }