Skip to content

Commit

Permalink
Merge pull request #37170 from suchandradutta/Phase2Digitizer_PSPInef…
Browse files Browse the repository at this point in the history
…f_123X_01032022

Adding MacroPixel inefficiency in Tracker Phase2Digitizer
  • Loading branch information
cmsbuild committed Mar 10, 2022
2 parents e941f53 + 4b85541 commit 767a838
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
25 changes: 23 additions & 2 deletions SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ PSPDigitizerAlgorithm::PSPDigitizerAlgorithm(const edm::ParameterSet& conf, edm:
: Phase2TrackerDigitizerAlgorithm(conf.getParameter<ParameterSet>("AlgorithmCommon"),
conf.getParameter<ParameterSet>("PSPDigitizerAlgorithm"),
iC),
geomToken_(iC.esConsumes()) {
geomToken_(iC.esConsumes()),
addBiasRailInefficiency_(
conf.getParameter<ParameterSet>("PSPDigitizerAlgorithm").getParameter<bool>("AddBiasRailInefficiency")) {
if (use_LorentzAngle_DB_)
siPhase2OTLorentzAngleToken_ = iC.esConsumes();
pixelFlag_ = false;
Expand All @@ -34,13 +36,16 @@ PSPDigitizerAlgorithm::PSPDigitizerAlgorithm(const edm::ParameterSet& conf, edm:
<< "threshold in electron Endcap = " << theThresholdInE_Endcap_
<< "threshold in electron Barrel = " << theThresholdInE_Barrel_ << " "
<< theElectronPerADC_ << " " << theAdcFullScale_ << " The delta cut-off is set to "
<< tMax_ << " pix-inefficiency " << addPixelInefficiency_;
<< tMax_ << " pix-inefficiency " << addPixelInefficiency_
<< "Bias Rail Inefficiency " << addBiasRailInefficiency_;
}
PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm() { LogDebug("PSPDigitizerAlgorithm") << "Algorithm deleted"; }
//
// -- Select the Hit for Digitization (sigScale will be implemented in future)
//
bool PSPDigitizerAlgorithm::select_hit(const PSimHit& hit, double tCorr, double& sigScale) const {
if (addBiasRailInefficiency_ && isInBiasRailRegion(hit))
return false;
double toa = hit.tof() - tCorr;
return (toa > theTofLowerCut_ && toa < theTofUpperCut_);
}
Expand All @@ -52,3 +57,19 @@ bool PSPDigitizerAlgorithm::isAboveThreshold(const DigitizerUtility::SimHitInfo*
float thr) const {
return (charge >= thr);
}
//
// Check whether the Hit is in the Inefficient Bias Rail Region
//
bool PSPDigitizerAlgorithm::isInBiasRailRegion(const PSimHit& hit) const {
constexpr float implant = 0.1467; // Implant length (1.467 mm)
constexpr float bRail = 0.00375; // Bias Rail region which causes inefficiency (37.5micron)
// Do coordinate transformation of the local Y from module middle point considering 32 implants and 31 inter-impant regions with bias rail
constexpr float block_len = 16 * implant + 15.5 * bRail;
constexpr float block_unit = implant + bRail;
float yin = hit.entryPoint().y() + block_len;
float yout = hit.exitPoint().y() + block_len;
if (std::fmod(yin, block_unit) > implant || std::fmod(yout, block_unit) > implant)
return true;
else
return false;
}
2 changes: 2 additions & 0 deletions SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ class PSPDigitizerAlgorithm : public Phase2TrackerDigitizerAlgorithm {

bool select_hit(const PSimHit& hit, double tCorr, double& sigScale) const override;
bool isAboveThreshold(const DigitizerUtility::SimHitInfo* hitInfo, float charge, float thr) const override;
bool isInBiasRailRegion(const PSimHit& hit) const;

private:
edm::ESGetToken<SiPhase2OuterTrackerLorentzAngle, SiPhase2OuterTrackerLorentzAngleSimRcd> siPhase2OTLorentzAngleToken_;
const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> geomToken_;
bool addBiasRailInefficiency_{false};
};
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@
EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,
0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
CellsToKill = cms.VPSet()
CellsToKill = cms.VPSet(),
AddBiasRailInefficiency= cms.bool(False)
),
#Strip in PS module
PSSDigitizerAlgorithm = cms.PSet(
Expand Down

0 comments on commit 767a838

Please sign in to comment.