diff --git a/Harvesting.py b/Harvesting.py new file mode 100644 index 0000000000000..8f060f33f5302 --- /dev/null +++ b/Harvesting.py @@ -0,0 +1,92 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.Utilities.FileUtils as FileUtils + +from Configuration.Eras.Era_Run3_2024_cff import Run3_2024 +process = cms.Process('HARVESTING', Run3_2024) + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff') +process.load('Configuration.StandardSequences.EDMtoMEAtRunEnd_cff') +process.load('Configuration.StandardSequences.Harvesting_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string(': 1.1 $'), + annotation = cms.untracked.string('harvest nevts:100'), + name = cms.untracked.string('PyReleaseValidation') +) +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) +process.options = cms.untracked.PSet( + Rethrow = cms.untracked.vstring('ProductNotFound'), + fileMode = cms.untracked.string('FULLMERGE') +) + +# Input source +process.source = cms.Source("DQMRootSource", + fileNames = cms.untracked.vstring('file:dummyfile.root') +) + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2024_realistic', '') + +# Path and EndPath definitions +process.edmtome_step = cms.Path(process.EDMtoME) +process.validationpreprodHarvesting = cms.Path(process.postValidation*process.hltpostvalidation_preprod) +process.validationprodHarvesting = cms.Path(process.postValidation*process.hltpostvalidation_prod) +process.dqmHarvesting = cms.Path(process.DQMOffline_SecondStep*process.DQMOffline_Certification) +process.validationHarvesting = cms.Path(process.postValidation*process.hltpostvalidation) +#process.validationHarvestingFS = cms.Path(process.HarvestingFastSim) +process.dqmHarvestingPOG = cms.Path(process.DQMOffline_SecondStep_PrePOG) +process.dqmsave_step = cms.Path(process.DQMSaver) + +# Schedule definition +process.schedule = cms.Schedule(process.edmtome_step,process.dqmHarvesting,process.dqmsave_step) + #----------------------------------------------------------------------------------- +# Mark's changes start (everything above this point is the output from cmsDriver) +# + +# For some reason a seed harvester isn't included in the standard sequences. If this next processor isn't +# run then things like efficiencies are just added together instead of recalculated. +process.dqmSaver.saveAtJobEnd = cms.untracked.bool(True) +#process.dqmSaver.workflow = "/G4e/RelVal/Validation" +#process.dqmSaver.forceRunNumber = cms.untracked.int32(1) + +import FWCore.ParameterSet.Config as cms +from Validation.RecoVertex.HLTpostProcessorVertex_cfi import * + +process.load('Validation.RecoTrack.HLTpostProcessorTracker_cfi') +process.postProcessorHLTtrackingSequence = cms.Sequence(process.postProcessorHLTtracking+process.postProcessorHLTtrackingSummary) + +from DQM.TrackingMonitorClient.TrackingEffFromHitPatternClientConfig_cff import * +process.trackingEffFromHitPatternHLT = trackingEffFromHitPattern.clone() +process.trackingEffFromHitPatternHLT.subDirs = cms.untracked.vstring( + "HLT/Tracking/pixelTracks/HitEffFromHitPattern", + "HLT/Tracking/tracks/HitEffFromHitPattern", +) +# Remove the HLT harvesting from the validation harvesting step +process.validationHarvesting = cms.Path(process.postValidation) +process.trackingOnlyHarvesting = cms.Path(process.postProcessorHLTtrackingSequence) +process.trackingEffFromHitHarvesting = cms.Path(process.trackingEffFromHitPatternHLT) +process.vertexingHarvesting = cms.Path(process.postProcessorHLTvertexing) +process.schedule = cms.Schedule(process.edmtome_step, + process.trackingOnlyHarvesting, + process.trackingEffFromHitHarvesting, + process.vertexingHarvesting, + process.dqmsave_step) + +files = cms.untracked.vstring() +files = [ +'file:DQMOutput_default.root' +#'file:DQMOutput_onDemandFalse.root' +#'file:DQMOutput_onDemandFalseMaxClusterSize8.root' +#'file:DQMOutput_onDemandFalseMaxClusterSize8_mkFitMaxCand3.root' +] +process.source.fileNames = files diff --git a/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py b/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py index a28f1a80d4389..f64a6be964ce1 100644 --- a/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py +++ b/RecoTracker/IterativeTracking/python/InitialStepPreSplitting_cff.py @@ -156,7 +156,8 @@ import RecoTracker.MkFit.mkFitProducer_cfi as _mkFitProducer_cfi import RecoTracker.MkFit.mkFitOutputConverter_cfi as _mkFitOutputConverter_cfi mkFitSiPixelHitsPreSplitting = _mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone( - hits = 'siPixelRecHitsPreSplitting' + hits = 'siPixelRecHitsPreSplitting', + clusters = 'siPixelClustersPreSplitting' ) mkFitSiStripHits = _mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone() # TODO: figure out better place for this module? mkFitEventOfHitsPreSplitting = _mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone( diff --git a/RecoTracker/MkFit/data/mkfit-phase1-hlt-mc3.json b/RecoTracker/MkFit/data/mkfit-phase1-hlt-mc3.json new file mode 100644 index 0000000000000..3e31dbcd16843 --- /dev/null +++ b/RecoTracker/MkFit/data/mkfit-phase1-hlt-mc3.json @@ -0,0 +1,2135 @@ +{ + "m_iteration_index": 0, + "m_track_algorithm": 4, + "m_seed_cleaner_name": "phase1:default", + "m_seed_partitioner_name": "phase1:1", + "m_pre_bkfit_filter_name": "", + "m_post_bkfit_filter_name": "", + "m_duplicate_cleaner_name": "phase1:clean_duplicates_sharedhits_pixelseed", + "m_default_track_scorer_name": "phase1:default", + "m_requires_seed_hit_sorting": false, + "m_backward_search": true, + "m_backward_drop_seed_hits": false, + "m_backward_fit_min_hits": 99, + "sc_ptthr_hpt": 2.0, + "sc_drmax_bh": 0.009999999776482582, + "sc_dzmax_bh": 0.004999999888241291, + "sc_drmax_eh": 0.019999999552965164, + "sc_dzmax_eh": 0.019999999552965164, + "sc_drmax_bl": 0.009999999776482582, + "sc_dzmax_bl": 0.004999999888241291, + "sc_drmax_el": 0.029999999329447746, + "sc_dzmax_el": 0.029999999329447746, + "dc_fracSharedHits": 0.23999999463558197, + "dc_drth_central": 0.0020000000949949026, + "dc_drth_obarrel": 0.004000000189989805, + "dc_drth_forward": 0.00800000037997961, + "m_params": { + "nlayers_per_seed": 4, + "maxCandsPerSeed": 3, + "maxHolesPerCand": 4, + "maxConsecHoles": 2, + "chi2Cut_min": 15.0, + "chi2CutOverlap": 3.5, + "pTCutOverlap": 0.0, + "recheckOverlap": false, + "useHitSelectionV2": false, + "minHitsQF": 4, + "minPtCut": 0.0, + "maxClusterSize": 8 + }, + "m_backward_params": { + "nlayers_per_seed": 4, + "maxCandsPerSeed": 3, + "maxHolesPerCand": 4, + "maxConsecHoles": 2, + "chi2Cut_min": 15.0, + "chi2CutOverlap": 3.5, + "pTCutOverlap": 0.0, + "recheckOverlap": false, + "useHitSelectionV2": false, + "minHitsQF": 4, + "minPtCut": 0.0, + "maxClusterSize": 8 + }, + "m_n_regions": 5, + "m_region_order": [ + 3, + 1, + 4, + 0, + 2 + ], + "m_steering_params": [ + { + "m_layer_plan": [ + { + "m_layer": 1 + }, + { + "m_layer": 0 + }, + { + "m_layer": 2 + }, + { + "m_layer": 45 + }, + { + "m_layer": 46 + }, + { + "m_layer": 47 + }, + { + "m_layer": 48 + }, + { + "m_layer": 49 + }, + { + "m_layer": 50 + }, + { + "m_layer": 51 + }, + { + "m_layer": 52 + }, + { + "m_layer": 53 + }, + { + "m_layer": 54 + }, + { + "m_layer": 55 + }, + { + "m_layer": 56 + }, + { + "m_layer": 57 + }, + { + "m_layer": 58 + }, + { + "m_layer": 59 + }, + { + "m_layer": 60 + }, + { + "m_layer": 61 + }, + { + "m_layer": 62 + }, + { + "m_layer": 63 + }, + { + "m_layer": 64 + }, + { + "m_layer": 65 + }, + { + "m_layer": 66 + }, + { + "m_layer": 67 + }, + { + "m_layer": 68 + }, + { + "m_layer": 69 + }, + { + "m_layer": 70 + }, + { + "m_layer": 71 + } + ], + "m_track_scorer_name": "", + "m_region": 0, + "m_fwd_search_pickup": 2, + "m_bkw_fit_last": 0, + "m_bkw_search_pickup": 3 + }, + { + "m_layer_plan": [ + { + "m_layer": 1 + }, + { + "m_layer": 0 + }, + { + "m_layer": 2 + }, + { + "m_layer": 3 + }, + { + "m_layer": 45 + }, + { + "m_layer": 46 + }, + { + "m_layer": 47 + }, + { + "m_layer": 4 + }, + { + "m_layer": 5 + }, + { + "m_layer": 6 + }, + { + "m_layer": 7 + }, + { + "m_layer": 8 + }, + { + "m_layer": 9 + }, + { + "m_layer": 48 + }, + { + "m_layer": 49 + }, + { + "m_layer": 50 + }, + { + "m_layer": 51 + }, + { + "m_layer": 52 + }, + { + "m_layer": 53 + }, + { + "m_layer": 10 + }, + { + "m_layer": 11 + }, + { + "m_layer": 12 + }, + { + "m_layer": 13 + }, + { + "m_layer": 14 + }, + { + "m_layer": 15 + }, + { + "m_layer": 16 + }, + { + "m_layer": 17 + }, + { + "m_layer": 54 + }, + { + "m_layer": 55 + }, + { + "m_layer": 56 + }, + { + "m_layer": 57 + }, + { + "m_layer": 58 + }, + { + "m_layer": 59 + }, + { + "m_layer": 60 + }, + { + "m_layer": 61 + }, + { + "m_layer": 62 + }, + { + "m_layer": 63 + }, + { + "m_layer": 64 + }, + { + "m_layer": 65 + }, + { + "m_layer": 66 + }, + { + "m_layer": 67 + }, + { + "m_layer": 68 + }, + { + "m_layer": 69 + }, + { + "m_layer": 70 + }, + { + "m_layer": 71 + } + ], + "m_track_scorer_name": "", + "m_region": 1, + "m_fwd_search_pickup": 2, + "m_bkw_fit_last": 0, + "m_bkw_search_pickup": 4 + }, + { + "m_layer_plan": [ + { + "m_layer": 0 + }, + { + "m_layer": 1 + }, + { + "m_layer": 2 + }, + { + "m_layer": 3 + }, + { + "m_layer": 4 + }, + { + "m_layer": 5 + }, + { + "m_layer": 6 + }, + { + "m_layer": 7 + }, + { + "m_layer": 8 + }, + { + "m_layer": 9 + }, + { + "m_layer": 10 + }, + { + "m_layer": 11 + }, + { + "m_layer": 12 + }, + { + "m_layer": 13 + }, + { + "m_layer": 14 + }, + { + "m_layer": 15 + }, + { + "m_layer": 16 + }, + { + "m_layer": 17 + } + ], + "m_track_scorer_name": "", + "m_region": 2, + "m_fwd_search_pickup": 2, + "m_bkw_fit_last": 0, + "m_bkw_search_pickup": 2 + }, + { + "m_layer_plan": [ + { + "m_layer": 1 + }, + { + "m_layer": 0 + }, + { + "m_layer": 2 + }, + { + "m_layer": 3 + }, + { + "m_layer": 18 + }, + { + "m_layer": 19 + }, + { + "m_layer": 20 + }, + { + "m_layer": 4 + }, + { + "m_layer": 5 + }, + { + "m_layer": 6 + }, + { + "m_layer": 7 + }, + { + "m_layer": 8 + }, + { + "m_layer": 9 + }, + { + "m_layer": 21 + }, + { + "m_layer": 22 + }, + { + "m_layer": 23 + }, + { + "m_layer": 24 + }, + { + "m_layer": 25 + }, + { + "m_layer": 26 + }, + { + "m_layer": 10 + }, + { + "m_layer": 11 + }, + { + "m_layer": 12 + }, + { + "m_layer": 13 + }, + { + "m_layer": 14 + }, + { + "m_layer": 15 + }, + { + "m_layer": 16 + }, + { + "m_layer": 17 + }, + { + "m_layer": 27 + }, + { + "m_layer": 28 + }, + { + "m_layer": 29 + }, + { + "m_layer": 30 + }, + { + "m_layer": 31 + }, + { + "m_layer": 32 + }, + { + "m_layer": 33 + }, + { + "m_layer": 34 + }, + { + "m_layer": 35 + }, + { + "m_layer": 36 + }, + { + "m_layer": 37 + }, + { + "m_layer": 38 + }, + { + "m_layer": 39 + }, + { + "m_layer": 40 + }, + { + "m_layer": 41 + }, + { + "m_layer": 42 + }, + { + "m_layer": 43 + }, + { + "m_layer": 44 + } + ], + "m_track_scorer_name": "", + "m_region": 3, + "m_fwd_search_pickup": 2, + "m_bkw_fit_last": 0, + "m_bkw_search_pickup": 4 + }, + { + "m_layer_plan": [ + { + "m_layer": 1 + }, + { + "m_layer": 0 + }, + { + "m_layer": 2 + }, + { + "m_layer": 18 + }, + { + "m_layer": 19 + }, + { + "m_layer": 20 + }, + { + "m_layer": 21 + }, + { + "m_layer": 22 + }, + { + "m_layer": 23 + }, + { + "m_layer": 24 + }, + { + "m_layer": 25 + }, + { + "m_layer": 26 + }, + { + "m_layer": 27 + }, + { + "m_layer": 28 + }, + { + "m_layer": 29 + }, + { + "m_layer": 30 + }, + { + "m_layer": 31 + }, + { + "m_layer": 32 + }, + { + "m_layer": 33 + }, + { + "m_layer": 34 + }, + { + "m_layer": 35 + }, + { + "m_layer": 36 + }, + { + "m_layer": 37 + }, + { + "m_layer": 38 + }, + { + "m_layer": 39 + }, + { + "m_layer": 40 + }, + { + "m_layer": 41 + }, + { + "m_layer": 42 + }, + { + "m_layer": 43 + }, + { + "m_layer": 44 + } + ], + "m_track_scorer_name": "", + "m_region": 4, + "m_fwd_search_pickup": 2, + "m_bkw_fit_last": 0, + "m_bkw_search_pickup": 3 + } + ], + "m_layer_configs": [ + { + "m_layer": 0, + "m_select_min_dphi": 0.026000000536441803, + "m_select_max_dphi": 0.12999999523162842, + "m_select_min_dq": 1.0, + "m_select_max_dq": 2.0, + "m_winpars_fwd": [], + "m_winpars_bkw": [] + }, + { + "m_layer": 1, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 1.0, + "m_select_max_dq": 2.0, + "m_winpars_fwd": [], + "m_winpars_bkw": [ + 1.100000023841858, + 0.012256000190973282, + -0.012640000320971012, + 0.026719000190496445, + 1.100000023841858, + 0.5761610269546509, + 0.116737000644207, + 0.6364399790763855, + 1.100000023841858, + -4.916454792022705, + 9.973447799682617, + 10.939167022705078 + ] + }, + { + "m_layer": 2, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 1.0, + "m_select_max_dq": 2.0, + "m_winpars_fwd": [], + "m_winpars_bkw": [] + }, + { + "m_layer": 3, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 1.0, + "m_select_max_dq": 2.0, + "m_winpars_fwd": [], + "m_winpars_bkw": [] + }, + { + "m_layer": 4, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 6.0, + "m_select_max_dq": 12.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.012768999673426151, + 1.4999999621068127e-05, + 0.0021359999664127827, + 1.100000023841858, + 0.02419999986886978, + 3.259752035140991, + 5.001598834991455, + 1.100000023841858, + -0.9476209878921509, + 0.0663909986615181, + 5.778456211090088 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 5, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 6.0, + "m_select_max_dq": 12.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008705000393092632, + 0.0005280000041238964, + 0.02158300019800663, + 1.100000023841858, + 0.09269700199365616, + 2.6960270404815674, + 5.133234977722168, + 1.100000023841858, + -3.9804630279541016, + 9.883829116821289, + 12.583168029785156 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 6, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 6.0, + "m_select_max_dq": 12.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.013150000013411045, + -0.00037799999699927866, + 0.002471999963745475, + 1.100000023841858, + -0.04225099831819534, + 3.5595650672912598, + 4.926647186279297, + 1.100000023841858, + -3.5912129878997803, + 8.501933097839355, + 7.8663859367370605 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 7, + "m_select_min_dphi": 0.017999999225139618, + "m_select_max_dphi": 0.027000000700354576, + "m_select_min_dq": 6.0, + "m_select_max_dq": 12.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008949000388383865, + 0.0009110000100918114, + 0.016246000304818153, + 1.100000023841858, + 0.012870999984443188, + 2.8202478885650635, + 4.998391151428223, + 1.100000023841858, + 2.8187289237976074, + 13.86037826538086, + 6.755713939666748 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 8, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 6.0, + "m_select_max_dq": 12.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.013559999875724316, + -0.0006329999887384474, + 0.0018119999440386891, + 1.100000023841858, + 0.07009299844503403, + 2.3303821086883545, + 5.1497578620910645, + 1.100000023841858, + -0.6653550267219543, + 5.354162216186523, + 5.33784294128418 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 9, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 6.0, + "m_select_max_dq": 12.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.014340000227093697, + -0.0008539999835193157, + 0.001715000020340085, + 1.100000023841858, + 0.11353199928998947, + 1.8411060571670532, + 5.311014175415039, + 1.100000023841858, + -0.7783330082893372, + 4.681081771850586, + 5.714535236358643 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 10, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.02072400040924549, + -0.0002579999854788184, + 0.0003060000017285347, + 1.100000023841858, + 0.16969899833202362, + 2.8597021102905273, + 8.213700294494629, + 1.100000023841858, + 2.2824409008026123, + 9.291048049926758, + 3.7291109561920166 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 11, + "m_select_min_dphi": 0.01600000075995922, + "m_select_max_dphi": 0.03200000151991844, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.01620600000023842, + 9.999999747378752e-06, + 0.01333600003272295, + 1.100000023841858, + 0.30375298857688904, + 2.6482110023498535, + 8.135384559631348, + 1.100000023841858, + 12.702515602111816, + 7.155814170837402, + 0.4312480092048645 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 12, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.02483700029551983, + -0.001791000016964972, + -0.00011000000085914508, + 1.100000023841858, + 0.29953500628471375, + 2.31370210647583, + 8.311434745788574, + 1.100000023841858, + 9.24059772491455, + 7.590989112854004, + 0.6879630088806152 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 13, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.019373999908566475, + -0.0008909999742172658, + 0.011633000336587429, + 1.100000023841858, + 0.41333499550819397, + 2.8005220890045166, + 8.01810359954834, + 1.100000023841858, + 43.048187255859375, + 16.387582778930664, + -15.386631965637207 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 14, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.024385999888181686, + -0.0024240000639110804, + -0.0002840000088326633, + 1.100000023841858, + 0.2539680004119873, + 1.7479759454727173, + 8.606943130493164, + 1.100000023841858, + 14.503907203674316, + 1.8727680444717407, + 1.4285069704055786 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 15, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.022948000580072403, + -0.004557000007480383, + 0.0017480000387877226, + 1.100000023841858, + 0.3876830041408539, + 1.61844003200531, + 8.540821075439453, + 1.100000023841858, + 19.604183197021484, + 2.5111279487609863, + 0.14319799840450287 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 16, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.025947999209165573, + -0.003720999928191304, + 0.0005469999741762877, + 1.100000023841858, + 0.48163101077079773, + 1.9990010261535645, + 8.356496810913086, + 1.100000023841858, + 33.21059799194336, + -2.693763017654419, + 0.44437700510025024 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 17, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 9.5, + "m_select_max_dq": 19.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.031394001096487045, + 0.0010649999603629112, + -0.0023169999476522207, + 1.100000023841858, + 0.620045006275177, + 2.347670078277588, + 8.199334144592285, + 1.100000023841858, + 69.91675567626953, + 15.497982025146484, + -16.08823013305664 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 18, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 0.800000011920929, + "m_select_max_dq": 1.600000023841858, + "m_winpars_fwd": [], + "m_winpars_bkw": [] + }, + { + "m_layer": 19, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 0.800000011920929, + "m_select_max_dq": 1.600000023841858, + "m_winpars_fwd": [ + 1.100000023841858, + 0.007317999843508005, + 0.004164000041782856, + 0.005363999865949154, + 1.100000023841858, + -0.050946999341249466, + -2.587069034576416, + 4.038462162017822, + 1.100000023841858, + 15.933650016784668, + -51.64920425415039, + 76.5508041381836 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 20, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 0.800000011920929, + "m_select_max_dq": 1.600000023841858, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008252999745309353, + 0.004155000206083059, + 0.0054419999942183495, + 1.100000023841858, + 0.12495499849319458, + -1.3424780368804932, + 2.1945390701293945, + 1.100000023841858, + -17.1494140625, + -182.20510864257812, + 272.3651123046875 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 21, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00940100010484457, + -0.01937600038945675, + 0.027712000533938408, + 1.100000023841858, + 0.003955999854952097, + -0.811610996723175, + 6.697015762329102, + 1.100000023841858, + -7.694706916809082, + 21.035921096801758, + 0.7511870265007019 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 22, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00786999985575676, + 0.0068270000629127026, + 0.0076870000921189785, + 1.100000023841858, + 0.014878000132739544, + 8.508790016174316, + -5.289605140686035, + 1.100000023841858, + -2.71260404586792, + 12.750507354736328, + 1.710787057876587 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 23, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008767999708652496, + -0.013787000440061092, + 0.020788000896573067, + 1.100000023841858, + -0.007569999899715185, + -1.5152850151062012, + 7.118037223815918, + 1.100000023841858, + 1.0320119857788086, + -12.882140159606934, + 25.99882698059082 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 24, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0031210000161081553, + 0.0, + 0.01879500038921833, + 1.100000023841858, + -0.003435000078752637, + 0.0, + 5.217534065246582, + 1.100000023841858, + 0.8335149884223938, + 0.0, + 7.433847904205322 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 25, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008824000135064125, + -0.010187000036239624, + 0.015438999980688095, + 1.100000023841858, + -0.08094699680805206, + -3.688918113708496, + 9.820364952087402, + 1.100000023841858, + 1.2523880004882812, + -1.533257007598877, + 10.048811912536621 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 26, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0033499998971819878, + 0.0, + 0.017965000122785568, + 1.100000023841858, + -0.038993000984191895, + 0.0, + 5.20231819152832, + 1.100000023841858, + 1.4512219429016113, + 0.0, + 6.185866832733154 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 27, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.013251000083982944, + -0.054513998329639435, + 0.067781001329422, + 1.100000023841858, + -0.814424991607666, + -9.371094703674316, + 19.26014518737793, + 1.100000023841858, + 1.3363269567489624, + -0.48084598779678345, + 11.353946685791016 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 28, + "m_select_min_dphi": 0.01850000023841858, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008244000375270844, + -0.01437699981033802, + 0.030580999329686165, + 1.100000023841858, + -0.1619189977645874, + -10.523651123046875, + 18.576791763305664, + 1.100000023841858, + 2.6991689205169678, + -17.505094528198242, + 29.05454444885254 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 29, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.017726000398397446, + -0.02428700029850006, + 0.030713999643921852, + 1.100000023841858, + -0.4422670006752014, + -11.092672348022461, + 21.015186309814453, + 1.100000023841858, + 3.7879459857940674, + -5.9916229248046875, + 17.246320724487305 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 30, + "m_select_min_dphi": 0.01850000023841858, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006171000190079212, + 0.0020749999675899744, + 0.012626999989151955, + 1.100000023841858, + -0.26556000113487244, + -7.974139213562012, + 15.933401107788086, + 1.100000023841858, + 2.1158459186553955, + -10.347472190856934, + 19.577159881591797 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 31, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.013181000016629696, + -0.02261500060558319, + 0.03139900043606758, + 1.100000023841858, + -0.3935239911079407, + -12.832921981811523, + 22.94975471496582, + 1.100000023841858, + 2.503321886062622, + -12.920571327209473, + 24.363784790039062 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 32, + "m_select_min_dphi": 0.01850000023841858, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006725000217556953, + 0.0017079999670386314, + 0.013472000136971474, + 1.100000023841858, + -0.4135980010032654, + -11.062895774841309, + 20.01961326599121, + 1.100000023841858, + 1.68619704246521, + -6.955778121948242, + 15.382207870483398 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 33, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.010459000244736671, + -0.042107999324798584, + 0.052181001752614975, + 1.100000023841858, + -0.589480996131897, + -11.853514671325684, + 22.7661075592041, + 1.100000023841858, + 3.5770089626312256, + -3.4933669567108154, + 16.139280319213867 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 34, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.005326000042259693, + -0.03860099986195564, + 0.06246599927544594, + 1.100000023841858, + -0.6816580295562744, + -8.98057746887207, + 18.641939163208008, + 1.100000023841858, + 4.609846115112305, + -52.87053680419922, + 74.41938781738281 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 35, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.011339000426232815, + -0.035314999520778656, + 0.04326599836349487, + 1.100000023841858, + -0.43343400955200195, + -11.936683654785156, + 22.62201499938965, + 1.100000023841858, + 1.2227460145950317, + 9.037846565246582, + 1.7746429443359375 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 36, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0038189999759197235, + -0.03830200061202049, + 0.06382299959659576, + 1.100000023841858, + -0.6480540037155151, + -10.280193328857422, + 20.142332077026367, + 1.100000023841858, + 2.5210070610046387, + -17.559520721435547, + 30.721227645874023 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 37, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.009554999880492687, + -0.024443000555038452, + 0.03410400077700615, + 1.100000023841858, + -0.2302439957857132, + -12.753430366516113, + 23.718473434448242, + 1.100000023841858, + 1.0057330131530762, + -3.281759023666382, + 15.214323997497559 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 38, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.004406000021845102, + -0.025383999571204185, + 0.04804300144314766, + 1.100000023841858, + -0.36084499955177307, + -9.141416549682617, + 18.47696304321289, + 1.100000023841858, + 3.7121949195861816, + -28.63644790649414, + 47.56441879272461 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 39, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.010688000358641148, + -0.04094000160694122, + 0.04924499988555908, + 1.100000023841858, + -0.4215199947357178, + -10.921496391296387, + 22.332975387573242, + 1.100000023841858, + 1.6831289529800415, + -10.56849193572998, + 26.68446922302246 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 40, + "m_select_min_dphi": 0.012500000186264515, + "m_select_max_dphi": 0.02500000037252903, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006616999860852957, + 0.0, + 0.011384000070393085, + 1.100000023841858, + -0.16744700074195862, + 0.0, + 7.5500030517578125, + 1.100000023841858, + 2.8121941089630127, + 0.0, + 9.61555004119873 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 41, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006432000081986189, + -0.05269699916243553, + 0.07265499979257584, + 1.100000023841858, + -0.5079960227012634, + -18.970579147338867, + 33.10487365722656, + 1.100000023841858, + 1.524332046508789, + 5.551368236541748, + 11.923224449157715 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 42, + "m_select_min_dphi": 0.012500000186264515, + "m_select_max_dphi": 0.02500000037252903, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0055320002138614655, + 0.0, + 0.011727999895811081, + 1.100000023841858, + -0.24653199315071106, + 0.0, + 7.587803840637207, + 1.100000023841858, + 4.468085765838623, + 0.0, + 8.92255973815918 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 43, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.005594000220298767, + -0.10175999999046326, + 0.1354849934577942, + 1.100000023841858, + -0.8210819959640503, + -19.796716690063477, + 34.84598922729492, + 1.100000023841858, + 4.568892955780029, + -94.13034057617188, + 138.59841918945312 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 44, + "m_select_min_dphi": 0.012500000186264515, + "m_select_max_dphi": 0.02500000037252903, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006467999890446663, + 0.0, + 0.01056899968534708, + 1.100000023841858, + -0.5888469815254211, + 0.0, + 7.653693199157715, + 1.100000023841858, + 8.1566801071167, + 0.0, + 7.202176094055176 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 45, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 0.800000011920929, + "m_select_max_dq": 1.600000023841858, + "m_winpars_fwd": [], + "m_winpars_bkw": [] + }, + { + "m_layer": 46, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 0.800000011920929, + "m_select_max_dq": 1.600000023841858, + "m_winpars_fwd": [ + 1.100000023841858, + 0.003944000229239464, + 0.005160999950021505, + 0.006705999840050936, + 1.100000023841858, + 0.11046700179576874, + -1.3889009952545166, + 2.365694999694824, + 1.100000023841858, + 18.430856704711914, + -72.39423370361328, + 104.65682983398438 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 47, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 0.800000011920929, + "m_select_max_dq": 1.600000023841858, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0025019999593496323, + -0.023243000730872154, + 0.04769900068640709, + 1.100000023841858, + 0.08983100205659866, + -1.341722011566162, + 2.3039889335632324, + 1.100000023841858, + -2.6074941158294678, + -74.88723754882812, + 114.5561294555664 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 48, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00863299984484911, + -0.020639000460505486, + 0.02950100041925907, + 1.100000023841858, + -0.04046199843287468, + -1.2262599468231201, + 7.046881198883057, + 1.100000023841858, + -8.280558586120605, + 8.324867248535156, + 16.28750991821289 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 49, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006293000187724829, + 0.007412000093609095, + 0.008477999828755856, + 1.100000023841858, + -0.0816819965839386, + 7.666919231414795, + -4.2220001220703125, + 1.100000023841858, + -4.076791763305664, + -11.930338859558105, + 32.211116790771484 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 50, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.007722000125795603, + -0.016613999381661415, + 0.02446099929511547, + 1.100000023841858, + -0.03188600018620491, + -1.7470250129699707, + 7.326432228088379, + 1.100000023841858, + 2.0478250980377197, + -27.463024139404297, + 43.315826416015625 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 51, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0028119999915361404, + 0.0, + 0.019019000232219696, + 1.100000023841858, + -0.08192700147628784, + 0.0, + 5.266347885131836, + 1.100000023841858, + -0.00761099997907877, + 0.0, + 7.56001615524292 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 52, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008589000441133976, + -0.00735200010240078, + 0.012543999589979649, + 1.100000023841858, + -0.012883000075817108, + -3.7224009037017822, + 9.868751525878906, + 1.100000023841858, + 1.2314670085906982, + -0.3298969864845276, + 8.402995109558105 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 53, + "m_select_min_dphi": 0.02500000037252903, + "m_select_max_dphi": 0.05000000074505806, + "m_select_min_dq": 5.599999904632568, + "m_select_max_dq": 11.199999809265137, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00267699989490211, + 0.0, + 0.01843699999153614, + 1.100000023841858, + -0.029983000829815865, + 0.0, + 5.205351829528809, + 1.100000023841858, + 1.18100905418396, + 0.0, + 6.3732380867004395 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 54, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.014217999763786793, + -0.05175799876451492, + 0.06389400362968445, + 1.100000023841858, + -0.7865949869155884, + -9.258519172668457, + 19.031108856201172, + 1.100000023841858, + 0.623386025428772, + -0.9021700024604797, + 12.693214416503906 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 55, + "m_select_min_dphi": 0.01850000023841858, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.008185000158846378, + -0.020083999261260033, + 0.036465998739004135, + 1.100000023841858, + -0.1675889939069748, + -11.611218452453613, + 20.063955307006836, + 1.100000023841858, + 2.632024049758911, + -27.113924026489258, + 41.044654846191406 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 56, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.01496800035238266, + -0.01690700091421604, + 0.024094000458717346, + 1.100000023841858, + -0.6635689735412598, + -11.17331600189209, + 21.05817985534668, + 1.100000023841858, + 2.1351048946380615, + -9.975438117980957, + 22.972578048706055 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 57, + "m_select_min_dphi": 0.01850000023841858, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0063760001212358475, + -0.0027119999285787344, + 0.018052000552415848, + 1.100000023841858, + -0.4128749966621399, + -8.723788261413574, + 16.99648666381836, + 1.100000023841858, + 2.969611883163452, + -16.712196350097656, + 27.142602920532227 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 58, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.007594000082463026, + -0.020721999928355217, + 0.03152899816632271, + 1.100000023841858, + -0.48015299439430237, + -12.255571365356445, + 22.261869430541992, + 1.100000023841858, + 1.799057960510254, + -8.069069862365723, + 18.83306121826172 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 59, + "m_select_min_dphi": 0.01850000023841858, + "m_select_max_dphi": 0.03700000047683716, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.006535999942570925, + -0.00113800005055964, + 0.016085000708699226, + 1.100000023841858, + -0.22046099603176117, + -10.89745807647705, + 19.73587417602539, + 1.100000023841858, + 1.2799259424209595, + -7.502927780151367, + 15.59870719909668 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 60, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.011105000041425228, + -0.04002099856734276, + 0.049295999109745026, + 1.100000023841858, + -0.5038459897041321, + -13.492438316345215, + 24.695253372192383, + 1.100000023841858, + 3.1910510063171387, + -7.3932108879089355, + 20.732351303100586 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 61, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.004720999859273434, + -0.04729599878191948, + 0.07335600256919861, + 1.100000023841858, + -0.5891730189323425, + -9.28159236907959, + 18.92984962463379, + 1.100000023841858, + 2.4973061084747314, + -8.995723724365234, + 19.061267852783203 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 62, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.01182899996638298, + -0.03857799991965294, + 0.04688899964094162, + 1.100000023841858, + -0.5518820285797119, + -13.395498275756836, + 24.518266677856445, + 1.100000023841858, + 2.6285970211029053, + 6.944496154785156, + 3.3739380836486816 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 63, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.0033009999897331, + -0.035461001098155975, + 0.06186699867248535, + 1.100000023841858, + -0.6607310175895691, + -9.633000373840332, + 19.27863883972168, + 1.100000023841858, + 1.7063959836959839, + -28.864980697631836, + 47.17497253417969 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 64, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.007867000065743923, + -0.02195500023663044, + 0.031341999769210815, + 1.100000023841858, + -0.4133029878139496, + -12.631274223327637, + 23.61241912841797, + 1.100000023841858, + 1.543823003768921, + -3.1266579627990723, + 14.914076805114746 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 65, + "m_select_min_dphi": 0.014000000432133675, + "m_select_max_dphi": 0.02800000086426735, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00482399994507432, + -0.0025029999669641256, + 0.016607999801635742, + 1.100000023841858, + -0.34958699345588684, + -12.020635604858398, + 22.324016571044922, + 1.100000023841858, + 1.476570963859558, + -11.231095314025879, + 25.56795883178711 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 66, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.011238999664783478, + -0.04197800159454346, + 0.050825998187065125, + 1.100000023841858, + -0.13347800076007843, + -12.20242691040039, + 23.70496368408203, + 1.100000023841858, + 5.128785133361816, + -29.43931007385254, + 45.96520233154297 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 67, + "m_select_min_dphi": 0.012500000186264515, + "m_select_max_dphi": 0.02500000037252903, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.007315000053495169, + 0.0, + 0.010463000275194645, + 1.100000023841858, + -0.20622600615024567, + 0.0, + 7.5946431159973145, + 1.100000023841858, + 3.60392689704895, + 0.0, + 8.501457214355469 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 68, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.004672999959439039, + -0.0638199970126152, + 0.0884379968047142, + 1.100000023841858, + -0.44918501377105713, + -17.454866409301758, + 31.017152786254883, + 1.100000023841858, + -1.913172960281372, + -29.164400100708008, + 59.21108627319336 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 69, + "m_select_min_dphi": 0.012500000186264515, + "m_select_max_dphi": 0.02500000037252903, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00736499996855855, + 0.0, + 0.01013800036162138, + 1.100000023841858, + 0.15379899740219116, + 0.0, + 7.22096586227417, + 1.100000023841858, + 4.10778284072876, + 0.0, + 8.064019203186035 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 70, + "m_select_min_dphi": 0.009999999776482582, + "m_select_max_dphi": 0.014999999664723873, + "m_select_min_dq": 10.25, + "m_select_max_dq": 20.5, + "m_winpars_fwd": [ + 1.100000023841858, + 0.005803999956697226, + -0.1360819935798645, + 0.17761899530887604, + 1.100000023841858, + -0.6152790188789368, + -20.220062255859375, + 35.37810516357422, + 1.100000023841858, + 2.570266008377075, + -57.03169631958008, + 90.10477447509766 + ], + "m_winpars_bkw": [] + }, + { + "m_layer": 71, + "m_select_min_dphi": 0.012500000186264515, + "m_select_max_dphi": 0.02500000037252903, + "m_select_min_dq": 7.5, + "m_select_max_dq": 15.0, + "m_winpars_fwd": [ + 1.100000023841858, + 0.00571900000795722, + 0.0, + 0.01127300038933754, + 1.100000023841858, + -0.07025399804115295, + 0.0, + 7.409028053283691, + 1.100000023841858, + 8.344770431518555, + 0.0, + 7.481551170349121 + ], + "m_winpars_bkw": [] + } + ] +} diff --git a/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc b/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc index 8f87957922585..9b0e5f79b9b81 100644 --- a/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc +++ b/RecoTracker/MkFit/plugins/MkFitEventOfHitsProducer.cc @@ -18,7 +18,6 @@ #include "Geometry/CommonTopologies/interface/StripTopology.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" -#include "RecoTracker/MkFit/interface/MkFitClusterIndexToHit.h" #include "RecoTracker/MkFit/interface/MkFitEventOfHits.h" #include "RecoTracker/MkFit/interface/MkFitGeometry.h" #include "RecoTracker/MkFit/interface/MkFitHitWrapper.h" @@ -39,15 +38,13 @@ class MkFitEventOfHitsProducer : public edm::global::EDProducer<> { private: void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override; - void fill(const std::vector& hits, - mkfit::EventOfHits& eventOfHits, - const MkFitGeometry& mkFitGeom) const; + void fill(const std::vector& hits, mkfit::EventOfHits& eventOfHits, const MkFitGeometry& mkFitGeom) const; const edm::EDGetTokenT beamSpotToken_; const edm::EDGetTokenT pixelHitsToken_; const edm::EDGetTokenT stripHitsToken_; - const edm::EDGetTokenT pixelClusterIndexToHitToken_; - const edm::EDGetTokenT stripClusterIndexToHitToken_; + const edm::EDGetTokenT> pixelLayerIndexToHitToken_; + const edm::EDGetTokenT> stripLayerIndexToHitToken_; const edm::ESGetToken mkFitGeomToken_; edm::ESGetToken pixelQualityToken_; edm::ESGetToken stripQualityToken_; @@ -61,8 +58,8 @@ MkFitEventOfHitsProducer::MkFitEventOfHitsProducer(edm::ParameterSet const& iCon : beamSpotToken_{consumes(iConfig.getParameter("beamSpot"))}, pixelHitsToken_{consumes(iConfig.getParameter("pixelHits"))}, stripHitsToken_{consumes(iConfig.getParameter("stripHits"))}, - pixelClusterIndexToHitToken_{consumes(iConfig.getParameter("pixelHits"))}, - stripClusterIndexToHitToken_{consumes(iConfig.getParameter("stripHits"))}, + pixelLayerIndexToHitToken_{consumes(iConfig.getParameter("pixelHits"))}, + stripLayerIndexToHitToken_{consumes(iConfig.getParameter("stripHits"))}, mkFitGeomToken_{esConsumes()}, putToken_{produces()}, usePixelQualityDB_{iConfig.getParameter("usePixelQualityDB")}, @@ -171,8 +168,8 @@ void MkFitEventOfHitsProducer::produce(edm::StreamID iID, edm::Event& iEvent, co mkfit::StdSeq::loadDeads(*eventOfHits, deadvectors); } - fill(iEvent.get(pixelClusterIndexToHitToken_).hits(), *eventOfHits, mkFitGeom); - fill(iEvent.get(stripClusterIndexToHitToken_).hits(), *eventOfHits, mkFitGeom); + fill(iEvent.get(pixelLayerIndexToHitToken_), *eventOfHits, mkFitGeom); + fill(iEvent.get(stripLayerIndexToHitToken_), *eventOfHits, mkFitGeom); mkfit::StdSeq::cmssw_LoadHits_End(*eventOfHits); @@ -183,13 +180,12 @@ void MkFitEventOfHitsProducer::produce(edm::StreamID iID, edm::Event& iEvent, co iEvent.emplace(putToken_, std::move(eventOfHits)); } -void MkFitEventOfHitsProducer::fill(const std::vector& hits, +void MkFitEventOfHitsProducer::fill(const std::vector& layerToHits, mkfit::EventOfHits& eventOfHits, const MkFitGeometry& mkFitGeom) const { - for (unsigned int i = 0, end = hits.size(); i < end; ++i) { - const auto* hit = hits[i]; - if (hit != nullptr) { - const auto ilay = mkFitGeom.mkFitLayerNumber(hit->geographicalId()); + for (unsigned int i = 0, end = layerToHits.size(); i < end; ++i) { + const auto ilay = layerToHits[i]; + if (ilay >= 0) { eventOfHits[ilay].registerHit(i); } } diff --git a/RecoTracker/MkFit/plugins/MkFitPhase2HitConverter.cc b/RecoTracker/MkFit/plugins/MkFitPhase2HitConverter.cc index 91e50345d3848..bf5213198f274 100644 --- a/RecoTracker/MkFit/plugins/MkFitPhase2HitConverter.cc +++ b/RecoTracker/MkFit/plugins/MkFitPhase2HitConverter.cc @@ -20,11 +20,16 @@ namespace { class ConvertHitTraitsPhase2 { public: + using Clusters = Phase2TrackerCluster1DCollectionNew; + using Cluster = Clusters::data_type; + static constexpr bool applyCCC() { return false; } - static std::nullptr_t clusterCharge(const Phase2TrackerRecHit1D& hit, DetId hitId) { return nullptr; } + static float chargeScale(DetId id) { return 0; } + static const Cluster& cluster(const Clusters& prod, unsigned int index) { return prod.data()[index]; } + static std::nullptr_t clusterCharge(const Cluster&, float) { return nullptr; } static bool passCCC(std::nullptr_t) { return true; } - static void setDetails(mkfit::Hit& mhit, const Phase2TrackerCluster1D& cluster, int shortId, std::nullptr_t) { - mhit.setupAsStrip(shortId, (1 << 8) - 1, cluster.size()); + static void setDetails(mkfit::Hit& mhit, const Cluster& clu, int shortId, std::nullptr_t) { + mhit.setupAsStrip(shortId, (1 << 8) - 1, clu.size()); } }; } // namespace @@ -40,31 +45,34 @@ class MkFitPhase2HitConverter : public edm::global::EDProducer<> { void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override; const edm::EDGetTokenT siPhase2RecHitToken_; + const edm::EDGetTokenT siPhase2ClusterToken_; const edm::ESGetToken ttrhBuilderToken_; const edm::ESGetToken ttopoToken_; const edm::ESGetToken mkFitGeomToken_; const edm::EDPutTokenT wrapperPutToken_; const edm::EDPutTokenT clusterIndexPutToken_; + const edm::EDPutTokenT> layerIndexPutToken_; const edm::EDPutTokenT> clusterChargePutToken_; const ConvertHitTraitsPhase2 convertTraits_; }; MkFitPhase2HitConverter::MkFitPhase2HitConverter(edm::ParameterSet const& iConfig) - : siPhase2RecHitToken_{consumes( - iConfig.getParameter("siPhase2Hits"))}, - ttrhBuilderToken_{esConsumes( - iConfig.getParameter("ttrhBuilder"))}, - ttopoToken_{esConsumes()}, - mkFitGeomToken_{esConsumes()}, - wrapperPutToken_{produces()}, - clusterIndexPutToken_{produces()}, - clusterChargePutToken_{produces>()}, + : siPhase2RecHitToken_{consumes(iConfig.getParameter("hits"))}, + siPhase2ClusterToken_{consumes(iConfig.getParameter("clusters"))}, + ttrhBuilderToken_{esConsumes(iConfig.getParameter("ttrhBuilder"))}, + ttopoToken_{esConsumes()}, + mkFitGeomToken_{esConsumes()}, + wrapperPutToken_{produces()}, + clusterIndexPutToken_{produces()}, + layerIndexPutToken_{produces()}, + clusterChargePutToken_{produces()}, convertTraits_{} {} void MkFitPhase2HitConverter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; - desc.add("siPhase2Hits", edm::InputTag{"siPhase2RecHits"}); + desc.add("hits", edm::InputTag{"siPhase2RecHits"}); + desc.add("clusters", edm::InputTag{"siPhase2Clusters"}); desc.add("ttrhBuilder", edm::ESInputTag{"", "WithTrackAngle"}); descriptions.add("mkFitPhase2HitConverterDefault", desc); @@ -77,6 +85,7 @@ void MkFitPhase2HitConverter::produce(edm::StreamID iID, edm::Event& iEvent, con MkFitHitWrapper hitWrapper; MkFitClusterIndexToHit clusterIndexToHit; + std::vector layerIndexToHit; std::vector clusterCharge; edm::ProductID stripClusterID; @@ -85,18 +94,22 @@ void MkFitPhase2HitConverter::produce(edm::StreamID iID, edm::Event& iEvent, con if (not phase2Hits.empty()) { stripClusterID = mkfit::convertHits(ConvertHitTraitsPhase2{}, phase2Hits, + iEvent.get(siPhase2ClusterToken_), hitWrapper.hits(), clusterIndexToHit.hits(), + layerIndexToHit, dummy, ttopo, ttrhBuilder, - mkFitGeom); + mkFitGeom, + phase2Hits.dataSize()); } hitWrapper.setClustersID(stripClusterID); iEvent.emplace(wrapperPutToken_, std::move(hitWrapper)); iEvent.emplace(clusterIndexPutToken_, std::move(clusterIndexToHit)); + iEvent.emplace(layerIndexPutToken_, std::move(layerIndexToHit)); iEvent.emplace(clusterChargePutToken_, std::move(clusterCharge)); } diff --git a/RecoTracker/MkFit/plugins/MkFitProducer.cc b/RecoTracker/MkFit/plugins/MkFitProducer.cc index 756a2c06bb93a..12a16f8b4392a 100644 --- a/RecoTracker/MkFit/plugins/MkFitProducer.cc +++ b/RecoTracker/MkFit/plugins/MkFitProducer.cc @@ -177,7 +177,7 @@ void MkFitProducer::produce(edm::StreamID iID, edm::Event& iEvent, const edm::Ev stripContainerMask.copyMaskTo(stripMask); } } else { - if (mkFitGeom.isPhase1()) + if (mkFitGeom.isPhase1() && minGoodStripCharge_ > 0) stripClusterChargeCut(iEvent.get(stripClusterChargeToken_), stripMask); } diff --git a/RecoTracker/MkFit/plugins/MkFitSiPixelHitConverter.cc b/RecoTracker/MkFit/plugins/MkFitSiPixelHitConverter.cc index 39d14c66c2d1c..a89067b68466d 100644 --- a/RecoTracker/MkFit/plugins/MkFitSiPixelHitConverter.cc +++ b/RecoTracker/MkFit/plugins/MkFitSiPixelHitConverter.cc @@ -19,11 +19,16 @@ namespace { struct ConvertHitTraits { + using Clusters = SiPixelClusterCollectionNew; + using Cluster = Clusters::data_type; + static constexpr bool applyCCC() { return false; } - static std::nullptr_t clusterCharge(const SiPixelRecHit& hit, DetId hitId) { return nullptr; } + static float chargeScale(DetId) { return 0; } + static const Cluster& cluster(const Clusters& prod, unsigned int index) { return prod.data()[index]; } + static std::nullptr_t clusterCharge(const Cluster&, float) { return nullptr; } static bool passCCC(std::nullptr_t) { return true; } - static void setDetails(mkfit::Hit& mhit, const SiPixelCluster& cluster, int shortId, std::nullptr_t) { - mhit.setupAsPixel(shortId, cluster.sizeX(), cluster.sizeY()); + static void setDetails(mkfit::Hit& mhit, const Cluster& clu, int shortId, std::nullptr_t) { + mhit.setupAsPixel(shortId, clu.sizeX(), clu.sizeY()); } }; } // namespace @@ -39,26 +44,30 @@ class MkFitSiPixelHitConverter : public edm::global::EDProducer<> { void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override; const edm::EDGetTokenT pixelRecHitToken_; + const edm::EDGetTokenT pixelClusterToken_; const edm::ESGetToken ttrhBuilderToken_; const edm::ESGetToken ttopoToken_; const edm::ESGetToken mkFitGeomToken_; const edm::EDPutTokenT wrapperPutToken_; const edm::EDPutTokenT clusterIndexPutToken_; + const edm::EDPutTokenT> layerIndexPutToken_; }; MkFitSiPixelHitConverter::MkFitSiPixelHitConverter(edm::ParameterSet const& iConfig) - : pixelRecHitToken_{consumes(iConfig.getParameter("hits"))}, - ttrhBuilderToken_{esConsumes( - iConfig.getParameter("ttrhBuilder"))}, - ttopoToken_{esConsumes()}, - mkFitGeomToken_{esConsumes()}, - wrapperPutToken_{produces()}, - clusterIndexPutToken_{produces()} {} + : pixelRecHitToken_{consumes(iConfig.getParameter("hits"))}, + pixelClusterToken_{consumes(iConfig.getParameter("clusters"))}, + ttrhBuilderToken_{esConsumes(iConfig.getParameter("ttrhBuilder"))}, + ttopoToken_{esConsumes()}, + mkFitGeomToken_{esConsumes()}, + wrapperPutToken_{produces()}, + clusterIndexPutToken_{produces()}, + layerIndexPutToken_{produces()} {} void MkFitSiPixelHitConverter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.add("hits", edm::InputTag{"siPixelRecHits"}); + desc.add("clusters", edm::InputTag{"siPixelClusters"}); desc.add("ttrhBuilder", edm::ESInputTag{"", "WithTrackAngle"}); descriptions.addWithDefaultLabel(desc); @@ -71,21 +80,27 @@ void MkFitSiPixelHitConverter::produce(edm::StreamID iID, edm::Event& iEvent, co MkFitHitWrapper hitWrapper; MkFitClusterIndexToHit clusterIndexToHit; + std::vector layerIndexToHit; std::vector dummy; + auto const& hits = iEvent.get(pixelRecHitToken_); auto pixelClusterID = mkfit::convertHits(ConvertHitTraits{}, - iEvent.get(pixelRecHitToken_), + hits, + iEvent.get(pixelClusterToken_), hitWrapper.hits(), clusterIndexToHit.hits(), + layerIndexToHit, dummy, ttopo, ttrhBuilder, - mkFitGeom); + mkFitGeom, + hits.dataSize()); hitWrapper.setClustersID(pixelClusterID); iEvent.emplace(wrapperPutToken_, std::move(hitWrapper)); iEvent.emplace(clusterIndexPutToken_, std::move(clusterIndexToHit)); + iEvent.emplace(layerIndexPutToken_, std::move(layerIndexToHit)); } DEFINE_FWK_MODULE(MkFitSiPixelHitConverter); diff --git a/RecoTracker/MkFit/plugins/MkFitSiStripHitConverter.cc b/RecoTracker/MkFit/plugins/MkFitSiStripHitConverter.cc index d15dff6788f59..632e74a20a7f5 100644 --- a/RecoTracker/MkFit/plugins/MkFitSiStripHitConverter.cc +++ b/RecoTracker/MkFit/plugins/MkFitSiStripHitConverter.cc @@ -22,14 +22,16 @@ namespace { class ConvertHitTraits { public: ConvertHitTraits(float minCharge) : minGoodStripCharge_(minCharge) {} + using Clusters = edmNew::DetSetVector; + using Cluster = Clusters::data_type; static constexpr bool applyCCC() { return true; } - static float clusterCharge(const SiStripRecHit2D& hit, DetId hitId) { - return siStripClusterTools::chargePerCM(hitId, hit.firstClusterRef().stripCluster()); - } + static float chargeScale(DetId id) { return siStripClusterTools::sensorThicknessInverse(id); } + static const Cluster& cluster(const Clusters& prod, unsigned int index) { return prod.data()[index]; } + static float clusterCharge(const Cluster& clu, float scale) { return clu.charge() * scale; } bool passCCC(float charge) const { return charge > minGoodStripCharge_; } - static void setDetails(mkfit::Hit& mhit, const SiStripCluster& cluster, int shortId, float charge) { - mhit.setupAsStrip(shortId, charge, cluster.amplitudes().size()); + static void setDetails(mkfit::Hit& mhit, const Cluster& clu, int shortId, float charge) { + mhit.setupAsStrip(shortId, charge, clu.size()); } private: @@ -49,25 +51,28 @@ class MkFitSiStripHitConverter : public edm::global::EDProducer<> { const edm::EDGetTokenT stripRphiRecHitToken_; const edm::EDGetTokenT stripStereoRecHitToken_; + const edm::EDGetTokenT> stripClusterToken_; const edm::ESGetToken ttrhBuilderToken_; const edm::ESGetToken ttopoToken_; const edm::ESGetToken mkFitGeomToken_; const edm::EDPutTokenT wrapperPutToken_; const edm::EDPutTokenT clusterIndexPutToken_; + const edm::EDPutTokenT> layerIndexPutToken_; const edm::EDPutTokenT> clusterChargePutToken_; const ConvertHitTraits convertTraits_; }; MkFitSiStripHitConverter::MkFitSiStripHitConverter(edm::ParameterSet const& iConfig) - : stripRphiRecHitToken_{consumes(iConfig.getParameter("rphiHits"))}, - stripStereoRecHitToken_{consumes(iConfig.getParameter("stereoHits"))}, - ttrhBuilderToken_{esConsumes( - iConfig.getParameter("ttrhBuilder"))}, - ttopoToken_{esConsumes()}, - mkFitGeomToken_{esConsumes()}, - wrapperPutToken_{produces()}, - clusterIndexPutToken_{produces()}, - clusterChargePutToken_{produces>()}, + : stripRphiRecHitToken_{consumes(iConfig.getParameter("rphiHits"))}, + stripStereoRecHitToken_{consumes(iConfig.getParameter("stereoHits"))}, + stripClusterToken_{consumes(iConfig.getParameter("clusters"))}, + ttrhBuilderToken_{esConsumes(iConfig.getParameter("ttrhBuilder"))}, + ttopoToken_{esConsumes()}, + mkFitGeomToken_{esConsumes()}, + wrapperPutToken_{produces()}, + clusterIndexPutToken_{produces()}, + layerIndexPutToken_{produces()}, + clusterChargePutToken_{produces()}, convertTraits_{static_cast( iConfig.getParameter("minGoodStripCharge").getParameter("value"))} {} @@ -76,6 +81,7 @@ void MkFitSiStripHitConverter::fillDescriptions(edm::ConfigurationDescriptions& desc.add("rphiHits", edm::InputTag{"siStripMatchedRecHits", "rphiRecHit"}); desc.add("stereoHits", edm::InputTag{"siStripMatchedRecHits", "stereoRecHit"}); + desc.add("clusters", edm::InputTag{"siStripClusters"}); desc.add("ttrhBuilder", edm::ESInputTag{"", "WithTrackAngle"}); edm::ParameterSetDescription descCCC; @@ -92,16 +98,29 @@ void MkFitSiStripHitConverter::produce(edm::StreamID iID, edm::Event& iEvent, co MkFitHitWrapper hitWrapper; MkFitClusterIndexToHit clusterIndexToHit; + std::vector layerIndexToHit; std::vector clusterCharge; - auto convert = [&](auto& hits) { - return mkfit::convertHits( - convertTraits_, hits, hitWrapper.hits(), clusterIndexToHit.hits(), clusterCharge, ttopo, ttrhBuilder, mkFitGeom); - }; - edm::ProductID stripClusterID; const auto& stripRphiHits = iEvent.get(stripRphiRecHitToken_); const auto& stripStereoHits = iEvent.get(stripStereoRecHitToken_); + const auto maxSizeGuess(stripRphiHits.dataSize() + stripStereoHits.dataSize()); + auto const& clusters = iEvent.get(stripClusterToken_); + + auto convert = [&](auto& hits) { + return mkfit::convertHits(convertTraits_, + hits, + clusters, + hitWrapper.hits(), + clusterIndexToHit.hits(), + layerIndexToHit, + clusterCharge, + ttopo, + ttrhBuilder, + mkFitGeom, + maxSizeGuess); + }; + if (not stripRphiHits.empty()) { stripClusterID = convert(stripRphiHits); } @@ -119,6 +138,7 @@ void MkFitSiStripHitConverter::produce(edm::StreamID iID, edm::Event& iEvent, co iEvent.emplace(wrapperPutToken_, std::move(hitWrapper)); iEvent.emplace(clusterIndexPutToken_, std::move(clusterIndexToHit)); + iEvent.emplace(layerIndexPutToken_, std::move(layerIndexToHit)); iEvent.emplace(clusterChargePutToken_, std::move(clusterCharge)); } diff --git a/RecoTracker/MkFit/plugins/convertHits.h b/RecoTracker/MkFit/plugins/convertHits.h index 6560f50e208e6..b2702f94f17d8 100644 --- a/RecoTracker/MkFit/plugins/convertHits.h +++ b/RecoTracker/MkFit/plugins/convertHits.h @@ -21,52 +21,43 @@ #include "RecoTracker/MkFitCore/interface/HitStructures.h" namespace mkfit { - template + template edm::ProductID convertHits(const Traits& traits, const HitCollection& hits, + const ClusterCollection& clusters, mkfit::HitVec& mkFitHits, std::vector& clusterIndexToHit, + std::vector& layerIndexToHit, std::vector& clusterChargeVec, const TrackerTopology& ttopo, const TransientTrackingRecHitBuilder& ttrhBuilder, - const MkFitGeometry& mkFitGeom) { + const MkFitGeometry& mkFitGeom, + std::size_t maxSizeGuess = 0) { if (hits.empty()) return edm::ProductID{}; - edm::ProductID clusterID; - { - const auto& lastClusterRef = hits.data().back().firstClusterRef(); - clusterID = lastClusterRef.id(); - if (lastClusterRef.index() >= mkFitHits.size()) { - auto const size = lastClusterRef.index(); - mkFitHits.resize(size); - clusterIndexToHit.resize(size, nullptr); - if constexpr (Traits::applyCCC()) { - clusterChargeVec.resize(size, -1.f); - } + const auto& lastClusterRef = hits.data().back().firstClusterRef(); + edm::ProductID clusterID = lastClusterRef.id(); + auto const size = std::max(static_cast(lastClusterRef.index() + 1), maxSizeGuess); + if (mkFitHits.size() < size) { + mkFitHits.resize(size); + clusterIndexToHit.resize(size, nullptr); + layerIndexToHit.resize(size, -1); + if constexpr (Traits::applyCCC()) { + clusterChargeVec.resize(size, -1.f); } } for (const auto& detset : hits) { + if (detset.empty()) + continue; const DetId detid = detset.detId(); const auto ilay = mkFitGeom.mkFitLayerNumber(detid); + const auto uniqueIdInLayer = mkFitGeom.uniqueIdInLayer(ilay, detid.rawId()); + const auto chargeScale = traits.chargeScale(detid); + const auto& surf = detset.begin()->det()->surface(); for (const auto& hit : detset) { - const auto charge = traits.clusterCharge(hit, detid); - if (!traits.passCCC(charge)) - continue; - - const auto& gpos = hit.globalPosition(); - SVector3 pos(gpos.x(), gpos.y(), gpos.z()); - const auto& gerr = hit.globalPositionError(); - SMatrixSym33 err; - err.At(0, 0) = gerr.cxx(); - err.At(1, 1) = gerr.cyy(); - err.At(2, 2) = gerr.czz(); - err.At(0, 1) = gerr.cyx(); - err.At(0, 2) = gerr.czx(); - err.At(1, 2) = gerr.czy(); - auto clusterRef = hit.firstClusterRef(); if UNLIKELY (clusterRef.id() != clusterID) { throw cms::Exception("LogicError") @@ -74,6 +65,22 @@ namespace mkfit { << ", but encountered Ref to product " << clusterRef.id() << " on detid " << detid.rawId(); } const auto clusterIndex = clusterRef.index(); + + const auto& clu = traits.cluster(clusters, clusterIndex); + const auto charge = traits.clusterCharge(clu, chargeScale); + if (!traits.passCCC(charge)) + continue; + + const auto& gpos = surf.toGlobal(hit.localPosition()); + SVector3 pos(gpos.x(), gpos.y(), gpos.z()); + const auto& gerr = ErrorFrameTransformer::transform(hit.localPositionError(), surf); + SMatrixSym33 err{{float(gerr.cxx()), + float(gerr.cyx()), + float(gerr.cyy()), + float(gerr.czx()), + float(gerr.czy()), + float(gerr.czz())}}; + LogTrace("MkFitHitConverter") << "Adding hit detid " << detid.rawId() << " subdet " << detid.subdetId() << " layer " << ttopo.layer(detid) << " isStereo " << ttopo.isStereo(detid) << " zplus " @@ -82,18 +89,19 @@ namespace mkfit { if UNLIKELY (clusterIndex >= mkFitHits.size()) { mkFitHits.resize(clusterIndex + 1); clusterIndexToHit.resize(clusterIndex + 1, nullptr); + layerIndexToHit.resize(clusterIndex + 1, -1); if constexpr (Traits::applyCCC()) { clusterChargeVec.resize(clusterIndex + 1, -1.f); } } mkFitHits[clusterIndex] = mkfit::Hit(pos, err); clusterIndexToHit[clusterIndex] = &hit; + layerIndexToHit[clusterIndex] = ilay; if constexpr (Traits::applyCCC()) { clusterChargeVec[clusterIndex] = charge; } - const auto uniqueIdInLayer = mkFitGeom.uniqueIdInLayer(ilay, detid.rawId()); - traits.setDetails(mkFitHits[clusterIndex], *(hit.cluster()), uniqueIdInLayer, charge); + traits.setDetails(mkFitHits[clusterIndex], clu, uniqueIdInLayer, charge); } } return clusterID; diff --git a/RecoTracker/MkFit/python/customizeHLTIter0ToMkFit.py b/RecoTracker/MkFit/python/customizeHLTIter0ToMkFit.py index 8a123556109c7..39c5b095bc755 100644 --- a/RecoTracker/MkFit/python/customizeHLTIter0ToMkFit.py +++ b/RecoTracker/MkFit/python/customizeHLTIter0ToMkFit.py @@ -39,11 +39,13 @@ def customizeHLTIter0ToMkFit(process): process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits = mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone( hits = "hltSiPixelRecHits", + clusters = "hltSiPixelClusters", ttrhBuilder = ":hltESPTTRHBWithTrackAngle", ) process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone( rphiHits = "hltSiStripRecHits:rphiRecHit", stereoHits = "hltSiStripRecHits:stereoRecHit", + clusters = "hltSiStripRawToClustersFacility", ttrhBuilder = ":hltESPTTRHBWithTrackAngle", minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'), ) @@ -66,8 +68,219 @@ def customizeHLTIter0ToMkFit(process): eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'), + minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutNone'), + ) + process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone( + seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", + mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", + mkFitPixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + mkFitStripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + mkFitSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", + tracks = "hltIter0PFlowCkfTrackCandidatesMkFit", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + propagatorAlong = ":PropagatorWithMaterialParabolicMf", + propagatorOpposite = ":PropagatorWithMaterialParabolicMfOpposite", + ) + + process.HLTDoLocalStripSequence += process.hltSiStripRecHits + + replaceWith = (process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds + + process.hltIter0PFlowCkfTrackCandidatesMkFit + + process.hltIter0PFlowCkfTrackCandidates) + + process.HLTIterativeTrackingIteration0.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + + for path in process.paths_().values(): + if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates): + path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + + return process + + +def customizeHLTIter0ToMkFitRelaxedHP(process): + + # if any of the following objects does not exist, do not apply any customisation + for objLabel in [ + 'hltSiStripRawToClustersFacility', + 'HLTDoLocalStripSequence', + 'HLTIterativeTrackingIteration0', + 'hltIter0PFlowCkfTrackCandidates', + ]: + if not hasattr(process, objLabel): + print(f'# WARNING: customizeHLTIter0ToMkFit failed (object with label "{objLabel}" not found) - no customisation applied !') + return process + + # mkFit needs all clusters, so switch off the on-demand mode + process.hltSiStripRawToClustersFacility.onDemand = False + + process.hltSiStripRecHits = SiStripRecHitConverter_cfi.siStripMatchedRecHits.clone( + ClusterProducer = "hltSiStripRawToClustersFacility", + StripCPE = "hltESPStripCPEfromTrackAngle:hltESPStripCPEfromTrackAngle", + doMatching = False, + ) + + # Use fourth hit if one is available + process.hltIter0PFLowPixelSeedsFromPixelTracks.includeFourthHit = cms.bool(True) + + process.hltMkFitGeometryESProducer = mkFitGeometryESProducer_cfi.mkFitGeometryESProducer.clone() + + process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits = mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone( + hits = "hltSiPixelRecHits", + clusters = "hltSiPixelClusters", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone( + rphiHits = "hltSiStripRecHits:rphiRecHit", + stereoHits = "hltSiStripRecHits:stereoRecHit", + clusters = "hltSiStripRawToClustersFacility", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'), + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits = mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone( + beamSpot = "hltOnlineBeamSpot", + pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone( + seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + ) + process.hltIter0PFlowTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone( + ComponentName = 'hltIter0PFlowTrackCandidatesMkFitConfig', + config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json', + ) + process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone( + pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", + seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", + config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'), + minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutNone'), + ) + process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone( + seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", + mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", + mkFitPixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + mkFitStripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + mkFitSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", + tracks = "hltIter0PFlowCkfTrackCandidatesMkFit", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + propagatorAlong = ":PropagatorWithMaterialParabolicMf", + propagatorOpposite = ":PropagatorWithMaterialParabolicMfOpposite", + ) + + process.HLTDoLocalStripSequence += process.hltSiStripRecHits + + replaceWith = (process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds + + process.hltIter0PFlowCkfTrackCandidatesMkFit + + process.hltIter0PFlowCkfTrackCandidates) + + process.HLTIterativeTrackingIteration0.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + + for path in process.paths_().values(): + if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates): + path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + + process.hltIter0PFlowTrackCutClassifier.mva.maxChi2 = cms.vdouble( 999.0, 25.0, 99.0 ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.maxChi2 = cms.vdouble( 999.0, 25.0, 99.0 ) + + process.hltIter0PFlowTrackCutClassifier.mva.maxChi2n = cms.vdouble( 1.2, 1.0, 999.0 ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.maxChi2n = cms.vdouble( 1.2, 1.0, 999.0 ) + + process.hltIter0PFlowTrackCutClassifier.mva.dr_par = cms.PSet( + d0err = cms.vdouble( 0.003, 0.003, 0.003 ), + dr_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dr_par2 = cms.vdouble( 3.40282346639E38, 0.42, 0.42 ), + dr_exp = cms.vint32( 4, 4, 4 ), + d0err_par = cms.vdouble( 0.001, 0.001, 0.001 ) + ) + process.hltIter0PFlowTrackCutClassifier.mva.dz_par = cms.PSet( + dz_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dz_par2 = cms.vdouble( 3.40282346639E38, 0.48, 0.48 ), + dz_exp = cms.vint32( 4, 4, 4 ) + ) + + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.dr_par = cms.PSet( + d0err = cms.vdouble( 0.003, 0.003, 0.003 ), + dr_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dr_par2 = cms.vdouble( 3.40282346639E38, 0.42, 0.42 ), + dr_exp = cms.vint32( 4, 4, 4 ), + d0err_par = cms.vdouble( 0.001, 0.001, 0.001 ) + ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.dz_par = cms.PSet( + dz_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dz_par2 = cms.vdouble( 3.40282346639E38, 0.48, 0.48 ), + dz_exp = cms.vint32( 4, 4, 4 ) + ) + + return process + +def customizeHLTIter0ToMkFitMaxCand3RelaxedHP(process): + + # if any of the following objects does not exist, do not apply any customisation + for objLabel in [ + 'hltSiStripRawToClustersFacility', + 'HLTDoLocalStripSequence', + 'HLTIterativeTrackingIteration0', + 'hltIter0PFlowCkfTrackCandidates', + ]: + if not hasattr(process, objLabel): + print(f'# WARNING: customizeHLTIter0ToMkFit failed (object with label "{objLabel}" not found) - no customisation applied !') + return process + + # mkFit needs all clusters, so switch off the on-demand mode + process.hltSiStripRawToClustersFacility.onDemand = False + + process.hltSiStripRecHits = SiStripRecHitConverter_cfi.siStripMatchedRecHits.clone( + ClusterProducer = "hltSiStripRawToClustersFacility", + StripCPE = "hltESPStripCPEfromTrackAngle:hltESPStripCPEfromTrackAngle", + doMatching = False, + ) + + # Use fourth hit if one is available + process.hltIter0PFLowPixelSeedsFromPixelTracks.includeFourthHit = cms.bool(True) + + process.hltMkFitGeometryESProducer = mkFitGeometryESProducer_cfi.mkFitGeometryESProducer.clone() + + process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits = mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone( + hits = "hltSiPixelRecHits", + clusters = "hltSiPixelClusters", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone( + rphiHits = "hltSiStripRecHits:rphiRecHit", + stereoHits = "hltSiStripRecHits:stereoRecHit", + clusters = "hltSiStripRawToClustersFacility", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'), ) + process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits = mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone( + beamSpot = "hltOnlineBeamSpot", + pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone( + seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + ) + process.hltIter0PFlowTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone( + ComponentName = 'hltIter0PFlowTrackCandidatesMkFitConfig', + config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json', + ) + process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone( + pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", + seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", + config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'), + minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutNone'), + ) process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone( seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", @@ -95,4 +308,292 @@ def customizeHLTIter0ToMkFit(process): if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates): path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + process.hltIter0PFlowTrackCandidatesMkFitConfig.config = 'RecoTracker/MkFit/data/mkfit-phase1-hlt-mc3.json' + + process.hltIter0PFlowTrackCutClassifier.mva.maxChi2 = cms.vdouble( 999.0, 25.0, 99.0 ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.maxChi2 = cms.vdouble( 999.0, 25.0, 99.0 ) + + process.hltIter0PFlowTrackCutClassifier.mva.maxChi2n = cms.vdouble( 1.2, 1.0, 999.0 ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.maxChi2n = cms.vdouble( 1.2, 1.0, 999.0 ) + + process.hltIter0PFlowTrackCutClassifier.mva.dr_par = cms.PSet( + d0err = cms.vdouble( 0.003, 0.003, 0.003 ), + dr_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dr_par2 = cms.vdouble( 3.40282346639E38, 0.45, 0.45 ), + dr_exp = cms.vint32( 4, 4, 4 ), + d0err_par = cms.vdouble( 0.001, 0.001, 0.001 ) + ) + process.hltIter0PFlowTrackCutClassifier.mva.dz_par = cms.PSet( + dz_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dz_par2 = cms.vdouble( 3.40282346639E38, 0.51, 0.51 ), + dz_exp = cms.vint32( 4, 4, 4 ) + ) + + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.dr_par = cms.PSet( + d0err = cms.vdouble( 0.003, 0.003, 0.003 ), + dr_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dr_par2 = cms.vdouble( 3.40282346639E38, 0.45, 0.45 ), + dr_exp = cms.vint32( 4, 4, 4 ), + d0err_par = cms.vdouble( 0.001, 0.001, 0.001 ) + ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.dz_par = cms.PSet( + dz_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dz_par2 = cms.vdouble( 3.40282346639E38, 0.51, 0.51 ), + dz_exp = cms.vint32( 4, 4, 4 ) + ) + + return process + +def customizeHLTIter0ToMkFitMaxCand3RelaxedHPMaxClusterSize8(process): + + # if any of the following objects does not exist, do not apply any customisation + for objLabel in [ + 'hltSiStripRawToClustersFacility', + 'HLTDoLocalStripSequence', + 'HLTIterativeTrackingIteration0', + 'hltIter0PFlowCkfTrackCandidates', + ]: + if not hasattr(process, objLabel): + print(f'# WARNING: customizeHLTIter0ToMkFit failed (object with label "{objLabel}" not found) - no customisation applied !') + return process + + # mkFit needs all clusters, so switch off the on-demand mode + process.hltSiStripRawToClustersFacility = cms.EDProducer( + "SiStripClusterizerFromRaw", + ProductLabel = cms.InputTag( "rawDataCollector" ), + ConditionsLabel = cms.string( "" ), + onDemand = cms.bool( True ), + DoAPVEmulatorCheck = cms.bool( False ), + LegacyUnpacker = cms.bool( False ), + HybridZeroSuppressed = cms.bool( False ), + Clusterizer = cms.PSet( + ConditionsLabel = cms.string( "" ), + MaxClusterSize = cms.uint32( 32 ), + ClusterThreshold = cms.double( 5.0 ), + SeedThreshold = cms.double( 3.0 ), + Algorithm = cms.string( "ThreeThresholdAlgorithm" ), + ChannelThreshold = cms.double( 2.0 ), + MaxAdjacentBad = cms.uint32( 0 ), + setDetId = cms.bool( True ), + MaxSequentialHoles = cms.uint32( 0 ), + RemoveApvShots = cms.bool( True ), + clusterChargeCut = cms.PSet( refToPSet_ = cms.string( "HLTSiStripClusterChargeCutNone" ) ), + MaxSequentialBad = cms.uint32( 1 ) + ), + Algorithms = cms.PSet( + Use10bitsTruncation = cms.bool( False ), + CommonModeNoiseSubtractionMode = cms.string( "Median" ), + useCMMeanMap = cms.bool( False ), + TruncateInSuppressor = cms.bool( True ), + doAPVRestore = cms.bool( False ), + SiStripFedZeroSuppressionMode = cms.uint32( 4 ), + PedestalSubtractionFedMode = cms.bool( True ) + ) + ) + process.hltSiStripRawToClustersFacility.onDemand = False + process.hltSiStripRawToClustersFacility.Clusterizer.MaxClusterSize = 8 + + process.hltSiStripRecHits = SiStripRecHitConverter_cfi.siStripMatchedRecHits.clone( + ClusterProducer = "hltSiStripRawToClustersFacility", + StripCPE = "hltESPStripCPEfromTrackAngle:hltESPStripCPEfromTrackAngle", + doMatching = False, + ) + + # Use fourth hit if one is available + process.hltIter0PFLowPixelSeedsFromPixelTracks.includeFourthHit = cms.bool(True) + + process.hltMkFitGeometryESProducer = mkFitGeometryESProducer_cfi.mkFitGeometryESProducer.clone() + + process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits = mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone( + hits = "hltSiPixelRecHits", + clusters = "hltSiPixelClusters", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits = mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone( + rphiHits = "hltSiStripRecHits:rphiRecHit", + stereoHits = "hltSiStripRecHits:stereoRecHit", + clusters = "hltSiStripRawToClustersFacility", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutLoose'), + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits = mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone( + beamSpot = "hltOnlineBeamSpot", + pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + ) + process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone( + seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + ) + process.hltIter0PFlowTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone( + ComponentName = 'hltIter0PFlowTrackCandidatesMkFitConfig', + config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json', + ) + process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone( + pixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + stripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + eventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", + seeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", + config = ('', 'hltIter0PFlowTrackCandidatesMkFitConfig'), + minGoodStripCharge = dict(refToPSet_ = 'HLTSiStripClusterChargeCutNone'), + ) + process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone( + seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", + mkFitEventOfHits = "hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits", + mkFitPixelHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits", + mkFitStripHits = "hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits", + mkFitSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitSeeds", + tracks = "hltIter0PFlowCkfTrackCandidatesMkFit", + ttrhBuilder = ":hltESPTTRHBWithTrackAngle", + propagatorAlong = ":PropagatorWithMaterialParabolicMf", + propagatorOpposite = ":PropagatorWithMaterialParabolicMfOpposite", + ) + + process.HLTDoLocalStripSequence += process.hltSiStripRecHits + + replaceWith = (process.hltIter0PFlowCkfTrackCandidatesMkFitSiPixelHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitSiStripHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitEventOfHits + + process.hltIter0PFlowCkfTrackCandidatesMkFitSeeds + + process.hltIter0PFlowCkfTrackCandidatesMkFit + + process.hltIter0PFlowCkfTrackCandidates) + + process.HLTIterativeTrackingIteration0.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + + for path in process.paths_().values(): + if not path.contains(process.HLTIterativeTrackingIteration0) and path.contains(process.hltIter0PFlowCkfTrackCandidates): + path.replace(process.hltIter0PFlowCkfTrackCandidates, replaceWith) + + process.hltIter0PFlowTrackCandidatesMkFitConfig.config = 'RecoTracker/MkFit/data/mkfit-phase1-hlt-mc3.json' + + process.hltIter0PFlowTrackCutClassifier.mva.maxChi2 = cms.vdouble( 999.0, 25.0, 99.0 ) + + process.hltIter0PFlowTrackCutClassifier.mva.maxChi2n = cms.vdouble( 1.2, 1.0, 999.0 ) + + process.hltIter0PFlowTrackCutClassifier.mva.dr_par = cms.PSet( + d0err = cms.vdouble( 0.003, 0.003, 0.003 ), + dr_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dr_par2 = cms.vdouble( 3.40282346639E38, 0.45, 0.45 ), + dr_exp = cms.vint32( 4, 4, 4 ), + d0err_par = cms.vdouble( 0.001, 0.001, 0.001 ) + ) + process.hltIter0PFlowTrackCutClassifier.mva.dz_par = cms.PSet( + dz_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dz_par2 = cms.vdouble( 3.40282346639E38, 0.51, 0.51 ), + dz_exp = cms.vint32( 4, 4, 4 ) + ) + + if hasattr(process, 'hltIter0PFlowTrackCutClassifierSerialSync'): + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.maxChi2 = cms.vdouble( 999.0, 25.0, 99.0 ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.maxChi2n = cms.vdouble( 1.2, 1.0, 999.0 ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.dr_par = cms.PSet( + d0err = cms.vdouble( 0.003, 0.003, 0.003 ), + dr_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dr_par2 = cms.vdouble( 3.40282346639E38, 0.45, 0.45 ), + dr_exp = cms.vint32( 4, 4, 4 ), + d0err_par = cms.vdouble( 0.001, 0.001, 0.001 ) + ) + process.hltIter0PFlowTrackCutClassifierSerialSync.mva.dz_par = cms.PSet( + dz_par1 = cms.vdouble( 3.40282346639E38, 0.6, 0.6 ), + dz_par2 = cms.vdouble( 3.40282346639E38, 0.51, 0.51 ), + dz_exp = cms.vint32( 4, 4, 4 ) + ) + + return process + +def customizeHLTSiStripClusterizerOnDemandFalse(process): + + # if any of the following objects does not exist, do not apply any customisation + for objLabel in [ + 'hltSiStripRawToClustersFacility', + ]: + if not hasattr(process, objLabel): + print(f'# WARNING: customize command failed (object with label "{objLabel}" not found) - no customisation applied !') + return process + + # mkFit needs all clusters, so switch off the on-demand mode + process.hltSiStripRawToClustersFacility.onDemand = False + return process + +def customizeHLTSiStripClusterizerOnDemandFalseMaxClusterSize8(process): + + for objLabel in [ + 'hltSiStripRawToClustersFacility', + ]: + if not hasattr(process, objLabel): + print(f'# WARNING: customize command failed (object with label "{objLabel}" not found) - no customisation applied !') + return process + + process.hltSiStripRawToClustersFacility = cms.EDProducer( + "SiStripClusterizerFromRaw", + ProductLabel = cms.InputTag( "rawDataCollector" ), + ConditionsLabel = cms.string( "" ), + onDemand = cms.bool( True ), + DoAPVEmulatorCheck = cms.bool( False ), + LegacyUnpacker = cms.bool( False ), + HybridZeroSuppressed = cms.bool( False ), + Clusterizer = cms.PSet( + ConditionsLabel = cms.string( "" ), + MaxClusterSize = cms.uint32( 32 ), + ClusterThreshold = cms.double( 5.0 ), + SeedThreshold = cms.double( 3.0 ), + Algorithm = cms.string( "ThreeThresholdAlgorithm" ), + ChannelThreshold = cms.double( 2.0 ), + MaxAdjacentBad = cms.uint32( 0 ), + setDetId = cms.bool( True ), + MaxSequentialHoles = cms.uint32( 0 ), + RemoveApvShots = cms.bool( True ), + clusterChargeCut = cms.PSet( refToPSet_ = cms.string( "HLTSiStripClusterChargeCutNone" ) ), + MaxSequentialBad = cms.uint32( 1 ) + ), + Algorithms = cms.PSet( + Use10bitsTruncation = cms.bool( False ), + CommonModeNoiseSubtractionMode = cms.string( "Median" ), + useCMMeanMap = cms.bool( False ), + TruncateInSuppressor = cms.bool( True ), + doAPVRestore = cms.bool( False ), + SiStripFedZeroSuppressionMode = cms.uint32( 4 ), + PedestalSubtractionFedMode = cms.bool( True ) + ) + ) + process.hltSiStripRawToClustersFacility.onDemand = False + process.hltSiStripRawToClustersFacility.Clusterizer.MaxClusterSize = 8 + + return process + +def modifyOutputModule(process, filename="output.root"): + + for objLabel in [ + 'hltOutputMinimal', + ]: + if not hasattr(process, objLabel): + print(f'# WARNING: customize command failed (object with label "{objLabel}" not found) - no customisation applied !') + return process + + process.hltOutputMinimal.outputCommands = cms.untracked.vstring( + 'drop *', + 'keep edmTriggerResults_*_*_*', + 'keep triggerTriggerEvent_*_*_*', + 'keep GlobalAlgBlkBXVector_*_*_*', + 'keep GlobalExtBlkBXVector_*_*_*', + 'keep l1tEGammaBXVector_*_EGamma_*', + 'keep l1tEtSumBXVector_*_EtSum_*', + 'keep l1tJetBXVector_*_Jet_*', + 'keep l1tMuonBXVector_*_Muon_*', + 'keep l1tTauBXVector_*_Tau_*', + 'keep *_*_*_HLTX', + 'drop *_hltHbherecoLegacy_*_*', + 'drop *_hlt*Pixel*SoA*_*_*', + 'keep recoGenParticles_genParticles_*_*', + 'keep TrackingParticles_*_*_*', + 'keep *_*_MergedTrackTruth_*', + 'keep *_simSiPixelDigis_*_*', + 'keep *_simSiStripDigis_*_*', + 'keep PSimHits_g4SimHits_*_*', + 'keep SimTracks_g4SimHits_*_*', + 'keep SimVertexs_g4SimHits_*_*', + 'keep PileupSummaryInfos_addPileupInfo_*_*', + ) + process.hltOutputMinimal.fileName = filename + process.schedule.remove( process.DQMOutput ) return process diff --git a/RecoTracker/MkFitCore/interface/Hit.h b/RecoTracker/MkFitCore/interface/Hit.h index efead1df7fcfd..4ace95ee5af43 100644 --- a/RecoTracker/MkFitCore/interface/Hit.h +++ b/RecoTracker/MkFitCore/interface/Hit.h @@ -5,6 +5,12 @@ #include "RecoTracker/MkFitCore/interface/MatrixSTypes.h" #include +#include +#include +#include +#include +#include +#include #include #include @@ -31,17 +37,17 @@ namespace mkfit { inline float getInvRad2(float x, float y) { return 1.0f / (x * x + y * y); } - inline float getPhi(float x, float y) { return std::atan2(y, x); } + inline float getPhi(float x, float y) { return vdt::fast_atan2f(y, x); } - inline float getTheta(float r, float z) { return std::atan2(r, z); } + inline float getTheta(float r, float z) { return vdt::fast_atan2f(r, z); } - inline float getEta(float r, float z) { return -1.0f * std::log(std::tan(getTheta(r, z) / 2.0f)); } + inline float getEta(float r, float z) { return -1.0f * vdt::fast_logf(vdt::fast_tanf(getTheta(r, z) / 2.0f)); } - inline float getEta(float theta) { return -1.0f * std::log(std::tan(theta / 2.0f)); } + inline float getEta(float theta) { return -1.0f * vdt::fast_logf(vdt::fast_tanf(theta / 2.0f)); } inline float getEta(float x, float y, float z) { - const float theta = std::atan2(std::sqrt(x * x + y * y), z); - return -1.0f * std::log(std::tan(theta / 2.0f)); + const float theta = vdt::fast_atan2f(std::sqrt(x * x + y * y), z); + return -1.0f * vdt::fast_logf(vdt::fast_tanf(theta / 2.0f)); } inline float getHypot(float x, float y) { return std::sqrt(x * x + y * y); } @@ -82,22 +88,24 @@ namespace mkfit { inline float getPxPxErr2(float ipt, float phi, float vipt, float vphi) { // ipt = 1/pT, v = variance const float iipt2 = 1.0f / (ipt * ipt); //iipt = 1/(1/pT) = pT - const float cosP = std::cos(phi); - const float sinP = std::sin(phi); + float cosP; + float sinP; + vdt::fast_sincosf(phi, sinP, cosP); return iipt2 * (iipt2 * cosP * cosP * vipt + sinP * sinP * vphi); } inline float getPyPyErr2(float ipt, float phi, float vipt, float vphi) { // ipt = 1/pT, v = variance const float iipt2 = 1.0f / (ipt * ipt); //iipt = 1/(1/pT) = pT - const float cosP = std::cos(phi); - const float sinP = std::sin(phi); + float cosP; + float sinP; + vdt::fast_sincosf(phi, sinP, cosP); return iipt2 * (iipt2 * sinP * sinP * vipt + cosP * cosP * vphi); } inline float getPzPzErr2(float ipt, float theta, float vipt, float vtheta) { // ipt = 1/pT, v = variance const float iipt2 = 1.0f / (ipt * ipt); //iipt = 1/(1/pT) = pT - const float cotT = 1.0f / std::tan(theta); - const float cscT = 1.0f / std::sin(theta); + const float cotT = 1.0f / vdt::fast_tanf(theta); + const float cscT = 1.0f / vdt::fast_sinf(theta); return iipt2 * (iipt2 * cotT * cotT * vipt + cscT * cscT * cscT * cscT * vtheta); } @@ -121,20 +129,13 @@ namespace mkfit { struct MeasurementState { public: MeasurementState() {} - MeasurementState(const SVector3& p, const SVector6& e) : pos_(p), err_(e) {} - MeasurementState(const SVector3& p, const SMatrixSym33& e) : pos_(p) { - for (int i = 0; i < 6; ++i) - err_[i] = e.Array()[i]; - } + MeasurementState(const SVector3& p, const SMatrixSym33& e) : pos_(p), err_(e) {} + const SVector3& parameters() const { return pos_; } - SMatrixSym33 errors() const { - SMatrixSym33 result; - for (int i = 0; i < 6; ++i) - result.Array()[i] = err_[i]; - return result; - } + const SMatrixSym33& errors() const { return err_; } + SVector3 pos_; - SVector6 err_; + SMatrixSym33 err_; }; class Hit { @@ -146,14 +147,14 @@ namespace mkfit { const SVector3& position() const { return state_.parameters(); } const SVector3& parameters() const { return state_.parameters(); } - const SMatrixSym33 error() const { return state_.errors(); } + const SMatrixSym33& error() const { return state_.err_; } const float* posArray() const { return state_.pos_.Array(); } const float* errArray() const { return state_.err_.Array(); } // Non-const versions needed for CopyOut of Matriplex. SVector3& parameters_nc() { return state_.pos_; } - SVector6& error_nc() { return state_.err_; } + SMatrixSym33& error_nc() { return state_.err_; } float r() const { return sqrtf(state_.parameters().At(0) * state_.parameters().At(0) + diff --git a/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.cc b/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.cc index 78c224d0bbaf5..9c3d83589fb8b 100644 --- a/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.cc +++ b/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.cc @@ -934,7 +934,7 @@ namespace mkfit { MPlexQF msRad; #pragma omp simd for (int n = 0; n < NN; ++n) { - msRad.At(n, 0, 0) = std::hypot(msPar.constAt(n, 0, 0), msPar.constAt(n, 1, 0)); + msRad.At(n, 0, 0) = hipo(msPar.constAt(n, 0, 0), msPar.constAt(n, 1, 0)); } propagateHelixToRMPlex(psErr, psPar, Chg, msRad, propErr, propPar, outFailFlag, N_proc, propFlags); @@ -983,7 +983,7 @@ namespace mkfit { #pragma omp simd for (int n = 0; n < NN; ++n) { if (n < N_proc) { - msRad.At(n, 0, 0) = std::hypot(msPar.constAt(n, 0, 0), msPar.constAt(n, 1, 0)); + msRad.At(n, 0, 0) = hipo(msPar.constAt(n, 0, 0), msPar.constAt(n, 1, 0)); } else { msRad.At(n, 0, 0) = 0.0f; } @@ -1053,7 +1053,7 @@ namespace mkfit { MPlexQF rotT01; for (int n = 0; n < NN; ++n) { if (n < N_proc) { - const float r = std::hypot(msPar.constAt(n, 0, 0), msPar.constAt(n, 1, 0)); + const float r = hipo(msPar.constAt(n, 0, 0), msPar.constAt(n, 1, 0)); rotT00.At(n, 0, 0) = -(msPar.constAt(n, 1, 0) + psPar.constAt(n, 1, 0)) / (2 * r); rotT01.At(n, 0, 0) = (msPar.constAt(n, 0, 0) + psPar.constAt(n, 0, 0)) / (2 * r); } else { diff --git a/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.icc b/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.icc index b6d5b73469a87..8134af5bce816 100644 --- a/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.icc +++ b/RecoTracker/MkFitCore/src/KalmanUtilsMPlex.icc @@ -54,7 +54,7 @@ template static inline void ConvertToCCS_imp(const TfLV1& a, TfLV2& b, TfLL& c, const int nmin, const int nmax) { #pragma omp simd for (int n = nmin; n < nmax; ++n) { - const float pt = getHypot(a(n, 0, 3), a(n, 0, 4)); + const float pt = hipo(a(n, 0, 3), a(n, 0, 4)); const float p2 = pt * pt + a(n, 0, 5) * a(n, 0, 5); // b(n, 0, 0) = a(n, 0, 0); diff --git a/RecoTracker/MkFitCore/src/MiniPropagators.cc b/RecoTracker/MkFitCore/src/MiniPropagators.cc index 66396bfbaaa0e..0c03258df6ca1 100644 --- a/RecoTracker/MkFitCore/src/MiniPropagators.cc +++ b/RecoTracker/MkFitCore/src/MiniPropagators.cc @@ -39,7 +39,7 @@ namespace mkfit::mini_propagators { for (int i = 0; i < Config::Niter; ++i) { // compute tangental and ideal distance for the current iteration. // 3-rd order asin for symmetric incidence (shortest arc lenght). - float r0 = std::hypot(c.x, c.y); + float r0 = hipo(c.x, c.y); float td = (R - r0) * curv; float id = oo_curv * td * (1.0f + 0.16666666f * td * td); // This would be for line approximation: @@ -67,7 +67,7 @@ namespace mkfit::mini_propagators { } } // should have some epsilon constant / member? relative vs. abs? - c.fail_flag = std::abs(std::hypot(c.x, c.y) - R) < 0.1f ? 0 : 1; + c.fail_flag = std::abs(hipo(c.x, c.y) - R) < 0.1f ? 0 : 1; return c.fail_flag; } diff --git a/RecoTracker/MkFitCore/src/MkBase.h b/RecoTracker/MkFitCore/src/MkBase.h index 2244ea1f8cccb..569c06d43a113 100644 --- a/RecoTracker/MkFitCore/src/MkBase.h +++ b/RecoTracker/MkFitCore/src/MkBase.h @@ -46,7 +46,7 @@ namespace mkfit { MPlexQF msRad; #pragma omp simd for (int n = 0; n < NN; ++n) { - msRad.At(n, 0, 0) = std::hypot(par.constAt(n, 0, 0), par.constAt(n, 1, 0)); + msRad.At(n, 0, 0) = hipo(par.constAt(n, 0, 0), par.constAt(n, 1, 0)); } propagateHelixToRMPlex( @@ -84,9 +84,9 @@ namespace mkfit { #pragma omp simd for (int n = 0; n < NN; ++n) { const float slope = std::tan(m_Par[iC].constAt(n, 5, 0)); - // msZ.At(n, 0, 0) = ( Config::beamspotz0 + slope * ( Config::beamspotr0 - std::hypot(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0))) + slope * slope * m_Par[iC].constAt(n, 2, 0) ) / ( 1+slope*slope); // PCA w.r.t. z0, r0 + // msZ.At(n, 0, 0) = ( Config::beamspotz0 + slope * ( Config::beamspotr0 - hipo(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0))) + slope * slope * m_Par[iC].constAt(n, 2, 0) ) / ( 1+slope*slope); // PCA w.r.t. z0, r0 msZ.At(n, 0, 0) = (slope * (slope * m_Par[iC].constAt(n, 2, 0) - - std::hypot(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0)))) / + hipo(m_Par[iC].constAt(n, 0, 0), m_Par[iC].constAt(n, 1, 0)))) / (1 + slope * slope); // PCA to origin } diff --git a/RecoTracker/MkFitCore/src/MkBuilder.cc b/RecoTracker/MkFitCore/src/MkBuilder.cc index 28abf7bb5d1f4..bf540dc86fb9c 100644 --- a/RecoTracker/MkFitCore/src/MkBuilder.cc +++ b/RecoTracker/MkFitCore/src/MkBuilder.cc @@ -120,14 +120,14 @@ namespace { const float pt = 1.f / fir->getPar(0, 0, 3); std::cout << "propagate to lay=" << ilay << " start from x=" << fir->getPar(0, 0, 0) << " y=" << fir->getPar(0, 0, 1) << " z=" << fir->getPar(0, 0, 2) - << " r=" << getHypot(fir->getPar(0, 0, 0), fir->getPar(0, 0, 1)) + << " r=" << hipo(fir->getPar(0, 0, 0), fir->getPar(0, 0, 1)) << " px=" << pt * std::cos(fir->getPar(0, 0, 4)) << " py=" << pt * std::sin(fir->getPar(0, 0, 4)) << " pz=" << pt / std::tan(fir->getPar(0, 0, 5)) << " pT=" << pt << std::endl; } void post_prop_print(int ilay, MkBase *fir) { std::cout << "propagate to lay=" << ilay << " arrive at x=" << fir->getPar(0, 1, 0) << " y=" << fir->getPar(0, 1, 1) - << " z=" << fir->getPar(0, 1, 2) << " r=" << getHypot(fir->getPar(0, 1, 0), fir->getPar(0, 1, 1)) + << " z=" << fir->getPar(0, 1, 2) << " r=" << hipo(fir->getPar(0, 1, 0), fir->getPar(0, 1, 1)) << std::endl; } diff --git a/RecoTracker/MkFitCore/src/MkFinder.cc b/RecoTracker/MkFitCore/src/MkFinder.cc index 07f42007ff373..ccc60233194dc 100644 --- a/RecoTracker/MkFitCore/src/MkFinder.cc +++ b/RecoTracker/MkFitCore/src/MkFinder.cc @@ -20,7 +20,9 @@ #include "RecoTracker/MkFitCore/standalone/RntDumper/MkFinder_selectHitIndices.icc" #endif -#include "vdt/atan2.h" +#include +#include +#include #include #include @@ -407,15 +409,15 @@ namespace mkfit { const float z = m_Par[iI].constAt(itrack, 2, 0); const float dz = std::abs(nSigmaZ * std::sqrt(m_Err[iI].constAt(itrack, 2, 2))); - const float edgeCorr = - std::abs(0.5f * (L.layer_info().rout() - L.layer_info().rin()) / std::tan(m_Par[iI].constAt(itrack, 5, 0))); + const float edgeCorr = std::abs(0.5f * (L.layer_info().rout() - L.layer_info().rin()) / + vdt::fast_tanf(m_Par[iI].constAt(itrack, 5, 0))); // XXX-NUM-ERR above, m_Err(2,2) gets negative! m_XWsrResult[itrack] = L.is_within_z_sensitive_region(z, std::sqrt(dz * dz + edgeCorr * edgeCorr)); assignbins(itrack, z, dz, phi, dphi, min_dq, max_dq, min_dphi, max_dphi); // Relax propagation-fail detection to be in line with pre-43145. - if (m_FailFlag[itrack] && std::sqrt(r2) >= L.layer_info().rin()) { + if (m_FailFlag[itrack] && r2 >= sqr(L.layer_info().rin())) { m_FailFlag[itrack] = 0; } } @@ -446,11 +448,10 @@ namespace mkfit { const float r2Inv = 1.f / r2; const float dphidx = -y * r2Inv, dphidy = x * r2Inv; const float phi = getPhi(x, y); - const float dphi2 = - calcdphi2(itrack, dphidx, dphidy) - //range from finite layer thickness - + std::pow(layerD * std::tan(m_Par[iI].At(itrack, 5, 0)) * std::sin(m_Par[iI].At(itrack, 4, 0) - phi), 2) * - r2Inv; + const float tanT = vdt::fast_tanf(m_Par[iI].At(itrack, 5, 0)); + const float dphi2 = calcdphi2(itrack, dphidx, dphidy) + //range from finite layer thickness + + std::pow(layerD * tanT * vdt::fast_sinf(m_Par[iI].At(itrack, 4, 0) - phi), 2) * r2Inv; #ifdef HARD_CHECK assert(dphi2 >= 0); #endif @@ -462,8 +463,7 @@ namespace mkfit { y * y * m_Err[iI].constAt(itrack, 1, 1) + 2 * x * y * m_Err[iI].constAt(itrack, 0, 1)) / r2); - const float edgeCorr = std::abs(0.5f * (L.layer_info().zmax() - L.layer_info().zmin()) * - std::tan(m_Par[iI].constAt(itrack, 5, 0))); + const float edgeCorr = std::abs(0.5f * (L.layer_info().zmax() - L.layer_info().zmin()) * tanT); m_XWsrResult[itrack] = L.is_within_r_sensitive_region(r, std::sqrt(dr * dr + edgeCorr * edgeCorr)); assignbins(itrack, r, dr, phi, dphi, min_dq, max_dq, min_dphi, max_dphi); @@ -627,8 +627,8 @@ namespace mkfit { float hx = thishit.x(); float hy = thishit.y(); float hz = thishit.z(); - float hr = std::hypot(hx, hy); - float hphi = std::atan2(hy, hx); + float hr = hipo(hx, hy); + float hphi = vdt::fast_atan2f(hy, hx); float hex = ngr( std::sqrt(thishit.exx()) ); float hey = ngr( std::sqrt(thishit.eyy()) ); float hez = ngr( std::sqrt(thishit.ezz()) ); @@ -640,7 +640,7 @@ namespace mkfit { float tx = m_Par[iI].At(itrack, 0, 0); float ty = m_Par[iI].At(itrack, 1, 0); float tz = m_Par[iI].At(itrack, 2, 0); - float tr = std::hypot(tx, ty); + float tr = hipo(tx, ty); float tphi = std::atan2(ty, tx); // float tchi2 = ngr( m_Chi2(itrack, 0, 0) ); // unused float tex = ngr( std::sqrt(m_Err[iI].At(itrack, 0, 0)) ); @@ -652,7 +652,7 @@ namespace mkfit { float tephi = ngr( std::sqrt( (ty * ty * tex * tex + tx * tx * tey * tey - 2.0f * tx * ty * m_Err[iI].At(itrack, 0, 1)) / (tr * tr * tr * tr)) ); - float ht_dxy = std::hypot(hx - tx, hy - ty); + float ht_dxy = hipo(hx - tx, hy - ty); float ht_dz = hz - tz; float ht_dphi = cdist(std::abs(hphi - tphi)); @@ -1041,7 +1041,7 @@ namespace mkfit { } } else { prop_fail = mp_is.propagate_to_z(mp::PA_Exact, L.hit_qbar(hi), mp_s, true); - new_q = std::hypot(mp_s.x, mp_s.y); + new_q = hipo(mp_s.x, mp_s.y); new_ddq = std::abs(new_q - L.hit_q(hi)); } @@ -1265,7 +1265,7 @@ namespace mkfit { } dprint("ADD FAKE HIT FOR TRACK #" << itrack << " withinBounds=" << (fake_hit_idx != Hit::kHitEdgeIdx) - << " r=" << std::hypot(m_Par[iP](itrack, 0, 0), m_Par[iP](itrack, 1, 0))); + << " r=" << hipo(m_Par[iP](itrack, 0, 0), m_Par[iP](itrack, 1, 0))); m_msErr.setDiagonal3x3(itrack, 666); m_msPar(itrack, 0, 0) = m_Par[iP](itrack, 0, 0); @@ -1347,16 +1347,17 @@ namespace mkfit { msErr.constAt(itrack, 1, 1) * hitT2inv}; const bool detXY_OK = std::abs(proj[0] * proj[2] - proj[1] * proj[1]) < 0.1f; //check that zero-direction is close - const float cosP = cos(pPar.constAt(itrack, 4, 0)); - const float sinP = sin(pPar.constAt(itrack, 4, 0)); - const float sinT = std::abs(sin(pPar.constAt(itrack, 5, 0))); + float sinP; + float cosP; + vdt::fast_sincosf(pPar.constAt(itrack, 4, 0), sinP, cosP); + const float sinT = std::abs(vdt::fast_sinf(pPar.constAt(itrack, 5, 0))); //qSF = sqrt[(px,py)*(1-proj)*(px,py)]/p = sinT*sqrt[(cosP,sinP)*(1-proj)*(cosP,sinP)]. qSF = detXY_OK ? sinT * std::sqrt(std::abs(1.f + cosP * cosP * proj[0] + sinP * sinP * proj[2] - 2.f * cosP * sinP * proj[1])) : 1.f; } else { //project on z // p_zLocal/p = p_z/p = cosT - qSF = std::abs(cos(pPar.constAt(itrack, 5, 0))); + qSF = std::abs(vdt::fast_cosf(pPar.constAt(itrack, 5, 0))); } const float qCorr = pcm * qSF; @@ -1623,7 +1624,7 @@ namespace mkfit { } dprint("ADD FAKE HIT FOR TRACK #" << itrack << " withinBounds=" << (fake_hit_idx != Hit::kHitEdgeIdx) - << " r=" << std::hypot(m_Par[iP](itrack, 0, 0), m_Par[iP](itrack, 1, 0))); + << " r=" << hipo(m_Par[iP](itrack, 0, 0), m_Par[iP](itrack, 1, 0))); // QQQ as above, only create and add if score better TrackCand newcand; @@ -2151,8 +2152,8 @@ namespace mkfit { #ifdef DEBUG_BACKWARD_FIT_BH // Dump per hit chi2 for (int i = 0; i < N_proc; ++i) { - float r_h = std::hypot(m_msPar.At(i, 0, 0), m_msPar.At(i, 1, 0)); - float r_t = std::hypot(m_Par[iC].At(i, 0, 0), m_Par[iC].At(i, 1, 0)); + float r_h = hipo(m_msPar.At(i, 0, 0), m_msPar.At(i, 1, 0)); + float r_t = hipo(m_Par[iC].At(i, 0, 0), m_Par[iC].At(i, 1, 0)); // if ((std::isnan(tmp_chi2[i]) || std::isnan(r_t))) // if ( ! std::isnan(tmp_chi2[i]) && tmp_chi2[i] > 0) // && tmp_chi2[i] > 30) @@ -2182,7 +2183,7 @@ namespace mkfit { m_Par[ti].At(i, 5, 0), // pt, phi, theta std::atan2(m_msPar.At(i, 1, 0), m_msPar.At(i, 0, 0)), // phi_h std::atan2(m_Par[ti].At(i, 1, 0), m_Par[ti].At(i, 0, 0)), // phi_t - 1e4f * std::hypot(m_msPar.At(i, 0, 0) - m_Par[ti].At(i, 0, 0), + 1e4f * hipo(m_msPar.At(i, 0, 0) - m_Par[ti].At(i, 0, 0), m_msPar.At(i, 1, 0) - m_Par[ti].At(i, 1, 0)), // d_xy 1e4f * (m_msPar.At(i, 2, 0) - m_Par[ti].At(i, 2, 0)) // d_z // e2s((m_msErr.At(i,0,0) + m_msErr.At(i,1,1)) / (r_h * r_h)), // ephi_h @@ -2415,7 +2416,7 @@ namespace mkfit { bb.pT(), beg_cur_sep, 1.0f / m_Par[ti].At(i, 3, 0), bb.posEta(), bb.posPhi(), beg_cur_sep, std::atan2(m_Par[ti].At(i, 1, 0), m_Par[ti].At(i, 0, 0)), - std::hypot(m_Par[ti].At(i, 0, 0), m_Par[ti].At(i, 1, 0)), + hipo(m_Par[ti].At(i, 0, 0), m_Par[ti].At(i, 1, 0)), m_Par[ti].At(i, 2, 0), chi_prnt, std::isnan(chi), std::isfinite(chi), chi > 0, @@ -2427,7 +2428,7 @@ namespace mkfit { e2s(std::abs(m_Err[ti].At(i, 0, 0))), e2s(std::abs(m_Err[ti].At(i, 1, 1))), e2s(std::abs(m_Err[ti].At(i, 2, 2))), // sx_t sy_t sz_t -- track errors - 1e4f * std::hypot(m_msPar.At(i, 0, 0) - m_Par[ti].At(i, 0, 0), + 1e4f * hipo(m_msPar.At(i, 0, 0) - m_Par[ti].At(i, 0, 0), m_msPar.At(i, 1, 0) - m_Par[ti].At(i, 1, 0)), // d_xy 1e4f * (m_msPar.At(i, 2, 0) - m_Par[ti].At(i, 2, 0)) // d_z ); diff --git a/RecoTracker/MkFitCore/src/MkFitter.cc b/RecoTracker/MkFitCore/src/MkFitter.cc index b345751ffe705..7efe276646fc9 100644 --- a/RecoTracker/MkFitCore/src/MkFitter.cc +++ b/RecoTracker/MkFitCore/src/MkFitter.cc @@ -22,7 +22,7 @@ namespace mkfit { void MkFitter::printPt(int idx) { for (int i = 0; i < NN; ++i) { - printf("%5.2f ", std::hypot(m_Par[idx].At(i, 3, 0), m_Par[idx].At(i, 4, 0))); + printf("%5.2f ", getHypot(m_Par[idx].At(i, 3, 0), m_Par[idx].At(i, 4, 0))); } } diff --git a/RecoTracker/MkFitCore/src/PropagationMPlex.cc b/RecoTracker/MkFitCore/src/PropagationMPlex.cc index 079c3d58c0ac9..66a638ba4fba8 100644 --- a/RecoTracker/MkFitCore/src/PropagationMPlex.cc +++ b/RecoTracker/MkFitCore/src/PropagationMPlex.cc @@ -1060,8 +1060,8 @@ namespace mkfit { if (fabs(sqrt(outPar[0]*outPar[0]+outPar[1]*outPar[1]) - msRad[0]) > 0.0001) { std::cout << "DID NOT GET TO R, FailFlag=" << failFlag[0] - << " dR=" << msRad[0] - std::hypot(outPar[0],outPar[1]) - << " r=" << msRad[0] << " rin=" << std::hypot(inPar[0],inPar[1]) << " rout=" << std::hypot(outPar[0],outPar[1]) + << " dR=" << msRad[0] - hipo(outPar[0],outPar[1]) + << " r=" << msRad[0] << " rin=" << hipo(inPar[0],inPar[1]) << " rout=" << hipo(outPar[0],outPar[1]) << std::endl; // std::cout << " pt=" << pt << " pz=" << inPar.At(n, 2) << std::endl; } diff --git a/RecoTracker/MkFitCore/src/PropagationMPlexCommon.cc b/RecoTracker/MkFitCore/src/PropagationMPlexCommon.cc index 767589f648ad6..98964b4773c61 100644 --- a/RecoTracker/MkFitCore/src/PropagationMPlexCommon.cc +++ b/RecoTracker/MkFitCore/src/PropagationMPlexCommon.cc @@ -5,6 +5,9 @@ #include "PropagationMPlex.h" +#include +#include + //#define DEBUG #include "Debug.h" @@ -93,26 +96,31 @@ namespace mkfit { const float ipt = outPar.constAt(n, 3, 0); const float pt = 1.f / ipt; //fixme, make sure it is positive? const float ipt2 = ipt * ipt; - const float p = pt / std::sin(theta); - const float pz = p * std::cos(theta); + float sT; + float cT; + vdt::fast_sincosf(theta, sT, cT); + const float p = pt / sT; + const float pz = p * cT; const float p2 = p * p; constexpr float mpi = 0.140; // m=140 MeV, pion constexpr float mpi2 = mpi * mpi; // m=140 MeV, pion const float beta2 = p2 / (p2 + mpi2); const float beta = std::sqrt(beta2); //radiation lenght, corrected for the crossing angle (cos alpha from dot product of radius vector and momentum) - const float invCos = - p / std::abs(pt * std::cos(outPar.constAt(n, 4, 0)) * plNrm.constAt(n, 0, 0) + - pt * std::sin(outPar.constAt(n, 4, 0)) * plNrm.constAt(n, 1, 0) + pz * plNrm.constAt(n, 2, 0)); + float sinP; + float cosP; + vdt::fast_sincosf(outPar.constAt(n, 4, 0), sinP, cosP); + const float invCos = p / std::abs(pt * cosP * plNrm.constAt(n, 0, 0) + pt * sinP * plNrm.constAt(n, 1, 0) + + pz * plNrm.constAt(n, 2, 0)); radL = radL * invCos; //fixme works only for barrel geom // multiple scattering //vary independently phi and theta by the rms of the planar multiple scattering angle // XXX-KMD radL < 0, see your fixme above! Repeating bailout if (radL < 1e-13f) continue; - // const float thetaMSC = 0.0136f*std::sqrt(radL)*(1.f+0.038f*std::log(radL))/(beta*p);// eq 32.15 + // const float thetaMSC = 0.0136f*std::sqrt(radL)*(1.f+0.038f*vdt::fast_logf(radL))/(beta*p);// eq 32.15 // const float thetaMSC2 = thetaMSC*thetaMSC; - const float thetaMSC = 0.0136f * (1.f + 0.038f * std::log(radL)) / (beta * p); // eq 32.15 + const float thetaMSC = 0.0136f * (1.f + 0.038f * vdt::fast_logf(radL)) / (beta * p); // eq 32.15 const float thetaMSC2 = thetaMSC * thetaMSC * radL; if /*constexpr*/ (Config::usePtMultScat) { outErr.At(n, 3, 3) += thetaMSC2 * pz * pz * ipt2 * ipt2; @@ -135,12 +143,13 @@ namespace mkfit { constexpr float me = 0.0005; // m=0.5 MeV, electron const float wmax = 2.f * me * beta2 * gamma2 / (1.f + 2.f * gamma * me / mpi + me * me / (mpi * mpi)); constexpr float I = 16.0e-9 * 10.75; - const float deltahalf = std::log(28.816e-9f * std::sqrt(2.33f * 0.498f) / I) + std::log(beta * gamma) - 0.5f; + const float deltahalf = + vdt::fast_logf(28.816e-9f * std::sqrt(2.33f * 0.498f) / I) + vdt::fast_logf(beta * gamma) - 0.5f; const float dEdx = - beta < 1.f - ? (2.f * (hitsXi.constAt(n, 0, 0) * invCos * - (0.5f * std::log(2.f * me * beta2 * gamma2 * wmax / (I * I)) - beta2 - deltahalf) / beta2)) - : 0.f; //protect against infs and nans + beta < 1.f ? (2.f * (hitsXi.constAt(n, 0, 0) * invCos * + (0.5f * vdt::fast_logf(2.f * me * beta2 * gamma2 * wmax / (I * I)) - beta2 - deltahalf) / + beta2)) + : 0.f; //protect against infs and nans // dEdx = dEdx*2.;//xi in cmssw is defined with an extra factor 0.5 with respect to formula 27.1 in pdg //std::cout << "dEdx=" << dEdx << " delta=" << deltahalf << " wmax=" << wmax << " Xi=" << hitsXi.constAt(n,0,0) << std::endl; const float dP = propSign.constAt(n, 0, 0) * dEdx / beta; diff --git a/RecoTracker/MkFitCore/src/PropagationMPlexEndcap.cc b/RecoTracker/MkFitCore/src/PropagationMPlexEndcap.cc index 35f31dbb077fa..467f7f51bafa6 100644 --- a/RecoTracker/MkFitCore/src/PropagationMPlexEndcap.cc +++ b/RecoTracker/MkFitCore/src/PropagationMPlexEndcap.cc @@ -135,7 +135,7 @@ namespace mkfit { hitsRl(n, 0, 0) = 0.f; hitsXi(n, 0, 0) = 0.f; } else { - const float hypo = std::hypot(outPar(n, 0, 0), outPar(n, 1, 0)); + const float hypo = hipo(outPar(n, 0, 0), outPar(n, 1, 0)); auto mat = tinfo.material_checked(std::abs(msZ(n, 0, 0)), hypo); hitsRl(n, 0, 0) = mat.radl; hitsXi(n, 0, 0) = mat.bbxi; @@ -454,7 +454,7 @@ namespace mkfit { // Are we close to apex? Same condition as in propToR, 12.5 deg, cos(78.5deg) = 0.2 float dotp = (outPar.At(n, 0, 0) * std::cos(outPar.At(n, 4, 0)) + outPar.At(n, 1, 0) * std::sin(outPar.At(n, 4, 0))) / - std::hypot(outPar.At(n, 0, 0), outPar.At(n, 1, 0)); + hipo(outPar.At(n, 0, 0), outPar.At(n, 1, 0)); if (dotp < 0.2 || dotp < 0) { dprintf("helixAtZ: dot product bad, dotp = %f\n", dotp); outFailFlag[n] = 1; diff --git a/RecoTracker/MkFitCore/src/PropagationMPlexPlane.cc b/RecoTracker/MkFitCore/src/PropagationMPlexPlane.cc index 8bba667b05297..e7ebbb3c84f1b 100644 --- a/RecoTracker/MkFitCore/src/PropagationMPlexPlane.cc +++ b/RecoTracker/MkFitCore/src/PropagationMPlexPlane.cc @@ -656,7 +656,7 @@ namespace mkfit { hitsRl(n, 0, 0) = 0.f; hitsXi(n, 0, 0) = 0.f; } else { - const float hypo = std::hypot(outPar(n, 0, 0), outPar(n, 1, 0)); + const float hypo = hipo(outPar(n, 0, 0), outPar(n, 1, 0)); auto mat = tinfo.material_checked(std::abs(outPar(n, 2, 0)), hypo); hitsRl(n, 0, 0) = mat.radl; hitsXi(n, 0, 0) = mat.bbxi; diff --git a/RecoTracker/MkFitCore/src/Track.cc b/RecoTracker/MkFitCore/src/Track.cc index 4fdd34437b01f..1980794c21949 100644 --- a/RecoTracker/MkFitCore/src/Track.cc +++ b/RecoTracker/MkFitCore/src/Track.cc @@ -197,11 +197,11 @@ namespace mkfit { // center of helix in x,y plane const float x_center = x() - k * py(); const float y_center = y() + k * px(); - return std::hypot(x_center - x_bs, y_center - y_bs) - abs_ooc_half; + return hipo(x_center - x_bs, y_center - y_bs) - abs_ooc_half; } } float TrackBase::swimPhiToR(const float x0, const float y0) const { - const float dR = getHypot(x() - x0, y() - y0); + const float dR = hipo(x() - x0, y() - y0); // XXX-ASSUMPTION-ERROR can not always reach R, should see what callers expect. // For now return PI to signal apex on the ohter side of the helix. const float v = dR / 176.f / pT() * charge(); @@ -213,7 +213,7 @@ namespace mkfit { bool TrackBase::canReachRadius(float R) const { const float k = ((charge() < 0) ? 100.0f : -100.0f) / (Const::sol * Config::Bfield); const float ooc = 2.0f * k * pT(); - return std::abs(ooc) > R - std::hypot(x(), y()); + return std::abs(ooc) > R - hipo(x(), y()); } float TrackBase::maxReachRadius() const { @@ -222,7 +222,7 @@ namespace mkfit { // center of helix in x,y plane const float x_center = x() - k * py(); const float y_center = y() + k * px(); - return std::hypot(x_center, y_center) + abs_ooc_half; + return hipo(x_center, y_center) + abs_ooc_half; } float TrackBase::zAtR(float R, float* r_reached) const { @@ -240,14 +240,14 @@ namespace mkfit { const float lambda = pz() * ipt; //printf("Track::zAtR to R=%f: k=%e, ipt=%e, c=%e, ooc=%e -- can hit = %f (if > 1 can)\n", - // R, k, ipt, c, ooc, ooc / (R - std::hypot(xc,yc))); + // R, k, ipt, c, ooc, ooc / (R - hipo(xc,yc))); float D = 0; for (int i = 0; i < Config::Niter; ++i) { // compute tangental and ideal distance for the current iteration. // 3-rd order asin for symmetric incidence (shortest arc lenght). - float r0 = std::hypot(xc, yc); + float r0 = hipo(xc, yc); float td = (R - r0) * c; float id = ooc * td * (1.0f + 0.16666666f * td * td); // This would be for line approximation: @@ -270,7 +270,7 @@ namespace mkfit { } if (r_reached) - *r_reached = std::hypot(xc, yc); + *r_reached = hipo(xc, yc); return z() + lambda * D; @@ -325,7 +325,7 @@ namespace mkfit { // pxc = pxc * cosa - pyc * sina; // pyc = pyc * cosa + pxo * sina; - return std::hypot(xc, yc); + return hipo(xc, yc); } const char* TrackBase::algoint_to_cstr(int algo) { diff --git a/hltValidation_default.py b/hltValidation_default.py new file mode 100644 index 0000000000000..66df7ca553a13 --- /dev/null +++ b/hltValidation_default.py @@ -0,0 +1,64 @@ +import FWCore.ParameterSet.Config as cms +#from Validation.RecoTrack.HLTmultiTrackValidator_cff import hltMultiTrackValidation +#from SimGeneral.TrackingAnalysis.trackingParticleNumberOfLayersProducer_cfi import * + +from Configuration.Eras.Era_Run3_2024_cff import Run3_2024 +process = cms.Process("HLTRACKVALIDATOR", Run3_2024) +process.load("Validation.RecoTrack.HLTmultiTrackValidator_cff") +process.load("SimGeneral.TrackingAnalysis.trackingParticleNumberOfLayersProducer_cfi") +process.load('Configuration.StandardSequences.Services_cff') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load("Configuration.StandardSequences.RawToDigi_cff") +process.load("Configuration.EventContent.EventContent_cff") +process.load("Configuration.StandardSequences.Reconstruction_cff") +process.load("Configuration.StandardSequences.MagneticField_cff") +process.load('Configuration.StandardSequences.EndOfProcess_cff') + +# source +readFiles = cms.untracked.vstring() +source = cms.Source ("PoolSource",fileNames = readFiles) +readFiles.extend([ + 'file:output_default_onlyTracking.root', +]) +process.source = source +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +### conditions +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2024_realistic', '') + +process.hltTrackValidator.cores = cms.InputTag("") +process.hltTrackValidator.label = ["hltPixelTracks", "hltIter0PFlowCtfWithMaterialTracks", "hltIter0PFlowTrackSelectionHighPurity", "hltDoubletRecoveryPFlowTrackSelectionHighPurity", "hltMergedTracks"] + +process.hltTracksValidationTruth = cms.Sequence( + process.hltTPClusterProducer + + process.hltTrackAssociatorByHits + + process.trackingParticleNumberOfLayersProducer +) +process.hltMultiTrackValidation = cms.Sequence( + process.hltTracksValidationTruth + + process.hltTrackValidator +) + +# paths +process.validation = cms.Path(process.hltMultiTrackValidation) + +# Output definition +process.load( "DQMServices.Core.DQMStore_cfi" ) +process.dqmOutput = cms.OutputModule("DQMRootOutputModule", + fileName = cms.untracked.string('file:DQMOutput_default.root'), +) + +process.endjob_step = cms.EndPath(process.endOfProcess) +process.DQMoutput_step = cms.EndPath(process.dqmOutput) + +process.schedule = cms.Schedule( + process.validation,process.endjob_step,process.DQMoutput_step +) + +process.options = cms.untracked.PSet( + numberOfThreads = cms.untracked.uint32(16), + numberOfStreams = cms.untracked.uint32(0), + wantSummary = cms.untracked.bool(True) +)