diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 9699c50059487..989fcbe750172 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -759,6 +759,14 @@ def SwapKeepAndDrop(l): phase2_hgcal.toModify(FEVTDEBUGHLTEventContent, outputCommands = FEVTDEBUGHLTEventContent.outputCommands + TICL_FEVTHLT.outputCommands) +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toModify(FEVTDEBUGHLTEventContent, + outputCommands = FEVTDEBUGHLTEventContent.outputCommands + RecoLocalFastTimeFEVTHLT.outputCommands + RecoMTDFEVTHLT.outputCommands) + +mtd_at_hlt.toModify(FEVTDEBUGHLTEventContent, + outputCommands = FEVTDEBUGHLTEventContent.outputCommands+[ + 'keep *_hltOfflinePrimaryVertices4D_*_*' + ]) from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2 diff --git a/Configuration/ProcessModifiers/python/mtd_at_hlt_cff.py b/Configuration/ProcessModifiers/python/mtd_at_hlt_cff.py new file mode 100644 index 0000000000000..b52fdc2b4f291 --- /dev/null +++ b/Configuration/ProcessModifiers/python/mtd_at_hlt_cff.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +# This modifier enables the usage of MTD into the Phase2 HLT +# This includes: +# - MTD local reconstruction +# - fast timing global reconstruction (TrackExtenderWithMTD) +# - 4D vertexing +mtd_at_hlt = cms.Modifier() diff --git a/Configuration/PyReleaseValidation/README.md b/Configuration/PyReleaseValidation/README.md index b03c6d17277dc..ca3b5793074d2 100644 --- a/Configuration/PyReleaseValidation/README.md +++ b/Configuration/PyReleaseValidation/README.md @@ -60,6 +60,7 @@ The offsets currently in use are: * 0.7503: HLT phase-2 menu, CPU vs. GPU validation * 0.751: HLT phase-2 timing menu Alpaka variant * 0.7521: HLT phase-2 timing menu ticlv5TrackLinkingGNN variant +* 0.7522: HLT phase-2 timing menu mtd_at_hlt variant * 0.753: HLT phase-2 timing menu legacy tracking * 0.754: HLT phase-2 timing menu legacy tracking with Patatrack quads * 0.755: HLT phase-2 timing menu LST building variant diff --git a/Configuration/PyReleaseValidation/python/relval_Run4.py b/Configuration/PyReleaseValidation/python/relval_Run4.py index 8e7a6d5c6713f..febe440c14dd5 100644 --- a/Configuration/PyReleaseValidation/python/relval_Run4.py +++ b/Configuration/PyReleaseValidation/python/relval_Run4.py @@ -63,6 +63,7 @@ numWFIB.extend([prefixDet+34.7503]) # HLTHeterogeneousValid numWFIB.extend([prefixDet+34.751]) # HLTTiming75e33, alpaka numWFIB.extend([prefixDet+34.7521]) # HLTTiming75e33, ticlv5TrackLinkingGNN +numWFIB.extend([prefixDet+34.7522]) # HLTTiming75e33, mtd_at_hlt numWFIB.extend([prefixDet+34.753]) # HLTTiming75e33, legacy tracking numWFIB.extend([prefixDet+34.754]) # HLTTiming75e33, legacy tracking with Patatrack quads numWFIB.extend([prefixDet+34.755]) # HLTTiming75e33, trackingLST diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index fb1e68b543434..2978e0b37b16b 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -1978,6 +1978,11 @@ def condition(self, fragment, stepList, key, hasHarvest): '-s':'HARVESTING:@hltValidation' } +upgradeWFs['HLTTiming75e33MTDatHLT'] = deepcopy(upgradeWFs['HLTTiming75e33']) +upgradeWFs['HLTTiming75e33MTDatHLT'].suffix = '_HLT75e33TimingMTDatHLT' +upgradeWFs['HLTTiming75e33MTDatHLT'].offset = 0.7522 +upgradeWFs['HLTTiming75e33MTDatHLT'].step2['--procModifiers'] = 'mtd_at_hlt' +upgradeWFs['HLTTiming75e33MTDatHLT'].step3['--procModifiers'] = 'mtd_at_hlt' upgradeWFs['HLTTiming75e33LegacyTracking'] = deepcopy(upgradeWFs['HLTTiming75e33']) upgradeWFs['HLTTiming75e33LegacyTracking'].suffix = '_HLT75e33TimingLegacyTracking' diff --git a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py index 167d20a534a41..c265c7df84748 100755 --- a/Configuration/PyReleaseValidation/scripts/runTheMatrix.py +++ b/Configuration/PyReleaseValidation/scripts/runTheMatrix.py @@ -155,7 +155,8 @@ def runSelected(opt): prefixDet+34.7502, # HLT phase-2 tracking menu with tracking ntuple prefixDet+34.7503, # HLT phase-2 menu, CPU vs. GPU validation prefixDet+34.751, # HLT phase-2 timing menu Alpaka variant - prefixDet+34.7521, # HLT phase-2 timing menu ticlv5TrackLinkGNN variant + prefixDet+34.7521, # HLT phase-2 timing menu ticlv5TrackLinkGNN variant + prefixDet+34.7522, # HLT phase-2 timing menu mtd_at_hlt variant prefixDet+34.753, # HLT phase-2 timing menu legacy tracking prefixDet+34.754, # HLT phase-2 timing menu legacy tracking with Patatrack quads prefixDet+34.755, # HLT phase-2 timing menu LST building variant diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltChi2EstimatorForRefit_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltChi2EstimatorForRefit_cfi.py new file mode 100644 index 0000000000000..32a010579b36f --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltChi2EstimatorForRefit_cfi.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessCh2EstimatorForRefit(process): + process.hltChi2EstimatorForRefit = cms.ESProducer('Chi2MeasurementEstimatorESProducer', + ComponentName = cms.string('hltChi2EstimatorForRefit'), + MaxChi2 = cms.double(100000.0), + nSigma = cms.double(3), + MaxDisplacement = cms.double(0.5), + MaxSagitta = cms.double(2), + MinimalTolerance = cms.double(0.5), + MinPtForHitRecoveryInGluedDet = cms.double(1000000000000), + appendToDataLabel = cms.string('')) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForChi2EstimatorForRefit_ = mtd_at_hlt.makeProcessModifier(_addProcessCh2EstimatorForRefit) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltKFFitterForRefitInsideOut_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltKFFitterForRefitInsideOut_cfi.py new file mode 100644 index 0000000000000..2342928566643 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltKFFitterForRefitInsideOut_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessKFFitterForRefitInsideOut(process): + process.hltKFFitterForRefitInsideOut = cms.ESProducer('KFTrajectoryFitterESProducer', + RecoGeometry = cms.string('GlobalDetLayerGeometry'), + ComponentName = cms.string('hltKFFitterForRefitInsideOut'), + Propagator = cms.string('hltSmartPropagatorAnyRK'), + Updator = cms.string('hltESPKFUpdator'), + Estimator = cms.string('hltChi2EstimatorForRefit'), + minHits = cms.int32(3), + appendToDataLabel = cms.string('')) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForKFFitterForRefitInsideOut_ = mtd_at_hlt.makeProcessModifier(_addProcessKFFitterForRefitInsideOut) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltKFSmootherForRefitInsideOut_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltKFSmootherForRefitInsideOut_cfi.py new file mode 100644 index 0000000000000..c72345b89b5db --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltKFSmootherForRefitInsideOut_cfi.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessKFSmootherForRefitInsideOut(process): + process.hltKFSmootherForRefitInsideOut = cms.ESProducer('KFTrajectorySmootherESProducer', + ComponentName = cms.string('hltKFSmootherForRefitInsideOut'), + Propagator = cms.string('hltSmartPropagatorAnyRK'), + Updator = cms.string('hltESPKFUpdator'), + Estimator = cms.string('hltChi2EstimatorForRefit'), + RecoGeometry = cms.string('GlobalDetLayerGeometry'), + errorRescaling = cms.double(100), + minHits = cms.int32(3), + appendToDataLabel = cms.string('')) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForKFSmootherForRefitInsideOut_ = mtd_at_hlt.makeProcessModifier(_addProcessKFSmootherForRefitInsideOut) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDCPEESProducer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDCPEESProducer_cfi.py new file mode 100644 index 0000000000000..7b0c903d5bc38 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDCPEESProducer_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessMTDCPEESProducer(process): + process.hltMTDCPEESProducer = cms.ESProducer('MTDCPEESProducer', + appendToDataLabel = cms.string('')) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForMTDCPEESProducer_ = mtd_at_hlt.makeProcessModifier(_addProcessMTDCPEESProducer) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDTimeCalibESProducer_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDTimeCalibESProducer_cfi.py new file mode 100644 index 0000000000000..dc59fdfc4a264 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDTimeCalibESProducer_cfi.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessMTDTimeCalibESProducer(process): + from SimFastTiming.FastTimingCommon.mtdDigitizer_cfi import mtdDigitizer as _mtdDigitizer + process.hltMTDTimeCalibESProducer = cms.ESProducer('MTDTimeCalibESProducer', + BTLLightCollSlope = _mtdDigitizer.barrelDigitizer.DeviceSimulation.LightCollectionSlope, + appendToDataLabel = cms.string('')) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForMTDTimeCalibESProducer_ = mtd_at_hlt.makeProcessModifier(_addProcessMTDTimeCalibESProducer) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDTransientTrackingRecHitBuilder_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDTransientTrackingRecHitBuilder_cfi.py new file mode 100644 index 0000000000000..ddd26044e6a51 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltMTDTransientTrackingRecHitBuilder_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessMTDTransientTrackingRecHitBuilder(process): + process.hltMTDTransientTrackingRecHitBuilder = cms.ESProducer("MTDTransientTrackingRecHitBuilderESProducer", + ComponentName = cms.string('hltMTDRecHitBuilder')) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForMTDTransientTrackingRecHitBuilder_ = mtd_at_hlt.makeProcessModifier(_addProcessMTDTransientTrackingRecHitBuilder) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltPropagatorWithMaterialForMTD_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltPropagatorWithMaterialForMTD_cfi.py new file mode 100644 index 0000000000000..f8e6bf74443da --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltPropagatorWithMaterialForMTD_cfi.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessPropagatorWithMaterialForMTD(process): + process.hltPropagatorWithMaterialForMTD = cms.ESProducer( + "PropagatorWithMaterialESProducer", + MaxDPhi = cms.double(1.6), #default was 1.6 + ComponentName = cms.string('hltPropagatorWithMaterialForMTD'), + Mass = cms.double(0.13957018), #default was 0.105 + PropagationDirection = cms.string('anyDirection'), + useRungeKutta = cms.bool(False), + ptMin = cms.double(0.1), + useOldAnalPropLogic = cms.bool(False) + ) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForPropagatorWithMaterialForMTD_ = mtd_at_hlt.makeProcessModifier(_addProcessPropagatorWithMaterialForMTD) diff --git a/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltSmartPropagatorAnyRK_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltSmartPropagatorAnyRK_cfi.py new file mode 100644 index 0000000000000..1c67fc85e6abd --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/eventsetup/hltSmartPropagatorAnyRK_cfi.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +def _addProcessSmartPropagatorAnyRK(process): + process.hltSmartPropagatorAnyRK = cms.ESProducer("SmartPropagatorESProducer", + ComponentName = cms.string('hltSmartPropagatorAnyRK'), + TrackerPropagator = cms.string('RungeKuttaTrackerPropagator'), + MuonPropagator = cms.string('SteppingHelixPropagatorAny'), + PropagationDirection = cms.string('alongMomentum'), + Epsilon = cms.double(5.0)) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +modifyConfigurationForSmartPropagatorAnyRK_ = mtd_at_hlt.makeProcessModifier(_addProcessSmartPropagatorAnyRK) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackSelectionHighPurity_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackSelectionHighPurity_cfi.py index d299885ff7454..7e384417b31be 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackSelectionHighPurity_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTrackSelectionHighPurity_cfi.py @@ -8,3 +8,6 @@ originalQualVals = cms.InputTag("hltInitialStepTrackCutClassifier","QualityMasks"), originalSource = cms.InputTag("hltInitialStepTracks") ) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toModify(hltInitialStepTrackSelectionHighPurity, copyTrajectories = True) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTracks_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTracks_cfi.py index 22e980e9f4694..31981bf057fd1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTracks_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltInitialStepTracks_cfi.py @@ -18,6 +18,8 @@ useSimpleMF = cms.bool(False) ) +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toModify(hltInitialStepTracks, TrajectoryInEvent = True) _hltInitialStepTracksMkFitFit = cms.EDProducer("MkFitOutputTrackConverter", mkFitEventOfHits = cms.InputTag("hltMkFitEventOfHits"), diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdClusters_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdClusters_cfi.py new file mode 100644 index 0000000000000..9b9d5661d3ee3 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdClusters_cfi.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +hltMtdClusters = cms.EDProducer('MTDClusterProducer', + srcBarrel = cms.InputTag('hltMtdRecHits', 'FTLBarrel'), + srcEndcap = cms.InputTag('hltMtdRecHits', 'FTLEndcap'), + BarrelClusterName = cms.string('FTLBarrel'), + EndcapClusterName = cms.string('FTLEndcap'), + ClusterMode = cms.string('MTDThresholdClusterizer'), + HitThreshold = cms.double(0), + SeedThreshold = cms.double(0), + ClusterThreshold = cms.double(0), + TimeThreshold = cms.double(10), + PositionThreshold = cms.double(-1) + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdRecHits_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdRecHits_cfi.py new file mode 100644 index 0000000000000..23ecd05dcc83c --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdRecHits_cfi.py @@ -0,0 +1,25 @@ +import FWCore.ParameterSet.Config as cms + +_barrelAlgo = cms.PSet( + algoName = cms.string("MTDRecHitAlgo"), + thresholdToKeep = cms.double(1.), # [MeV] + calibrationConstant = cms.double(1.) +) + +_endcapAlgo = cms.PSet( + algoName = cms.string("MTDRecHitAlgo"), + thresholdToKeep = cms.double(0.0425), # MeV + calibrationConstant = cms.double(0.085), # MeV/MIP +) + +from Configuration.Eras.Modifier_phase2_etlV4_cff import phase2_etlV4 +phase2_etlV4.toModify(_endcapAlgo, thresholdToKeep = 0.005, calibrationConstant = 0.015 ) + +hltMtdRecHits = cms.EDProducer("MTDRecHitProducer", + barrel = _barrelAlgo, + endcap = _endcapAlgo, + barrelUncalibratedRecHits = cms.InputTag('hltMtdUncalibratedRecHits:FTLBarrel'), + endcapUncalibratedRecHits = cms.InputTag('hltMtdUncalibratedRecHits:FTLEndcap'), + BarrelHitsName = cms.string('FTLBarrel'), + EndcapHitsName = cms.string('FTLEndcap'), + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdTrackQualityMVA_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdTrackQualityMVA_cfi.py new file mode 100644 index 0000000000000..21b04e6232e41 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdTrackQualityMVA_cfi.py @@ -0,0 +1,18 @@ +import FWCore.ParameterSet.Config as cms + +hltMtdTrackQualityMVA = cms.EDProducer('MTDTrackQualityMVAProducer', + tracksSrc = cms.InputTag('hltGeneralTracks'), + btlMatchChi2Src = cms.InputTag('hltTrackExtenderWithMTD', 'btlMatchChi2'), + btlMatchTimeChi2Src = cms.InputTag('hltTrackExtenderWithMTD', 'btlMatchTimeChi2'), + etlMatchChi2Src = cms.InputTag('hltTrackExtenderWithMTD', 'etlMatchChi2'), + etlMatchTimeChi2Src = cms.InputTag('hltTrackExtenderWithMTD', 'etlMatchTimeChi2'), + mtdTimeSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + sigmamtdTimeSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmatmtd'), + pathLengthSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackPathLength'), + npixBarrelSrc = cms.InputTag('hltTrackExtenderWithMTD', 'npixBarrel'), + npixEndcapSrc = cms.InputTag('hltTrackExtenderWithMTD', 'npixEndcap'), + outermostHitPositionSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackOutermostHitPosition'), + offlineBS = cms.InputTag('hltOnlineBeamSpot'), + qualityBDT_weights_file = cms.FileInPath('RecoMTD/TimingIDTools/data/BDT_nvars_17_d7.xml'), + mightGet = cms.optional.untracked.vstring + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdTrackingRecHits_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdTrackingRecHits_cfi.py new file mode 100644 index 0000000000000..03675c99b7d59 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdTrackingRecHits_cfi.py @@ -0,0 +1,7 @@ +import FWCore.ParameterSet.Config as cms + +hltMtdTrackingRecHits = cms.EDProducer('MTDTrackingRecHitProducer', + barrelClusters = cms.InputTag('hltMtdClusters', 'FTLBarrel'), + endcapClusters = cms.InputTag('hltMtdClusters', 'FTLEndcap'), + mightGet = cms.optional.untracked.vstring + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdUncalibratedRecHits_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdUncalibratedRecHits_cfi.py new file mode 100644 index 0000000000000..5f08e15f3992a --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltMtdUncalibratedRecHits_cfi.py @@ -0,0 +1,42 @@ +import FWCore.ParameterSet.Config as cms + +from SimFastTiming.FastTimingCommon.mtdDigitizer_cfi import mtdDigitizer as _mtdDigitizer + +_barrelAlgo = cms.PSet( + algoName = cms.string("BTLUncalibRecHitAlgo"), + invLightSpeedLYSO = _mtdDigitizer.barrelDigitizer.DeviceSimulation.LightCollectionSlope, # [ns/cm] + npeToADC = _mtdDigitizer.barrelDigitizer.ElectronicsSimulation.PulseQParam, # Npe to ADC counts conversion + npePerMeV = _mtdDigitizer.barrelDigitizer.DeviceSimulation.LightOutput, # [Npe/MeV] + npeSaturationCorrection = _mtdDigitizer.barrelDigitizer.ElectronicsSimulation.SiPMSaturationParam, # effective Npe to true Npe conversion (SiPM saturation) + tdcLSB_ns = cms.double(0.020), # [ns] + timeResolutionInNs = cms.string("0.0593858*pow(x,-1.02826)+0.0156719"), # [ns] + timeWalkCorrection = cms.string("1.16946*pow(x,-0.671018)+0.0443454") # [ns] +) + +_endcapAlgo = cms.PSet( + algoName = cms.string("ETLUncalibRecHitAlgo"), + adcNbits = _mtdDigitizer.endcapDigitizer.ElectronicsSimulation.adcNbits, + adcSaturation = _mtdDigitizer.endcapDigitizer.ElectronicsSimulation.adcSaturation_MIP, + toaLSB_ns = _mtdDigitizer.endcapDigitizer.ElectronicsSimulation.toaLSB_ns, + timeResolutionInNs = cms.string("0.0370"), # [ns] + timeCorr_p0 = cms.double(0.967683), # 0.974683 - 0.007, ad hoc correction for bias from global delay removal + timeCorr_p1 = cms.double(-0.237274), + timeCorr_p2 = cms.double(0.021455), + timeCorr_p3 = cms.double(-0.000727429) +) + +hltMtdUncalibratedRecHits = cms.EDProducer( + "MTDUncalibratedRecHitProducer", + barrel = _barrelAlgo, + endcap = _endcapAlgo, + barrelDigis = cms.InputTag('mix:FTLBarrel'), + endcapDigis = cms.InputTag('mix:FTLEndcap'), + BarrelHitsName = cms.string('FTLBarrel'), + EndcapHitsName = cms.string('FTLEndcap') +) + +from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2 +premix_stage2.toModify(hltMtdUncalibratedRecHits, + barrelDigis = 'mixData:FTLBarrel', + endcapDigis = 'mixData:FTLEndcap', +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltOfflinePrimaryVertices4D_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltOfflinePrimaryVertices4D_cfi.py new file mode 100644 index 0000000000000..39f6441a7d938 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltOfflinePrimaryVertices4D_cfi.py @@ -0,0 +1,40 @@ +import FWCore.ParameterSet.Config as cms + +hltOfflinePrimaryVertices4D = cms.EDProducer("RecoChargedRefCandidatePrimaryVertexSorter", + assignment = cms.PSet( + DzCutForChargedFromPUVtxs = cms.double(0.2), + EtaMinUseDz = cms.double(-1), + NumOfPUVtxsForCharged = cms.uint32(0), + OnlyUseFirstDz = cms.bool(False), + PtMaxCharged = cms.double(-1), + maxDistanceToJetAxis = cms.double(0.07), + maxDtSigForPrimaryAssignment = cms.double(3), + maxDxyForJetAxisAssigment = cms.double(0.1), + maxDxyForNotReconstructedPrimary = cms.double(0.01), + maxDxySigForNotReconstructedPrimary = cms.double(2), + maxDzErrorForPrimaryAssignment = cms.double(0.05), + maxDzForJetAxisAssigment = cms.double(0.1), + maxDzForPrimaryAssignment = cms.double(0.1), + maxDzSigForPrimaryAssignment = cms.double(5), + maxJetDeltaR = cms.double(0.5), + minJetPt = cms.double(25), + preferHighRanked = cms.bool(False), + useTiming = cms.bool(True), + useVertexFit = cms.bool(True) + ), + jets = cms.InputTag("hltAk4CaloJetsForTrk"), + mightGet = cms.optional.untracked.vstring, + particles = cms.InputTag("hltTrackRefsForJetsBeforeSorting4D"), + produceAssociationToOriginalVertices = cms.bool(False), + produceNoPileUpCollection = cms.bool(False), + producePileUpCollection = cms.bool(False), + produceSortedVertices = cms.bool(True), + qualityForPrimary = cms.int32(3), + sorting = cms.PSet( + + ), + trackTimeResoTag = cms.InputTag("hltTofPID4DnoPID","sigmat0safe"), + trackTimeTag = cms.InputTag("hltTofPID4DnoPID","t0safe"), + usePVMET = cms.bool(True), + vertices = cms.InputTag("hltUnsortedOfflinePrimaryVertices4D") +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPfTICL_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltPfTICL_cfi.py index c3d7aaed120b0..e187c666d47d1 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltPfTICL_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltPfTICL_cfi.py @@ -26,10 +26,13 @@ ), ticlCandidateSrc = cms.InputTag("hltTiclCandidate"), timingQualityThreshold = cms.double(0.5), - trackTimeErrorMap = cms.InputTag("tofPID","sigmat0"), - trackTimeQualityMap = cms.InputTag("mtdTrackQualityMVA","mtdQualMVA"), - trackTimeValueMap = cms.InputTag("tofPID","t0"), + trackTimeErrorMap = cms.InputTag("hltTofPID","sigmat0"), + trackTimeQualityMap = cms.InputTag("hltMtdTrackQualityMVA","mtdQualMVA"), + trackTimeValueMap = cms.InputTag("hltTofPID","t0"), useMTDTiming = cms.bool(False), useTimingAverage = cms.bool(False) ) +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toModify(hltPfTICL, + useMTDTiming = True) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTofPID4DnoPID_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTofPID4DnoPID_cfi.py new file mode 100644 index 0000000000000..6e723b48ae2fc --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTofPID4DnoPID_cfi.py @@ -0,0 +1,27 @@ +import FWCore.ParameterSet.Config as cms + +hltTofPID4DnoPID = cms.EDProducer("TOFPIDProducer", + MVASel = cms.bool(False), + fixedT0Error = cms.double(0), + maxDtSignificance = cms.double(5), + maxDz = cms.double(0.1), + minProbHeavy = cms.double(0.75), + minTrackTimeQuality = cms.double(0.8), + probKaon = cms.double(1), + probPion = cms.double(1), + probProton = cms.double(1), + sigmat0Src = cms.InputTag("hltTrackExtenderWithMTD","generalTracksigmat0"), + sigmatmtdSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTracksigmatmtd"), + sigmatofkSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackSigmaTofK"), + sigmatofpSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackSigmaTofP"), + sigmatofpiSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackSigmaTofPi"), + t0Src = cms.InputTag("hltTrackExtenderWithMTD","generalTrackt0"), + tmtdSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTracktmtd"), + tofkSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackTofK"), + tofpSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackTofP"), + trackMTDTimeQualityVMapTag = cms.InputTag("hltMtdTrackQualityMVA","mtdQualMVA"), + tracksSrc = cms.InputTag("hltGeneralTracks"), + vertexReassignment = cms.bool(True), + vtxMaxSigmaT = cms.double(0.025), + vtxsSrc = cms.InputTag("hltUnsortedOfflinePrimaryVertices") +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTofPID_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTofPID_cfi.py new file mode 100644 index 0000000000000..3337397c4ac9a --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTofPID_cfi.py @@ -0,0 +1,28 @@ +import FWCore.ParameterSet.Config as cms + +hltTofPID = cms.EDProducer("TOFPIDProducer", + MVASel = cms.bool(False), + fixedT0Error = cms.double(0), + maxDtSignificance = cms.double(5), + maxDz = cms.double(0.1), + mightGet = cms.optional.untracked.vstring, + minProbHeavy = cms.double(0.75), + minTrackTimeQuality = cms.double(0.8), + probKaon = cms.double(1), + probPion = cms.double(1), + probProton = cms.double(1), + sigmat0Src = cms.InputTag("hltTrackExtenderWithMTD","generalTracksigmat0"), + sigmatmtdSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTracksigmatmtd"), + sigmatofkSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackSigmaTofK"), + sigmatofpSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackSigmaTofP"), + sigmatofpiSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackSigmaTofPi"), + t0Src = cms.InputTag("hltTrackExtenderWithMTD","generalTrackt0"), + tmtdSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTracktmtd"), + tofkSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackTofK"), + tofpSrc = cms.InputTag("hltTrackExtenderWithMTD","generalTrackTofP"), + trackMTDTimeQualityVMapTag = cms.InputTag("hltMtdTrackQualityMVA","mtdQualMVA"), + tracksSrc = cms.InputTag("hltGeneralTracks"), + vertexReassignment = cms.bool(False), + vtxMaxSigmaT = cms.double(0.025), + vtxsSrc = cms.InputTag("hltUnsortedOfflinePrimaryVertices4D") +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackExtenderWithMTD_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackExtenderWithMTD_cfi.py new file mode 100644 index 0000000000000..8ce6d3ba844ee --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackExtenderWithMTD_cfi.py @@ -0,0 +1,35 @@ +import FWCore.ParameterSet.Config as cms + +hltTrackExtenderWithMTD = cms.EDProducer('TrackExtenderWithMTD', + tracksSrc = cms.InputTag('hltGeneralTracks'), + trjtrkAssSrc = cms.InputTag('hltGeneralTracks'), + hitsSrc = cms.InputTag('hltMtdTrackingRecHits'), + beamSpotSrc = cms.InputTag('hltOnlineBeamSpot'), + vtxSrc = cms.InputTag('hltOfflinePrimaryVertices4D'), + updateTrackTrajectory = cms.bool(True), + updateTrackExtra = cms.bool(True), + updateTrackHitPattern = cms.bool(True), + TransientTrackBuilder = cms.string('TransientTrackBuilder'), + MTDRecHitBuilder = cms.string('hltMTDRecHitBuilder'), + Propagator = cms.string('hltPropagatorWithMaterialForMTD'), + TrackTransformer = cms.PSet( + DoPredictionsOnly = cms.bool(False), + Fitter = cms.string('hltKFFitterForRefitInsideOut'), + Smoother = cms.string('hltKFSmootherForRefitInsideOut'), + Propagator = cms.string('hltPropagatorWithMaterialForMTD'), + RefitDirection = cms.string('alongMomentum'), + RefitRPCHits = cms.bool(True), + TrackerRecHitBuilder = cms.string('hltESPTTRHBuilderWithTrackAngle'), + MuonRecHitBuilder = cms.string('MuonRecHitBuilder'), + MTDRecHitBuilder = cms.string('hltMTDRecHitBuilder') + ), + estimatorMaxChi2 = cms.double(500), + estimatorMaxNSigma = cms.double(10), + btlChi2Cut = cms.double(50), + btlTimeChi2Cut = cms.double(10), + etlChi2Cut = cms.double(50), + etlTimeChi2Cut = cms.double(10), + useVertex = cms.bool(False), + dZCut = cms.double(0.1), + bsTimeSpread = cms.double(0.2), +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackRefsForJetsBeforeSorting4D_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackRefsForJetsBeforeSorting4D_cfi.py new file mode 100644 index 0000000000000..25b7f0c45ff02 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackRefsForJetsBeforeSorting4D_cfi.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +hltTrackRefsForJetsBeforeSorting4D = cms.EDProducer("ChargedRefCandidateProducer", + particleType = cms.string('pi+'), + src = cms.InputTag("hltTrackWithVertexRefSelectorBeforeSorting4D") +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackWithVertexRefSelectorBeforeSorting4D_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackWithVertexRefSelectorBeforeSorting4D_cfi.py new file mode 100644 index 0000000000000..994ed15783b44 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTrackWithVertexRefSelectorBeforeSorting4D_cfi.py @@ -0,0 +1,26 @@ +import FWCore.ParameterSet.Config as cms + +hltTrackWithVertexRefSelectorBeforeSorting4D = cms.EDProducer("TrackWithVertexRefSelector", + d0Max = cms.double(999.0), + dzMax = cms.double(999.0), + etaMax = cms.double(5.0), + etaMin = cms.double(0.0), + nSigmaDtVertex = cms.double(0), + nVertices = cms.uint32(0), + normalizedChi2 = cms.double(999999.0), + numberOfLostHits = cms.uint32(999), + numberOfValidHits = cms.uint32(0), + numberOfValidPixelHits = cms.uint32(0), + ptErrorCut = cms.double(9e+99), + ptMax = cms.double(9e+99), + ptMin = cms.double(0.3), + quality = cms.string('highPurity'), + rhoVtx = cms.double(0.2), + src = cms.InputTag("hltGeneralTracks"), + timeResosTag = cms.InputTag(""), + timesTag = cms.InputTag(""), + useVtx = cms.bool(True), + vertexTag = cms.InputTag("hltUnsortedOfflinePrimaryVertices4D"), + vtxFallback = cms.bool(True), + zetaVtx = cms.double(1.0) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices4D_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices4D_cfi.py new file mode 100644 index 0000000000000..63bc2673d5e7a --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices4D_cfi.py @@ -0,0 +1,98 @@ +import FWCore.ParameterSet.Config as cms + +hltUnsortedOfflinePrimaryVertices4D = cms.EDProducer("PrimaryVertexProducer", + TkClusParameters = cms.PSet( + TkDAClusParameters = cms.PSet( + Tmin = cms.double(4.0), + Tpurge = cms.double(4.0), + Tstop = cms.double(2.0) + ), + algorithm = cms.string('DA2D_vect') + ), + TkFilterParameters = cms.PSet( + algorithm = cms.string('filter'), + maxD0Error = cms.double(1.0), + maxD0Significance = cms.double(4.0), + maxDzError = cms.double(1.0), + maxEta = cms.double(4.0), + maxNormalizedChi2 = cms.double(10.0), + minPixelLayersWithHits = cms.int32(2), + minPt = cms.double(0.0), + minSiliconLayersWithHits = cms.int32(5), + trackQuality = cms.string('any') + ), + TrackLabel = cms.InputTag("hltGeneralTracks"), + TrackTimeResosLabel = cms.InputTag("hltTofPID4DnoPID","sigmat0safe"), + TrackTimesLabel = cms.InputTag("hltTofPID4DnoPID","t0safe"), + beamSpotLabel = cms.InputTag("hltOnlineBeamSpot"), + isRecoveryIteration = cms.bool(False), + minTrackTimeQuality = cms.double(0.8), + recoveryVtxCollection = cms.InputTag(""), + trackMTDTimeQualityVMapTag = cms.InputTag("hltMtdTrackQualityMVA","mtdQualMVA"), + useMVACut = cms.bool(False), + verbose = cms.untracked.bool(False), + vertexCollections = cms.VPSet( + cms.PSet( + algorithm = cms.string('AdaptiveVertexFitter'), + chi2cutoff = cms.double(2.5), + label = cms.string(''), + maxDistanceToBeam = cms.double(1.0), + minNdof = cms.double(0.0), + useBeamConstraint = cms.bool(False), + vertexTimeParameters = cms.PSet( + fromTracksPID = cms.PSet( + trackMTDTimeVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + trackMTDTimeErrorVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmatmtd'), + trackMTDTimeQualityVMapTag = cms.InputTag('hltMtdTrackQualityMVA', 'mtdQualMVA'), + trackMTDTofPiVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofPi'), + trackMTDTofKVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofK'), + trackMTDTofPVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofP'), + trackMTDSigmaTofPiVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofPi'), + trackMTDSigmaTofKVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofK'), + trackMTDSigmaTofPVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofP'), + minTrackVtxWeight = cms.double(0.5), + minTrackTimeQuality = cms.double(0.8), + probPion = cms.double(0.7), + probKaon = cms.double(0.2), + probProton = cms.double(0.1), + Tstart = cms.double(256), + coolingFactor = cms.double(0.5), + useMVAVtxTime = cms.bool(True) + ), + legacy4D = cms.PSet(), + algorithm = cms.string('fromTracksPID') + ) + ), + cms.PSet( + algorithm = cms.string('AdaptiveVertexFitter'), + chi2cutoff = cms.double(2.5), + label = cms.string('WithBS'), + maxDistanceToBeam = cms.double(1.0), + minNdof = cms.double(2.0), + useBeamConstraint = cms.bool(True), + vertexTimeParameters = cms.PSet( + fromTracksPID = cms.PSet( + trackMTDTimeVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + trackMTDTimeErrorVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmatmtd'), + trackMTDTimeQualityVMapTag = cms.InputTag('hltMtdTrackQualityMVA', 'mtdQualMVA'), + trackMTDTofPiVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofPi'), + trackMTDTofKVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofK'), + trackMTDTofPVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofP'), + trackMTDSigmaTofPiVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofPi'), + trackMTDSigmaTofKVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofK'), + trackMTDSigmaTofPVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofP'), + minTrackVtxWeight = cms.double(0.5), + minTrackTimeQuality = cms.double(0.8), + probPion = cms.double(0.7), + probKaon = cms.double(0.2), + probProton = cms.double(0.1), + Tstart = cms.double(256), + coolingFactor = cms.double(0.5), + useMVAVtxTime = cms.bool(True) + ), + legacy4D = cms.PSet(), + algorithm = cms.string('fromTracksPID') + ) + ) + ) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices_cfi.py index bb9c7a9989904..a4ae81dd1b7e2 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltUnsortedOfflinePrimaryVertices_cfi.py @@ -47,3 +47,40 @@ ) ) ) + +_mtdVertexTimeParameters = cms.PSet( + fromTracksPID = cms.PSet( + trackMTDTimeVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + trackMTDTimeErrorVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmatmtd'), + trackMTDTimeQualityVMapTag = cms.InputTag('hltMtdTrackQualityMVA', 'mtdQualMVA'), + trackMTDTofPiVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofPi'), + trackMTDTofKVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofK'), + trackMTDTofPVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofP'), + trackMTDSigmaTofPiVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofPi'), + trackMTDSigmaTofKVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofK'), + trackMTDSigmaTofPVMapTag = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofP'), + minTrackVtxWeight = cms.double(0.5), + minTrackTimeQuality = cms.double(0.8), + probPion = cms.double(0.7), + probKaon = cms.double(0.2), + probProton = cms.double(0.1), + Tstart = cms.double(256), + coolingFactor = cms.double(0.5), + useMVAVtxTime = cms.bool(True) + ), + algorithm = cms.string('fromTracksPID') +) + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toModify(hltUnsortedOfflinePrimaryVertices, + vertexCollections = cms.VPSet( + cms.PSet( + **hltUnsortedOfflinePrimaryVertices.vertexCollections[0].parameters_(), + vertexTimeParameters = _mtdVertexTimeParameters + ), + cms.PSet( + **hltUnsortedOfflinePrimaryVertices.vertexCollections[1].parameters_(), + vertexTimeParameters = _mtdVertexTimeParameters + ) + ) +) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTFastTimingGlobalRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTFastTimingGlobalRecoSequence_cfi.py new file mode 100644 index 0000000000000..dadb3136caef8 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTFastTimingGlobalRecoSequence_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltTrackExtenderWithMTD_cfi import * +from ..modules.hltMtdTrackQualityMVA_cfi import * + +HLTFastTimingGlobalRecoSequence = cms.Sequence(hltTrackExtenderWithMTD + +hltMtdTrackQualityMVA + ) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTMtdLocalRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTMtdLocalRecoSequence_cfi.py new file mode 100644 index 0000000000000..03e76d92145f2 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTMtdLocalRecoSequence_cfi.py @@ -0,0 +1,11 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltMtdUncalibratedRecHits_cfi import * +from ..modules.hltMtdRecHits_cfi import * +from ..modules.hltMtdTrackingRecHits_cfi import * +from ..modules.hltMtdClusters_cfi import * + +HLTMtdLocalRecoSequence = cms.Sequence(hltMtdUncalibratedRecHits + +hltMtdRecHits + +hltMtdClusters + +hltMtdTrackingRecHits) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTrackingSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTrackingSequence_cfi.py index 2f38100f173ea..df370a013b941 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTrackingSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTTrackingSequence_cfi.py @@ -6,6 +6,8 @@ from ..sequences.HLTInitialStepSequence_cfi import * from ..sequences.HLTItLocalRecoSequence_cfi import * from ..sequences.HLTOtLocalRecoSequence_cfi import * +from ..sequences.HLTMtdLocalRecoSequence_cfi import * +from ..sequences.HLTFastTimingGlobalRecoSequence_cfi import * from ..sequences.HLTPhase2PixelTracksAndVerticesSequence_cfi import * _HLTTrackingSequenceLegacy = cms.Sequence( @@ -18,8 +20,23 @@ +hltGeneralTracks ) -HLTTrackingSequence = _HLTTrackingSequenceLegacy.copyAndExclude([HLTHighPtTripletStepSequence]) +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toReplaceWith( + _HLTTrackingSequenceLegacy, + cms.Sequence( + HLTItLocalRecoSequence + + HLTOtLocalRecoSequence + + hltTrackerClusterCheck + + HLTPhase2PixelTracksAndVerticesSequence + + HLTInitialStepSequence + + HLTHighPtTripletStepSequence + + hltGeneralTracks + + HLTMtdLocalRecoSequence + + HLTFastTimingGlobalRecoSequence + ) +) +HLTTrackingSequence = _HLTTrackingSequenceLegacy.copyAndExclude([HLTHighPtTripletStepSequence]) # Empty sequence as a placeholder to be filled when alpakaValidationHLT is active HLTTrackingSequenceSerialSync = cms.Sequence() diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertex4DRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertex4DRecoSequence_cfi.py new file mode 100644 index 0000000000000..ee669ac191f64 --- /dev/null +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertex4DRecoSequence_cfi.py @@ -0,0 +1,15 @@ +import FWCore.ParameterSet.Config as cms + +from ..modules.hltTofPID4DnoPID_cfi import * +from ..modules.hltUnsortedOfflinePrimaryVertices4D_cfi import * +from ..modules.hltTrackWithVertexRefSelectorBeforeSorting4D_cfi import * +from ..modules.hltTrackRefsForJetsBeforeSorting4D_cfi import * +from ..modules.hltOfflinePrimaryVertices4D_cfi import * +from ..modules.hltTofPID_cfi import * + +HLTVertex4DRecoSequence = cms.Sequence(hltTofPID4DnoPID+ + hltUnsortedOfflinePrimaryVertices4D+ + hltTrackWithVertexRefSelectorBeforeSorting4D+ + hltTrackRefsForJetsBeforeSorting4D+ + hltOfflinePrimaryVertices4D+ + hltTofPID) diff --git a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertexRecoSequence_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertexRecoSequence_cfi.py index 673bd6acaa3b2..2cd0d96ddc6f6 100644 --- a/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertexRecoSequence_cfi.py +++ b/HLTrigger/Configuration/python/HLT_75e33/sequences/HLTVertexRecoSequence_cfi.py @@ -5,5 +5,17 @@ from ..modules.hltTrackWithVertexRefSelectorBeforeSorting_cfi import * from ..modules.hltUnsortedOfflinePrimaryVertices_cfi import * from ..sequences.HLTInitialStepPVSequence_cfi import * +from ..sequences.HLTVertex4DRecoSequence_cfi import * -HLTVertexRecoSequence = cms.Sequence(HLTInitialStepPVSequence+hltUnsortedOfflinePrimaryVertices+hltTrackWithVertexRefSelectorBeforeSorting+hltTrackRefsForJetsBeforeSorting+hltOfflinePrimaryVertices) +HLTVertexRecoSequence = cms.Sequence(HLTInitialStepPVSequence+ + hltUnsortedOfflinePrimaryVertices+ + hltTrackWithVertexRefSelectorBeforeSorting+ + hltTrackRefsForJetsBeforeSorting+ + hltOfflinePrimaryVertices) + +_HLTVertexRecoSequence = HLTVertexRecoSequence.copy() + +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toReplaceWith(HLTVertexRecoSequence, + cms.Sequence(_HLTVertexRecoSequence+ + HLTVertex4DRecoSequence)) diff --git a/HLTrigger/Configuration/python/HLT_75e33_cff.py b/HLTrigger/Configuration/python/HLT_75e33_cff.py index 5cbce67ff0ab3..33d2f4b1d842d 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_cff.py @@ -97,6 +97,15 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPModulesDevLST_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPTTRHBuilderWithoutRefit_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDCPEESProducer_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDTimeCalibESProducer_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDTransientTrackingRecHitBuilder_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltPropagatorWithMaterialForMTD_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltKFFitterForRefitInsideOut_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltSmartPropagatorAnyRK_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltChi2EstimatorForRefit_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltKFSmootherForRefitInsideOut_cfi") + fragment.load("HLTrigger/Configuration/HLT_75e33/paths/HLT_AK4PFPuppiJet520_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/paths/HLT_Diphoton30_23_IsoCaloId_L1Seeded_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/paths/HLT_Diphoton30_23_IsoCaloId_Unseeded_cfi") diff --git a/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py b/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py index fe7e1edad5f30..a5389d692435b 100644 --- a/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py +++ b/HLTrigger/Configuration/python/HLT_75e33_timing_cff.py @@ -102,6 +102,15 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPModulesDevLST_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPTTRHBuilderWithoutRefit_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDCPEESProducer_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDTimeCalibESProducer_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDTransientTrackingRecHitBuilder_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltPropagatorWithMaterialForMTD_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltKFFitterForRefitInsideOut_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltSmartPropagatorAnyRK_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltChi2EstimatorForRefit_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltKFSmootherForRefitInsideOut_cfi") + fragment.load("HLTrigger/Configuration/HLT_75e33/paths/HLT_AK4PFPuppiJet520_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/paths/HLT_Diphoton30_23_IsoCaloId_L1Seeded_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/paths/HLT_DoubleEle23_12_Iso_L1Seeded_cfi") diff --git a/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py b/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py index 11e8efb92b970..2a42058d69c65 100644 --- a/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py +++ b/HLTrigger/Configuration/python/HLT_NGTScouting_cff.py @@ -96,6 +96,14 @@ fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPModulesDevLST_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPTTRHBuilderWithoutRefit_cfi") fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltESPMkFit_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDCPEESProducer_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDTimeCalibESProducer_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltMTDTransientTrackingRecHitBuilder_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltPropagatorWithMaterialForMTD_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltKFFitterForRefitInsideOut_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltSmartPropagatorAnyRK_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltChi2EstimatorForRefit_cfi") +fragment.load("HLTrigger/Configuration/HLT_75e33/eventsetup/hltKFSmootherForRefitInsideOut_cfi") # Paths fragment.load("HLTrigger/Configuration/HLT_75e33/paths/DST_PFScouting_cfi") diff --git a/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py b/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py index 3adbd44b5ae6f..e0419bea4ed68 100644 --- a/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py +++ b/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py @@ -18,6 +18,7 @@ from Validation.HGCalValidation.HLTHGCalPostProcessor_cff import * from Validation.HLTrigger.HLTGenValidationHarvesting_cff import * from Validation.HGCalValidation.BarrelPostProcessor_cff import * +from Validation.MtdValidation.hltMtdPostProcessor_cff import * hltpostvalidation = cms.Sequence( postProcessorHLTtrackingSequence @@ -62,6 +63,13 @@ # Add HLT gen validation _phase2_hltpostvalidation += hltGenValidationClient +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +# Add MTD validation only when mtd_at_hlt is active +mtd_at_hlt.toModify( + _phase2_hltpostvalidation, + func=lambda seq: seq.insert(-1, hltMtdValidationPostProcessor) +) + from Configuration.Eras.Modifier_phase2_common_cff import phase2_common phase2_common.toReplaceWith(hltpostvalidation, _phase2_hltpostvalidation) diff --git a/HLTriggerOffline/Common/python/HLTValidation_cff.py b/HLTriggerOffline/Common/python/HLTValidation_cff.py index 179d38848094e..cf5d88cdc4044 100644 --- a/HLTriggerOffline/Common/python/HLTValidation_cff.py +++ b/HLTriggerOffline/Common/python/HLTValidation_cff.py @@ -21,6 +21,8 @@ # Gen-level Validation from Validation.HLTrigger.HLTGenValidation_cff import * from Validation.Configuration.globalValidation_cff import * +#MTD +from Validation.MtdValidation.hltMtdValidation_cff import * # HGCAL Rechit Calibration from Validation.HGCalValidation.hgcalHitCalibrationDefault_cfi import hgcalHitCalibrationDefault as _hgcalHitCalibrationDefault @@ -118,6 +120,14 @@ _hltvalidationWithMC_Phase2.insert(-1, hgcalHitCalibrationHLT) _hltvalidationWithMC_Phase2.insert(-1, hltHgcalValidator) _hltvalidationWithMC_Phase2.insert(-1, hltGENValidation) + +# Add at the end only when mtd_at_hlt is active +from Configuration.ProcessModifiers.mtd_at_hlt_cff import mtd_at_hlt +mtd_at_hlt.toModify( + _hltvalidationWithMC_Phase2, + func=lambda seq: seq.insert(-1, hltMtdRecoValid) +) + phase2_common.toReplaceWith(hltvalidationWithMC, _hltvalidationWithMC_Phase2) hltvalidationWithData = cms.Sequence( diff --git a/RecoLocalFastTime/Configuration/python/RecoLocalFastTime_EventContent_cff.py b/RecoLocalFastTime/Configuration/python/RecoLocalFastTime_EventContent_cff.py index dd8ce385f0c3f..5d33cc056ce84 100644 --- a/RecoLocalFastTime/Configuration/python/RecoLocalFastTime_EventContent_cff.py +++ b/RecoLocalFastTime/Configuration/python/RecoLocalFastTime_EventContent_cff.py @@ -22,3 +22,13 @@ ) ) RecoLocalFastTimeFEVT.outputCommands.extend(RecoLocalFastTimeRECO.outputCommands) + +#FEVTHLT content +RecoLocalFastTimeFEVTHLT = cms.PSet( + outputCommands = cms.untracked.vstring( + 'keep *_hltMtdRecHits_*_*', + 'keep *_hltMtdClusters_*_*', + 'keep *_hltMtdUncalibratedRecHits_*_*', + 'keep *_hltMtdTrackingRecHits_*_*', + ) +) diff --git a/RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h b/RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h index fa2c0013b055a..7585b0817379e 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h +++ b/RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h @@ -8,6 +8,7 @@ */ #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "DataFormats/FTLRecHit/interface/FTLRecHit.h" diff --git a/RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h b/RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h index 68a0d238e5aec..f4d625ee9384f 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h +++ b/RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h @@ -2,6 +2,7 @@ #define RecoLocalFastTime_FTLCommonAlgos_MTDUncalibratedRecHitRecAlgoBase_HH #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include "FWCore/Framework/interface/ConsumesCollector.h" #include "DataFormats/FTLDigi/interface/FTLDigiCollections.h" diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.cc b/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.cc index 03b882bfcb279..5606e13a3e473 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.cc +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.cc @@ -1,46 +1,7 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h" #include "RecoLocalFastTime/FTLClusterizer/interface/BTLRecHitsErrorEstimatorIM.h" -#include "CommonTools/Utils/interface/FormulaEvaluator.h" - -class BTLUncalibRecHitAlgo : public BTLUncalibratedRecHitAlgoBase { -public: - /// Constructor - BTLUncalibRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) - : MTDUncalibratedRecHitAlgoBase(conf, sumes), - invLightSpeedLYSO_(conf.getParameter("invLightSpeedLYSO")), - c_LYSO_(1. / invLightSpeedLYSO_), - npeToADC_(conf.getParameter>("npeToADC")), - npePerMeV_(conf.getParameter("npePerMeV")), - invADCPerMeV_(1. / (npeToADC_[1] * npePerMeV_)), - npeSaturationCorr_(conf.getParameter>("npeSaturationCorrection")), - tdc_to_ns_(conf.getParameter("tdcLSB_ns")), - timeError_(conf.getParameter("timeResolutionInNs")), - timeWalkCorr_(conf.getParameter("timeWalkCorrection")) {} - - /// Destructor - ~BTLUncalibRecHitAlgo() override {} - - /// get event and eventsetup information - void getEvent(const edm::Event&) final {} - void getEventSetup(const edm::EventSetup&) final {} - - /// make the rec hit - FTLUncalibratedRecHit makeRecHit(const BTLDataFrame& dataFrame) const final; - -private: - const double invLightSpeedLYSO_; - const double c_LYSO_; - const std::vector npeToADC_; - const double npePerMeV_; - const double invADCPerMeV_; - const std::vector npeSaturationCorr_; - const double tdc_to_ns_; - const reco::FormulaEvaluator timeError_; - const reco::FormulaEvaluator timeWalkCorr_; -}; +#include "BTLUncalibRecHitAlgo.h" FTLUncalibratedRecHit BTLUncalibRecHitAlgo::makeRecHit(const BTLDataFrame& dataFrame) const { // The reconstructed amplitudes and times of the right and left hits are saved in a std::pair @@ -119,5 +80,12 @@ FTLUncalibratedRecHit BTLUncalibRecHitAlgo::makeRecHit(const BTLDataFrame& dataF dataFrame.id(), dataFrame.row(), dataFrame.column(), amplitude, time, timeError, position, positionError, flag); } -#include "FWCore/Framework/interface/MakerMacros.h" -DEFINE_EDM_PLUGIN(BTLUncalibratedRecHitAlgoFactory, BTLUncalibRecHitAlgo, "BTLUncalibRecHitAlgo"); +void BTLUncalibRecHitAlgo::fillPSetDescription(edm::ParameterSetDescription& desc) { + desc.add("invLightSpeedLYSO"); + desc.add>("npeToADC"); + desc.add("npePerMeV"); + desc.add>("npeSaturationCorrection"); + desc.add("tdcLSB_ns"); + desc.add("timeResolutionInNs"); + desc.add("timeWalkCorrection"); +} diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.h b/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.h new file mode 100644 index 0000000000000..8d5bec8bb26c4 --- /dev/null +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/BTLUncalibRecHitAlgo.h @@ -0,0 +1,42 @@ +#include "CommonTools/Utils/interface/FormulaEvaluator.h" +#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h" + +class BTLUncalibRecHitAlgo : public BTLUncalibratedRecHitAlgoBase { +public: + /// Constructor + BTLUncalibRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) + : MTDUncalibratedRecHitAlgoBase(conf, sumes), + invLightSpeedLYSO_(conf.getParameter("invLightSpeedLYSO")), + c_LYSO_(1. / invLightSpeedLYSO_), + npeToADC_(conf.getParameter>("npeToADC")), + npePerMeV_(conf.getParameter("npePerMeV")), + invADCPerMeV_(1. / (npeToADC_[1] * npePerMeV_)), + npeSaturationCorr_(conf.getParameter>("npeSaturationCorrection")), + tdc_to_ns_(conf.getParameter("tdcLSB_ns")), + timeError_(conf.getParameter("timeResolutionInNs")), + timeWalkCorr_(conf.getParameter("timeWalkCorrection")) {} + + /// Destructor + ~BTLUncalibRecHitAlgo() override {} + + /// get event and eventsetup information + void getEvent(const edm::Event&) final {} + void getEventSetup(const edm::EventSetup&) final {} + + /// make the rec hit + FTLUncalibratedRecHit makeRecHit(const BTLDataFrame& dataFrame) const final; + + /// Fill parameter descriptions for validation + static void fillPSetDescription(edm::ParameterSetDescription& desc); + +private: + const double invLightSpeedLYSO_; + const double c_LYSO_; + const std::vector npeToADC_; + const double npePerMeV_; + const double invADCPerMeV_; + const std::vector npeSaturationCorr_; + const double tdc_to_ns_; + const reco::FormulaEvaluator timeError_; + const reco::FormulaEvaluator timeWalkCorr_; +}; diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.cc b/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.cc index 0964a13038190..f07e9abd5129a 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.cc +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.cc @@ -1,43 +1,6 @@ -#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "CommonTools/Utils/interface/FormulaEvaluator.h" - -class ETLUncalibRecHitAlgo : public ETLUncalibratedRecHitAlgoBase { -public: - /// Constructor - ETLUncalibRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) - : MTDUncalibratedRecHitAlgoBase(conf, sumes), - adcNBits_(conf.getParameter("adcNbits")), - adcSaturation_(conf.getParameter("adcSaturation")), - adcLSB_(adcSaturation_ / (1 << adcNBits_)), - toaLSBToNS_(conf.getParameter("toaLSB_ns")), - timeError_(conf.getParameter("timeResolutionInNs")), - timeCorr_p0_(conf.getParameter("timeCorr_p0")), - timeCorr_p1_(conf.getParameter("timeCorr_p1")), - timeCorr_p2_(conf.getParameter("timeCorr_p2")), - timeCorr_p3_(conf.getParameter("timeCorr_p3")) {} - /// Destructor - ~ETLUncalibRecHitAlgo() override {} - - /// get event and eventsetup information - void getEvent(const edm::Event&) final {} - void getEventSetup(const edm::EventSetup&) final {} - - /// make the rec hit - FTLUncalibratedRecHit makeRecHit(const ETLDataFrame& dataFrame) const final; - -private: - const uint32_t adcNBits_; - const double adcSaturation_; - const double adcLSB_; - const double toaLSBToNS_; - const reco::FormulaEvaluator timeError_; - const double timeCorr_p0_; - const double timeCorr_p1_; - const double timeCorr_p2_; - const double timeCorr_p3_; -}; +#include "ETLUncalibRecHitAlgo.h" FTLUncalibratedRecHit ETLUncalibRecHitAlgo::makeRecHit(const ETLDataFrame& dataFrame) const { constexpr int iSample = 2; //only in-time sample @@ -83,5 +46,14 @@ FTLUncalibratedRecHit ETLUncalibRecHitAlgo::makeRecHit(const ETLDataFrame& dataF -1.f, flag); } -#include "FWCore/Framework/interface/MakerMacros.h" -DEFINE_EDM_PLUGIN(ETLUncalibratedRecHitAlgoFactory, ETLUncalibRecHitAlgo, "ETLUncalibRecHitAlgo"); + +void ETLUncalibRecHitAlgo::fillPSetDescription(edm::ParameterSetDescription& desc) { + desc.add("adcNbits"); + desc.add("adcSaturation"); + desc.add("toaLSB_ns"); + desc.add("timeResolutionInNs"); + desc.add("timeCorr_p0"); + desc.add("timeCorr_p1"); + desc.add("timeCorr_p2"); + desc.add("timeCorr_p3"); +} diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.h b/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.h new file mode 100644 index 0000000000000..fb5b059bb7198 --- /dev/null +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/ETLUncalibRecHitAlgo.h @@ -0,0 +1,41 @@ +#include "CommonTools/Utils/interface/FormulaEvaluator.h" +#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h" + +class ETLUncalibRecHitAlgo : public ETLUncalibratedRecHitAlgoBase { +public: + /// Constructor + ETLUncalibRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) + : MTDUncalibratedRecHitAlgoBase(conf, sumes), + adcNBits_(conf.getParameter("adcNbits")), + adcSaturation_(conf.getParameter("adcSaturation")), + adcLSB_(adcSaturation_ / (1 << adcNBits_)), + toaLSBToNS_(conf.getParameter("toaLSB_ns")), + timeError_(conf.getParameter("timeResolutionInNs")), + timeCorr_p0_(conf.getParameter("timeCorr_p0")), + timeCorr_p1_(conf.getParameter("timeCorr_p1")), + timeCorr_p2_(conf.getParameter("timeCorr_p2")), + timeCorr_p3_(conf.getParameter("timeCorr_p3")) {} + /// Destructor + ~ETLUncalibRecHitAlgo() override {} + + /// get event and eventsetup information + void getEvent(const edm::Event&) final {} + void getEventSetup(const edm::EventSetup&) final {} + + /// make the rec hit + FTLUncalibratedRecHit makeRecHit(const ETLDataFrame& dataFrame) const final; + + /// Fill parameter descriptions for validation + static void fillPSetDescription(edm::ParameterSetDescription& desc); + +private: + const uint32_t adcNBits_; + const double adcSaturation_; + const double adcLSB_; + const double toaLSBToNS_; + const reco::FormulaEvaluator timeError_; + const double timeCorr_p0_; + const double timeCorr_p1_; + const double timeCorr_p2_; + const double timeCorr_p3_; +}; diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.cc b/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.cc index fdfc183b95890..1f9a54300cd72 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.cc +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.cc @@ -1,28 +1,6 @@ -#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h" - #include "RecoLocalFastTime/Records/interface/MTDTimeCalibRecord.h" #include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDTimeCalib.h" - -class MTDRecHitAlgo : public MTDRecHitAlgoBase { -public: - /// Constructor - MTDRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes); - - /// Destructor - ~MTDRecHitAlgo() override {} - - /// get event and eventsetup information - void getEvent(const edm::Event&) final {} - void getEventSetup(const edm::EventSetup&) final; - - /// make the rec hit - FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags) const final; - -private: - double thresholdToKeep_, calibration_; - const MTDTimeCalib* time_calib_; - edm::ESGetToken tcToken_; -}; +#include "MTDRecHitAlgo.h" MTDRecHitAlgo::MTDRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) : MTDRecHitAlgoBase(conf, sumes), @@ -95,5 +73,7 @@ FTLRecHit MTDRecHitAlgo::makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32 return rh; } -#include "FWCore/Framework/interface/MakerMacros.h" -DEFINE_EDM_PLUGIN(MTDRecHitAlgoFactory, MTDRecHitAlgo, "MTDRecHitAlgo"); +void MTDRecHitAlgo::fillPSetDescription(edm::ParameterSetDescription& desc) { + desc.add("thresholdToKeep", 1.0)->setComment("Threshold below which rechits are killed"); + desc.add("calibrationConstant", 1.0)->setComment("Energy calibration factor"); +} diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.h b/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.h new file mode 100644 index 0000000000000..2f3ddaadf8c4d --- /dev/null +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/MTDRecHitAlgo.h @@ -0,0 +1,27 @@ +#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h" +#include "RecoLocalFastTime/Records/interface/MTDTimeCalibRecord.h" +#include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDTimeCalib.h" + +class MTDRecHitAlgo : public MTDRecHitAlgoBase { +public: + /// Constructor + MTDRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes); + + /// Destructor + ~MTDRecHitAlgo() override {} + + /// get event and eventsetup information + void getEvent(const edm::Event&) final {} + void getEventSetup(const edm::EventSetup&) final; + + /// make the rec hit + FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags) const final; + + /// Fill parameter descriptions for validation + static void fillPSetDescription(edm::ParameterSetDescription& desc); + +private: + double thresholdToKeep_, calibration_; + const MTDTimeCalib* time_calib_; + edm::ESGetToken tcToken_; +}; diff --git a/RecoLocalFastTime/FTLCommonAlgos/plugins/SealModules.cc b/RecoLocalFastTime/FTLCommonAlgos/plugins/SealModules.cc new file mode 100644 index 0000000000000..af2779542fd66 --- /dev/null +++ b/RecoLocalFastTime/FTLCommonAlgos/plugins/SealModules.cc @@ -0,0 +1,7 @@ +#include "BTLUncalibRecHitAlgo.h" +#include "ETLUncalibRecHitAlgo.h" +#include "MTDRecHitAlgo.h" +#include "FWCore/ParameterSet/interface/ValidatedPluginMacros.h" +DEFINE_EDM_VALIDATED_PLUGIN(BTLUncalibratedRecHitAlgoFactory, BTLUncalibRecHitAlgo, "BTLUncalibRecHitAlgo"); +DEFINE_EDM_VALIDATED_PLUGIN(ETLUncalibratedRecHitAlgoFactory, ETLUncalibRecHitAlgo, "ETLUncalibRecHitAlgo"); +DEFINE_EDM_VALIDATED_PLUGIN(MTDRecHitAlgoFactory, MTDRecHitAlgo, "MTDRecHitAlgo"); diff --git a/RecoLocalFastTime/FTLCommonAlgos/src/MTDRecHitAlgoBase.cc b/RecoLocalFastTime/FTLCommonAlgos/src/MTDRecHitAlgoBase.cc index df1a81fe2a315..bcfd993b18010 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/src/MTDRecHitAlgoBase.cc +++ b/RecoLocalFastTime/FTLCommonAlgos/src/MTDRecHitAlgoBase.cc @@ -1,3 +1,3 @@ #include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDRecHitAlgoBase.h" - -EDM_REGISTER_PLUGINFACTORY(MTDRecHitAlgoFactory, "MTDRecHitAlgoFactory"); +#include "FWCore/ParameterSet/interface/ValidatedPluginFactoryMacros.h" +EDM_REGISTER_VALIDATED_PLUGINFACTORY(MTDRecHitAlgoFactory, "MTDRecHitAlgoFactory"); diff --git a/RecoLocalFastTime/FTLCommonAlgos/src/MTDUncalibratedRecHitAlgoBase.cc b/RecoLocalFastTime/FTLCommonAlgos/src/MTDUncalibratedRecHitAlgoBase.cc index 84d04a95de5c5..388f814d7b9cf 100644 --- a/RecoLocalFastTime/FTLCommonAlgos/src/MTDUncalibratedRecHitAlgoBase.cc +++ b/RecoLocalFastTime/FTLCommonAlgos/src/MTDUncalibratedRecHitAlgoBase.cc @@ -1,4 +1,4 @@ #include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h" - -EDM_REGISTER_PLUGINFACTORY(BTLUncalibratedRecHitAlgoFactory, "BTLUncalibratedRecHitAlgoFactory"); -EDM_REGISTER_PLUGINFACTORY(ETLUncalibratedRecHitAlgoFactory, "ETLUncalibratedRecHitAlgoFactory"); +#include "FWCore/ParameterSet/interface/ValidatedPluginFactoryMacros.h" +EDM_REGISTER_VALIDATED_PLUGINFACTORY(BTLUncalibratedRecHitAlgoFactory, "BTLUncalibratedRecHitAlgoFactory"); +EDM_REGISTER_VALIDATED_PLUGINFACTORY(ETLUncalibratedRecHitAlgoFactory, "ETLUncalibratedRecHitAlgoFactory"); diff --git a/RecoLocalFastTime/FTLRecProducers/plugins/MTDRecHitProducer.cc b/RecoLocalFastTime/FTLRecProducers/plugins/MTDRecHitProducer.cc index aa197b13050c7..298b1b8e952fd 100644 --- a/RecoLocalFastTime/FTLRecProducers/plugins/MTDRecHitProducer.cc +++ b/RecoLocalFastTime/FTLRecProducers/plugins/MTDRecHitProducer.cc @@ -2,7 +2,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" - +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/PluginDescription.h" #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/FTLDigi/interface/FTLDigiCollections.h" #include "DataFormats/FTLRecHit/interface/FTLRecHitCollections.h" @@ -22,8 +23,9 @@ class MTDRecHitProducer : public edm::stream::EDProducer<> { public: explicit MTDRecHitProducer(const edm::ParameterSet& ps); - ~MTDRecHitProducer() override; + ~MTDRecHitProducer() override = default; void produce(edm::Event& evt, const edm::EventSetup& es) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: const edm::EDGetTokenT ftlbURecHits_; // collection of barrel digis @@ -35,7 +37,7 @@ class MTDRecHitProducer : public edm::stream::EDProducer<> { std::unique_ptr barrel_, endcap_; const MTDGeometry* geom_; - edm::ESGetToken mtdgeoToken_; + const edm::ESGetToken mtdgeoToken_; }; MTDRecHitProducer::MTDRecHitProducer(const edm::ParameterSet& ps) @@ -44,13 +46,12 @@ MTDRecHitProducer::MTDRecHitProducer(const edm::ParameterSet& ps) ftleURecHits_( consumes(ps.getParameter("endcapUncalibratedRecHits"))), ftlbInstance_(ps.getParameter("BarrelHitsName")), - ftleInstance_(ps.getParameter("EndcapHitsName")) { + ftleInstance_(ps.getParameter("EndcapHitsName")), + mtdgeoToken_(esConsumes()) { produces(ftlbInstance_); produces(ftleInstance_); auto sumes = consumesCollector(); - mtdgeoToken_ = esConsumes(); - const edm::ParameterSet& barrel = ps.getParameterSet("barrel"); const std::string& barrelAlgo = barrel.getParameter("algoName"); barrel_ = MTDRecHitAlgoFactory::get()->create(barrelAlgo, barrel, sumes); @@ -60,8 +61,6 @@ MTDRecHitProducer::MTDRecHitProducer(const edm::ParameterSet& ps) endcap_ = MTDRecHitAlgoFactory::get()->create(endcapAlgo, endcap, sumes); } -MTDRecHitProducer::~MTDRecHitProducer() {} - void MTDRecHitProducer::produce(edm::Event& evt, const edm::EventSetup& es) { auto geom = es.getTransientHandle(mtdgeoToken_); geom_ = geom.product(); @@ -110,5 +109,24 @@ void MTDRecHitProducer::produce(edm::Event& evt, const edm::EventSetup& es) { evt.put(std::move(endcapRechits), ftleInstance_); } +void MTDRecHitProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + + desc.add("barrelUncalibratedRecHits", edm::InputTag("mtdUncalibratedRecHits:FTLBarrel")); + desc.add("endcapUncalibratedRecHits", edm::InputTag("mtdUncalibratedRecHits:FTLEndcap")); + desc.add("BarrelHitsName", "FTLBarrel"); + desc.add("EndcapHitsName", "FTLEndcap"); + + edm::ParameterSetDescription barrelDesc; + barrelDesc.addNode(edm::PluginDescription("algoName", true)); + desc.add("barrel", barrelDesc); + + edm::ParameterSetDescription endcapDesc; + endcapDesc.addNode(edm::PluginDescription("algoName", true)); + desc.add("endcap", endcapDesc); + + descriptions.addWithDefaultLabel(desc); +} + #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(MTDRecHitProducer); diff --git a/RecoLocalFastTime/FTLRecProducers/plugins/MTDUncalibratedRecHitProducer.cc b/RecoLocalFastTime/FTLRecProducers/plugins/MTDUncalibratedRecHitProducer.cc index 6883380756aaa..fe61532649dbe 100644 --- a/RecoLocalFastTime/FTLRecProducers/plugins/MTDUncalibratedRecHitProducer.cc +++ b/RecoLocalFastTime/FTLRecProducers/plugins/MTDUncalibratedRecHitProducer.cc @@ -6,6 +6,9 @@ #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/FTLDigi/interface/FTLDigiCollections.h" #include "DataFormats/FTLRecHit/interface/FTLRecHitCollections.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/PluginDescription.h" #include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDUncalibratedRecHitAlgoBase.h" @@ -14,8 +17,9 @@ class MTDUncalibratedRecHitProducer : public edm::stream::EDProducer<> { public: explicit MTDUncalibratedRecHitProducer(const edm::ParameterSet& ps); - ~MTDUncalibratedRecHitProducer() override; + ~MTDUncalibratedRecHitProducer() override = default; void produce(edm::Event& evt, const edm::EventSetup& es) override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: const edm::EDGetTokenT ftlbDigis_; // collection of BTL digis @@ -49,8 +53,6 @@ MTDUncalibratedRecHitProducer::MTDUncalibratedRecHitProducer(const edm::Paramete ETLUncalibratedRecHitAlgoFactory::get()->create(endcapAlgo, endcap, sumes)}; } -MTDUncalibratedRecHitProducer::~MTDUncalibratedRecHitProducer() {} - void MTDUncalibratedRecHitProducer::produce(edm::Event& evt, const edm::EventSetup& es) { // tranparently get things from event setup barrel_->getEventSetup(es); @@ -90,5 +92,24 @@ void MTDUncalibratedRecHitProducer::produce(edm::Event& evt, const edm::EventSet evt.put(std::move(endcapRechits), ftleInstance_); } +void MTDUncalibratedRecHitProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("barrelDigis", edm::InputTag("mix", "FTLBarrel")); + desc.add("endcapDigis", edm::InputTag("mix", "FTEndcap")); + + desc.add("BarrelHitsName", "FTLBarrel"); + desc.add("EndcapHitsName", "FTLEndcap"); + + edm::ParameterSetDescription barrelDesc; + barrelDesc.addNode(edm::PluginDescription("algoName", true)); + desc.add("barrel", barrelDesc); + + edm::ParameterSetDescription endcapDesc; + endcapDesc.addNode(edm::PluginDescription("algoName", true)); + desc.add("endcap", endcapDesc); + + descriptions.addWithDefaultLabel(desc); +} + #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE(MTDUncalibratedRecHitProducer); diff --git a/RecoMTD/Configuration/python/RecoMTD_EventContent_cff.py b/RecoMTD/Configuration/python/RecoMTD_EventContent_cff.py index 67c5bd241e35c..a369397642bb9 100644 --- a/RecoMTD/Configuration/python/RecoMTD_EventContent_cff.py +++ b/RecoMTD/Configuration/python/RecoMTD_EventContent_cff.py @@ -21,3 +21,13 @@ outputCommands = cms.untracked.vstring() ) RecoMTDFEVT.outputCommands.extend(RecoMTDRECO.outputCommands) + +#FEVTHLT content +RecoMTDFEVTHLT = cms.PSet( + outputCommands = cms.untracked.vstring( + 'keep *edmValueMap_hltTrackExtenderWithMTD_*_*', + 'keep *_hltMtdTrackQualityMVA_*_*', + 'keep recoTrack*_hltTrackExtenderWithMTD_*_*', + 'keep TrackingRecHitsOwned_hltTrackExtenderWithMTD_*_*', + ) +) diff --git a/SimFastTiming/MtdAssociatorProducers/plugins/MtdRecoClusterToSimLayerClusterAssociatorEDProducer.cc b/SimFastTiming/MtdAssociatorProducers/plugins/MtdRecoClusterToSimLayerClusterAssociatorEDProducer.cc index a3edfd7106f76..e993de9b29c5f 100644 --- a/SimFastTiming/MtdAssociatorProducers/plugins/MtdRecoClusterToSimLayerClusterAssociatorEDProducer.cc +++ b/SimFastTiming/MtdAssociatorProducers/plugins/MtdRecoClusterToSimLayerClusterAssociatorEDProducer.cc @@ -59,27 +59,23 @@ void MtdRecoClusterToSimLayerClusterAssociatorEDProducer::produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const { using namespace edm; - - edm::Handle theAssociator; - iEvent.getByToken(associatorToken_, theAssociator); - - edm::Handle btlRecoClusters; - iEvent.getByToken(btlRecoClustersToken_, btlRecoClusters); - - edm::Handle etlRecoClusters; - iEvent.getByToken(etlRecoClustersToken_, etlRecoClusters); - - edm::Handle simClusters; - iEvent.getByToken(simClustersToken_, simClusters); - - // associate reco clus to sim layer clus - reco::RecoToSimCollectionMtd recoToSimColl = - theAssociator->associateRecoToSim(btlRecoClusters, etlRecoClusters, simClusters); - reco::SimToRecoCollectionMtd simToRecoColl = - theAssociator->associateSimToReco(btlRecoClusters, etlRecoClusters, simClusters); - - auto r2s = std::make_unique(recoToSimColl); - auto s2r = std::make_unique(simToRecoColl); + auto theAssociator = iEvent.getHandle(associatorToken_); + auto btlRecoClusters = iEvent.getHandle(btlRecoClustersToken_); + auto etlRecoClusters = iEvent.getHandle(etlRecoClustersToken_); + auto simClusters = iEvent.getHandle(simClustersToken_); + + auto r2s = std::make_unique(); + auto s2r = std::make_unique(); + + if (btlRecoClusters.isValid() && etlRecoClusters.isValid()) { + // associate reco clus to sim layer clus + reco::RecoToSimCollectionMtd recoToSimColl = + theAssociator->associateRecoToSim(btlRecoClusters, etlRecoClusters, simClusters); + reco::SimToRecoCollectionMtd simToRecoColl = + theAssociator->associateSimToReco(btlRecoClusters, etlRecoClusters, simClusters); + *r2s = recoToSimColl; + *s2r = simToRecoColl; + } iEvent.put(std::move(r2s)); iEvent.put(std::move(s2r)); diff --git a/Validation/MtdValidation/plugins/MtdTracksValidation.cc b/Validation/MtdValidation/plugins/MtdTracksValidation.cc index 6e8789bcebb75..11a880f5f1322 100644 --- a/Validation/MtdValidation/plugins/MtdTracksValidation.cc +++ b/Validation/MtdValidation/plugins/MtdTracksValidation.cc @@ -128,6 +128,7 @@ class MtdTracksValidation : public DQMEDAnalyzer { const float trackMaxBtlEta_; const float trackMinEtlEta_; const float trackMaxEtlEta_; + const bool skipNonExistingSrc_; static constexpr double simUnit_ = 1e9; // sim time in s while reco time in ns static constexpr double etacutGEN_ = 4.; // |eta| < 4; @@ -514,7 +515,8 @@ MtdTracksValidation::MtdTracksValidation(const edm::ParameterSet& iConfig) trackMaxPt_(iConfig.getParameter("trackMaximumPt")), trackMaxBtlEta_(iConfig.getParameter("trackMaximumBtlEta")), trackMinEtlEta_(iConfig.getParameter("trackMinimumEtlEta")), - trackMaxEtlEta_(iConfig.getParameter("trackMaximumEtlEta")) { + trackMaxEtlEta_(iConfig.getParameter("trackMaximumEtlEta")), + skipNonExistingSrc_(iConfig.getParameter("skipNonExistingSrc")) { GenRecTrackToken_ = consumes(iConfig.getParameter("inputTagG")); RecTrackToken_ = consumes(iConfig.getParameter("inputTagT")); @@ -568,33 +570,86 @@ void MtdTracksValidation::analyze(const edm::Event& iEvent, const edm::EventSetu using namespace geant_units::operators; using namespace std; - auto GenRecTrackHandle = makeValid(iEvent.getHandle(GenRecTrackToken_)); + const auto& GenRecTrackHandle = iEvent.getHandle(GenRecTrackToken_); + const auto& btlRecCluHandle = iEvent.getHandle(btlRecCluToken_); + const auto& etlRecCluHandle = iEvent.getHandle(etlRecCluToken_); - auto btlRecCluHandle = makeValid(iEvent.getHandle(btlRecCluToken_)); - auto etlRecCluHandle = makeValid(iEvent.getHandle(etlRecCluToken_)); + if (!GenRecTrackHandle.isValid() || !btlRecCluHandle.isValid() || !etlRecCluHandle.isValid()) { + if (skipNonExistingSrc_) + return; + else + throw cms::Exception("Invalid Product") + << "Attempted to fill a input collection edm::Handle with an invalid product"; + } const auto& tp2SimAssociationMap = iEvent.get(tp2SimAssociationMapToken_); const auto& Sim2tpAssociationMap = iEvent.get(Sim2tpAssociationMapToken_); const auto& r2sAssociationMap = iEvent.get(r2sAssociationMapToken_); - const auto& tMtd = iEvent.get(tmtdToken_); - const auto& SigmatMtd = iEvent.get(SigmatmtdToken_); - const auto& t0Src = iEvent.get(t0SrcToken_); - const auto& Sigmat0Src = iEvent.get(Sigmat0SrcToken_); - const auto& t0Pid = iEvent.get(t0PidToken_); - const auto& Sigmat0Pid = iEvent.get(Sigmat0PidToken_); - const auto& t0Safe = iEvent.get(t0SafePidToken_); - const auto& Sigmat0Safe = iEvent.get(Sigmat0SafePidToken_); - const auto& SigmaTofPi = iEvent.get(SigmaTofPiToken_); - const auto& SigmaTofK = iEvent.get(SigmaTofKToken_); - const auto& SigmaTofP = iEvent.get(SigmaTofPToken_); - const auto& mtdQualMVA = iEvent.get(trackMVAQualToken_); - const auto& trackAssoc = iEvent.get(trackAssocToken_); - const auto& pathLength = iEvent.get(pathLengthToken_); - const auto& btlMatchTimeChi2 = iEvent.get(btlMatchTimeChi2Token_); - const auto& etlMatchTimeChi2 = iEvent.get(etlMatchTimeChi2Token_); - const auto& btlMatchChi2 = iEvent.get(btlMatchChi2Token_); - const auto& outermostHitPosition = iEvent.get(outermostHitPositionToken_); + const auto& tMtdHandle = iEvent.getHandle(tmtdToken_); + const auto& SigmatMtdHandle = iEvent.getHandle(SigmatmtdToken_); + const auto& t0SrcHandle = iEvent.getHandle(t0SrcToken_); + const auto& Sigmat0SrcHandle = iEvent.getHandle(Sigmat0SrcToken_); + const auto& t0PidHandle = iEvent.getHandle(t0PidToken_); + const auto& Sigmat0PidHandle = iEvent.getHandle(Sigmat0PidToken_); + const auto& t0SafeHandle = iEvent.getHandle(t0SafePidToken_); + const auto& Sigmat0SafeHandle = iEvent.getHandle(Sigmat0SafePidToken_); + const auto& SigmaTofPiHandle = iEvent.getHandle(SigmaTofPiToken_); + const auto& SigmaTofKHandle = iEvent.getHandle(SigmaTofKToken_); + const auto& SigmaTofPHandle = iEvent.getHandle(SigmaTofPToken_); + const auto& mtdQualMVAHandle = iEvent.getHandle(trackMVAQualToken_); + const auto& trackAssocHandle = iEvent.getHandle(trackAssocToken_); + const auto& pathLengthHandle = iEvent.getHandle(pathLengthToken_); + const auto& btlMatchTimeChi2Handle = iEvent.getHandle(btlMatchTimeChi2Token_); + const auto& etlMatchTimeChi2Handle = iEvent.getHandle(etlMatchTimeChi2Token_); + const auto& btlMatchChi2Handle = iEvent.getHandle(btlMatchChi2Token_); + const auto& outermostHitPositionHandle = iEvent.getHandle(outermostHitPositionToken_); + + const auto& allValid = {tMtdHandle.isValid(), + SigmatMtdHandle.isValid(), + t0SrcHandle.isValid(), + Sigmat0SrcHandle.isValid(), + t0PidHandle.isValid(), + Sigmat0PidHandle.isValid(), + t0SafeHandle.isValid(), + Sigmat0SafeHandle.isValid(), + SigmaTofPiHandle.isValid(), + SigmaTofKHandle.isValid(), + SigmaTofPHandle.isValid(), + mtdQualMVAHandle.isValid(), + trackAssocHandle.isValid(), + pathLengthHandle.isValid(), + btlMatchTimeChi2Handle.isValid(), + etlMatchTimeChi2Handle.isValid(), + btlMatchChi2Handle.isValid(), + outermostHitPositionHandle.isValid()}; + + if (!std::all_of(allValid.begin(), allValid.end(), [](bool v) { return v; })) { + if (skipNonExistingSrc_) + return; + else + throw cms::Exception("Invalid Product") + << "Attempted to fill a edm::ValueMap edm::Handle with an invalid product"; + } + + const auto& tMtd = *tMtdHandle; + const auto& SigmatMtd = *SigmatMtdHandle; + const auto& t0Src = *t0SrcHandle; + const auto& Sigmat0Src = *Sigmat0SrcHandle; + const auto& t0Pid = *t0PidHandle; + const auto& Sigmat0Pid = *Sigmat0PidHandle; + const auto& t0Safe = *t0SafeHandle; + const auto& Sigmat0Safe = *Sigmat0SafeHandle; + const auto& SigmaTofPi = *SigmaTofPiHandle; + const auto& SigmaTofK = *SigmaTofKHandle; + const auto& SigmaTofP = *SigmaTofPHandle; + const auto& mtdQualMVA = *mtdQualMVAHandle; + const auto& trackAssoc = *trackAssocHandle; + const auto& pathLength = *pathLengthHandle; + const auto& btlMatchTimeChi2 = *btlMatchTimeChi2Handle; + const auto& etlMatchTimeChi2 = *etlMatchTimeChi2Handle; + const auto& btlMatchChi2 = *btlMatchChi2Handle; + const auto& outermostHitPosition = *outermostHitPositionHandle; auto recoToSimH = makeValid(iEvent.getHandle(recoToSimAssociationToken_)); r2s_ = recoToSimH.product(); @@ -3286,6 +3341,7 @@ void MtdTracksValidation::fillDescriptions(edm::ConfigurationDescriptions& descr desc.add("folder", "MTD/Tracks"); desc.add("optionalPlots", false); + desc.add("skipNonExistingSrc", false); desc.add("inputTagG", edm::InputTag("generalTracks")); desc.add("inputTagT", edm::InputTag("trackExtenderWithMTD")); desc.add("inputTagV", edm::InputTag("offlinePrimaryVertices4D")); diff --git a/Validation/MtdValidation/plugins/Primary4DVertexValidation.cc b/Validation/MtdValidation/plugins/Primary4DVertexValidation.cc index 88fd4a75fc031..f4f514d0f4d3e 100644 --- a/Validation/MtdValidation/plugins/Primary4DVertexValidation.cc +++ b/Validation/MtdValidation/plugins/Primary4DVertexValidation.cc @@ -2260,33 +2260,43 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve edm::Handle TPCollectionH; iEvent.getByToken(trackingParticleCollectionToken_, TPCollectionH); - if (!TPCollectionH.isValid()) + if (!TPCollectionH.isValid()) { edm::LogWarning("Primary4DVertexValidation") << "TPCollectionH is not valid"; + return; + } edm::Handle TVCollectionH; iEvent.getByToken(trackingVertexCollectionToken_, TVCollectionH); - if (!TVCollectionH.isValid()) + if (!TVCollectionH.isValid()) { edm::LogWarning("Primary4DVertexValidation") << "TVCollectionH is not valid"; + return; + } edm::Handle simToRecoH; iEvent.getByToken(simToRecoAssociationToken_, simToRecoH); if (simToRecoH.isValid()) s2r_ = simToRecoH.product(); - else + else { edm::LogWarning("Primary4DVertexValidation") << "simToRecoH is not valid"; + return; + } edm::Handle recoToSimH; iEvent.getByToken(recoToSimAssociationToken_, recoToSimH); if (recoToSimH.isValid()) r2s_ = recoToSimH.product(); - else + else { edm::LogWarning("Primary4DVertexValidation") << "recoToSimH is not valid"; + return; + } reco::BeamSpot beamSpot; edm::Handle BeamSpotH; iEvent.getByToken(RecBeamSpotToken_, BeamSpotH); - if (!BeamSpotH.isValid()) + if (!BeamSpotH.isValid()) { edm::LogWarning("Primary4DVertexValidation") << "BeamSpotH is not valid"; + return; + } beamSpot = *BeamSpotH; edm::Handle tks; @@ -2305,8 +2315,10 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve std::vector recopv; // a list of reconstructed primary MC vertices edm::Handle> recVtxs; iEvent.getByToken(Rec4DVerToken_, recVtxs); - if (!recVtxs.isValid()) + if (!recVtxs.isValid()) { edm::LogWarning("Primary4DVertexValidation") << "recVtxs is not valid"; + return; + } recopv = getRecoPVs(recVtxs); const auto& trackAssoc = iEvent.get(trackAssocToken_); diff --git a/Validation/MtdValidation/python/hltMtdPostProcessor_cff.py b/Validation/MtdValidation/python/hltMtdPostProcessor_cff.py new file mode 100644 index 0000000000000..70e0190327384 --- /dev/null +++ b/Validation/MtdValidation/python/hltMtdPostProcessor_cff.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +from Validation.MtdValidation.MtdTracksPostProcessor_cfi import MtdTracksPostProcessor as _MtdTracksPostProcessor +from Validation.MtdValidation.Primary4DVertexPostProcessor_cfi import Primary4DVertexPostProcessor as _Primary4DVertexPostProcessor + +hltMtdTracksPostProcessor = _MtdTracksPostProcessor.clone( + folder = cms.string('HLT/MTD/Tracks/') +) +hltPrimary4DVertexPostProcessor = _Primary4DVertexPostProcessor.clone( + folder = cms.string('HLT/MTD/Vertices/') +) + +hltMtdValidationPostProcessor = cms.Sequence(hltMtdTracksPostProcessor + + hltPrimary4DVertexPostProcessor) diff --git a/Validation/MtdValidation/python/hltMtdValidation_cff.py b/Validation/MtdValidation/python/hltMtdValidation_cff.py new file mode 100644 index 0000000000000..9b951c224dfec --- /dev/null +++ b/Validation/MtdValidation/python/hltMtdValidation_cff.py @@ -0,0 +1,95 @@ +import FWCore.ParameterSet.Config as cms + +# --- Cluster associations maps producers +from SimFastTiming.MtdAssociatorProducers.mtdRecoClusterToSimLayerClusterAssociatorByHits_cfi import mtdRecoClusterToSimLayerClusterAssociatorByHits as _mtdRecoClusterToSimLayerClusterAssociatorByHits +from SimFastTiming.MtdAssociatorProducers.mtdSimLayerClusterToTPAssociatorByTrackId_cfi import mtdSimLayerClusterToTPAssociatorByTrackId as _mtdSimLayerClusterToTPAssociatorByTrackId + +from SimFastTiming.MtdAssociatorProducers.mtdRecoClusterToSimLayerClusterAssociation_cfi import mtdRecoClusterToSimLayerClusterAssociation as _mtdRecoClusterToSimLayerClusterAssociation +from SimFastTiming.MtdAssociatorProducers.mtdSimLayerClusterToTPAssociation_cfi import mtdSimLayerClusterToTPAssociation as _mtdSimLayerClusterToTPAssociation + +hltMtdRecoClusterToSimLayerClusterAssociatorByHits = _mtdRecoClusterToSimLayerClusterAssociatorByHits.clone() +hltMtdSimLayerClusterToTPAssociatorByTrackId = _mtdSimLayerClusterToTPAssociatorByTrackId.clone() + +hltMtdRecoClusterToSimLayerClusterAssociation = _mtdRecoClusterToSimLayerClusterAssociation.clone( + associator = cms.InputTag('hltMtdRecoClusterToSimLayerClusterAssociatorByHits'), + btlRecoClustersTag = cms.InputTag('hltMtdClusters', 'FTLBarrel'), + etlRecoClustersTag = cms.InputTag('hltMtdClusters', 'FTLEndcap'), +) + +hltMtdSimLayerClusterToTPAssociation = _mtdSimLayerClusterToTPAssociation.clone( + associator = cms.InputTag('hltMtdSimLayerClusterToTPAssociatorByTrackId') +) + +hltMtdAssociationProducers = cms.Sequence( + hltMtdRecoClusterToSimLayerClusterAssociatorByHits+ + hltMtdRecoClusterToSimLayerClusterAssociation+ + hltMtdSimLayerClusterToTPAssociatorByTrackId+ + hltMtdSimLayerClusterToTPAssociation +) + +from Validation.MtdValidation.mtdTracksValid_cfi import mtdTracksValid as _mtdTracksValid +hltMtdTracksValid = _mtdTracksValid.clone( + folder = cms.string('HLT/MTD/Tracks'), + skipNonExistingSrc = cms.bool(True), # at HLT to protect when the products are not available + inputTagG = cms.InputTag('hltGeneralTracks'), + inputTagT = cms.InputTag('hltTrackExtenderWithMTD'), + inputTagV = cms.InputTag('hltOfflinePrimaryVertices4D'), + TPtoRecoTrackAssoc = cms.InputTag('tpToHLTphase2TrackAssociation'), + tp2SimAssociationMapTag = cms.InputTag('hltMtdSimLayerClusterToTPAssociation'), + Sim2tpAssociationMapTag = cms.InputTag('hltMtdSimLayerClusterToTPAssociation'), + r2sAssociationMapTag = cms.InputTag('hltMtdRecoClusterToSimLayerClusterAssociation'), + btlRecHits = cms.InputTag('hltMtdRecHits', 'FTLBarrel'), + etlRecHits = cms.InputTag('hltMtdRecHits', 'FTLEndcap'), + recCluTagBTL = cms.InputTag('hltMtdClusters', 'FTLBarrel'), + recCluTagETL = cms.InputTag('hltMtdClusters', 'FTLEndcap'), + tmtd = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + sigmatmtd = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmatmtd'), + t0Src = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackt0'), + sigmat0Src = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmat0'), + trackAssocSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackassoc'), + pathLengthSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackPathLength'), + btlMatchTimeChi2 = cms.InputTag('hltTrackExtenderWithMTD', 'btlMatchTimeChi2'), + etlMatchTimeChi2 = cms.InputTag('hltTrackExtenderWithMTD', 'etlMatchTimeChi2'), + btlMatchChi2 = cms.InputTag('hltTrackExtenderWithMTD', 'btlMatchChi2'), + t0SafePID = cms.InputTag('hltTofPID', 't0safe'), + sigmat0SafePID = cms.InputTag('hltTofPID', 'sigmat0safe'), + sigmat0PID = cms.InputTag('hltTofPID', 'sigmat0'), + t0PID = cms.InputTag('hltTofPID', 't0'), + sigmaTofPi = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofPi'), + sigmaTofK = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofK'), + sigmaTofP = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackSigmaTofP'), + trackMVAQual = cms.InputTag('hltMtdTrackQualityMVA', 'mtdQualMVA'), + outermostHitPositionSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackOutermostHitPosition'), +) + +from Validation.MtdValidation.vertices4DValid_cff import vertices4DValid as _vertices4DValid +hltVertices4DValid = _vertices4DValid.clone( + folder = cms.string('HLT/MTD/Vertices'), + TPtoRecoTrackAssoc = cms.InputTag('tpToHLTphase2TrackAssociation'), + TrackLabel = cms.InputTag('hltGeneralTracks'), + mtdTracks = cms.InputTag('hltTrackExtenderWithMTD'), + SimTag = cms.InputTag('mix', 'MergedTrackTruth'), + offlineBS = cms.InputTag('hltOnlineBeamSpot'), + offline4DPV = cms.InputTag('hltOfflinePrimaryVertices4D'), + trackAssocSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackassoc'), + pathLengthSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackPathLength'), + momentumSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackp'), + tmtd = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + timeSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracktmtd'), + sigmaSrc = cms.InputTag('hltTrackExtenderWithMTD', 'generalTracksigmatmtd'), + t0PID = cms.InputTag('hltTofPID', 't0'), + sigmat0PID = cms.InputTag('hltTofPID', 'sigmat0'), + t0SafePID = cms.InputTag('hltTofPID', 't0safe'), + sigmat0SafePID = cms.InputTag('hltTofPID', 'sigmat0safe'), + trackMVAQual = cms.InputTag('hltMtdTrackQualityMVA', 'mtdQualMVA'), + tofPi = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofPi'), + tofK = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofK'), + tofP = cms.InputTag('hltTrackExtenderWithMTD', 'generalTrackTofP'), + probPi = cms.InputTag('hltTofPID', 'probPi'), + probK = cms.InputTag('hltTofPID', 'probK'), + probP = cms.InputTag('hltTofPID', 'probP') +) + +hltMtdRecoValid = cms.Sequence(hltMtdAssociationProducers + + hltMtdTracksValid + + hltVertices4DValid)