CMS 3D CMS Logo

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