Skip to content

Commit

Permalink
Merge pull request #39989 from suchandradutta/Phase2Digitizer_NoiseOc…
Browse files Browse the repository at this point in the history
…cupancy_03112022

Implementation of  digitizer noise occupancy
  • Loading branch information
cmsbuild committed Nov 10, 2022
2 parents 4bc13d6 + b34f540 commit 34f52b3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
Expand Up @@ -721,7 +721,7 @@ void Phase2TrackerDigitizerAlgorithm::pixel_inefficiency(const SubdetEfficiencie
}
void Phase2TrackerDigitizerAlgorithm::initializeEvent(CLHEP::HepRandomEngine& eng) {
if (addNoise_ || addPixelInefficiency_ || fluctuateCharge_ || addThresholdSmearing_) {
gaussDistribution_ = std::make_unique<CLHEP::RandGaussQ>(eng, 0., theReadoutNoise_);
gaussDistribution_ = std::make_unique<CLHEP::RandGaussQ>(eng, 0., theNoiseInElectrons_);
}
// Threshold smearing with gaussian distribution:
if (addThresholdSmearing_) {
Expand Down Expand Up @@ -891,8 +891,12 @@ void Phase2TrackerDigitizerAlgorithm::digitize(const Phase2TrackerGeomDetUnit* p
add_noise(pixdet); // generate noise
if (addXtalk_)
add_cross_talk(pixdet);
if (addNoisyPixels_)
add_noisy_cells(pixdet, theHIPThresholdInE / theElectronPerADC_);
if (addNoisyPixels_) {
float thresholdInNoiseUnits = 99.9;
if (theNoiseInElectrons_)
thresholdInNoiseUnits = theThresholdInE / theNoiseInElectrons_;
add_noisy_cells(pixdet, thresholdInNoiseUnits);
}

// Do only if needed
if (addPixelInefficiency_ && !theSignal.empty()) {
Expand Down
34 changes: 17 additions & 17 deletions SimTracker/SiPhase2Digitizer/python/phase2TrackerDigitizer_cfi.py
Expand Up @@ -2,7 +2,7 @@

PixelDigitizerAlgorithmCommon = cms.PSet(
ElectronPerAdc = cms.double(1500.0),
ReadoutNoiseInElec = cms.double(0.0),
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(1000.0),
ThresholdInElectrons_Endcap = cms.double(1000.0),
AddThresholdSmearing = cms.bool(False),
Expand Down Expand Up @@ -94,10 +94,10 @@
#Pixel in PS Module
PSPDigitizerAlgorithm = cms.PSet(
ElectronPerAdc = cms.double(135.0),
ReadoutNoiseInElec = cms.double(200.0),#D.B.:Fill readout noise, including all readout chain, relevant for smearing
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
ThresholdInElectrons_Endcap = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
AddThresholdSmearing = cms.bool(True),
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(630.0),
ThresholdSmearing_Endcap = cms.double(630.0),
HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
Expand Down Expand Up @@ -133,15 +133,15 @@
PSSDigitizerAlgorithm = cms.PSet(
ElectronPerAdc = cms.double(135.0),
#D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
ReadoutNoiseInElec = cms.double(700.0),#D.B.:Fill readout noise, including all readout chain, relevant for smearing
ThresholdInElectrons_Barrel = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
ThresholdInElectrons_Endcap = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
AddThresholdSmearing = cms.bool(True),
ThresholdSmearing_Barrel = cms.double(630.0),
ThresholdSmearing_Endcap = cms.double(630.0),
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(4800.), #(0.4 MIP = 0.4 * 16000 e)
ThresholdInElectrons_Endcap = cms.double(4800.), #(0.4 MIP = 0.4 * 16000 e)
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(480.0),
ThresholdSmearing_Endcap = cms.double(480.0),
HIPThresholdInElectrons_Barrel = cms.double(21000.), # 1.4 MIP considered as HIP
HIPThresholdInElectrons_Endcap = cms.double(21000.), # 1.4 MIP considered as HIP
NoiseInElectrons = cms.double(700), # 30% of the readout noise (should be changed in future)
NoiseInElectrons = cms.double(1010), # threshold = 4800e, noise=4800e/4.75=1010 (4.75 sigma=>occupancy =1e-6)
Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
AdcFullScale = cms.int32(255),
TofUpperCut = cms.double(12.5),
Expand Down Expand Up @@ -171,15 +171,15 @@
SSDigitizerAlgorithm = cms.PSet(
ElectronPerAdc = cms.double(135.0),
#D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
ReadoutNoiseInElec = cms.double(1000.0),#D.B.:Fill readout noise, including all readout chain, relevant for smearing
ThresholdInElectrons_Barrel = cms.double(5800.), #D.B.: this should correspond to a threshold of 530mV
ThresholdInElectrons_Endcap = cms.double(5800.),
AddThresholdSmearing = cms.bool(True),
ThresholdSmearing_Barrel = cms.double(580.0),#D.B.: changed (~5mV peakToPeak --> 1.76mV rms) (was 210.0)
ThresholdSmearing_Endcap = cms.double(580.0),#D.B.: changed (~5mV peakToPeak --> 1.76mV rms) (was 245.0)
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(6000.),
ThresholdInElectrons_Endcap = cms.double(6000.),
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(600.0),
ThresholdSmearing_Endcap = cms.double(600.0),
HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
NoiseInElectrons = cms.double(1000), # 30% of the readout noise (should be changed in future)
NoiseInElectrons = cms.double(1263), # threshold = 6000e, noise=6000e/4.75=1263e (4.75 sigma=>occupancy =1e-6)
Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
AdcFullScale = cms.int32(255),
TofUpperCut = cms.double(12.5),
Expand Down

0 comments on commit 34f52b3

Please sign in to comment.