Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:41

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(20.),
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                                seeds_norm_by_area=cms.bool(False)
0089                               )
0090 
0091 histoMax_C3d_clustering_params = cms.PSet(dR_multicluster=cms.double(0.03),
0092                                dR_multicluster_byLayer_coefficientA=cms.vdouble(),
0093                                dR_multicluster_byLayer_coefficientB=cms.vdouble(),
0094                                shape_threshold=cms.double(1.),
0095                                shape_distance=cms.double(0.015),
0096                                minPt_multicluster=cms.double(0.5),  # minimum pt of the multicluster (GeV)
0097                                cluster_association=cms.string("NearestNeighbour"),
0098                                EGIdentification=egamma_identification_histomax.clone(),
0099                                )
0100 
0101 
0102 histoMax_C3d_sorting_truncation_params = cms.PSet(AlgoName = cms.string('HGCalSortingTruncationWrapper'),
0103                                                   maxTCs=cms.uint32(80),
0104                                )
0105 
0106 
0107 histoMaxVariableDR_C3d_params = histoMax_C3d_clustering_params.clone(
0108         AlgoName = cms.string('HGCalHistoClusteringWrapper'),
0109         dR_multicluster = cms.double(0.),
0110         dR_multicluster_byLayer_coefficientA = cms.vdouble(dr_layerbylayer),
0111         dR_multicluster_byLayer_coefficientB = cms.vdouble([0]*(MAX_LAYERS+1))
0112         )
0113 
0114 
0115 histoSecondaryMax_C3d_params = histoMax_C3d_seeding_params.clone(
0116         type_histoalgo = cms.string('HistoSecondaryMaxC3d')
0117         )
0118 
0119 histoMaxXYVariableDR_C3d_params = histoMax_C3d_seeding_params.clone(
0120         seeding_space=cms.string("XY"),
0121         nBins_X1_histo_multicluster=cms.uint32(192),
0122         nBins_X2_histo_multicluster=cms.uint32(192)
0123         )
0124 
0125 histoInterpolatedMax_C3d_params = histoMax_C3d_seeding_params.clone(
0126         type_histoalgo = cms.string('HistoInterpolatedMaxC3d')
0127         )
0128 
0129 
0130 histoThreshold_C3d_params = histoMax_C3d_seeding_params.clone(
0131         type_histoalgo = cms.string('HistoThresholdC3d')
0132         )
0133 
0134 
0135 histoMax_C3d_params = cms.PSet(
0136         type_multicluster=cms.string('Histo'),
0137         histoMax_C3d_clustering_parameters = histoMaxVariableDR_C3d_params.clone(),
0138         histoMax_C3d_seeding_parameters = histoMax_C3d_seeding_params.clone(),
0139         histoMax_C3d_sorting_truncation_parameters = histoMax_C3d_sorting_truncation_params.clone(),
0140         )
0141 
0142 
0143 energy_interpretations_em = cms.PSet(type = cms.string('HGCalTriggerClusterInterpretationEM'),
0144                                      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),
0145                                      scale_correction_coeff = cms.vdouble(53.94, -27.15),
0146                                      dr_bylayer = cms.vdouble([0.015]*15)
0147                                      )
0148 
0149 phase2_hgcalV10.toModify(
0150         energy_interpretations_em,
0151         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),
0152         scale_correction_coeff=cms.vdouble(53.92, -27.53),
0153         )
0154 
0155 phase2_hgcalV11.toModify(
0156         energy_interpretations_em,
0157         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),
0158         scale_correction_coeff=cms.vdouble(52.99, -24.96),
0159         )
0160 
0161 
0162 energy_interpretations = cms.VPSet(energy_interpretations_em)
0163 
0164 be_proc = cms.PSet(ProcessorName  = cms.string('HGCalBackendLayer2Processor3DClustering'),
0165                    C3d_parameters = histoMax_C3d_params.clone(),
0166                    energy_interpretations = energy_interpretations
0167                    )
0168 
0169 l1tHGCalBackEndLayer2Producer = cms.EDProducer(
0170     "HGCalBackendLayer2Producer",
0171     InputCluster = cms.InputTag('l1tHGCalBackEndLayer1Producer:HGCalBackendLayer1Processor2DClustering'),
0172     ProcessorParameters = be_proc.clone()
0173     )
0174 
0175 l1tHGCalBackEndStage2Producer = cms.EDProducer(
0176     "HGCalBackendLayer2Producer",
0177     InputCluster = cms.InputTag('l1tHGCalBackEndStage1Producer:HGCalBackendStage1Processor'),
0178     ProcessorParameters = be_proc.clone()
0179     )
0180 
0181 l1tHGCalBackEndLayer2ProducerHFNose = l1tHGCalBackEndLayer2Producer.clone(
0182     InputCluster = cms.InputTag('l1tHGCalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering'),
0183     ProcessorParameters = dict(
0184         C3d_parameters = dict(
0185             histoMax_C3d_seeding_parameters = dict(
0186                 ## note in #Phi same bin size for HGCAL and HFNose
0187                 nBins_X1_histo_multicluster = 4, # R bin size: 5 FullModules * 8 TP
0188                 binSumsHisto = cms.vuint32(13,11,9,9),
0189                 kROverZMin = 0.025,
0190                 kROverZMax = 0.1
0191             )
0192         )
0193     )
0194 )