CMS 3D CMS Logo

HGCalRecHit_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
4 
5 from Configuration.Eras.Modifier_phase2_hgcalV16_cff import phase2_hgcalV16
6 
7 # There is no layer zero, while no average is taken for the last layer
8 dummy_weight = 0.0
9 def calcWeights(weightsPerLayer): res = [sum(wei)/2. for wei in zip(weightsPerLayer[:], weightsPerLayer[1:] + [weightsPerLayer[-1]])]; res[0] = dummy_weight; return res;
10 
11 
12 weightsPerLayer_V16 = cms.vdouble(dummy_weight,
13  5.55, # MeV
14  12.86,
15  9.4,
16  12.86,
17  9.4,
18  12.86,
19  9.4,
20  12.86,
21  9.4,
22  12.86,
23  9.4,
24  12.86,
25  9.4,
26  12.86,
27  9.4,
28  12.86,
29  9.4,
30  12.86,
31  13.54,
32  12.86,
33  13.54,
34  12.86,
35  13.54,
36  12.86,
37  13.54,
38  12.86,
39  58.63,
40  60.7,
41  60.7,
42  60.7,
43  60.7,
44  60.7,
45  60.7,
46  60.7,
47  60.7,
48  60.7,
49  60.7,
50  83.08,
51  83.08,
52  83.43,
53  83.61,
54  83.61,
55  83.61,
56  83.61,
57  83.61,
58  83.61,
59  83.61)
60 
61 
62 dEdX = cms.PSet(
63  # for v10 geometry
64  weights = cms.vdouble(0.0, # there is no layer zero
65  8.894541, # MeV
66  10.937907,
67  10.937907,
68  10.937907,
69  10.937907,
70  10.937907,
71  10.937907,
72  10.937907,
73  10.937907,
74  10.932882,
75  10.932882,
76  10.937907,
77  10.937907,
78  10.938169,
79  10.938169,
80  10.938169,
81  10.938169,
82  10.938169,
83  10.938169,
84  10.938169,
85  10.938169,
86  10.938169,
87  10.938169,
88  10.938169,
89  10.938169,
90  10.938169,
91  10.938169,
92  32.332097,
93  51.574301,
94  51.444192,
95  51.444192,
96  51.444192,
97  51.444192,
98  51.444192,
99  51.444192,
100  51.444192,
101  51.444192,
102  51.444192,
103  51.444192,
104  69.513118,
105  87.582044,
106  87.582044,
107  87.582044,
108  87.582044,
109  87.582044,
110  87.214571,
111  86.888309,
112  86.929520,
113  86.929520,
114  86.929520),
115 
116  weightsNose = cms.vdouble(0.0, # there is no layer zero
117  39.500245, # MeV
118  39.756638,
119  39.756638,
120  39.756638,
121  39.756638,
122  66.020266,
123  92.283895,
124  92.283895)
125 )
126 
127 
128 # for v16 geometry
129 dEdX_v16 = cms.PSet(
130  weights = cms.vdouble(calcWeights(weightsPerLayer_V16)),
131 
132  weightsNose = cms.vdouble(0.0, # there is no layer zero
133  39.500245, # MeV
134  39.756638,
135  39.756638,
136  39.756638,
137  39.756638,
138  66.020266,
139  92.283895,
140  92.283895)
141 )
142 
143 # HGCAL rechit producer
144 HGCalRecHit = cms.EDProducer(
145  "HGCalRecHitProducer",
146  HGCEErechitCollection = cms.string('HGCEERecHits'),
147  HGCEEuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCEEUncalibRecHits'),
148  HGCHEFrechitCollection = cms.string('HGCHEFRecHits'),
149  HGCHEFuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCHEFUncalibRecHits'),
150  HGCHEBrechitCollection = cms.string('HGCHEBRecHits'),
151  HGCHEBuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCHEBUncalibRecHits'),
152  HGCHFNoserechitCollection = cms.string('HGCHFNoseRecHits'),
153  HGCHFNoseuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCHFNoseUncalibRecHits'),
154 
155 
156  # digi constants
157  HGCEE_keV2DIGI = hgceeDigitizer.digiCfg.keV2fC,
158  HGCEE_isSiFE = HGCalUncalibRecHit.HGCEEConfig.isSiFE,
159  HGCEE_fCPerMIP = HGCalUncalibRecHit.HGCEEConfig.fCPerMIP,
160  HGCHEF_keV2DIGI = hgchefrontDigitizer.digiCfg.keV2fC,
161  HGCHEF_isSiFE = HGCalUncalibRecHit.HGCHEFConfig.isSiFE,
162  HGCHEF_fCPerMIP = HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP,
163  HGCHEB_keV2DIGI = hgchebackDigitizer.digiCfg.keV2MIP,
164  HGCHEB_isSiFE = HGCalUncalibRecHit.HGCHEBConfig.isSiFE,
165  HGCHFNose_keV2DIGI = hfnoseDigitizer.digiCfg.keV2fC,
166  HGCHFNose_isSiFE = HGCalUncalibRecHit.HGCHFNoseConfig.isSiFE,
167  HGCHFNose_fCPerMIP = HGCalUncalibRecHit.HGCHFNoseConfig.fCPerMIP,
168  # don't produce rechit if detid is a ghost one
169  rangeMask = cms.uint32(4294442496),
170  rangeMatch = cms.uint32(1161838592),
171 
172 
173  # EM Scale calibrations
174  layerWeights = dEdX.weights,
175  layerNoseWeights = dEdX.weightsNose,
176 
177  #With the new regional em factors there are 7 different factors used.
178  #Six of them are for silicon and one for scint. For silicon it is in the following order
179  # CE_E_120um, CE_E_200um, CE_E_300um, CE_H_120um, CE_H_200um, CE_H_300um
180  thicknessCorrection = cms.vdouble(1.132,1.092,1.084,1.0,1.0,1.0),
181  deltasi_index_regemfac = cms.int32(3),
182  #One factor for scint
183  sciThicknessCorrection = cms.double(1.0),
184  thicknessNoseCorrection = cms.vdouble(1.132,1.092,1.084), # 100, 200, 300 um
185 
186  HGCEE_noise_fC = hgceeDigitizer.digiCfg.noise_fC,
187  HGCEE_cce = hgceeDigitizer.digiCfg.chargeCollectionEfficiencies,
188  HGCHEF_noise_fC = hgchefrontDigitizer.digiCfg.noise_fC,
189  HGCHEF_cce = hgchefrontDigitizer.digiCfg.chargeCollectionEfficiencies,
190  HGCHEB_noise_MIP = hgchebackDigitizer.digiCfg.noise,
191  HGCHFNose_noise_fC = hfnoseDigitizer.digiCfg.noise_fC,
192  HGCHFNose_cce = hfnoseDigitizer.digiCfg.chargeCollectionEfficiencies,
193 
194  # expected resolution on time for recHits - ns units
195  minValSiPar = cms.double(10.),
196  maxValSiPar = cms.double(1.e4),
197  noiseSiPar = cms.double(5.5),
198  constSiPar = cms.double(0.02),
199 
200  # algo
201  algo = cms.string("HGCalRecHitWorkerSimple")
202 
203  )
204 
205 # For silicon the order is: CE_E_120um, CE_E_200um, CE_E_300um, CE_H_120um, CE_H_200um, CE_H_300um
206 phase2_hgcalV10.toModify( HGCalRecHit , thicknessCorrection = [0.77, 0.77, 0.77, 0.84, 0.84, 0.84] , sciThicknessCorrection = 0.90 )
207 
208 phase2_hfnose.toModify( HGCalRecHit , thicknessNoseCorrection = [0.58,0.58,0.58])
209 
210 phase2_hgcalV16.toModify(HGCalRecHit,
211  thicknessCorrection = [0.75, 0.76, 0.75, 0.85, 0.85, 0.84] ,
212  sciThicknessCorrection = 0.69,
213  layerWeights = dEdX_v16.weights)
214 
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:90
def calcWeights(weightsPerLayer)