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 hitsProducer = cms.string(
"g4SimHits"),
58 hitCollection = cms.string(
"HGCHitsEE"),
59 digiCollection = cms.string(
"HGCDigisEE"),
60 NoiseGeneration_Method = cms.bool(
True),
61 maxSimHitsAccTime = cms.uint32(100),
62 bxTime = cms.double(25),
63 eVPerEleHolePair = cms.double(eV_per_eh_pair),
64 tofDelay = cms.double(-9),
65 digitizationType = cms.uint32(0),
66 makeDigiSimLinks = cms.bool(
False),
67 premixStage1 = cms.bool(
False),
68 premixStage1MinCharge = cms.double(0),
69 premixStage1MaxCharge = cms.double(1e6),
70 useAllChannels = cms.bool(
True),
71 verbosity = cms.untracked.uint32(0),
73 keV2fC = cms.double(0.044259),
74 ileakParam = cms.PSet(refToPSet_ = cms.string(
"HGCAL_ileakParam_toUse")),
75 cceParams = cms.PSet(refToPSet_ = cms.string(
"HGCAL_cceParams_toUse")),
76 chargeCollectionEfficiencies = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
77 noise_fC = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_fC")),
78 doTimeSamples = cms.bool(
False),
79 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
80 feCfg = hgcROCSettings.clone()
85 hgchefrontDigitizer = cms.PSet(
86 accumulatorType = cms.string(
"HGCDigiProducer"),
87 digitizer = cms.string(
"HGCHEfrontDigitizer"),
88 hitsProducer = cms.string(
"g4SimHits"),
89 hitCollection = cms.string(
"HGCHitsHEfront"),
90 digiCollection = cms.string(
"HGCDigisHEfront"),
91 NoiseGeneration_Method = cms.bool(
True),
92 maxSimHitsAccTime = cms.uint32(100),
93 bxTime = cms.double(25),
94 tofDelay = cms.double(-11),
95 digitizationType = cms.uint32(0),
96 makeDigiSimLinks = cms.bool(
False),
97 premixStage1 = cms.bool(
False),
98 premixStage1MinCharge = cms.double(0),
99 premixStage1MaxCharge = cms.double(1e6),
100 useAllChannels = cms.bool(
True),
101 verbosity = cms.untracked.uint32(0),
103 keV2fC = cms.double(0.044259),
104 ileakParam = cms.PSet(refToPSet_ = cms.string(
"HGCAL_ileakParam_toUse")),
105 cceParams = cms.PSet(refToPSet_ = cms.string(
"HGCAL_cceParams_toUse")),
106 chargeCollectionEfficiencies = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
107 noise_fC = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_fC")),
108 doTimeSamples = cms.bool(
False),
109 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
110 feCfg = hgcROCSettings.clone()
115 hgchebackDigitizer = cms.PSet(
116 accumulatorType = cms.string(
"HGCDigiProducer"),
117 digitizer = cms.string(
"HGCHEbackDigitizer"),
118 hitsProducer = cms.string(
"g4SimHits"),
119 hitCollection = cms.string(
"HGCHitsHEback"),
120 digiCollection = cms.string(
"HGCDigisHEback"),
121 NoiseGeneration_Method = cms.bool(
True),
122 maxSimHitsAccTime = cms.uint32(100),
123 bxTime = cms.double(25),
124 tofDelay = cms.double(-14),
125 digitizationType = cms.uint32(1),
126 makeDigiSimLinks = cms.bool(
False),
127 premixStage1 = cms.bool(
False),
128 premixStage1MinCharge = cms.double(0),
129 premixStage1MaxCharge = cms.double(1e6),
130 useAllChannels = cms.bool(
True),
131 verbosity = cms.untracked.uint32(0),
134 algo = cms.uint32(2),
135 noise = cms.PSet(refToPSet_ = cms.string(
"HGCAL_noise_heback")),
136 keV2MIP = cms.double(1./675.0),
137 doTimeSamples = cms.bool(
False),
138 nPEperMIP = cms.double(21.0),
139 nTotalPE = cms.double(7500),
140 sdPixels = cms.double(1e-6),
141 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
142 feCfg = hgcROCSettings.clone(
144 adcSaturation_fC = 68.75,
145 tdcSaturation_fC = 1000,
146 targetMIPvalue_ADC = 15,
147 adcThreshold_fC = 0.5,
150 tdcForToAOnset_fC = cms.vdouble(12.,12.,12.),
156 hfnoseDigitizer = cms.PSet(
157 accumulatorType = cms.string(
"HGCDigiProducer"),
158 digitizer = cms.string(
"HFNoseDigitizer"),
159 hitsProducer = cms.string(
"g4SimHits"),
160 hitCollection = cms.string(
"HFNoseHits"),
161 digiCollection = cms.string(
"HFNoseDigis"),
162 NoiseGeneration_Method = cms.bool(
True),
163 maxSimHitsAccTime = cms.uint32(100),
164 bxTime = cms.double(25),
165 eVPerEleHolePair = cms.double(eV_per_eh_pair),
166 tofDelay = cms.double(-33),
167 digitizationType = cms.uint32(0),
168 makeDigiSimLinks = cms.bool(
False),
169 premixStage1 = cms.bool(
False),
170 premixStage1MinCharge = cms.double(0),
171 premixStage1MaxCharge = cms.double(1e6),
172 useAllChannels = cms.bool(
True),
173 verbosity = cms.untracked.uint32(0),
175 keV2fC = cms.double(0.044259),
176 ileakParam = cms.PSet(refToPSet_ = cms.string(
"HGCAL_ileakParam_toUse")),
177 cceParams = cms.PSet(refToPSet_ = cms.string(
"HGCAL_cceParams_toUse")),
178 chargeCollectionEfficiencies = cms.PSet(refToPSet_ = cms.string(
"HGCAL_chargeCollectionEfficiencies")),
179 noise_fC = cms.PSet(refToPSet_ = cms.string(
"HFNose_noise_fC")),
180 doTimeSamples = cms.bool(
False),
181 thresholdFollowsMIP = cms.bool(thresholdTracksMIP),
182 feCfg = hgcROCSettings.clone()
187 from Configuration.ProcessModifiers.premix_stage1_cff
import premix_stage1
188 for _m
in [hgceeDigitizer, hgchefrontDigitizer, hgchebackDigitizer, hfnoseDigitizer]:
189 premix_stage1.toModify(_m, premixStage1 =
True)
192 endOfLifeCCEs = [0.5, 0.5, 0.7]
193 endOfLifeNoises = [2400.0,2250.0,1750.0]
196 includes all effects from radiation and gain choice 197 (see also notes in HGCal_setRealisticStartupNoise) 203 byDoseAlgo=byDoseAlgoSci,
204 byDoseFactor=byDoseFactor,
209 process.HGCAL_cceParams_toUse = cms.PSet(
214 process.HGCAL_ileakParam_toUse = cms.PSet(
220 process.HGCAL_cceParams_toUse = cms.PSet(
225 process.HGCAL_ileakParam_toUse = cms.PSet(
232 include all effects except: 233 * fluence impact on leakage current, CCE and SiPM dark current 234 * dose impact on tile light yield 235 dark current on SiPMs adjusted for a S/N ~ 7 237 * byDoseAlgo is used as a collection of bits to toggle: 238 * Si: FLUENCE, CCE, NOISE, PULSEPERGAIN, CACHEDOP (from lsb to Msb) 239 * Sci: IGNORE_SIPMAREA, OVERRIDE_SIPMAREA, IGNORE_TILEAREA, IGNORE_DOSESCALE, IGNORE_FLUENCESCALE, IGNORE_NOISE, IGNORE_TILETYPE (from lsb to Msb) 240 (for instance turning on the 0th bit turns off the impact of fluence in Si) 248 similar to HGCal_setRealisticStartupNoise but tile and SiPM areas are fixed 249 as 4mm2 assumed use Idark=0.25 so that S/N ~ 7 250 by changing the target S/N different the reference Idark will be scaled accordingly 255 idark=0.25/(targetSN/6.97)**2
256 print(
'[HGCal_setRealisticStartupNoise_fixedSiPMTileAreasAndSN] for a target S/N={:3.2f} setting idark={:3.3f}nA'.
format(targetSN,idark))
258 byDoseAlgo=2+4+8+16+64+128*ignorePedestal,
259 byDoseSipmMap=cms.string(
"SimCalorimetry/HGCalSimProducers/data/sipmParams_all4mm2.txt"),
260 referenceIdark=idark,
261 referenceXtalk=referenceXtalk)
267 include all effects except fluence impact on leakage current and CCE and SiPM dark current 268 and dose impact on tile light yield 269 (see also notes in HGCal_setRealisticStartupNoise) 277 include all effects except noise impact on leakage current and CCE, and scint 278 (see also notes in HGCal_setRealisticStartupNoise) 286 include all effects except the per-gain pulse emulation 287 for the moment this only done for Si 288 (see also notes in HGCal_setRealisticStartupNoise) 296 include all effects except cachine of siop parameters (gain cpu time) 297 for the moment this only done for Si 298 (see also notes in HGCal_setRealisticStartupNoise) 304 doseMap = cms.string(
"SimCalorimetry/HGCalSimProducers/data/doseParams_3000fb_fluka-3.7.20.txt")
307 process.HGCAL_noise_fC = cms.PSet(
308 scaleByDose = cms.bool(byDose),
309 scaleByDoseAlgo = cms.uint32(byDoseAlgo),
310 scaleByDoseFactor = cms.double(byDoseFactor),
312 values = cms.vdouble( [x*fC_per_ele
for x
in endOfLifeNoises] ),
316 process.HGCAL_chargeCollectionEfficiencies = cms.PSet(
317 values = cms.vdouble(endOfLifeCCEs)
321 process.HGCAL_noises = cms.PSet(
322 values = cms.vdouble([x
for x
in endOfLifeNoises])
329 process.HFNose_noise_fC = cms.PSet(
330 scaleByDose = cms.bool(byDose),
331 scaleByDoseAlgo = cms.uint32(byDoseAlgo),
332 scaleByDoseFactor = cms.double(byDoseFactor),
334 values = cms.vdouble( [x*fC_per_ele
for x
in endOfLifeNoises] ),
343 byDoseSipmMap=cms.string(
"SimCalorimetry/HGCalSimProducers/data/sipmParams_geom-10.txt"),
347 process.HGCAL_noise_heback = cms.PSet(
348 scaleByDose = cms.bool(byDose),
349 scaleByDoseAlgo = cms.uint32(byDoseAlgo),
350 scaleByDoseFactor = cms.double(byDoseFactor),
352 sipmMap = byDoseSipmMap,
353 referenceIdark = cms.double(referenceIdark),
354 referenceXtalk = cms.double(referenceXtalk),
355 noise_MIP = cms.double(1./5.),
360 process.HGCAL_noise_fC = cms.PSet(
361 scaleByDose = cms.bool(
False),
362 scaleByDoseAlgo = cms.uint32(0),
363 scaleByDoseFactor = cms.double(1),
364 doseMap = cms.string(
""),
365 values = cms.vdouble(0,0,0),
367 process.HGCAL_noise_heback = cms.PSet(
368 scaleByDose = cms.bool(
False),
369 scaleByDoseAlgo = cms.uint32(0),
370 scaleByDoseFactor = cms.double(1),
371 doseMap = cms.string(
""),
372 referenceIdark = cms.double(0.),
373 referenceXtalk = cms.double(-1),
374 noise_MIP = cms.double(0.),
376 process.HGCAL_noises = cms.PSet(
377 values = cms.vdouble(0,0,0)
381 from Configuration.Eras.Modifier_phase2_hgcalV10_cff
import phase2_hgcalV10
383 phase2_hgcalV10.toModify(HGCAL_noise_fC, values = [x*fC_per_ele
for x
in nonAgedNoises_v9])
384 phase2_hgcalV10.toModify(HGCAL_noises, values = [x
for x
in nonAgedNoises_v9])
387 """includes all effects from radiation and gain choice""" 389 process=
HFNose_setRealisticNoiseSi(process,byDose=byDose,byDoseAlgo=byDoseAlgo,byDoseMap=doseMapNose,byDoseFactor=byDoseFactor)
392 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)