Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
move noise into hgcroc conditions table
Browse files Browse the repository at this point in the history
use ADC=2.0 as the average noise, this is a conservative default that
aligns with noise found in CMS HGCAL tests
  • Loading branch information
tomeichlersmith committed Nov 10, 2022
1 parent 91ad8fa commit 0c3aa20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions python/digi.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def __init__(self) :
self.timeDnSlope = 45.037
self.timePeak = 12.698 # the time such that with [parameter 4]=0, the pulse peaks at t=0

# noise (0.02PE)
self.noiseRMS = self.calculateVoltageHcal(0.02) # mV

def calculateVoltageHcal(self, PE) :
"""Calculate the voltage signal [mV] of the input number of photo-electrons (PEs)
Assuming that 1 PE ~ 5mV
Expand Down Expand Up @@ -94,6 +91,7 @@ def __init__(self, instance_name = 'hcalDigis') :
self.avgReadoutThreshold = 4. #ADCs - noise config only
self.avgGain = 1.2 #noise config only
self.avgPedestal = 1. #noise config only
self.avgNoiseRMS = 2. #noise config only

# input and output collection name parameters
self.inputCollName = 'HcalSimHits'
Expand Down
2 changes: 2 additions & 0 deletions python/hcal_hardcoded_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

HcalHgcrocConditionsHardcode=SimpleCSVDoubleTableProvider("HcalHgcrocConditions", [
"PEDESTAL",
"NOISE",
"MEAS_TIME",
"PAD_CAPACITANCE",
"TOT_MAX",
Expand All @@ -52,6 +53,7 @@

HcalHgcrocConditionsHardcode.validForAllRows([
1. , #PEDESTAL
2.0, #NOISE
12.5, #MEAS_TIME - ns - clock_cycle/2 - defines the point in the BX where an in-time (time=0 in times vector) hit would arrive
20., #PAD_CAPACITANCE - pF
200., #TOT_MAX - ns - maximum time chip would be in TOT mode
Expand Down
3 changes: 1 addition & 2 deletions src/Hcal/HcalDigiProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ void HcalDigiProducer::configure(framework::config::Parameters& ps) {
double gain = ps.getParameter<double>("avgGain");
double pedestal = ps.getParameter<double>("avgPedestal");
// rms noise in mV
noiseGenerator_->setNoise(
hgcrocParams.getParameter<double>("noiseRMS")); // rms noise in mV
noiseGenerator_->setNoise(gain*ps.getParameter<double>("avgNoiseRMS"));
// mean noise amplitude (if using Gaussian Model for the noise) in mV
noiseGenerator_->setPedestal(gain * pedestal);
// threshold for readout in mV
Expand Down

0 comments on commit 0c3aa20

Please sign in to comment.