Skip to content

Commit

Permalink
Merge pull request #41010 from suchandradutta/Phase2Digitizer_PseudoP…
Browse files Browse the repository at this point in the history
…ixel3DAlgo_13X_08032023

Phase2 Tracker Digitizer updated to have the possibility to used planer pixel algorithm in 3D pixel
  • Loading branch information
cmsbuild authored Mar 13, 2023
2 parents fdaea76 + 118498a commit 33b1318
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
14 changes: 8 additions & 6 deletions SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ namespace cms {
pSetupToken_(iC.esConsumes()),
tTopoToken_(iC.esConsumes()),
isOuterTrackerReadoutAnalog_(iConfig.getParameter<bool>("isOTreadoutAnalog")),
usePseudoPixel3DAlgo_(iConfig.getParameter<bool>("usePseudoPixel3DAlgo")),
premixStage1_(iConfig.getParameter<bool>("premixStage1")),

makeDigiSimLinks_(
iConfig.getParameter<edm::ParameterSet>("AlgorithmCommon").getUntrackedParameter<bool>("makeDigiSimLinks")) {
const std::string alias1("simSiPixelDigis");
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ namespace cms {
const TrackerTopology* tTopo_ = nullptr;
edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher_;
const bool isOuterTrackerReadoutAnalog_;
const bool usePseudoPixel3DAlgo_;
const bool premixStage1_;
const bool makeDigiSimLinks_;
// cache for detector types
Expand Down
14 changes: 3 additions & 11 deletions SimTracker/SiPhase2Digitizer/plugins/Pixel3DDigitizerAlgorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_));
Expand Down Expand Up @@ -177,9 +169,9 @@ std::vector<digitizerUtility::SignalPoint> Pixel3DDigitizerAlgorithm::drift(
const Phase2TrackerGeomDetUnit* pixdet,
const GlobalVector& bfield,
const std::vector<digitizerUtility::EnergyDepositUnit>& ionization_points) const {
return drift(hit, pixdet, bfield, ionization_points, true);
return driftFor3DSensors(hit, pixdet, bfield, ionization_points, true);
}
std::vector<digitizerUtility::SignalPoint> Pixel3DDigitizerAlgorithm::drift(
std::vector<digitizerUtility::SignalPoint> Pixel3DDigitizerAlgorithm::driftFor3DSensors(
const PSimHit& hit,
const Phase2TrackerGeomDetUnit* pixdet,
const GlobalVector& bfield,
Expand Down Expand Up @@ -294,7 +286,7 @@ std::vector<digitizerUtility::SignalPoint> 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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<digitizerUtility::SignalPoint> drift(
const PSimHit& hit,
const Phase2TrackerGeomDetUnit* pixdet,
const GlobalVector& bfield,
const std::vector<digitizerUtility::EnergyDepositUnit>& ionization_points) const override;
// overload drift
std::vector<digitizerUtility::SignalPoint> drift(
std::vector<digitizerUtility::SignalPoint> driftFor3DSensors(
const PSimHit& hit,
const Phase2TrackerGeomDetUnit* pixdet,
const GlobalVector& bfield,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 33b1318

Please sign in to comment.