Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 from L1Trigger.L1THGCal.l1tHGCalBackEndLayer2Producer_cfi import histoMax_C3d_seeding_params, \
0003                                                               histoSecondaryMax_C3d_params, \
0004                                                               histoInterpolatedMax_C3d_params, \
0005                                                               histoThreshold_C3d_params, \
0006                                                               histoMaxXYVariableDR_C3d_params, \
0007                                                               neighbour_weights_1stOrder, \
0008                                                               neighbour_weights_2ndOrder
0009                                                               
0010 
0011 
0012 def set_histomax_seeding_params(parameters_seeding_c3d,
0013                         nBins_X1,
0014                         nBins_X2,
0015                         binSumsHisto,
0016                         seed_threshold,
0017                         ):
0018     parameters_seeding_c3d.nBins_X1_histo_multicluster = nBins_X1
0019     parameters_seeding_c3d.nBins_X2_histo_multicluster = nBins_X2
0020     parameters_seeding_c3d.binSumsHisto = binSumsHisto
0021     parameters_seeding_c3d.threshold_histo_multicluster = seed_threshold
0022 
0023 
0024 def custom_3dclustering_histoMax(process,
0025                                  nBins_X1=histoMax_C3d_seeding_params.nBins_X1_histo_multicluster,
0026                                  nBins_X2=histoMax_C3d_seeding_params.nBins_X2_histo_multicluster,
0027                                  binSumsHisto=histoMax_C3d_seeding_params.binSumsHisto,
0028                                  seed_threshold=histoMax_C3d_seeding_params.threshold_histo_multicluster,
0029                                  seed_position=histoMax_C3d_seeding_params.seed_position,
0030                                  ):
0031     parameters_c3d = histoMax_C3d_seeding_params.clone()
0032     set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, binSumsHisto,
0033                         seed_threshold)
0034     process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0035     return process
0036 
0037 def custom_3dclustering_histoSecondaryMax(process,
0038                                           threshold=histoSecondaryMax_C3d_params.threshold_histo_multicluster,
0039                                           nBins_X1=histoSecondaryMax_C3d_params.nBins_X1_histo_multicluster,
0040                                           nBins_X2=histoSecondaryMax_C3d_params.nBins_X2_histo_multicluster,
0041                                           binSumsHisto=histoSecondaryMax_C3d_params.binSumsHisto,
0042                                           ):
0043     parameters_c3d = histoSecondaryMax_C3d_params.clone()
0044     set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, binSumsHisto,
0045                         threshold)
0046     process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0047     return process
0048 
0049 
0050 def custom_3dclustering_histoInterpolatedMax1stOrder(process,
0051                                                      nBins_X1=histoInterpolatedMax_C3d_params.nBins_X1_histo_multicluster,
0052                                                      nBins_X2=histoInterpolatedMax_C3d_params.nBins_X2_histo_multicluster,
0053                                                      binSumsHisto=histoInterpolatedMax_C3d_params.binSumsHisto,
0054                                                      seed_threshold=histoInterpolatedMax_C3d_params.threshold_histo_multicluster,
0055                                                      ):
0056     parameters_c3d = histoInterpolatedMax_C3d_params.clone(
0057             neighbour_weights = neighbour_weights_1stOrder
0058             )
0059     set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, binSumsHisto,
0060                         seed_threshold)
0061     process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0062     return process
0063 
0064 
0065 def custom_3dclustering_histoInterpolatedMax2ndOrder(process,
0066                                                      nBins_X1=histoInterpolatedMax_C3d_params.nBins_X1_histo_multicluster,
0067                                                      nBins_X2=histoInterpolatedMax_C3d_params.nBins_X2_histo_multicluster,
0068                                                      binSumsHisto=histoInterpolatedMax_C3d_params.binSumsHisto,
0069                                                      seed_threshold=histoInterpolatedMax_C3d_params.threshold_histo_multicluster,
0070                                                      ):
0071     parameters_c3d = histoInterpolatedMax_C3d_params.clone(
0072             neighbour_weights = neighbour_weights_2ndOrder
0073             )
0074     set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, binSumsHisto,
0075                         seed_threshold)
0076     process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0077     return process
0078 
0079 
0080 def custom_3dclustering_histoThreshold(process,
0081                                        nBins_X1=histoThreshold_C3d_params.nBins_X1_histo_multicluster,
0082                                        nBins_X2=histoThreshold_C3d_params.nBins_X2_histo_multicluster,
0083                                        binSumsHisto=histoThreshold_C3d_params.binSumsHisto,
0084                                        seed_threshold=histoThreshold_C3d_params.threshold_histo_multicluster,
0085                                        ):
0086     parameters_c3d = histoThreshold_C3d_params.clone()
0087     set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2, binSumsHisto,
0088                         seed_threshold)
0089     process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0090     return process
0091 
0092 
0093 def custom_3dclustering_XYHistoMax(process,
0094                                    nBins_X1=histoMaxXYVariableDR_C3d_params.nBins_X1_histo_multicluster,
0095                                    nBins_X2=histoMaxXYVariableDR_C3d_params.nBins_X2_histo_multicluster,
0096                                    seed_threshold=histoMaxXYVariableDR_C3d_params.threshold_histo_multicluster,
0097                                    seed_position=histoMaxXYVariableDR_C3d_params.seed_position,
0098                                    ):
0099     parameters_c3d = histoMaxXYVariableDR_C3d_params.clone()
0100     set_histomax_seeding_params(parameters_c3d, nBins_X1, nBins_X2,
0101             histoMaxXYVariableDR_C3d_params.binSumsHisto,seed_threshold)
0102     process.l1tHGCalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0103     return process
0104 
0105 
0106 def custom_3dclustering_seedArea(process,
0107                                    seed_threshold=cms.double(8.5)):
0108     parameters_c3d = histoMax_C3d_seeding_params.clone(seeds_norm_by_area = True,
0109                                                         threshold_histo_multicluster = seed_threshold)
0110     process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0111     return process
0112 
0113 def custom_3dclustering_seedNoArea(process,
0114                                    seed_threshold=cms.double(20)):
0115     parameters_c3d = histoMax_C3d_seeding_params.clone(seeds_norm_by_area = False,
0116                                                         threshold_histo_multicluster = seed_threshold)
0117     process.hgcalBackEndLayer2Producer.ProcessorParameters.C3d_parameters.histoMax_C3d_seeding_parameters = parameters_c3d
0118     return process