diff --git a/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc b/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc index 63dd0e3dc0712..261552666e289 100644 --- a/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc +++ b/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc @@ -68,7 +68,9 @@ namespace cms { pSetupToken_(iC.esConsumes()), tTopoToken_(iC.esConsumes()), isOuterTrackerReadoutAnalog_(iConfig.getParameter("isOTreadoutAnalog")), + usePseudoPixel3DAlgo_(iConfig.getParameter("usePseudoPixel3DAlgo")), premixStage1_(iConfig.getParameter("premixStage1")), + makeDigiSimLinks_( iConfig.getParameter("AlgorithmCommon").getUntrackedParameter("makeDigiSimLinks")) { const std::string alias1("simSiPixelDigis"); @@ -247,12 +249,12 @@ namespace cms { case TrackerGeometry::ModuleType::Ph2PXF: algotype = AlgorithmType::InnerPixel; break; - case TrackerGeometry::ModuleType::Ph2PXB3D: - algotype = AlgorithmType::InnerPixel3D; - break; - case TrackerGeometry::ModuleType::Ph2PXF3D: - algotype = AlgorithmType::InnerPixel3D; - break; + case TrackerGeometry::ModuleType::Ph2PXB3D: { + algotype = (usePseudoPixel3DAlgo_) ? AlgorithmType::InnerPixel : AlgorithmType::InnerPixel3D; + } break; + case TrackerGeometry::ModuleType::Ph2PXF3D: { + algotype = (usePseudoPixel3DAlgo_) ? AlgorithmType::InnerPixel : AlgorithmType::InnerPixel3D; + } break; case TrackerGeometry::ModuleType::Ph2PSP: algotype = AlgorithmType::PixelinPS; break; diff --git a/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.h b/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.h index 7a8889959700a..81401773fcb32 100644 --- a/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.h +++ b/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.h @@ -106,6 +106,7 @@ namespace cms { const TrackerTopology* tTopo_ = nullptr; edm::ESWatcher theTkDigiGeomWatcher_; const bool isOuterTrackerReadoutAnalog_; + const bool usePseudoPixel3DAlgo_; const bool premixStage1_; const bool makeDigiSimLinks_; // cache for detector types diff --git a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc index 01ad7b674803e..ef843f6d70e2f 100644 --- a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc +++ b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc @@ -44,14 +44,6 @@ Pixel3DDigitizerAlgorithm::Pixel3DDigitizerAlgorithm(const edm::ParameterSet& co Pixel3DDigitizerAlgorithm::~Pixel3DDigitizerAlgorithm() {} -// -// -- Select the Hit for Digitization -// -bool Pixel3DDigitizerAlgorithm::select_hit(const PSimHit& hit, double tCorr, double& sigScale) const { - double time = hit.tof() - tCorr; - return (time >= theTofLowerCut_ && time < theTofUpperCut_); -} - const bool Pixel3DDigitizerAlgorithm::is_inside_n_column_(const LocalPoint& p, const float& sensor_thickness) const { // The insensitive volume of the column: sensor thickness - column gap distance return (p.perp() <= np_column_radius_ && p.z() <= (sensor_thickness - np_column_gap_)); @@ -177,9 +169,9 @@ std::vector Pixel3DDigitizerAlgorithm::drift( const Phase2TrackerGeomDetUnit* pixdet, const GlobalVector& bfield, const std::vector& ionization_points) const { - return drift(hit, pixdet, bfield, ionization_points, true); + return driftFor3DSensors(hit, pixdet, bfield, ionization_points, true); } -std::vector Pixel3DDigitizerAlgorithm::drift( +std::vector Pixel3DDigitizerAlgorithm::driftFor3DSensors( const PSimHit& hit, const Phase2TrackerGeomDetUnit* pixdet, const GlobalVector& bfield, @@ -294,7 +286,7 @@ std::vector Pixel3DDigitizerAlgorithm::drift( << "MIGRATING (super-)charges" << "****************"; // Drift this charges on the other pixel - auto mig_colpoints = drift(hit, pixdet, bfield, migrated_charges, false); + auto mig_colpoints = driftFor3DSensors(hit, pixdet, bfield, migrated_charges, false); collection_points.insert(std::end(collection_points), mig_colpoints.begin(), mig_colpoints.end()); LogDebug("Pixel3DDigitizerAlgorithm::drift") << "*****************" << "DOME MIGRATION" diff --git a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.h b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.h index a7f6868e927a5..a31993f7b42ee 100644 --- a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.h +++ b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.h @@ -31,14 +31,13 @@ class Pixel3DDigitizerAlgorithm : public PixelDigitizerAlgorithm { Pixel3DDigitizerAlgorithm(const edm::ParameterSet& conf, edm::ConsumesCollector iC); ~Pixel3DDigitizerAlgorithm() override; - bool select_hit(const PSimHit& hit, double tCorr, double& sigScale) const override; std::vector drift( const PSimHit& hit, const Phase2TrackerGeomDetUnit* pixdet, const GlobalVector& bfield, const std::vector& ionization_points) const override; // overload drift - std::vector drift( + std::vector driftFor3DSensors( const PSimHit& hit, const Phase2TrackerGeomDetUnit* pixdet, const GlobalVector& bfield, diff --git a/SimTracker/SiPhase2Digitizer/python/phase2TrackerDigitizer_cfi.py b/SimTracker/SiPhase2Digitizer/python/phase2TrackerDigitizer_cfi.py index d42d88a1446d1..e19632b04fd8c 100644 --- a/SimTracker/SiPhase2Digitizer/python/phase2TrackerDigitizer_cfi.py +++ b/SimTracker/SiPhase2Digitizer/python/phase2TrackerDigitizer_cfi.py @@ -75,6 +75,7 @@ GeometryType = cms.string('idealForDigi'), isOTreadoutAnalog = cms.bool(False),#set this to true if you want analog readout for OT # Common for Algos + usePseudoPixel3DAlgo = cms.bool(False), premixStage1 = cms.bool(False), AlgorithmCommon = cms.PSet( DeltaProductionCut = cms.double(0.03),