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 nonAgedNoises = [2100.0,2100.0,1600.0] #100,200,300 um (in electrons)
7 
8 # ECAL
9 hgceeDigitizer = cms.PSet(
10  accumulatorType = cms.string("HGCDigiProducer"),
11  hitCollection = cms.string("HGCHitsEE"),
12  digiCollection = cms.string("HGCDigisEE"),
13  maxSimHitsAccTime = cms.uint32(100),
14  bxTime = cms.double(25),
15  eVPerEleHolePair = cms.double(eV_per_eh_pair),
16  tofDelay = cms.double(1),
17  digitizationType = cms.uint32(0),
18  makeDigiSimLinks = cms.bool(False),
19  useAllChannels = cms.bool(True),
20  verbosity = cms.untracked.uint32(0),
21  digiCfg = cms.PSet(
22  keV2fC = cms.double(0.044259), #1000 eV/3.62 (eV per e) / 6.24150934e3 (e per fC)
23  noise_fC = cms.vdouble( [x*fC_per_ele for x in nonAgedNoises] ), #100,200,300 um
24  doTimeSamples = cms.bool(False),
25  feCfg = cms.PSet(
26  # 0 only ADC, 1 ADC with pulse shape, 2 ADC+TDC with pulse shape
27  fwVersion = cms.uint32(2),
28  # leakage to bunches -2, -1, in-time, +1, +2, +3 (from J. Kaplon)
29  #NOTE: this is a fixed-size array inside the simulation (for speed) change accordingly!
30  adcPulse = cms.vdouble(0.00, 0.017, 0.817, 0.163, 0.003, 0.000),
31  pulseAvgT = cms.vdouble(0.00, 23.42298,13.16733,6.41062,5.03946,4.5320),
32  # n bits for the ADC
33  adcNbits = cms.uint32(10),
34  # ADC saturation
35  adcSaturation_fC = cms.double(100),
36  # the tdc resolution smearing (in picoseconds)
37  tdcResolutionInPs = cms.double( 0.001 ),
38  # LSB for TDC, assuming 12 bit dynamic range to 10 pC
39  tdcNbits = cms.uint32(12),
40  # TDC saturation
41  tdcSaturation_fC = cms.double(10000),
42  # raise threshold flag (~MIP/2) this is scaled
43  # for different thickness
44  adcThreshold_fC = cms.double(0.672),
45  # raise usage of TDC and mode flag (from J. Kaplon)
46  tdcOnset_fC = cms.double(60) ,
47  # LSB for time of arrival estimate from TDC in ns
48  toaLSB_ns = cms.double(0.005),
49  #toa computation mode (0=by weighted energy, 1=simple threshold)
50  toaMode = cms.uint32(1),
51  # TDC charge drain parameterisation (from J. Kaplon)
52  tdcChargeDrainParameterisation = cms.vdouble(
53  -919.13, 365.36, -14.10, 0.2,
54  -21.85, 49.39, 22.21, 0.8,
55  -0.28, 27.14, 43.95,
56  3.89048 )
57  )
58  )
59  )
60 
61 # HCAL front
62 hgchefrontDigitizer = cms.PSet(
63  accumulatorType = cms.string("HGCDigiProducer"),
64  hitCollection = cms.string("HGCHitsHEfront"),
65  digiCollection = cms.string("HGCDigisHEfront"),
66  maxSimHitsAccTime = cms.uint32(100),
67  bxTime = cms.double(25),
68  tofDelay = cms.double(1),
69  digitizationType = cms.uint32(0),
70  makeDigiSimLinks = cms.bool(False),
71  useAllChannels = cms.bool(True),
72  verbosity = cms.untracked.uint32(0),
73  digiCfg = cms.PSet(
74  keV2fC = cms.double(0.044259), #1000 eV / 3.62 (eV per e) / 6.24150934e3 (e per fC)
75  noise_fC = cms.vdouble( [x*fC_per_ele for x in nonAgedNoises] ), #100,200,300 um
76  doTimeSamples = cms.bool(False),
77  feCfg = cms.PSet(
78  # 0 only ADC, 1 ADC with pulse shape, 2 ADC+TDC with pulse shape
79  fwVersion = cms.uint32(2),
80  # leakage to bunches -2, -1, in-time, +1, +2, +3 (from J. Kaplon)
81  adcPulse = cms.vdouble(0.00, 0.017, 0.817, 0.163, 0.003, 0.000),
82  pulseAvgT = cms.vdouble(0.00, 23.42298,13.16733,6.41062,5.03946,4.5320),
83  # n bits for the ADC
84  adcNbits = cms.uint32(10),
85  # ADC saturation
86  adcSaturation_fC = cms.double(100),
87  # the tdc resolution smearing (in picoseconds)
88  tdcResolutionInPs = cms.double( 0.001 ),
89  # LSB for TDC, assuming 12 bit dynamic range to 10 pC
90  tdcNbits = cms.uint32(12),
91  # TDC saturation
92  tdcSaturation_fC = cms.double(10000),
93  # raise threshold flag (~MIP/2) this is scaled
94  # for different thickness
95  adcThreshold_fC = cms.double(0.672),
96  # raise usage of TDC and mode flag (from J. Kaplon)
97  tdcOnset_fC = cms.double(60) ,
98  # LSB for time of arrival estimate from TDC in ns
99  toaLSB_ns = cms.double(0.005),
100  #toa computation mode (0=by weighted energy, 1=simple threshold)
101  toaMode = cms.uint32(1),
102  # TDC charge drain parameterisation (from J. Kaplon)
103  tdcChargeDrainParameterisation = cms.vdouble(
104  -919.13, 365.36, -14.10, 0.2,
105  -21.85, 49.39, 22.21, 0.8,
106  -0.28, 27.14, 43.95,
107  3.89048)
108  )
109  )
110  )
111 
112 
113 # HCAL back (CALICE-like version, no pulse shape)
114 hgchebackDigitizer = cms.PSet(
115  accumulatorType = cms.string("HGCDigiProducer"),
116  hitCollection = cms.string("HcalHits"),
117  digiCollection = cms.string("HGCDigisHEback"),
118  maxSimHitsAccTime = cms.uint32(100),
119  bxTime = cms.double(25),
120  tofDelay = cms.double(1),
121  digitizationType = cms.uint32(1),
122  makeDigiSimLinks = cms.bool(False),
123  useAllChannels = cms.bool(True),
124  verbosity = cms.untracked.uint32(0),
125  digiCfg = cms.PSet(
126  keV2MIP = cms.double(1./616.0),
127  noise_MIP = cms.double(0.2),
128  doTimeSamples = cms.bool(False),
129  nPEperMIP = cms.double(11.0),
130  nTotalPE = cms.double(1156), #1156 pixels => saturation ~600MIP
131  xTalk = cms.double(0.25),
132  sdPixels = cms.double(3.0),
133  feCfg = cms.PSet(
134  # 0 only ADC, 1 ADC with pulse shape, 2 ADC+TDC with pulse shape
135  fwVersion = cms.uint32(0),
136  # n bits for the ADC
137  adcNbits = cms.uint32(12),
138  # ADC saturation : in this case we use the same variable but fC=MIP
139  adcSaturation_fC = cms.double(1024.0),
140  # threshold for digi production : in this case we use the same variable but fC=MIP
141  adcThreshold_fC = cms.double(0.75)
142  )
143  )
144  )
145 
146 #function to set noise to aged HGCal
147 endOfLifeNoises = [2400.0,2250.0,1750.0]
148 def HGCal_setEndOfLifeNoise(digitizer):
149  digitizer.digiCfg.noise_fC = cms.vdouble( [x*fC_per_ele for x in endOfLifeNoises] )
def HGCal_setEndOfLifeNoise(digitizer)