CMS 3D CMS Logo

hgcalDigitizer_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Base configurations for HGCal digitizers
4 eV_per_eh_pair = 3.62
5 fC_per_ele = 1.6020506e-4
6 nonAgedCCEs = [1.0, 1.0, 1.0]
7 nonAgedNoises = [2100.0,2100.0,1600.0] #100,200,300 um (in electrons)
8 thresholdTracksMIP = False
9 
10 # ECAL
11 hgceeDigitizer = cms.PSet(
12  accumulatorType = cms.string("HGCDigiProducer"),
13  hitCollection = cms.string("HGCHitsEE"),
14  digiCollection = cms.string("HGCDigisEE"),
15  maxSimHitsAccTime = cms.uint32(100),
16  bxTime = cms.double(25),
17  eVPerEleHolePair = cms.double(eV_per_eh_pair),
18  tofDelay = cms.double(1),
19  digitizationType = cms.uint32(0),
20  makeDigiSimLinks = cms.bool(False),
21  useAllChannels = cms.bool(True),
22  verbosity = cms.untracked.uint32(0),
23  digiCfg = cms.PSet(
24  keV2fC = cms.double(0.044259), #1000 eV/3.62 (eV per e) / 6.24150934e3 (e per fC)
25 
26  chargeCollectionEfficiency = cms.vdouble( nonAgedCCEs ),
27  noise_fC = cms.vdouble( [x*fC_per_ele for x in nonAgedNoises] ), #100,200,300 um
28  doTimeSamples = cms.bool(False),
29  feCfg = cms.PSet(
30  # 0 only ADC, 1 ADC with pulse shape, 2 ADC+TDC with pulse shape
31  fwVersion = cms.uint32(2),
32  # leakage to bunches -2, -1, in-time, +1, +2, +3 (from J. Kaplon)
33  #NOTE: this is a fixed-size array inside the simulation (for speed) change accordingly!
34  adcPulse = cms.vdouble(0.00, 0.017, 0.817, 0.163, 0.003, 0.000),
35  pulseAvgT = cms.vdouble(0.00, 23.42298,13.16733,6.41062,5.03946,4.5320),
36  # n bits for the ADC
37  adcNbits = cms.uint32(10),
38  # ADC saturation
39  adcSaturation_fC = cms.double(100),
40  # the tdc resolution smearing (in picoseconds)
41  tdcResolutionInPs = cms.double( 0.001 ),
42  # jitter for timing noise term ns
43  jitterNoise_ns = cms.vdouble(0., 0., 0.),
44  # jitter for timing noise term ns
45  jitterConstant_ns = cms.vdouble(0.00, 0.00, 0.00),
46  # LSB for TDC, assuming 12 bit dynamic range to 10 pC
47  tdcNbits = cms.uint32(12),
48  # TDC saturation
49  tdcSaturation_fC = cms.double(10000),
50  # raise threshold flag (~MIP/2) this is scaled
51  # for different thickness
52  adcThreshold_fC = cms.double(0.672),
53  thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
54  # raise usage of TDC and mode flag (from J. Kaplon)
55  tdcOnset_fC = cms.double(60),
56  # raise usage of TDC for TOA only
57  tdcForToAOnset_fC = cms.vdouble(60., 60., 60.),
58  # LSB for time of arrival estimate from TDC in ns
59  toaLSB_ns = cms.double(0.005),
60  #toa computation mode (0=by weighted energy, 1=simple threshold)
61  toaMode = cms.uint32(1),
62  # TDC charge drain parameterisation (from J. Kaplon)
63  tdcChargeDrainParameterisation = cms.vdouble(
64  -919.13, 365.36, -14.10, 0.2,
65  -21.85, 49.39, 22.21, 0.8,
66  -0.28, 27.14, 43.95,
67  3.89048 )
68  )
69  )
70  )
71 
72 # HCAL front
73 hgchefrontDigitizer = cms.PSet(
74  accumulatorType = cms.string("HGCDigiProducer"),
75  hitCollection = cms.string("HGCHitsHEfront"),
76  digiCollection = cms.string("HGCDigisHEfront"),
77  maxSimHitsAccTime = cms.uint32(100),
78  bxTime = cms.double(25),
79  tofDelay = cms.double(1),
80  digitizationType = cms.uint32(0),
81  makeDigiSimLinks = cms.bool(False),
82  useAllChannels = cms.bool(True),
83  verbosity = cms.untracked.uint32(0),
84  digiCfg = cms.PSet(
85  keV2fC = cms.double(0.044259), #1000 eV / 3.62 (eV per e) / 6.24150934e3 (e per fC)
86  chargeCollectionEfficiency = cms.vdouble( nonAgedCCEs ),
87  noise_fC = cms.vdouble( [x*fC_per_ele for x in nonAgedNoises] ), #100,200,300 um
88  doTimeSamples = cms.bool(False),
89  feCfg = cms.PSet(
90  # 0 only ADC, 1 ADC with pulse shape, 2 ADC+TDC with pulse shape
91  fwVersion = cms.uint32(2),
92  # leakage to bunches -2, -1, in-time, +1, +2, +3 (from J. Kaplon)
93  adcPulse = cms.vdouble(0.00, 0.017, 0.817, 0.163, 0.003, 0.000),
94  pulseAvgT = cms.vdouble(0.00, 23.42298,13.16733,6.41062,5.03946,4.5320),
95  # n bits for the ADC
96  adcNbits = cms.uint32(10),
97  # ADC saturation
98  adcSaturation_fC = cms.double(100),
99  # the tdc resolution smearing (in picoseconds)
100  tdcResolutionInPs = cms.double( 0.001 ),
101  # jitter for timing noise term ns
102  jitterNoise_ns = cms.vdouble(0., 0., 0.),
103  # jitter for timing noise term ns
104  jitterConstant_ns = cms.vdouble(0.00, 0.00, 0.00),
105  # LSB for TDC, assuming 12 bit dynamic range to 10 pC
106  tdcNbits = cms.uint32(12),
107  # TDC saturation
108  tdcSaturation_fC = cms.double(10000),
109  # raise threshold flag (~MIP/2) this is scaled
110  # for different thickness
111  adcThreshold_fC = cms.double(0.672),
112  thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
113  # raise usage of TDC and mode flag (from J. Kaplon)
114  tdcOnset_fC = cms.double(60),
115  # raise usage of TDC for TOA only
116  tdcForToAOnset_fC = cms.vdouble(60., 60., 60.),
117  # LSB for time of arrival estimate from TDC in ns
118  toaLSB_ns = cms.double(0.005),
119  #toa computation mode (0=by weighted energy, 1=simple threshold)
120  toaMode = cms.uint32(1),
121  # TDC charge drain parameterisation (from J. Kaplon)
122  tdcChargeDrainParameterisation = cms.vdouble(
123  -919.13, 365.36, -14.10, 0.2,
124  -21.85, 49.39, 22.21, 0.8,
125  -0.28, 27.14, 43.95,
126  3.89048)
127  )
128  )
129  )
130 
131 
132 # HCAL back (CALICE-like version, no pulse shape)
133 hgchebackDigitizer = cms.PSet(
134  accumulatorType = cms.string("HGCDigiProducer"),
135  hitCollection = cms.string("HcalHits"),
136  digiCollection = cms.string("HGCDigisHEback"),
137  maxSimHitsAccTime = cms.uint32(100),
138  bxTime = cms.double(25),
139  tofDelay = cms.double(1),
140  digitizationType = cms.uint32(1),
141  makeDigiSimLinks = cms.bool(False),
142  useAllChannels = cms.bool(True),
143  verbosity = cms.untracked.uint32(0),
144  digiCfg = cms.PSet(
145  keV2MIP = cms.double(1./616.0),
146  noise_MIP = cms.double(1.0/7.0), #expectation based on latest SiPM performance
147  doTimeSamples = cms.bool(False),
148  nPEperMIP = cms.double(11.0),
149  nTotalPE = cms.double(1156), #1156 pixels => saturation ~600MIP
150  xTalk = cms.double(0.25),
151  sdPixels = cms.double(1e-6), # this is additional photostatistics noise (as implemented), not sure why it's here...
152  feCfg = cms.PSet(
153  # 0 only ADC, 1 ADC with pulse shape, 2 ADC+TDC with pulse shape
154  fwVersion = cms.uint32(0),
155  # n bits for the ADC
156  adcNbits = cms.uint32(12),
157  # ADC saturation : in this case we use the same variable but fC=MIP
158  adcSaturation_fC = cms.double(1024.0),
159  # threshold for digi production : in this case we use the same variable but fC=MIP
160  adcThreshold_fC = cms.double(0.50),
161  thresholdFollowsMIP = cms.bool(False)
162  )
163  )
164  )
165 
166 #function to set noise to aged HGCal
167 endOfLifeCCEs = [0.5, 0.5, 0.7]
168 endOfLifeNoises = [2400.0,2250.0,1750.0]
169 def HGCal_setEndOfLifeNoise(digitizer):
170  if( digitizer.digiCollection != "HGCDigisHEback" ):
171  digitizer.digiCfg.noise_fC = cms.vdouble( [x*fC_per_ele for x in endOfLifeNoises] )
172  digitizer.digiCfg.chargeCollectionEfficiency = cms.double(endOfLifeCCEs)
173  else: #use S/N of 7 for SiPM readout
174  digitizer.digiCfg.noise_MIP = cms.vdouble( 1.0/5.0 )
def HGCal_setEndOfLifeNoise(digitizer)
if(dp >Float(M_PI)) dp-