From e411402e4b10f38b25759c244a011d55b30ba6e5 Mon Sep 17 00:00:00 2001 From: Suchandra Date: Thu, 9 Mar 2023 07:47:35 +0100 Subject: [PATCH] update to include the possibility to use planer-pixel digitization alogorithm (PixelDigitizerAlgorithm) for 3D-pixel modules if needed. Hence intriduced usePseudoPixel3DAlgo parameter in the configuration --- .../plugins/Phase2TrackerDigitizer.cc | 5 ++++- .../plugins/Phase2TrackerDigitizer.h | 1 + .../plugins/Pixel3DDigitizerAlgorithm.cc | 13 +++---------- .../plugins/Pixel3DDigitizerAlgorithm.h | 3 +-- .../python/phase2TrackerDigitizer_cfi.py | 1 + 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc b/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc index 63dd0e3dc0712..3674fd61a6709 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"); @@ -248,7 +250,8 @@ namespace cms { algotype = AlgorithmType::InnerPixel; break; case TrackerGeometry::ModuleType::Ph2PXB3D: - algotype = AlgorithmType::InnerPixel3D; + algotype = (usePseudoPixel3DAlgo_) ? AlgorithmType::InnerPixel + : AlgorithmType::InnerPixel3D; break; case TrackerGeometry::ModuleType::Ph2PXF3D: algotype = AlgorithmType::InnerPixel3D; 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..aeb8b17b2fa94 100644 --- a/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc +++ b/SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc @@ -44,13 +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 @@ -177,9 +170,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 +287,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),