Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:12:21

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from L1Trigger.L1THGCal.egammaIdentification import egamma_identification_drnn_cone, \
0004                                                     egamma_identification_drnn_dbscan, \
0005                                                     egamma_identification_histomax
0006 
0007 from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
0008 from Configuration.Eras.Modifier_phase2_hgcalV11_cff import phase2_hgcalV11
0009 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
0010 
0011 
0012 binSums = cms.vuint32(13,               # 0
0013                       11, 11, 11,       # 1 - 3
0014                       9, 9, 9,          # 4 - 6
0015                       7, 7, 7, 7, 7, 7,  # 7 - 12
0016                       5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,  # 13 - 27
0017                       3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3  # 28 - 41
0018                       )
0019 
0020 EE_DR_GROUP = 7
0021 FH_DR_GROUP = 6
0022 BH_DR_GROUP = 12
0023 MAX_LAYERS = 52
0024 
0025 dr_layerbylayer = ([0] + # no layer 0
0026         [0.015]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.030]*EE_DR_GROUP + [0.040]*EE_DR_GROUP + # EM
0027         [0.040]*FH_DR_GROUP + [0.050]*FH_DR_GROUP + # FH
0028         [0.050]*BH_DR_GROUP) # BH
0029 
0030 
0031 dr_layerbylayer_Bcoefficient = ([0] + # no layer 0
0032         [0.020]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + [0.02]*EE_DR_GROUP + [0.020]*EE_DR_GROUP + # EM
0033         [0.020]*FH_DR_GROUP + [0.020]*FH_DR_GROUP + # FH
0034         [0.020]*BH_DR_GROUP) # BH
0035 
0036 
0037 neighbour_weights_1stOrder = cms.vdouble(0, 0.25, 0,
0038                                          0.25, 0, 0.25,
0039                                          0, 0.25, 0)
0040 
0041 neighbour_weights_2ndOrder = cms.vdouble(-0.25, 0.5, -0.25,
0042                                          0.5, 0,  0.5,
0043                                          -0.25, 0.5, -0.25)
0044 
0045 
0046 seed_smoothing_ecal = cms.vdouble(
0047         1., 1., 1.,
0048         1., 1.1, 1.,
0049         1., 1., 1.,
0050         )
0051 seed_smoothing_hcal = cms.vdouble(
0052         1., 1., 1., 1., 1.,
0053         1., 1., 1., 1., 1.,
0054         1., 1., 2., 1., 1.,
0055         1., 1., 1., 1., 1.,
0056         1., 1., 1., 1., 1.,
0057         )
0058 
0059 distance_C3d_params = cms.PSet(type_multicluster=cms.string('dRC3d'),
0060                                dR_multicluster=cms.double(0.01),
0061                                minPt_multicluster=cms.double(0.5),  # minimum pt of the multicluster (GeV)
0062                                dist_dbscan_multicluster=cms.double(0.),
0063                                minN_dbscan_multicluster=cms.uint32(0),
0064                                EGIdentification=egamma_identification_drnn_cone.clone(),
0065                                )
0066 
0067 
0068 dbscan_C3d_params = cms.PSet(type_multicluster=cms.string('DBSCANC3d'),
0069                              dR_multicluster=cms.double(0.),
0070                              minPt_multicluster=cms.double(0.5),  # minimum pt of the multicluster (GeV)
0071                              dist_dbscan_multicluster=cms.double(0.005),
0072                              minN_dbscan_multicluster=cms.uint32(3),
0073                              EGIdentification=egamma_identification_drnn_dbscan.clone())
0074 
0075 
0076 histoMax_C3d_seeding_params = cms.PSet(type_histoalgo=cms.string('HistoMaxC3d'),
0077                                nBins_X1_histo_multicluster=cms.uint32(42), # bin size of about 0.012
0078                                nBins_X2_histo_multicluster=cms.uint32(216), # bin size of about 0.029
0079                                binSumsHisto=binSums,
0080                                kROverZMin=cms.double(0.076),
0081                                kROverZMax=cms.double(0.58),
0082                                threshold_histo_multicluster=cms.double(10.),
0083                                neighbour_weights=neighbour_weights_1stOrder,
0084                                seed_position=cms.string("TCWeighted"),#BinCentre, TCWeighted
0085                                seeding_space=cms.string("RPhi"),# RPhi, XY
0086                                seed_smoothing_ecal=seed_smoothing_ecal,
0087                                seed_smoothing_hcal=seed_smoothing_hcal,
0088                               )
0089 
0090 histoMax_C3d_clustering_params = cms.PSet(dR_multicluster=cms.double(0.03),
0091                                dR_multicluster_byLayer_coefficientA=cms.vdouble(),
0092                                dR_multicluster_byLayer_coefficientB=cms.vdouble(),
0093                                shape_threshold=cms.double(1.),
0094                                shape_distance=cms.double(0.015),
0095                                minPt_multicluster=cms.double(0.5),  # minimum pt of the multicluster (GeV)
0096                                cluster_association=cms.string("NearestNeighbour"),
0097                                EGIdentification=egamma_identification_histomax.clone(),
0098                                )
0099 
0100 
0101 histoMax_C3d_sorting_truncation_params = cms.PSet(AlgoName = cms.string('HGCalSortingTruncationWrapper'),
0102                                                   maxTCs=cms.uint32(80),
0103                                )
0104 
0105 # >= V9 samples have a different definition of the dEdx calibrations. To account for it
0106 # we rescale the thresholds of the clustering seeds
0107 # (see https://indico.cern.ch/event/806845/contributions/3359859/attachments/1815187/2966402/19-03-20_EGPerf_HGCBE.pdf
0108 # for more details)
0109 phase2_hgcalV10.toModify(histoMax_C3d_seeding_params,
0110                         threshold_histo_multicluster=8.5,  # MipT
0111                         )
0112 
0113 
0114 histoMaxVariableDR_C3d_params = histoMax_C3d_clustering_params.clone(
0115         AlgoName = cms.string('HGCalHistoClusteringWrapper'),
0116         dR_multicluster = cms.double(0.),
0117         dR_multicluster_byLayer_coefficientA = cms.vdouble(dr_layerbylayer),
0118         dR_multicluster_byLayer_coefficientB = cms.vdouble([0]*(MAX_LAYERS+1))
0119         )
0120 
0121 
0122 histoSecondaryMax_C3d_params = histoMax_C3d_seeding_params.clone(
0123         type_histoalgo = cms.string('HistoSecondaryMaxC3d')
0124         )
0125 
0126 histoMaxXYVariableDR_C3d_params = histoMax_C3d_seeding_params.clone(
0127         seeding_space=cms.string("XY"),
0128         nBins_X1_histo_multicluster=cms.uint32(192),
0129         nBins_X2_histo_multicluster=cms.uint32(192)
0130         )
0131 
0132 histoInterpolatedMax_C3d_params = histoMax_C3d_seeding_params.clone(
0133         type_histoalgo = cms.string('HistoInterpolatedMaxC3d')
0134         )
0135 
0136 
0137 histoThreshold_C3d_params = histoMax_C3d_seeding_params.clone(
0138         type_histoalgo = cms.string('HistoThresholdC3d')
0139         )
0140 
0141 
0142 histoMax_C3d_params = cms.PSet(
0143         type_multicluster=cms.string('Histo'),
0144         histoMax_C3d_clustering_parameters = histoMaxVariableDR_C3d_params.clone(),
0145         histoMax_C3d_seeding_parameters = histoMax_C3d_seeding_params.clone(),
0146         histoMax_C3d_sorting_truncation_parameters = histoMax_C3d_sorting_truncation_params.clone(),
0147         )
0148 
0149 
0150 energy_interpretations_em = cms.PSet(type = cms.string('HGCalTriggerClusterInterpretationEM'),
0151                                      layer_containment_corrs = cms.vdouble(0., 0.0, 1.38, 0.97, 1.11, 0.92, 1.06, 1.01, 1.06, 0.89, 1.0, 1.06, 0.89, 1.62, 1.83),
0152                                      scale_correction_coeff = cms.vdouble(53.94, -27.15),
0153                                      dr_bylayer = cms.vdouble([0.015]*15)
0154                                      )
0155 
0156 phase2_hgcalV10.toModify(
0157         energy_interpretations_em,
0158         layer_containment_corrs=cms.vdouble(0., 0.0, 1.73, 0.97, 1.08, 1.1, 1.01, 0.96, 1.18, 0.98, 1.05, 0.99, 0.89, 1.75, 2.0),
0159         scale_correction_coeff=cms.vdouble(53.92, -27.53),
0160         )
0161 
0162 phase2_hgcalV11.toModify(
0163         energy_interpretations_em,
0164         layer_containment_corrs=cms.vdouble(0., 0.0, 1.28, 1.09, 1.0, 1.07, 1.09, 1.04, 1.0, 1.09, 1.07, 1.03, 0.93, 1.4, 1.89),
0165         scale_correction_coeff=cms.vdouble(52.99, -24.96),
0166         )
0167 
0168 
0169 energy_interpretations = cms.VPSet(energy_interpretations_em)
0170 
0171 be_proc = cms.PSet(ProcessorName  = cms.string('HGCalBackendLayer2Processor3DClustering'),
0172                    C3d_parameters = histoMax_C3d_params.clone(),
0173                    energy_interpretations = energy_interpretations
0174                    )
0175 
0176 l1tHGCalBackEndLayer2Producer = cms.EDProducer(
0177     "HGCalBackendLayer2Producer",
0178     InputCluster = cms.InputTag('l1tHGCalBackEndLayer1Producer:HGCalBackendLayer1Processor2DClustering'),
0179     ProcessorParameters = be_proc.clone()
0180     )
0181 
0182 l1tHGCalBackEndStage2Producer = cms.EDProducer(
0183     "HGCalBackendLayer2Producer",
0184     InputCluster = cms.InputTag('l1tHGCalBackEndStage1Producer:HGCalBackendStage1Processor'),
0185     ProcessorParameters = be_proc.clone()
0186     )
0187 
0188 l1tHGCalBackEndLayer2ProducerHFNose = l1tHGCalBackEndLayer2Producer.clone(
0189     InputCluster = cms.InputTag('l1tHGCalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering'),
0190     ProcessorParameters = dict(
0191         C3d_parameters = dict(
0192             histoMax_C3d_seeding_parameters = dict(
0193                 ## note in #Phi same bin size for HGCAL and HFNose
0194                 nBins_X1_histo_multicluster = 4, # R bin size: 5 FullModules * 8 TP
0195                 binSumsHisto = cms.vuint32(13,11,9,9),
0196                 kROverZMin = 0.025,
0197                 kROverZMax = 0.1
0198             )
0199         )
0200     )
0201 )