Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-31 23:17:22

0001 import FWCore.ParameterSet.Config as cms
0002 from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import *
0003 from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import *
0004 
0005 from Configuration.Eras.Modifier_phase2_hgcalV16_cff import phase2_hgcalV16
0006 
0007 # There is no layer zero, while no average is taken for the last layer
0008 dummy_weight = 0.0
0009 def calcWeights(weightsPerLayer): res = [sum(wei)/2. for wei in zip(weightsPerLayer[:], weightsPerLayer[1:] + [weightsPerLayer[-1]])]; res[0] = dummy_weight; return res;   
0010 
0011 
0012 weightsPerLayer_V16 = cms.vdouble(dummy_weight,
0013                                   5.55, # MeV
0014                                   12.86,
0015                                   9.4,
0016                                   12.86,
0017                                   9.4,
0018                                   12.86,
0019                                   9.4,
0020                                   12.86,
0021                                   9.4,
0022                                   12.86,
0023                                   9.4,
0024                                   12.86,
0025                                   9.4,
0026                                   12.86,
0027                                   9.4,
0028                                   12.86,
0029                                   9.4,
0030                                   12.86,
0031                                   13.54,
0032                                   12.86,
0033                                   13.54,
0034                                   12.86,
0035                                   13.54,
0036                                   12.86,
0037                                   13.54,
0038                                   12.86,
0039                                   58.63,
0040                                   60.7,
0041                                   60.7,
0042                                   60.7,
0043                                   60.7,
0044                                   60.7,
0045                                   60.7,
0046                                   60.7,
0047                                   60.7,
0048                                   60.7,
0049                                   60.7,
0050                                   83.08,
0051                                   83.08,
0052                                   83.43,
0053                                   83.61,
0054                                   83.61,
0055                                   83.61,
0056                                   83.61,
0057                                   83.61,
0058                                   83.61,
0059                                   83.61)
0060 
0061 
0062 dEdX = cms.PSet(
0063     # for v10 geometry
0064     weights = cms.vdouble(0.0,      # there is no layer zero
0065                           8.894541,  # MeV
0066                           10.937907,
0067                           10.937907,
0068                           10.937907,
0069                           10.937907,
0070                           10.937907,
0071                           10.937907,
0072                           10.937907,
0073                           10.937907,
0074                           10.932882,
0075                           10.932882,
0076                           10.937907,
0077                           10.937907,
0078                           10.938169,
0079                           10.938169,
0080                           10.938169,
0081                           10.938169,
0082                           10.938169,
0083                           10.938169,
0084                           10.938169,
0085                           10.938169,
0086                           10.938169,
0087                           10.938169,
0088                           10.938169,
0089                           10.938169,
0090                           10.938169,
0091                           10.938169,
0092                           32.332097,
0093                           51.574301,
0094                           51.444192,
0095                           51.444192,
0096                           51.444192,
0097                           51.444192,
0098                           51.444192,
0099                           51.444192,
0100                           51.444192,
0101                           51.444192,
0102                           51.444192,
0103                           51.444192,
0104                           69.513118,
0105                           87.582044,
0106                           87.582044,
0107                           87.582044,
0108                           87.582044,
0109                           87.582044,
0110                           87.214571,
0111                           86.888309,
0112                           86.929520,
0113                           86.929520,
0114                           86.929520),
0115 
0116     weightsNose = cms.vdouble(0.0,   # there is no layer zero
0117                               39.500245, # MeV
0118                               39.756638,
0119                               39.756638,
0120                               39.756638,
0121                               39.756638,
0122                               66.020266,
0123                               92.283895,
0124                               92.283895)
0125 )
0126 
0127 
0128 # for v16 geometry
0129 dEdX_v16 = cms.PSet(
0130     weights = cms.vdouble(calcWeights(weightsPerLayer_V16)),
0131 
0132     weightsNose = cms.vdouble(0.0,   # there is no layer zero
0133                               39.500245, # MeV
0134                               39.756638,
0135                               39.756638,
0136                               39.756638,
0137                               39.756638,
0138                               66.020266,
0139                               92.283895,
0140                               92.283895)
0141 )
0142 
0143 # HGCAL rechit producer
0144 HGCalRecHit = cms.EDProducer(
0145     "HGCalRecHitProducer",
0146     HGCEErechitCollection = cms.string('HGCEERecHits'),
0147     HGCEEuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCEEUncalibRecHits'),
0148     HGCHEFrechitCollection = cms.string('HGCHEFRecHits'),
0149     HGCHEFuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCHEFUncalibRecHits'),
0150     HGCHEBrechitCollection = cms.string('HGCHEBRecHits'),
0151     HGCHEBuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCHEBUncalibRecHits'),
0152     HGCHFNoserechitCollection = cms.string('HGCHFNoseRecHits'),
0153     HGCHFNoseuncalibRecHitCollection = cms.InputTag('HGCalUncalibRecHit:HGCHFNoseUncalibRecHits'), 
0154 
0155 
0156     # digi constants
0157     HGCEE_keV2DIGI  = hgceeDigitizer.digiCfg.keV2fC,
0158     HGCEE_isSiFE    = HGCalUncalibRecHit.HGCEEConfig.isSiFE,
0159     HGCEE_fCPerMIP  = HGCalUncalibRecHit.HGCEEConfig.fCPerMIP,
0160     HGCHEF_keV2DIGI = hgchefrontDigitizer.digiCfg.keV2fC,
0161     HGCHEF_isSiFE   = HGCalUncalibRecHit.HGCHEFConfig.isSiFE,
0162     HGCHEF_fCPerMIP = HGCalUncalibRecHit.HGCHEFConfig.fCPerMIP,
0163     HGCHEB_keV2DIGI = hgchebackDigitizer.digiCfg.keV2MIP,
0164     HGCHEB_isSiFE   = HGCalUncalibRecHit.HGCHEBConfig.isSiFE,
0165     HGCHFNose_keV2DIGI = hfnoseDigitizer.digiCfg.keV2fC,
0166     HGCHFNose_isSiFE   = HGCalUncalibRecHit.HGCHFNoseConfig.isSiFE,
0167     HGCHFNose_fCPerMIP = HGCalUncalibRecHit.HGCHFNoseConfig.fCPerMIP,
0168     # don't produce rechit if detid is a ghost one
0169     rangeMask = cms.uint32(4294442496),
0170     rangeMatch = cms.uint32(1161838592),
0171 
0172 
0173     # EM Scale calibrations
0174     layerWeights = dEdX.weights,
0175     layerNoseWeights = dEdX.weightsNose,
0176 
0177     #With the new regional em factors there are 7 different factors used. 
0178     #Six of them are for silicon and one for scint. For silicon it is in the following order
0179     # CE_E_120um, CE_E_200um, CE_E_300um, CE_H_120um, CE_H_200um, CE_H_300um
0180     thicknessCorrection = cms.vdouble(1.132,1.092,1.084,1.0,1.0,1.0),
0181     deltasi_index_regemfac = cms.int32(3),
0182     #One factor for scint 
0183     sciThicknessCorrection = cms.double(1.0),
0184     thicknessNoseCorrection = cms.vdouble(1.132,1.092,1.084), # 100, 200, 300 um
0185  
0186     HGCEE_noise_fC = hgceeDigitizer.digiCfg.noise_fC,
0187     HGCEE_cce = hgceeDigitizer.digiCfg.chargeCollectionEfficiencies,
0188     HGCHEF_noise_fC = hgchefrontDigitizer.digiCfg.noise_fC,
0189     HGCHEF_cce = hgchefrontDigitizer.digiCfg.chargeCollectionEfficiencies,
0190     HGCHEB_noise_MIP = hgchebackDigitizer.digiCfg.noise,
0191     HGCHFNose_noise_fC = hfnoseDigitizer.digiCfg.noise_fC,
0192     HGCHFNose_cce = hfnoseDigitizer.digiCfg.chargeCollectionEfficiencies,
0193 
0194     # expected resolution on time for recHits - ns units
0195     minValSiPar = cms.double(10.),
0196     maxValSiPar = cms.double(1.e4),
0197     noiseSiPar = cms.double(5.5),
0198     constSiPar = cms.double(0.02),
0199 
0200     # algo
0201     algo = cms.string("HGCalRecHitWorkerSimple")
0202 
0203     )
0204 
0205 # For silicon the order is: CE_E_120um, CE_E_200um, CE_E_300um, CE_H_120um, CE_H_200um, CE_H_300um
0206 phase2_hgcalV10.toModify( HGCalRecHit , thicknessCorrection = [0.77, 0.77, 0.77, 0.84, 0.84, 0.84] , sciThicknessCorrection =  0.90 ) 
0207 
0208 phase2_hfnose.toModify( HGCalRecHit , thicknessNoseCorrection = [0.58,0.58,0.58])
0209 
0210 phase2_hgcalV16.toModify(HGCalRecHit, 
0211                          thicknessCorrection = [0.75, 0.76, 0.75, 0.85, 0.85, 0.84] , 
0212                          sciThicknessCorrection =  0.69,
0213                          layerWeights = dEdX_v16.weights) 
0214