1 import FWCore.ParameterSet.Config
as cms
3 from SimCalorimetry.HGCalSimProducers.hgcROCParameters_cfi
import hgcROCSettings
4 from SimCalorimetry.HGCalSimAlgos.hgcSensorOpParams_cfi
import hgcSiSensorIleak,hgcSiSensorCCE
8 fC_per_ele = 1.6020506e-4
9 nonAgedCCEs = [1.0, 1.0, 1.0]
10 nonAgedNoises = [2100.0,2100.0,1600.0]
11 nonAgedNoises_v9 = [2000.0,2400.0,2000.0]
12 thresholdTracksMIP =
True 14 HGCAL_ileakParam_toUse = cms.PSet(
18 HGCAL_cceParams_toUse = cms.PSet(
24 HGCAL_noise_fC = cms.PSet(
25 scaleByDose = cms.bool(
False),
26 scaleByDoseAlgo = cms.uint32(0),
27 scaleByDoseFactor = cms.double(1),
28 doseMap = cms.string(
""),
29 values = cms.vdouble( [x*fC_per_ele
for x
in nonAgedNoises] ),
32 HFNose_noise_fC = HGCAL_noise_fC.clone()
34 HGCAL_noise_heback = cms.PSet(
35 scaleByDose = cms.bool(
False),
36 scaleByDoseAlgo = cms.uint32(0),
37 scaleByDoseFactor = cms.double(1),
38 doseMap = cms.string(
""),
39 sipmMap = cms.string(
""),
40 referenceIdark = cms.double(-1),
41 referenceXtalk = cms.double(-1),
42 noise_MIP = cms.double(1./100.)
45 HGCAL_chargeCollectionEfficiencies = cms.PSet(
46 values = cms.vdouble( nonAgedCCEs )
49 HGCAL_noises = cms.PSet(
50 values = cms.vdouble([x
for x
in nonAgedNoises])
54 hgceeDigitizer = cms.PSet(
55 accumulatorType = cms.string(
"HGCDigiProducer"),
56 digitizer = cms.string(
"HGCEEDigitizer"),
57 hitCollection = cms.string(
"HGCHitsEE"),
58 digiCollection = cms.string(
"HGCDigisEE"),
59 NoiseGeneration_Method = cms.bool(
True),
60 maxSimHitsAccTime = cms.uint32(100),
61 bxTime = cms.double(25),
62 eVPerEleHolePair = cms.double(eV_per_eh_pair),
63 tofDelay = cms.double(5),
64 digitizationType = cms.uint32(0),
65 makeDigiSimLinks = cms.bool(
False),
66 premixStage1 = cms.bool(
False),
67 premixStage1MinCharge = cms.double(0),
68 premixStage1MaxCharge = cms.double(1e6),
69 useAllChannels = cms.bool(
True),
70 verbosity = cms.untracked.uint32(0),
72 keV2fC = cms.double(0.044259),
73 ileakParam = cms.PSet(refToPSet_ = cms.string(
"HGCAL_ileakParam_toUse")),
74 cceParams = cms.PSet(refToPSet_ = cms.string(
"HGCAL_cceParams_toUse")),
75 chargeCollectionEfficiencies = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
76 noise_fC = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_fC")),
77 doTimeSamples = cms.bool(
False),
78 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
79 feCfg = hgcROCSettings.clone()
84 hgchefrontDigitizer = cms.PSet(
85 accumulatorType = cms.string(
"HGCDigiProducer"),
86 digitizer = cms.string(
"HGCHEfrontDigitizer"),
87 hitCollection = cms.string(
"HGCHitsHEfront"),
88 digiCollection = cms.string(
"HGCDigisHEfront"),
89 NoiseGeneration_Method = cms.bool(
True),
90 maxSimHitsAccTime = cms.uint32(100),
91 bxTime = cms.double(25),
92 tofDelay = cms.double(5),
93 digitizationType = cms.uint32(0),
94 makeDigiSimLinks = cms.bool(
False),
95 premixStage1 = cms.bool(
False),
96 premixStage1MinCharge = cms.double(0),
97 premixStage1MaxCharge = cms.double(1e6),
98 useAllChannels = cms.bool(
True),
99 verbosity = cms.untracked.uint32(0),
101 keV2fC = cms.double(0.044259),
102 ileakParam = cms.PSet(refToPSet_ = cms.string(
"HGCAL_ileakParam_toUse")),
103 cceParams = cms.PSet(refToPSet_ = cms.string(
"HGCAL_cceParams_toUse")),
104 chargeCollectionEfficiencies = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
105 noise_fC = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_fC")),
106 doTimeSamples = cms.bool(
False),
107 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
108 feCfg = hgcROCSettings.clone()
113 hgchebackDigitizer = cms.PSet(
114 accumulatorType = cms.string(
"HGCDigiProducer"),
115 digitizer = cms.string(
"HGCHEbackDigitizer"),
116 hitCollection = cms.string(
"HGCHitsHEback"),
117 digiCollection = cms.string(
"HGCDigisHEback"),
118 NoiseGeneration_Method = cms.bool(
True),
119 maxSimHitsAccTime = cms.uint32(100),
120 bxTime = cms.double(25),
121 tofDelay = cms.double(1),
122 digitizationType = cms.uint32(1),
123 makeDigiSimLinks = cms.bool(
False),
124 premixStage1 = cms.bool(
False),
125 premixStage1MinCharge = cms.double(0),
126 premixStage1MaxCharge = cms.double(1e6),
127 useAllChannels = cms.bool(
True),
128 verbosity = cms.untracked.uint32(0),
131 algo = cms.uint32(2),
132 noise = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_heback")),
133 keV2MIP = cms.double(1./675.0),
134 doTimeSamples = cms.bool(
False),
135 nPEperMIP = cms.double(21.0),
136 nTotalPE = cms.double(7500),
137 sdPixels = cms.double(1e-6),
138 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
139 feCfg = hgcROCSettings.clone(
141 adcSaturation_fC = 68.75,
142 tdcSaturation_fC = 1000,
143 targetMIPvalue_ADC = 15,
144 adcThreshold_fC = 0.5,
147 tdcForToAOnset_fC = cms.vdouble(12.,12.,12.),
153 hfnoseDigitizer = cms.PSet(
154 accumulatorType = cms.string(
"HGCDigiProducer"),
155 digitizer = cms.string(
"HFNoseDigitizer"),
156 hitCollection = cms.string(
"HFNoseHits"),
157 digiCollection = cms.string(
"HFNoseDigis"),
158 NoiseGeneration_Method = cms.bool(
True),
159 maxSimHitsAccTime = cms.uint32(100),
160 bxTime = cms.double(25),
161 eVPerEleHolePair = cms.double(eV_per_eh_pair),
162 tofDelay = cms.double(5),
163 digitizationType = cms.uint32(0),
164 makeDigiSimLinks = cms.bool(
False),
165 premixStage1 = cms.bool(
False),
166 premixStage1MinCharge = cms.double(0),
167 premixStage1MaxCharge = cms.double(1e6),
168 useAllChannels = cms.bool(
True),
169 verbosity = cms.untracked.uint32(0),
171 keV2fC = cms.double(0.044259),
172 ileakParam = cms.PSet(refToPSet_ = cms.string(
"HGCAL_ileakParam_toUse")),
173 cceParams = cms.PSet(refToPSet_ = cms.string(
"HGCAL_cceParams_toUse")),
174 chargeCollectionEfficiencies = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
175 noise_fC = cms.PSet(refToPSet_ = cms.string(
"HFNose_noise_fC")),
176 doTimeSamples = cms.bool(
False),
177 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
178 feCfg = hgcROCSettings.clone()
183 from Configuration.ProcessModifiers.premix_stage1_cff
import premix_stage1
184 for _m
in [hgceeDigitizer, hgchefrontDigitizer, hgchebackDigitizer, hfnoseDigitizer]:
185 premix_stage1.toModify(_m, premixStage1 =
True)
188 endOfLifeCCEs = [0.5, 0.5, 0.7]
189 endOfLifeNoises = [2400.0,2250.0,1750.0]
192 includes all effects from radiation and gain choice 193 (see also notes in HGCal_setRealisticStartupNoise) 199 byDoseAlgo=byDoseAlgoSci,
200 byDoseFactor=byDoseFactor,
205 process.HGCAL_cceParams_toUse = cms.PSet(
210 process.HGCAL_ileakParam_toUse = cms.PSet(
216 process.HGCAL_cceParams_toUse = cms.PSet(
221 process.HGCAL_ileakParam_toUse = cms.PSet(
228 include all effects except: 229 * fluence impact on leakage current, CCE and SiPM dark current 230 * dose impact on tile light yield 231 dark current on SiPMs adjusted for a S/N ~ 7 233 * byDoseAlgo is used as a collection of bits to toggle: 234 * Si: FLUENCE, CCE, NOISE, PULSEPERGAIN, CACHEDOP (from lsb to Msb) 235 * Sci: IGNORE_SIPMAREA, OVERRIDE_SIPMAREA, IGNORE_TILEAREA, IGNORE_DOSESCALE, IGNORE_FLUENCESCALE, IGNORE_NOISE, IGNORE_TILETYPE (from lsb to Msb) 236 (for instance turning on the 0th bit turns off the impact of fluence in Si) 244 similar to HGCal_setRealisticStartupNoise but tile and SiPM areas are fixed 245 as 4mm2 assumed use Idark=0.25 so that S/N ~ 7 246 by changing the target S/N different the reference Idark will be scaled accordingly 251 idark=0.25/(targetSN/6.97)**2
252 print(
'[HGCal_setRealisticStartupNoise_fixedSiPMTileAreasAndSN] for a target S/N={:3.2f} setting idark={:3.3f}nA'.
format(targetSN,idark))
254 byDoseAlgo=2+4+8+16+64+128*ignorePedestal,
255 byDoseSipmMap=cms.string(
"SimCalorimetry/HGCalSimProducers/data/sipmParams_all4mm2.txt"),
256 referenceIdark=idark,
257 referenceXtalk=referenceXtalk)
263 include all effects except fluence impact on leakage current and CCE and SiPM dark current 264 and dose impact on tile light yield 265 (see also notes in HGCal_setRealisticStartupNoise) 273 include all effects except noise impact on leakage current and CCE, and scint 274 (see also notes in HGCal_setRealisticStartupNoise) 282 include all effects except the per-gain pulse emulation 283 for the moment this only done for Si 284 (see also notes in HGCal_setRealisticStartupNoise) 292 include all effects except cachine of siop parameters (gain cpu time) 293 for the moment this only done for Si 294 (see also notes in HGCal_setRealisticStartupNoise) 300 doseMap = cms.string(
"SimCalorimetry/HGCalSimProducers/data/doseParams_3000fb_fluka-3.7.20.txt")
303 process.HGCAL_noise_fC = cms.PSet(
304 scaleByDose = cms.bool(byDose),
305 scaleByDoseAlgo = cms.uint32(byDoseAlgo),
306 scaleByDoseFactor = cms.double(byDoseFactor),
308 values = cms.vdouble( [x*fC_per_ele
for x
in endOfLifeNoises] ),
312 process.HGCAL_chargeCollectionEfficiencies = cms.PSet(
313 values = cms.vdouble(endOfLifeCCEs)
317 process.HGCAL_noises = cms.PSet(
318 values = cms.vdouble([x
for x
in endOfLifeNoises])
325 process.HFNose_noise_fC = cms.PSet(
326 scaleByDose = cms.bool(byDose),
327 scaleByDoseAlgo = cms.uint32(byDoseAlgo),
328 scaleByDoseFactor = cms.double(byDoseFactor),
330 values = cms.vdouble( [x*fC_per_ele
for x
in endOfLifeNoises] ),
339 byDoseSipmMap=cms.string(
"SimCalorimetry/HGCalSimProducers/data/sipmParams_geom-10.txt"),
343 process.HGCAL_noise_heback = cms.PSet(
344 scaleByDose = cms.bool(byDose),
345 scaleByDoseAlgo = cms.uint32(byDoseAlgo),
346 scaleByDoseFactor = cms.double(byDoseFactor),
348 sipmMap = byDoseSipmMap,
349 referenceIdark = cms.double(referenceIdark),
350 referenceXtalk = cms.double(referenceXtalk),
351 noise_MIP = cms.double(1./5.),
356 process.HGCAL_noise_fC = cms.PSet(
357 scaleByDose = cms.bool(
False),
358 scaleByDoseAlgo = cms.uint32(0),
359 scaleByDoseFactor = cms.double(1),
360 doseMap = cms.string(
""),
361 values = cms.vdouble(0,0,0),
363 process.HGCAL_noise_heback = cms.PSet(
364 scaleByDose = cms.bool(
False),
365 scaleByDoseAlgo = cms.uint32(0),
366 scaleByDoseFactor = cms.double(1),
367 doseMap = cms.string(
""),
368 referenceIdark = cms.double(0.),
369 referenceXtalk = cms.double(-1),
370 noise_MIP = cms.double(0.),
372 process.HGCAL_noises = cms.PSet(
373 values = cms.vdouble(0,0,0)
377 from Configuration.Eras.Modifier_phase2_hgcalV10_cff
import phase2_hgcalV10
379 phase2_hgcalV10.toModify(HGCAL_noise_fC, values = [x*fC_per_ele
for x
in nonAgedNoises_v9])
380 phase2_hgcalV10.toModify(HGCAL_noises, values = [x
for x
in nonAgedNoises_v9])
383 """includes all effects from radiation and gain choice""" 385 process=
HFNose_setRealisticNoiseSi(process,byDose=byDose,byDoseAlgo=byDoseAlgo,byDoseMap=doseMapNose,byDoseFactor=byDoseFactor)
388 doseMapNose = cms.string(
"SimCalorimetry/HGCalSimProducers/data/doseParams_3000fb_fluka_HFNose_3.7.20.12_Eta2.4.txt")
def HFNose_setEndOfLifeNoise(process, byDose=True, byDoseAlgo=0, byDoseFactor=1)
def HGCal_setEndOfLifeNoise_4000(process)
def HGCal_ignoreFluence(process)
def HGCal_disableNoise(process)
def hgcSiSensorCCE(sensor, version)
def hgcSiSensorIleak(version)
def HGCal_ignoreNoise(process)
def HGCal_setRealisticNoiseSci(process, byDose=True, byDoseAlgo=2, byDoseMap=doseMap, byDoseSipmMap=cms.string("SimCalorimetry/HGCalSimProducers/data/sipmParams_geom-10.txt"), byDoseFactor=1, referenceIdark=0.25, referenceXtalk=-1)
def HGCal_useCaching(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def HGCal_setEndOfLifeNoise_1500(process)
def HFNose_setRealisticNoiseSi(process, byDose=True, byDoseAlgo=0, byDoseMap=doseMap, byDoseFactor=1)
def HGCal_setRealisticNoiseSi(process, byDose=True, byDoseAlgo=0, byDoseMap=doseMap, byDoseFactor=1)
def HGCal_setRealisticStartupNoise_fixedSiPMTileAreasAndSN(process, targetSN=7, referenceXtalk=-1, ignorePedestal=False)
def HGCal_ignorePulsePerGain(process)
def HGCal_setRealisticStartupNoise(process)
def HGCal_setEndOfLifeNoise(process, byDose=True, byDoseAlgo=0, byDoseAlgoSci=2, byDoseFactor=1)