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