/
phase2TrackerDigitizer_cfi.py
290 lines (282 loc) · 15.2 KB
/
phase2TrackerDigitizer_cfi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
import FWCore.ParameterSet.Config as cms
PixelDigitizerAlgorithmCommon = cms.PSet(
ElectronPerAdc = cms.double(1500.0),
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(1000.0),
ThresholdInElectrons_Endcap = cms.double(1000.0),
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(0.0),
ThresholdSmearing_Endcap = cms.double(0.0),
HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
NoiseInElectrons = cms.double(0.0),
Phase2ReadoutMode = cms.int32(3), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
AdcFullScale = cms.int32(15),
TofUpperCut = cms.double(20.),
TofLowerCut = cms.double(-5.),
AddNoisyPixels = cms.bool(False),
Alpha2Order = cms.bool(True), #D.B.: second order effect, does not switch off magnetic field as described
AddNoise = cms.bool(False),
AddXTalk = cms.bool(False), #D.B.
InterstripCoupling = cms.double(0.0), #D.B. # No need to be used in PixelDigitizerAlgorithm
Odd_row_interchannelCoupling_next_row = cms.double(0.20),
Even_row_interchannelCoupling_next_row = cms.double(0.0),
Odd_column_interchannelCoupling_next_column = cms.double(0.0),
Even_column_interchannelCoupling_next_column = cms.double(0.0),
SigmaZero = cms.double(0.00037), #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
SigmaCoeff = cms.double(0), #S.D: setting SigmaCoeff=0 for IT-pixel
ClusterWidth = cms.double(3), #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
LorentzAngle_DB = cms.bool(True),
TanLorentzAnglePerTesla_Endcap = cms.double(0.106),
TanLorentzAnglePerTesla_Barrel = cms.double(0.106),
KillModules = cms.bool(False),
DeadModules_DB = cms.bool(False),
DeadModules = cms.VPSet(),
AddInefficiency = cms.bool(False),
Inefficiency_DB = cms.bool(False),
UseReweighting = cms.bool(False),
EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,
0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
CellsToKill = cms.VPSet(),
ApplyTimewalk = cms.bool(False),
TimewalkModel = cms.PSet(
ThresholdValues = cms.vdouble(1000, 1200, 1500, 3000),
Curves = cms.VPSet(
cms.PSet(
charge = cms.vdouble(1000, 1025, 1050, 1100, 1200, 1500, 2000, 6000, 10000, 15000, 20000, 30000),
delay = cms.vdouble(26.8, 23.73, 21.92, 19.46, 16.52, 12.15, 8.88, 3.03, 1.69, 0.95, 0.56, 0.19)
),
cms.PSet(
charge = cms.vdouble(1200, 1225, 1250, 1500, 2000, 6000, 10000, 15000, 20000, 30000),
delay = cms.vdouble(26.28, 23.5, 21.79, 14.92, 10.27, 3.33, 1.86, 1.07, 0.66, 0.27)
),
cms.PSet(
charge = cms.vdouble(1500, 1525, 1550, 1600, 2000, 6000, 10000, 15000, 20000, 30000),
delay = cms.vdouble(25.36, 23.05, 21.6, 19.56, 12.94, 3.79, 2.14, 1.26, 0.81, 0.39)
),
cms.PSet(
charge = cms.vdouble(3000, 3025, 3050, 3100, 3500, 6000, 10000, 15000, 20000, 30000),
delay = cms.vdouble(25.63, 23.63, 22.35, 20.65, 14.92, 6.7, 3.68, 2.29, 1.62, 1.02)
)
)
)
)
phase2TrackerDigitizer = cms.PSet(
# For the Digitizer
accumulatorType = cms.string("Phase2TrackerDigitizer"),
hitsProducer = cms.string('g4SimHits'),
ROUList = cms.vstring(
'TrackerHitsPixelBarrelLowTof',
'TrackerHitsPixelBarrelHighTof',
'TrackerHitsPixelEndcapLowTof',
'TrackerHitsPixelEndcapHighTof'),
GeometryType = cms.string('idealForDigi'),
isOTreadoutAnalog = cms.bool(False),#set this to true if you want analog readout for OT
# Common for Algos
usePseudoPixel3DAlgo = cms.bool(False),
premixStage1 = cms.bool(False),
AlgorithmCommon = cms.PSet(
DeltaProductionCut = cms.double(0.03),
makeDigiSimLinks = cms.untracked.bool(True),
),
# Specific parameters
#Pixel Digitizer Algorithm
PixelDigitizerAlgorithm = PixelDigitizerAlgorithmCommon.clone(
UseReweighting = cms.bool(False), # will be True for realistic simulations
),
#Pixel-3D Digitizer Algorithm
Pixel3DDigitizerAlgorithm = PixelDigitizerAlgorithmCommon.clone(
SigmaCoeff = cms.double(1.80),
NPColumnRadius = cms.double(4.0),
OhmicColumnRadius = cms.double(4.0),
NPColumnGap = cms.double(46.0),
UseReweighting = cms.bool(False), # will be True for realistic simulations
),
#Pixel in PS Module
PSPDigitizerAlgorithm = cms.PSet(
ElectronPerAdc = cms.double(135.0),
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
ThresholdInElectrons_Endcap = cms.double(6300.), #(0.4 MIP = 0.4 * 16000 e)
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(630.0),
ThresholdSmearing_Endcap = cms.double(630.0),
HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
NoiseInElectrons = cms.double(200), # 30% of the readout noise (should be changed in future)
Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1)), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
AdcFullScale = cms.int32(255),
TofUpperCut = cms.double(12.5),
TofLowerCut = cms.double(-12.5),
AddNoisyPixels = cms.bool(True),
Alpha2Order = cms.bool(True), #D.B.: second order effect, does not switch off magnetic field as described
AddNoise = cms.bool(True),
AddXTalk = cms.bool(True), #D.B.
InterstripCoupling = cms.double(0.05), #D.B.
SigmaZero = cms.double(0.00037), #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
SigmaCoeff = cms.double(1.80), #D.B.: to be confirmed with simulations in CMSSW_6.X
ClusterWidth = cms.double(3), #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
LorentzAngle_DB = cms.bool(True),
TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
KillModules = cms.bool(False),
DeadModules_DB = cms.bool(False),
DeadModules = cms.VPSet(),
AddInefficiency = cms.bool(False),
Inefficiency_DB = cms.bool(False),
EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,
0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
CellsToKill = cms.VPSet(),
BiasRailInefficiencyFlag = cms.int32(1), # Flag to decide BiasRail inefficiency : no inefficency(0) : inefficiency with optimistic(AND) scenario(1) : inefficiency with pessimistic(OR) scenario(2)
UseReweighting = cms.bool(False),
),
#Strip in PS module
PSSDigitizerAlgorithm = cms.PSet(
ElectronPerAdc = cms.double(135.0),
#D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(4800.), #(0.4 MIP = 0.4 * 16000 e)
ThresholdInElectrons_Endcap = cms.double(4800.), #(0.4 MIP = 0.4 * 16000 e)
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(480.0),
ThresholdSmearing_Endcap = cms.double(480.0),
HIPThresholdInElectrons_Barrel = cms.double(21000.), # 1.4 MIP considered as HIP
HIPThresholdInElectrons_Endcap = cms.double(21000.), # 1.4 MIP considered as HIP
NoiseInElectrons = cms.double(1010), # threshold = 4800e, noise=4800e/4.75=1010 (4.75 sigma=>occupancy =1e-6)
Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1)), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
AdcFullScale = cms.int32(255),
TofUpperCut = cms.double(12.5),
TofLowerCut = cms.double(-12.5),
AddNoisyPixels = cms.bool(True),
Alpha2Order = cms.bool(True), #D.B.: second order effect, does not switch off magnetic field as described
AddNoise = cms.bool(True),
AddXTalk = cms.bool(True), #D.B.
InterstripCoupling = cms.double(0.05), #D.B.
SigmaZero = cms.double(0.00037), #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
SigmaCoeff = cms.double(1.80), #D.B.: to be confirmed with simulations in CMSSW_6.X
ClusterWidth = cms.double(3), #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
LorentzAngle_DB = cms.bool(True),
TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
KillModules = cms.bool(False),
DeadModules_DB = cms.bool(False),
DeadModules = cms.VPSet(),
AddInefficiency = cms.bool(False),
Inefficiency_DB = cms.bool(False),
EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,
0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
CellsToKill = cms.VPSet(),
UseReweighting = cms.bool(False),
),
#Two Strip Module
SSDigitizerAlgorithm = cms.PSet(
ElectronPerAdc = cms.double(135.0),
#D.B.:the noise should be a function of strip capacitance, roughly: ReadoutNoiseInElec=500+(64*Cdet[pF]) ~= 500+(64*1.5[cm])
ReadoutNoiseInElec = cms.double(-99.9), # not used at the moment
ThresholdInElectrons_Barrel = cms.double(6000.),
ThresholdInElectrons_Endcap = cms.double(6000.),
AddThresholdSmearing = cms.bool(False),
ThresholdSmearing_Barrel = cms.double(600.0),
ThresholdSmearing_Endcap = cms.double(600.0),
HIPThresholdInElectrons_Barrel = cms.double(1.0e10), # very high value to avoid Over threshold bit
HIPThresholdInElectrons_Endcap = cms.double(1.0e10), # very high value to avoid Over threshold bit
NoiseInElectrons = cms.double(1263), # threshold = 6000e, noise=6000e/4.75=1263e (4.75 sigma=>occupancy =1e-6)
Phase2ReadoutMode = cms.int32(0), # Flag to decide Readout Mode :Digital(0) or Analog (linear TDR (-1)), dual slope with slope parameters (+1,+2,+3,+4) with threshold subtraction
AdcFullScale = cms.int32(255),
TofUpperCut = cms.double(12.5),
TofLowerCut = cms.double(-12.5),
AddNoisyPixels = cms.bool(True),
Alpha2Order = cms.bool(True), #D.B.: second order effect, does not switch off magnetic field as described
AddNoise = cms.bool(True),
AddXTalk = cms.bool(True), #D.B.
InterstripCoupling = cms.double(0.05), #D.B.
SigmaZero = cms.double(0.00037), #D.B.: 3.7um spread for 300um-thick sensor, renormalized in digitizerAlgo
SigmaCoeff = cms.double(1.80), #D.B.: to be confirmed with simulations in CMSSW_6.X
ClusterWidth = cms.double(3), #D.B.: this is used as number of sigmas for charge collection (3=+-3sigmas)
LorentzAngle_DB = cms.bool(True),
TanLorentzAnglePerTesla_Endcap = cms.double(0.07),
TanLorentzAnglePerTesla_Barrel = cms.double(0.07),
KillModules = cms.bool(False),
DeadModules_DB = cms.bool(False),
DeadModules = cms.VPSet(),
AddInefficiency = cms.bool(False),
Inefficiency_DB = cms.bool(False),
EfficiencyFactors_Barrel = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999 ),
EfficiencyFactors_Endcap = cms.vdouble(0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999,
0.999, 0.999 ),#Efficiencies kept as Side2Disk1,Side1Disk1 and so on
CellsToKill = cms.VPSet(),
HitDetectionMode = cms.int32(0), # (0/1/2/3/4 => SquareWindow/SampledMode/LatchedMode/SampledOrLachedMode/HIPFindingMode)
PulseShapeParameters = cms.vdouble(-3.0, 16.043703, 99.999857, 40.571650, 2.0, 1.2459094),
CBCDeadTime = cms.double(0.0), # (2.7 ns deadtime in latched mode)
UseReweighting = cms.bool(False),
)
)
# For premixing stage1
# - add noise as by default
# - do not add noisy pixels (to be done in stage2)
# - do not apply inefficiency (to be done in stage2)
# - disable threshold smearing
# - disable x-talk simulatiom
#
# For both Inner and Outer tracker
# - force analog readout to get Full Charge ADCs
# - for Inner Tracker Dual Slope signal scaling NOT used here to avoid any singal loss.
# At step 2 Dual Slope signal scaling is used as default. To keep the full precision
# ADCFull scaling is also changed to 255 for Inner Tracker
#
# -
# NOTE: It is currently assumed that all sub-digitizers have the same ElectronPerAdc.
from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
_premixStage1ModifyDict = dict(
premixStage1 = True,
PixelDigitizerAlgorithm = dict(
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
AddXTalk = False,
Phase2ReadoutMode = -1,
AdcFullScale = 255,
),
Pixel3DDigitizerAlgorithm = dict(
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
AddXTalk = False,
Phase2ReadoutMode = -1,
AdcFullScale = 255,
),
PSPDigitizerAlgorithm = dict(
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
AddXTalk = False,
Phase2ReadoutMode = -1,
),
PSSDigitizerAlgorithm = dict(
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
AddXTalk = False,
Phase2ReadoutMode = -1,
),
SSDigitizerAlgorithm = dict(
AddNoisyPixels = False,
AddInefficiency = False,
AddThresholdSmearing = False,
AddXTalk = False,
Phase2ReadoutMode = -1,
),
)
premix_stage1.toModify(phase2TrackerDigitizer, **_premixStage1ModifyDict)
from Configuration.ProcessModifiers.enableXTalkInPhase2Pixel_cff import enableXTalkInPhase2Pixel
_enableXTalkInPhase2PixelModifyDict = dict(
PixelDigitizerAlgorithm = dict(
AddXTalk = True,
Odd_row_interchannelCoupling_next_row = 0.00,
Even_row_interchannelCoupling_next_row = 0.06
)
)
enableXTalkInPhase2Pixel.toModify(phase2TrackerDigitizer, **_enableXTalkInPhase2PixelModifyDict)