Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of Phase2 Tracker Digitizer to fix an issue in Premixing #42938

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -997,15 +997,16 @@ int Phase2TrackerDigitizerAlgorithm::convertSignalToAdc(uint32_t detID, float si
signal_in_adc = theAdcFullScale_;
} else {
if (thePhase2ReadoutMode_ == -1) {
temp_signal = std::min(static_cast<int>(signal_in_elec / theElectronPerADC_), theAdcFullScale_);
temp_signal = std::min(static_cast<int>(std::round(signal_in_elec / theElectronPerADC_)), theAdcFullScale_);
} else {
// calculate the kink point and the slope
int dualslope_param = std::min(std::abs(thePhase2ReadoutMode_), max_limit);
int kink_point = static_cast<int>(theAdcFullScale_ / 2) + 1;
// C-ROC: first valid ToT code above threshold is 0b0000
temp_signal = std::floor((signal_in_elec - threshold) / theElectronPerADC_);
if (temp_signal > kink_point)
temp_signal = std::floor((temp_signal - kink_point) / (pow(2, dualslope_param - 1))) + kink_point;
temp_signal =
static_cast<int>(std::floor((temp_signal - kink_point) / (pow(2, dualslope_param - 1)))) + kink_point;
}
signal_in_adc = std::min(temp_signal, theAdcFullScale_);
LogTrace("Phase2TrackerDigitizerAlgorithm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,17 @@
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
Phase2ReadoutMode = -1,
AdcFullScale = 255,
AddXTalk = False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend documenting this here:

# For premixing stage1
# - add noise as by default
# - do not add noisy pixels (to be done in stage2)
# - do not apply inefficiency (to be done in stage2)
# - disable threshold smearing

),
Pixel3DDigitizerAlgorithm = dict(
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
Phase2ReadoutMode = -1,
AdcFullScale = 255,
AddXTalk = False,
),
PSPDigitizerAlgorithm = dict(
AddNoisyPixels = False,
Expand Down