From b27f9a633adadc1fa765e2b24bf72368e494d341 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sat, 14 Dec 2013 13:30:55 +0100 Subject: [PATCH 01/30] Jet core dedicated tracking Conflicts: RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py RecoTracker/IterativeTracking/python/iterativeTk_cff.py --- .../src/TrajectorySegmentBuilder.cc | 7 +- .../python/MergeTrackCollections_cff.py | 1 - .../python/earlyGeneralTracks_cfi.py | 8 +- .../python/JetCoreRegionalStep_cff.py | 167 ++++++++++++++++++ .../python/iterativeTk_cff.py | 6 +- .../plugins/SeedFromConsecutiveHitsCreator.cc | 28 +++ .../test/tracking_reco_validation_cfg.py | 48 +++++ 7 files changed, 252 insertions(+), 13 deletions(-) create mode 100644 RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py create mode 100644 Validation/RecoB/test/tracking_reco_validation_cfg.py diff --git a/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc b/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc index ae4ca871ca5b0..b820b93e731fc 100644 --- a/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc +++ b/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc @@ -251,11 +251,8 @@ TrajectorySegmentBuilder::addGroup (TempTrajectory const & traj, TempTrajectoryContainer updatedTrajectories; updatedTrajectories.reserve(2); if ( traj.measurements().empty() ) { - vector const & firstMeasurements = unlockedMeasurements(begin->measurements()); - if ( theBestHitOnly ) - updateCandidatesWithBestHit(traj,firstMeasurements,updatedTrajectories); - else - updateCandidates(traj,begin->measurements(),updatedTrajectories); + vector const & firstMeasurements = unlockedMeasurements(begin->measurements());//not used???fixme gc + updateCandidates(traj,begin->measurements(),updatedTrajectories); if unlikely(theDbgFlg) cout << "TSB::addGroup : updating with first group - " << updatedTrajectories.size() << " trajectories" << endl; } diff --git a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py index 49d2ad2bae8ec..969aebc81822a 100644 --- a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py +++ b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py @@ -1,6 +1,5 @@ import FWCore.ParameterSet.Config as cms - import RecoTracker.FinalTrackSelectors.DuplicateTrackMerger_cfi duplicateTrackCandidates = RecoTracker.FinalTrackSelectors.DuplicateTrackMerger_cfi.duplicateTrackMerger.clone( diff --git a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py index b9096bd157fe5..f6f800cee61fb 100644 --- a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py +++ b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py @@ -2,15 +2,17 @@ import RecoTracker.FinalTrackSelectors.trackListMerger_cfi earlyGeneralTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone( TrackProducers = (cms.InputTag('initialStepTracks'), + cms.InputTag('jetCoreRegionalStepTracks'), cms.InputTag('lowPtTripletStepTracks'), cms.InputTag('pixelPairStepTracks'), cms.InputTag('detachedTripletStepTracks'), cms.InputTag('mixedTripletStepTracks'), cms.InputTag('pixelLessStepTracks'), cms.InputTag('tobTecStepTracks')), - hasSelector=cms.vint32(1,1,1,1,1,1,1), - indivShareFrac=cms.vdouble(1.0,0.16,0.19,0.13,0.11,0.11,0.09), + hasSelector=cms.vint32(1,1,1,1,1,1,1,1), + indivShareFrac=cms.vdouble(1.0,0.19,0.16,0.19,0.13,0.11,0.11,0.09), selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStep"), + cms.InputTag("jetCoreRegionalStepSelector","jetCoreRegionalStep"), cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"), cms.InputTag("pixelPairStepSelector","pixelPairStep"), cms.InputTag("detachedTripletStep"), @@ -18,7 +20,7 @@ cms.InputTag("pixelLessStep"), cms.InputTag("tobTecStepSelector","tobTecStep") ), - setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4,5,6), pQual=cms.bool(True) ) + setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1,2,3,4,5,6,7), pQual=cms.bool(True) ) ), copyExtras = True, makeReKeyedSeeds = cms.untracked.bool(False) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py new file mode 100644 index 0000000000000..61bb104a8ce56 --- /dev/null +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -0,0 +1,167 @@ +import FWCore.ParameterSet.Config as cms + + +# NEW CLUSTERS (remove previously used clusters) +#jetCoreRegionalStepClusters = cms.EDProducer("TrackClusterRemover", +# clusterLessSolution = cms.bool(True), +# oldClusterRemovalInfo = cms.InputTag("lowPtTripletStepClusters"), +# trajectories = cms.InputTag("lowPtTripletStepTracks"), +# overrideTrkQuals = cms.InputTag('lowPtTripletStepSelector','lowPtTripletStep'), +# TrackQuality = cms.string('highPurity'), +# minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0), +# pixelClusters = cms.InputTag("siPixelClusters"), +# stripClusters = cms.InputTag("siStripClusters"), +# Common = cms.PSet( +# maxChi2 = cms.double(9.0) +# ) +#) + +# SEEDING LAYERS +jetCoreRegionalStepSeedLayers = cms.ESProducer("SeedingLayersESProducer", + ComponentName = cms.string('jetCoreRegionalStepSeedLayers'), + layerList = cms.vstring('BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3', + 'BPix1+FPix1_pos', 'BPix1+FPix1_neg', + 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', + 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg','BPix2+TIB1','BPix3+TIB1','BPix2+TIB2','BPix3+TIB2'), + TIB = cms.PSet( + matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), + TTRHBuilder = cms.string('WithTrackAngle') + ), + BPix = cms.PSet( + useErrorsFromParam = cms.bool(True), + hitErrorRPhi = cms.double(0.0027), + hitErrorRZ = cms.double(0.006), + TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4MixedPairs'), + HitProducer = cms.string('siPixelRecHits'), + # skipClusters = cms.InputTag('jetCoreRegionalStepClusters') + ), + FPix = cms.PSet( + useErrorsFromParam = cms.bool(True), + hitErrorRPhi = cms.double(0.0051), + hitErrorRZ = cms.double(0.0036), + TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4MixedPairs'), + HitProducer = cms.string('siPixelRecHits'), + # skipClusters = cms.InputTag('jetCoreRegionalStepClusters') + ) +) + +# SEEDS +import RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff +jetCoreRegionalStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff.globalSeedsFromPairsWithVertices.clone() +jetCoreRegionalStepSeeds.RegionFactoryPSet = cms.PSet( + ComponentName = cms.string( "TauRegionalPixelSeedGenerator" ), + RegionPSet = cms.PSet( + precise = cms.bool( True ), + originRadius = cms.double( 0.2 ), + ptMin = cms.double( 10. ), + originHalfLength = cms.double( 0.2 ), + deltaPhiRegion = cms.double( 0.05 ), ## 0.5 + deltaEtaRegion = cms.double( 0.05 ), ## 0.5 + JetSrc = cms.InputTag( "ak5CaloJets" ), + vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), +# JetMinPt = cms.double( 20.0 ), + )) + +jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = cms.string('jetCoreRegionalStepSeedLayers') + +jetCoreRegionalStepSeeds.SeedComparitorPSet = cms.PSet( + ComponentName = cms.string('none'), +#PixelClusterShapeSeedComparitor'), +# FilterAtHelixStage = cms.bool(True), +# FilterPixelHits = cms.bool(True), +# FilterStripHits = cms.bool(False), + # ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter') + ) + +# QUALITY CUTS DURING TRACK BUILDING +import TrackingTools.TrajectoryFiltering.TrajectoryFilterESProducer_cfi +jetCoreRegionalStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilterESProducer_cfi.trajectoryFilterESProducer.clone( + ComponentName = 'jetCoreRegionalStepTrajectoryFilter', + filterPset = TrackingTools.TrajectoryFiltering.TrajectoryFilterESProducer_cfi.trajectoryFilterESProducer.filterPset.clone( + minimumNumberOfHits = 3, + minPt = 0.1 + ) + ) + +import TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi +jetCoreRegionalStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi.Chi2MeasurementEstimator.clone( + ComponentName = cms.string('jetCoreRegionalStepChi2Est'), + nSigma = cms.double(3.0), + MaxChi2 = cms.double(9.0) +) + +# TRACK BUILDING +import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilderESProducer_cfi +jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilderESProducer_cfi.GroupedCkfTrajectoryBuilder.clone( + ComponentName = 'jetCoreRegionalStepTrajectoryBuilder', + MeasurementTrackerName = '', + trajectoryFilterName = 'jetCoreRegionalStepTrajectoryFilter', +# clustersToSkip = cms.InputTag('jetCoreRegionalStepClusters'), + maxCand = 50, + estimator = cms.string('jetCoreRegionalStepChi2Est'), + maxDPhiForLooperReconstruction = cms.double(2.0), + maxPtForLooperReconstruction = cms.double(0.7) + ) + +# MAKING OF TRACK CANDIDATES +import RecoTracker.CkfPattern.CkfTrackCandidates_cfi +jetCoreRegionalStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone( + src = cms.InputTag('jetCoreRegionalStepSeeds'), + TrajectoryBuilder = 'jetCoreRegionalStepTrajectoryBuilder', + ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput + numHitsForSeedCleaner = cms.int32(50), + onlyPixelHitsForSeedCleaner = cms.bool(True), + +) + + +# TRACK FITTING +import RecoTracker.TrackProducer.TrackProducer_cfi +jetCoreRegionalStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( + AlgorithmName = cms.string('iter2'), + src = 'jetCoreRegionalStepTrackCandidates', + Fitter = cms.string('FlexibleKFFittingSmoother') + ) + +# Final selection +import RecoTracker.IterativeTracking.LowPtTripletStep_cff +import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi +jetCoreRegionalStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone( + src='jetCoreRegionalStepTracks', + trackSelectors= cms.VPSet( + RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone( + name = 'jetCoreRegionalStepLoose', + ), #end of pset + RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone( + name = 'jetCoreRegionalStepTight', + preFilterName = 'jetCoreRegionalStepLoose', + ), + RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone( + name = 'jetCoreRegionalStep', + preFilterName = 'jetCoreRegionalStepTight', + ), + ) #end of vpset + ) #end of clone + +import RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi +firstStepPrimaryVertices=RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi.offlinePrimaryVertices.clone() +firstStepPrimaryVertices.TrackLabel = cms.InputTag("initialStepTracks") + +firstStepGoodPrimaryVertices = cms.EDFilter( + "PrimaryVertexObjectFilter", + filterParams = cms.PSet( + pvSrc = cms.InputTag('firstStepPrimaryVertices'), + minNdof = cms.double(25.0), + maxZ = cms.double(15.0), + maxRho = cms.double(2.0) + ), + src=cms.InputTag('offlinePrimaryVertices') + ) + +# Final sequence +JetCoreRegionalStep = cms.Sequence(firstStepPrimaryVertices*firstStepGoodPrimaryVertices* + #jetCoreRegionalStepClusters* + jetCoreRegionalStepSeeds* + jetCoreRegionalStepTrackCandidates* + jetCoreRegionalStepTracks* + jetCoreRegionalStepSelector) diff --git a/RecoTracker/IterativeTracking/python/iterativeTk_cff.py b/RecoTracker/IterativeTracking/python/iterativeTk_cff.py index 7c624d819c1d2..1300ae1914905 100644 --- a/RecoTracker/IterativeTracking/python/iterativeTk_cff.py +++ b/RecoTracker/IterativeTracking/python/iterativeTk_cff.py @@ -1,16 +1,13 @@ import FWCore.ParameterSet.Config as cms from RecoTracker.IterativeTracking.InitialStep_cff import * +from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import * from RecoTracker.IterativeTracking.DetachedTripletStep_cff import * from RecoTracker.IterativeTracking.LowPtTripletStep_cff import * from RecoTracker.IterativeTracking.PixelPairStep_cff import * from RecoTracker.IterativeTracking.MixedTripletStep_cff import * - from RecoTracker.IterativeTracking.PixelLessStep_cff import * -#from RecoTracker.IterativeTracking.PixelLessTripletStep_cff import * - from RecoTracker.IterativeTracking.TobTecStep_cff import * -#from RecoTracker.IterativeTracking.TobTecHybridStep_cff import * from RecoTracker.FinalTrackSelectors.earlyGeneralTracks_cfi import * from RecoTracker.IterativeTracking.MuonSeededStep_cff import * @@ -19,6 +16,7 @@ from RecoTracker.ConversionSeedGenerators.ConversionStep_cff import * iterTracking = cms.Sequence(InitialStep* + JetCoreRegionalStep * DetachedTripletStep* LowPtTripletStep* PixelPairStep* diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc index b53faa3cbe4e9..0a4a60fc1a466 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc @@ -63,6 +63,34 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol CurvilinearTrajectoryError error = initialError(sin2Theta); FreeTrajectoryState fts(kine, error); + if(region.direction().x()!=0) + { + //FIXME: make itconfigurable + if(region.direction().perp() < 20) return 0; + GlobalVector direction=region.direction()/region.direction().mag(); + GlobalVector momentum=direction*fts.momentum().mag(); + GlobalPoint position=region.origin()+5*direction; + GlobalTrajectoryParameters newKine(position,momentum,fts.charge(),&fts.parameters().magneticField()); + GlobalError vertexErr( sqr(region.originRBound()), 0, sqr(region.originRBound()), + 0, 0, sqr(region.originZBound())); + + float ptMin = region.ptMin(); + AlgebraicSymMatrix55 C = ROOT::Math::SMatrixIdentity(); + + float sin2th = sqr(sinTheta); + float minC00 = 0.4; + C[0][0] = std::max(sin2th/sqr(ptMin), minC00); + float zErr = vertexErr.czz(); + float transverseErr = vertexErr.cxx(); // assume equal cxx cyy + //FIXME: take it from region + C[1][1] = 0.05; + C[2][2] = 0.05; + C[3][3] = transverseErr; + C[4][4] = zErr*sin2th + transverseErr*(1-sin2th); + CurvilinearTrajectoryError newError(C); + fts = FreeTrajectoryState(newKine,newError); + } + buildSeed(seedCollection,hits,fts); } diff --git a/Validation/RecoB/test/tracking_reco_validation_cfg.py b/Validation/RecoB/test/tracking_reco_validation_cfg.py new file mode 100644 index 0000000000000..236adfaa4ae8d --- /dev/null +++ b/Validation/RecoB/test/tracking_reco_validation_cfg.py @@ -0,0 +1,48 @@ +# The following comments couldn't be translated into the new config version: + +#! /bin/env cmsRun + +import FWCore.ParameterSet.Config as cms + +process = cms.Process("trackingandvalidation") +process.load("DQMServices.Components.DQMEnvironment_cfi") + +#keep the logging output to a nice level +process.load("FWCore.MessageLogger.MessageLogger_cfi") + +process.load("DQMServices.Core.DQM_cfg") + +# load the full reconstraction configuration, to make sure we're getting all needed dependencies +process.load("Configuration.StandardSequences.MagneticField_cff") +process.load("Configuration.StandardSequences.Geometry_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.load("Configuration.StandardSequences.Reconstruction_cff") + +process.load("PhysicsTools.JetMCAlgos.CaloJetsMCFlavour_cfi") + +process.load("Validation.RecoB.bTagAnalysis_cfi") +process.bTagValidation.jetMCSrc = 'AK5byValAlgo' +process.bTagValidation.allHistograms = True +#process.bTagValidation.fastMC = True + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring() +) + +process.plots = cms.Path(process.siPixelRecHits+process.siStripMatchedRecHits+process.pixelTracks+process.ckftracks_wodEdX+process.offlinePrimaryVertices+process.ak5JetTracksAssociatorAtVertex+process.btagging * process.myPartons* process.AK5Flavour * process.bTagValidation * process.dqmSaver) +process.dqmEnv.subSystemFolder = 'BTAG' +process.dqmSaver.producer = 'DQM' +process.dqmSaver.workflow = '/POG/BTAG/BJET' +process.dqmSaver.convention = 'Offline' +process.dqmSaver.saveByRun = cms.untracked.int32(-1) +process.dqmSaver.saveAtJobEnd =cms.untracked.bool(True) +process.dqmSaver.forceRunNumber = cms.untracked.int32(1) + +process.GlobalTag.globaltag = 'START53_V27::All' + +process.PoolSource.fileNames = [ +'file:/data/arizzi/TomoGerrit/CMSSW_5_3_12_patch1/src/Validation/RecoB/test/qcdquick/btag004-unreconstructedFromttbar30-80angle.root' +] From acecddad74b22e0e3357e0924bf5f5e6f1b01a4e Mon Sep 17 00:00:00 2001 From: Andrea Date: Sat, 14 Dec 2013 13:31:16 +0100 Subject: [PATCH 02/30] Jet core dedicated tracking --- .../test/reco_tracking_and_btagging_cfg.py | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Validation/RecoB/test/reco_tracking_and_btagging_cfg.py diff --git a/Validation/RecoB/test/reco_tracking_and_btagging_cfg.py b/Validation/RecoB/test/reco_tracking_and_btagging_cfg.py new file mode 100644 index 0000000000000..3d995c17db14d --- /dev/null +++ b/Validation/RecoB/test/reco_tracking_and_btagging_cfg.py @@ -0,0 +1,46 @@ +# The following comments couldn't be translated into the new config version: + +#! /bin/env cmsRun + +import FWCore.ParameterSet.Config as cms + +process = cms.Process("trackingandvalidation") +process.load("DQMServices.Components.DQMEnvironment_cfi") + +#keep the logging output to a nice level +process.load("FWCore.MessageLogger.MessageLogger_cfi") + +# load the full reconstraction configuration, to make sure we're getting all needed dependencies +process.load("Configuration.StandardSequences.MagneticField_cff") +process.load("Configuration.StandardSequences.Geometry_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.load("Configuration.StandardSequences.Reconstruction_cff") + +#process.options = cms.untracked.PSet(multiProcesses=cms.untracked.PSet( +# maxChildProcesses=cms.untracked.int32(8), +# maxSequentialEventsPerChild=cms.untracked.uint32(10))) + + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(), + skipEvents = cms.untracked.uint32(3), + +) +process.load("RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff") + +process.plots = cms.Path(process.siPixelRecHits+process.siStripMatchedRecHits+process.pixelTracks+process.ckftracks_wodEdX+process.offlinePrimaryVertices+process.ak5JetTracksAssociatorAtVertex+process.btagging+process.inclusiveVertexing) + +process.out = cms.OutputModule("PoolOutputModule", + fileName = cms.untracked.string('trk.root'), +) +process.endpath= cms.EndPath(process.out) + + +process.GlobalTag.globaltag = 'START53_V27::All' + +process.PoolSource.fileNames = [ +'file:/data/arizzi/TomoGerrit/CMSSW_5_3_12_patch1/src/Validation/RecoB/test/qcdquick/btag004-unreconstructedFromttbar30-80angle.root' +] From 1f600fcaaff085ee539ba92b8f7a8d968e4bb254 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sun, 15 Dec 2013 12:18:28 +0100 Subject: [PATCH 03/30] change a couple of parameters to be closer to the other tested config --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 61bb104a8ce56..e294065dc3199 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -87,7 +87,7 @@ jetCoreRegionalStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi.Chi2MeasurementEstimator.clone( ComponentName = cms.string('jetCoreRegionalStepChi2Est'), nSigma = cms.double(3.0), - MaxChi2 = cms.double(9.0) + MaxChi2 = cms.double(30.0) ) # TRACK BUILDING @@ -108,9 +108,10 @@ jetCoreRegionalStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone( src = cms.InputTag('jetCoreRegionalStepSeeds'), TrajectoryBuilder = 'jetCoreRegionalStepTrajectoryBuilder', + maxSeedsBeforeCleaning = cms.uint32(10000), ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput - numHitsForSeedCleaner = cms.int32(50), - onlyPixelHitsForSeedCleaner = cms.bool(True), + #numHitsForSeedCleaner = cms.int32(50), + #onlyPixelHitsForSeedCleaner = cms.bool(True), ) From dd214645db9cb7ea49fb21b438a6516d144cc6fd Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 16 Dec 2013 10:17:44 +0100 Subject: [PATCH 04/30] remove PXB2 Conflicts: RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py RecoTracker/IterativeTracking/python/iterativeTk_cff.py --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index e294065dc3199..969a22cf0eb59 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -22,7 +22,11 @@ layerList = cms.vstring('BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3', 'BPix1+FPix1_pos', 'BPix1+FPix1_neg', 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', - 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg','BPix2+TIB1','BPix3+TIB1','BPix2+TIB2','BPix3+TIB2'), + 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg', + #'BPix2+TIB1', + 'BPix3+TIB1', + #'BPix2+TIB2', + 'BPix3+TIB2'), TIB = cms.PSet( matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), TTRHBuilder = cms.string('WithTrackAngle') @@ -100,7 +104,8 @@ maxCand = 50, estimator = cms.string('jetCoreRegionalStepChi2Est'), maxDPhiForLooperReconstruction = cms.double(2.0), - maxPtForLooperReconstruction = cms.double(0.7) + maxPtForLooperReconstruction = cms.double(0.7), +# bestHitOnly=False ) # MAKING OF TRACK CANDIDATES From f244584719d69b3f6281d0c4b349a921db476033 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 9 Apr 2014 18:58:46 +0200 Subject: [PATCH 05/30] remove hard coded stuff --- .../python/JetCoreRegionalStep_cff.py | 8 ++-- .../plugins/SeedFromConsecutiveHitsCreator.cc | 20 +++++--- .../test/reco_tracking_and_btagging_cfg.py | 46 ------------------ .../test/tracking_reco_validation_cfg.py | 48 ------------------- 4 files changed, 17 insertions(+), 105 deletions(-) delete mode 100644 Validation/RecoB/test/reco_tracking_and_btagging_cfg.py delete mode 100644 Validation/RecoB/test/tracking_reco_validation_cfg.py diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 969a22cf0eb59..bab0fd2b3d512 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -52,6 +52,7 @@ # SEEDS import RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff jetCoreRegionalStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff.globalSeedsFromPairsWithVertices.clone() +jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak5CaloJets"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) jetCoreRegionalStepSeeds.RegionFactoryPSet = cms.PSet( ComponentName = cms.string( "TauRegionalPixelSeedGenerator" ), RegionPSet = cms.PSet( @@ -59,11 +60,10 @@ originRadius = cms.double( 0.2 ), ptMin = cms.double( 10. ), originHalfLength = cms.double( 0.2 ), - deltaPhiRegion = cms.double( 0.05 ), ## 0.5 - deltaEtaRegion = cms.double( 0.05 ), ## 0.5 - JetSrc = cms.InputTag( "ak5CaloJets" ), + deltaPhiRegion = cms.double( 0.10 ), + deltaEtaRegion = cms.double( 0.10 ), + JetSrc = cms.InputTag( "jetsForCoreTracking" ), vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), -# JetMinPt = cms.double( 20.0 ), )) jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = cms.string('jetCoreRegionalStepSeedLayers') diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc index 0a4a60fc1a466..da94c3aacf368 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc @@ -12,6 +12,7 @@ #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h" #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" #include "RecoTracker/TkSeedingLayers/interface/SeedComparitor.h" +#include "RecoTracker/TkTrackingRegions/interface/RectangularEtaPhiTrackingRegion.h" namespace { @@ -63,14 +64,17 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol CurvilinearTrajectoryError error = initialError(sin2Theta); FreeTrajectoryState fts(kine, error); - if(region.direction().x()!=0) + if(region.direction().x()!=0) // a direction was given, check if it is an etaPhi region { - //FIXME: make itconfigurable - if(region.direction().perp() < 20) return 0; + const RectangularEtaPhiTrackingRegion * etaPhiRegion = dynamic_cast(®ion); + if(etaPhiRegion) { + + //the following completely reset the kinematics, perhaps it makes no sense and newKine=kine would do better GlobalVector direction=region.direction()/region.direction().mag(); GlobalVector momentum=direction*fts.momentum().mag(); - GlobalPoint position=region.origin()+5*direction; + GlobalPoint position=region.origin()+5*direction; GlobalTrajectoryParameters newKine(position,momentum,fts.charge(),&fts.parameters().magneticField()); + GlobalError vertexErr( sqr(region.originRBound()), 0, sqr(region.originRBound()), 0, 0, sqr(region.originZBound())); @@ -82,13 +86,15 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol C[0][0] = std::max(sin2th/sqr(ptMin), minC00); float zErr = vertexErr.czz(); float transverseErr = vertexErr.cxx(); // assume equal cxx cyy - //FIXME: take it from region - C[1][1] = 0.05; - C[2][2] = 0.05; + float deltaEta = (etaPhiRegion->etaRange().first-etaPhiRegion->etaRange().first)/2.; + float deltaPhi = (etaPhiRegion->phiMargin().right()-etaPhiRegion->phiMargin().left())/2.; + C[1][1] = deltaEta*deltaEta*4; //2 sigma of what given in input + C[2][2] = deltaPhi*deltaPhi*4; C[3][3] = transverseErr; C[4][4] = zErr*sin2th + transverseErr*(1-sin2th); CurvilinearTrajectoryError newError(C); fts = FreeTrajectoryState(newKine,newError); + } } diff --git a/Validation/RecoB/test/reco_tracking_and_btagging_cfg.py b/Validation/RecoB/test/reco_tracking_and_btagging_cfg.py deleted file mode 100644 index 3d995c17db14d..0000000000000 --- a/Validation/RecoB/test/reco_tracking_and_btagging_cfg.py +++ /dev/null @@ -1,46 +0,0 @@ -# The following comments couldn't be translated into the new config version: - -#! /bin/env cmsRun - -import FWCore.ParameterSet.Config as cms - -process = cms.Process("trackingandvalidation") -process.load("DQMServices.Components.DQMEnvironment_cfi") - -#keep the logging output to a nice level -process.load("FWCore.MessageLogger.MessageLogger_cfi") - -# load the full reconstraction configuration, to make sure we're getting all needed dependencies -process.load("Configuration.StandardSequences.MagneticField_cff") -process.load("Configuration.StandardSequences.Geometry_cff") -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.load("Configuration.StandardSequences.Reconstruction_cff") - -#process.options = cms.untracked.PSet(multiProcesses=cms.untracked.PSet( -# maxChildProcesses=cms.untracked.int32(8), -# maxSequentialEventsPerChild=cms.untracked.uint32(10))) - - -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(1) -) -process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring(), - skipEvents = cms.untracked.uint32(3), - -) -process.load("RecoVertex.AdaptiveVertexFinder.inclusiveVertexing_cff") - -process.plots = cms.Path(process.siPixelRecHits+process.siStripMatchedRecHits+process.pixelTracks+process.ckftracks_wodEdX+process.offlinePrimaryVertices+process.ak5JetTracksAssociatorAtVertex+process.btagging+process.inclusiveVertexing) - -process.out = cms.OutputModule("PoolOutputModule", - fileName = cms.untracked.string('trk.root'), -) -process.endpath= cms.EndPath(process.out) - - -process.GlobalTag.globaltag = 'START53_V27::All' - -process.PoolSource.fileNames = [ -'file:/data/arizzi/TomoGerrit/CMSSW_5_3_12_patch1/src/Validation/RecoB/test/qcdquick/btag004-unreconstructedFromttbar30-80angle.root' -] diff --git a/Validation/RecoB/test/tracking_reco_validation_cfg.py b/Validation/RecoB/test/tracking_reco_validation_cfg.py deleted file mode 100644 index 236adfaa4ae8d..0000000000000 --- a/Validation/RecoB/test/tracking_reco_validation_cfg.py +++ /dev/null @@ -1,48 +0,0 @@ -# The following comments couldn't be translated into the new config version: - -#! /bin/env cmsRun - -import FWCore.ParameterSet.Config as cms - -process = cms.Process("trackingandvalidation") -process.load("DQMServices.Components.DQMEnvironment_cfi") - -#keep the logging output to a nice level -process.load("FWCore.MessageLogger.MessageLogger_cfi") - -process.load("DQMServices.Core.DQM_cfg") - -# load the full reconstraction configuration, to make sure we're getting all needed dependencies -process.load("Configuration.StandardSequences.MagneticField_cff") -process.load("Configuration.StandardSequences.Geometry_cff") -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.load("Configuration.StandardSequences.Reconstruction_cff") - -process.load("PhysicsTools.JetMCAlgos.CaloJetsMCFlavour_cfi") - -process.load("Validation.RecoB.bTagAnalysis_cfi") -process.bTagValidation.jetMCSrc = 'AK5byValAlgo' -process.bTagValidation.allHistograms = True -#process.bTagValidation.fastMC = True - -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(-1) -) -process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring() -) - -process.plots = cms.Path(process.siPixelRecHits+process.siStripMatchedRecHits+process.pixelTracks+process.ckftracks_wodEdX+process.offlinePrimaryVertices+process.ak5JetTracksAssociatorAtVertex+process.btagging * process.myPartons* process.AK5Flavour * process.bTagValidation * process.dqmSaver) -process.dqmEnv.subSystemFolder = 'BTAG' -process.dqmSaver.producer = 'DQM' -process.dqmSaver.workflow = '/POG/BTAG/BJET' -process.dqmSaver.convention = 'Offline' -process.dqmSaver.saveByRun = cms.untracked.int32(-1) -process.dqmSaver.saveAtJobEnd =cms.untracked.bool(True) -process.dqmSaver.forceRunNumber = cms.untracked.int32(1) - -process.GlobalTag.globaltag = 'START53_V27::All' - -process.PoolSource.fileNames = [ -'file:/data/arizzi/TomoGerrit/CMSSW_5_3_12_patch1/src/Validation/RecoB/test/qcdquick/btag004-unreconstructedFromttbar30-80angle.root' -] From f608c70c79abb5b92d2f5cc03d870362b8a82ffa Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Mon, 14 Apr 2014 12:29:21 +0200 Subject: [PATCH 06/30] fix compilation errors --- .../src/TrajectorySegmentBuilder.cc | 3 ++- .../python/earlyGeneralTracks_cfi.py | 2 +- .../plugins/SeedFromConsecutiveHitsCreator.cc | 19 +++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc b/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc index b820b93e731fc..5ae143091cf2b 100644 --- a/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc +++ b/RecoTracker/CkfPattern/src/TrajectorySegmentBuilder.cc @@ -252,7 +252,8 @@ TrajectorySegmentBuilder::addGroup (TempTrajectory const & traj, TempTrajectoryContainer updatedTrajectories; updatedTrajectories.reserve(2); if ( traj.measurements().empty() ) { vector const & firstMeasurements = unlockedMeasurements(begin->measurements());//not used???fixme gc - updateCandidates(traj,begin->measurements(),updatedTrajectories); + updateCandidates(traj,firstMeasurements,updatedTrajectories); + //updateCandidates(traj,begin->measurements(),updatedTrajectories); if unlikely(theDbgFlg) cout << "TSB::addGroup : updating with first group - " << updatedTrajectories.size() << " trajectories" << endl; } diff --git a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py index f6f800cee61fb..43c27b8b64310 100644 --- a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py +++ b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py @@ -10,7 +10,7 @@ cms.InputTag('pixelLessStepTracks'), cms.InputTag('tobTecStepTracks')), hasSelector=cms.vint32(1,1,1,1,1,1,1,1), - indivShareFrac=cms.vdouble(1.0,0.19,0.16,0.19,0.13,0.11,0.11,0.09), + indivShareFrac=cms.vdouble(1.0,0.19,0.16,0.19,0.13,0.11,0.11,0.09),#using 0.19 for jetCoreRegionalStep? selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStep"), cms.InputTag("jetCoreRegionalStepSelector","jetCoreRegionalStep"), cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"), diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc index da94c3aacf368..f04eb31bf1af0 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc @@ -64,26 +64,25 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol CurvilinearTrajectoryError error = initialError(sin2Theta); FreeTrajectoryState fts(kine, error); - if(region.direction().x()!=0) // a direction was given, check if it is an etaPhi region + if(region->direction().x()!=0) // a direction was given, check if it is an etaPhi region { - const RectangularEtaPhiTrackingRegion * etaPhiRegion = dynamic_cast(®ion); + const RectangularEtaPhiTrackingRegion * etaPhiRegion = dynamic_cast(region); if(etaPhiRegion) { //the following completely reset the kinematics, perhaps it makes no sense and newKine=kine would do better - GlobalVector direction=region.direction()/region.direction().mag(); + GlobalVector direction=region->direction()/region->direction().mag(); GlobalVector momentum=direction*fts.momentum().mag(); - GlobalPoint position=region.origin()+5*direction; + GlobalPoint position=region->origin()+5*direction; GlobalTrajectoryParameters newKine(position,momentum,fts.charge(),&fts.parameters().magneticField()); - GlobalError vertexErr( sqr(region.originRBound()), 0, sqr(region.originRBound()), - 0, 0, sqr(region.originZBound())); + GlobalError vertexErr( sqr(region->originRBound()), 0, sqr(region->originRBound()), + 0, 0, sqr(region->originZBound())); - float ptMin = region.ptMin(); + float ptMin = region->ptMin(); AlgebraicSymMatrix55 C = ROOT::Math::SMatrixIdentity(); - float sin2th = sqr(sinTheta); float minC00 = 0.4; - C[0][0] = std::max(sin2th/sqr(ptMin), minC00); + C[0][0] = std::max(sin2Theta/sqr(ptMin), minC00); float zErr = vertexErr.czz(); float transverseErr = vertexErr.cxx(); // assume equal cxx cyy float deltaEta = (etaPhiRegion->etaRange().first-etaPhiRegion->etaRange().first)/2.; @@ -91,7 +90,7 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol C[1][1] = deltaEta*deltaEta*4; //2 sigma of what given in input C[2][2] = deltaPhi*deltaPhi*4; C[3][3] = transverseErr; - C[4][4] = zErr*sin2th + transverseErr*(1-sin2th); + C[4][4] = zErr*sin2Theta + transverseErr*(1-sin2Theta); CurvilinearTrajectoryError newError(C); fts = FreeTrajectoryState(newKine,newError); } From d7165a26e42ece09801299edbd842e44dc57af21 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Mon, 14 Apr 2014 14:08:10 +0200 Subject: [PATCH 07/30] switch to iter7 --- RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index bab0fd2b3d512..a00e57c05855d 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -124,7 +124,7 @@ # TRACK FITTING import RecoTracker.TrackProducer.TrackProducer_cfi jetCoreRegionalStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( - AlgorithmName = cms.string('iter2'), + AlgorithmName = cms.string('iter7'), src = 'jetCoreRegionalStepTrackCandidates', Fitter = cms.string('FlexibleKFFittingSmoother') ) From 0868b5b8c12271f755bcf2d6115bbe5a42db017f Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Mon, 14 Apr 2014 14:13:46 +0200 Subject: [PATCH 08/30] seeding layers ed producer --- .../python/JetCoreRegionalStep_cff.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index a00e57c05855d..d6bf1b714c925 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -17,8 +17,7 @@ #) # SEEDING LAYERS -jetCoreRegionalStepSeedLayers = cms.ESProducer("SeedingLayersESProducer", - ComponentName = cms.string('jetCoreRegionalStepSeedLayers'), +jetCoreRegionalStepSeedLayers = cms.EDProducer("SeedingLayersEDProducer", layerList = cms.vstring('BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3', 'BPix1+FPix1_pos', 'BPix1+FPix1_neg', 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', @@ -66,7 +65,7 @@ vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), )) -jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = cms.string('jetCoreRegionalStepSeedLayers') +jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'jetCoreRegionalStepSeedLayers' jetCoreRegionalStepSeeds.SeedComparitorPSet = cms.PSet( ComponentName = cms.string('none'), @@ -165,9 +164,11 @@ ) # Final sequence -JetCoreRegionalStep = cms.Sequence(firstStepPrimaryVertices*firstStepGoodPrimaryVertices* - #jetCoreRegionalStepClusters* - jetCoreRegionalStepSeeds* - jetCoreRegionalStepTrackCandidates* - jetCoreRegionalStepTracks* - jetCoreRegionalStepSelector) +JetCoreRegionalStep = cms.Sequence(firstStepPrimaryVertices* + firstStepGoodPrimaryVertices* + #jetCoreRegionalStepClusters* + jetCoreRegionalStepSeedLayers* + jetCoreRegionalStepSeeds* + jetCoreRegionalStepTrackCandidates* + jetCoreRegionalStepTracks* + jetCoreRegionalStepSelector) From 5d434455052abac6554e35e820151b06753021f6 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Mon, 14 Apr 2014 16:04:03 +0200 Subject: [PATCH 09/30] fix pvSrc and add jet filter to sequence --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index d6bf1b714c925..1b04cb5871f5f 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -155,16 +155,17 @@ firstStepGoodPrimaryVertices = cms.EDFilter( "PrimaryVertexObjectFilter", filterParams = cms.PSet( - pvSrc = cms.InputTag('firstStepPrimaryVertices'), + #pvSrc = cms.InputTag('firstStepPrimaryVertices'),#try to remove this one minNdof = cms.double(25.0), maxZ = cms.double(15.0), maxRho = cms.double(2.0) ), - src=cms.InputTag('offlinePrimaryVertices') + src=cms.InputTag('firstStepPrimaryVertices')#why need twice the same src? ) # Final sequence -JetCoreRegionalStep = cms.Sequence(firstStepPrimaryVertices* +JetCoreRegionalStep = cms.Sequence(jetsForCoreTracking* + firstStepPrimaryVertices* firstStepGoodPrimaryVertices* #jetCoreRegionalStepClusters* jetCoreRegionalStepSeedLayers* From 8539af8858158da1012c406bc1384e57383c779a Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 15 Apr 2014 09:25:49 +0200 Subject: [PATCH 10/30] using track jets and pixel vertices (and fixing MTE for the region) it runs --- .../python/JetCoreRegionalStep_cff.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 1b04cb5871f5f..38af85dfac396 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -51,9 +51,13 @@ # SEEDS import RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff jetCoreRegionalStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff.globalSeedsFromPairsWithVertices.clone() -jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak5CaloJets"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) +from RecoJets.JetProducers.ak4TrackJets_cfi import ak4TrackJets +from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets +iter0TrackRefsForJets = trackRefsForJets.clone(src = cms.InputTag('initialStepTracks')) +ak4TrackJetsForTrk = ak4TrackJets.clone(src = cms.InputTag('iter0TrackRefsForJets'),srcPVs = cms.InputTag('pixelVertices')) +jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4TrackJetsForTrk"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) jetCoreRegionalStepSeeds.RegionFactoryPSet = cms.PSet( - ComponentName = cms.string( "TauRegionalPixelSeedGenerator" ), + ComponentName = cms.string( "TauRegionalPixelSeedGenerator" ),#not so nice to depend on RecoTau RegionPSet = cms.PSet( precise = cms.bool( True ), originRadius = cms.double( 0.2 ), @@ -63,6 +67,8 @@ deltaEtaRegion = cms.double( 0.10 ), JetSrc = cms.InputTag( "jetsForCoreTracking" ), vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), + measurementTrackerName = cms.string( "MeasurementTrackerEvent" ), + howToUseMeasurementTracker = cms.double( 1.0 ) )) jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'jetCoreRegionalStepSeedLayers' @@ -103,8 +109,7 @@ maxCand = 50, estimator = cms.string('jetCoreRegionalStepChi2Est'), maxDPhiForLooperReconstruction = cms.double(2.0), - maxPtForLooperReconstruction = cms.double(0.7), -# bestHitOnly=False + maxPtForLooperReconstruction = cms.double(0.7) ) # MAKING OF TRACK CANDIDATES @@ -164,7 +169,7 @@ ) # Final sequence -JetCoreRegionalStep = cms.Sequence(jetsForCoreTracking* +JetCoreRegionalStep = cms.Sequence(iter0TrackRefsForJets*ak4TrackJetsForTrk*jetsForCoreTracking* firstStepPrimaryVertices* firstStepGoodPrimaryVertices* #jetCoreRegionalStepClusters* From f16f901c6c3692beebcf6b3cdd9e1b168a875c2d Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 15 Apr 2014 11:18:27 +0200 Subject: [PATCH 11/30] add validation of jet core step --- Validation/RecoTrack/python/TrackValidation_cff.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Validation/RecoTrack/python/TrackValidation_cff.py b/Validation/RecoTrack/python/TrackValidation_cff.py index 2e71ed5014581..c4818081e6b58 100644 --- a/Validation/RecoTrack/python/TrackValidation_cff.py +++ b/Validation/RecoTrack/python/TrackValidation_cff.py @@ -36,6 +36,9 @@ cutsRecoTracksSixth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() cutsRecoTracksSixth.algorithm=cms.vstring("iter6") +cutsRecoTracksSeventh = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() +cutsRecoTracksSeventh.algorithm=cms.vstring("iter7") + cutsRecoTracksNinth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() cutsRecoTracksNinth.algorithm=cms.vstring("iter9") @@ -74,6 +77,10 @@ cutsRecoTracksSixthHp.algorithm=cms.vstring("iter6") cutsRecoTracksSixthHp.quality=cms.vstring("highPurity") +cutsRecoTracksSeventhHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() +cutsRecoTracksSeventhHp.algorithm=cms.vstring("iter7") +cutsRecoTracksSeventhHp.quality=cms.vstring("highPurity") + cutsRecoTracksNinthHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() cutsRecoTracksNinthHp.algorithm=cms.vstring("iter9") cutsRecoTracksNinthHp.quality=cms.vstring("highPurity") @@ -100,6 +107,8 @@ cms.InputTag("cutsRecoTracksFifthHp"), cms.InputTag("cutsRecoTracksSixth"), cms.InputTag("cutsRecoTracksSixthHp"), + cms.InputTag("cutsRecoTracksSeventh"), + cms.InputTag("cutsRecoTracksSeventhHp"), cms.InputTag("cutsRecoTracksNinth"), cms.InputTag("cutsRecoTracksNinthHp"), cms.InputTag("cutsRecoTracksTenth"), @@ -127,6 +136,8 @@ cutsRecoTracksFifthHp* cutsRecoTracksSixth* cutsRecoTracksSixthHp* + cutsRecoTracksSeventh* + cutsRecoTracksSeventhHp* cutsRecoTracksNinth* cutsRecoTracksNinthHp* cutsRecoTracksTenth* From 3ec04183b7b1bb9fe1d9ecf5501c55ba1b0cc225 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 15 Apr 2014 12:00:50 +0200 Subject: [PATCH 12/30] cleanups --- .../python/JetCoreRegionalStep_cff.py | 82 ++++++++----------- 1 file changed, 32 insertions(+), 50 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 38af85dfac396..d85c6238bcb50 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -1,31 +1,35 @@ import FWCore.ParameterSet.Config as cms +# This step runs over all clusters -# NEW CLUSTERS (remove previously used clusters) -#jetCoreRegionalStepClusters = cms.EDProducer("TrackClusterRemover", -# clusterLessSolution = cms.bool(True), -# oldClusterRemovalInfo = cms.InputTag("lowPtTripletStepClusters"), -# trajectories = cms.InputTag("lowPtTripletStepTracks"), -# overrideTrkQuals = cms.InputTag('lowPtTripletStepSelector','lowPtTripletStep'), -# TrackQuality = cms.string('highPurity'), -# minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0), -# pixelClusters = cms.InputTag("siPixelClusters"), -# stripClusters = cms.InputTag("siStripClusters"), -# Common = cms.PSet( -# maxChi2 = cms.double(9.0) -# ) -#) +# run only if there are high pT jets +from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets +iter0TrackRefsForJets = trackRefsForJets.clone(src = cms.InputTag('initialStepTracks')) +from RecoJets.JetProducers.ak4TrackJets_cfi import ak4TrackJets +ak4TrackJetsForTrk = ak4TrackJets.clone(src = cms.InputTag('iter0TrackRefsForJets'),srcPVs = cms.InputTag('pixelVertices')) +jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4TrackJetsForTrk"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) + +# care only at tracks from main PV +import RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi +firstStepPrimaryVertices=RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi.offlinePrimaryVertices.clone() +firstStepPrimaryVertices.TrackLabel = cms.InputTag("initialStepTracks") +firstStepGoodPrimaryVertices = cms.EDFilter("PrimaryVertexObjectFilter", + filterParams = cms.PSet( + minNdof = cms.double(25.0), + maxZ = cms.double(15.0), + maxRho = cms.double(2.0) + ), + src=cms.InputTag('firstStepPrimaryVertices') +) # SEEDING LAYERS jetCoreRegionalStepSeedLayers = cms.EDProducer("SeedingLayersEDProducer", layerList = cms.vstring('BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3', - 'BPix1+FPix1_pos', 'BPix1+FPix1_neg', - 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', - 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg', - #'BPix2+TIB1', - 'BPix3+TIB1', - #'BPix2+TIB2', - 'BPix3+TIB2'), + 'BPix1+FPix1_pos', 'BPix1+FPix1_neg', + 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', + 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg', + #'BPix2+TIB1','BPix2+TIB2', + 'BPix3+TIB1','BPix3+TIB2'), TIB = cms.PSet( matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"), TTRHBuilder = cms.string('WithTrackAngle') @@ -36,7 +40,7 @@ hitErrorRZ = cms.double(0.006), TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4MixedPairs'), HitProducer = cms.string('siPixelRecHits'), - # skipClusters = cms.InputTag('jetCoreRegionalStepClusters') + #skipClusters = cms.InputTag('jetCoreRegionalStepClusters') ), FPix = cms.PSet( useErrorsFromParam = cms.bool(True), @@ -44,20 +48,15 @@ hitErrorRZ = cms.double(0.0036), TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4MixedPairs'), HitProducer = cms.string('siPixelRecHits'), - # skipClusters = cms.InputTag('jetCoreRegionalStepClusters') + #skipClusters = cms.InputTag('jetCoreRegionalStepClusters') ) ) # SEEDS import RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff jetCoreRegionalStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromPairsWithVertices_cff.globalSeedsFromPairsWithVertices.clone() -from RecoJets.JetProducers.ak4TrackJets_cfi import ak4TrackJets -from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets -iter0TrackRefsForJets = trackRefsForJets.clone(src = cms.InputTag('initialStepTracks')) -ak4TrackJetsForTrk = ak4TrackJets.clone(src = cms.InputTag('iter0TrackRefsForJets'),srcPVs = cms.InputTag('pixelVertices')) -jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4TrackJetsForTrk"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) jetCoreRegionalStepSeeds.RegionFactoryPSet = cms.PSet( - ComponentName = cms.string( "TauRegionalPixelSeedGenerator" ),#not so nice to depend on RecoTau + ComponentName = cms.string( "TauRegionalPixelSeedGenerator" ),#not so nice to depend on RecoTau... RegionPSet = cms.PSet( precise = cms.bool( True ), originRadius = cms.double( 0.2 ), @@ -69,17 +68,16 @@ vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), measurementTrackerName = cms.string( "MeasurementTrackerEvent" ), howToUseMeasurementTracker = cms.double( 1.0 ) - )) - + ) +) jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'jetCoreRegionalStepSeedLayers' - jetCoreRegionalStepSeeds.SeedComparitorPSet = cms.PSet( ComponentName = cms.string('none'), #PixelClusterShapeSeedComparitor'), # FilterAtHelixStage = cms.bool(True), # FilterPixelHits = cms.bool(True), # FilterStripHits = cms.bool(False), - # ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter') +# ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter') ) # QUALITY CUTS DURING TRACK BUILDING @@ -105,7 +103,7 @@ ComponentName = 'jetCoreRegionalStepTrajectoryBuilder', MeasurementTrackerName = '', trajectoryFilterName = 'jetCoreRegionalStepTrajectoryFilter', -# clustersToSkip = cms.InputTag('jetCoreRegionalStepClusters'), + #clustersToSkip = cms.InputTag('jetCoreRegionalStepClusters'), maxCand = 50, estimator = cms.string('jetCoreRegionalStepChi2Est'), maxDPhiForLooperReconstruction = cms.double(2.0), @@ -121,7 +119,6 @@ ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput #numHitsForSeedCleaner = cms.int32(50), #onlyPixelHitsForSeedCleaner = cms.bool(True), - ) @@ -153,21 +150,6 @@ ) #end of vpset ) #end of clone -import RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi -firstStepPrimaryVertices=RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi.offlinePrimaryVertices.clone() -firstStepPrimaryVertices.TrackLabel = cms.InputTag("initialStepTracks") - -firstStepGoodPrimaryVertices = cms.EDFilter( - "PrimaryVertexObjectFilter", - filterParams = cms.PSet( - #pvSrc = cms.InputTag('firstStepPrimaryVertices'),#try to remove this one - minNdof = cms.double(25.0), - maxZ = cms.double(15.0), - maxRho = cms.double(2.0) - ), - src=cms.InputTag('firstStepPrimaryVertices')#why need twice the same src? - ) - # Final sequence JetCoreRegionalStep = cms.Sequence(iter0TrackRefsForJets*ak4TrackJetsForTrk*jetsForCoreTracking* firstStepPrimaryVertices* From a6a6ffd6170c33ed745226cc618f18ccddafa6d7 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 15 Apr 2014 12:01:13 +0200 Subject: [PATCH 13/30] remove clusters from JetCoreRegionalStep --- .../python/DetachedTripletStep_cff.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py b/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py index 71322b6d9af2c..071439954b173 100644 --- a/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py @@ -6,9 +6,24 @@ # REMOVE HITS ASSIGNED TO GOOD TRACKS FROM PREVIOUS ITERATIONS +detachedTripletStepClustersFromJetCore = cms.EDProducer("TrackClusterRemover", + clusterLessSolution = cms.bool(True), + trajectories = cms.InputTag("jetCoreRegionalStepTracks"), + overrideTrkQuals = cms.InputTag('jetCoreRegionalStepSelector','jetCoreRegionalStep'), + TrackQuality = cms.string('highPurity'), + minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0), + pixelClusters = cms.InputTag("siPixelClusters"), + stripClusters = cms.InputTag("siStripClusters"), + doStripChargeCheck = cms.bool(True), + stripRecHits = cms.string('siStripMatchedRecHits'), + Common = cms.PSet( + maxChi2 = cms.double(9.0) + ) +) + detachedTripletStepClusters = cms.EDProducer("TrackClusterRemover", clusterLessSolution = cms.bool(True), - oldClusterRemovalInfo = cms.InputTag("initialStepClusters"), + oldClusterRemovalInfo = cms.InputTag("detachedTripletStepClustersFromJetCore"), trajectories = cms.InputTag("initialStepTracks"), overrideTrkQuals = cms.InputTag('initialStep'), TrackQuality = cms.string('highPurity'), @@ -210,7 +225,8 @@ writeOnlyTrkQuals=cms.bool(True) ) -DetachedTripletStep = cms.Sequence(detachedTripletStepClusters* +DetachedTripletStep = cms.Sequence(detachedTripletStepClustersFromJetCore* + detachedTripletStepClusters* detachedTripletStepSeedLayers* detachedTripletStepSeeds* detachedTripletStepTrackCandidates* From 1d686f695588b284c115d8f9ff3fc9091ffe73cc Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Thu, 24 Apr 2014 18:25:10 +0200 Subject: [PATCH 14/30] Revert "remove clusters from JetCoreRegionalStep" This reverts commit a6a6ffd6170c33ed745226cc618f18ccddafa6d7. --- .../python/DetachedTripletStep_cff.py | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py b/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py index 071439954b173..71322b6d9af2c 100644 --- a/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py +++ b/RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py @@ -6,24 +6,9 @@ # REMOVE HITS ASSIGNED TO GOOD TRACKS FROM PREVIOUS ITERATIONS -detachedTripletStepClustersFromJetCore = cms.EDProducer("TrackClusterRemover", - clusterLessSolution = cms.bool(True), - trajectories = cms.InputTag("jetCoreRegionalStepTracks"), - overrideTrkQuals = cms.InputTag('jetCoreRegionalStepSelector','jetCoreRegionalStep'), - TrackQuality = cms.string('highPurity'), - minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0), - pixelClusters = cms.InputTag("siPixelClusters"), - stripClusters = cms.InputTag("siStripClusters"), - doStripChargeCheck = cms.bool(True), - stripRecHits = cms.string('siStripMatchedRecHits'), - Common = cms.PSet( - maxChi2 = cms.double(9.0) - ) -) - detachedTripletStepClusters = cms.EDProducer("TrackClusterRemover", clusterLessSolution = cms.bool(True), - oldClusterRemovalInfo = cms.InputTag("detachedTripletStepClustersFromJetCore"), + oldClusterRemovalInfo = cms.InputTag("initialStepClusters"), trajectories = cms.InputTag("initialStepTracks"), overrideTrkQuals = cms.InputTag('initialStep'), TrackQuality = cms.string('highPurity'), @@ -225,8 +210,7 @@ writeOnlyTrkQuals=cms.bool(True) ) -DetachedTripletStep = cms.Sequence(detachedTripletStepClustersFromJetCore* - detachedTripletStepClusters* +DetachedTripletStep = cms.Sequence(detachedTripletStepClusters* detachedTripletStepSeedLayers* detachedTripletStepSeeds* detachedTripletStepTrackCandidates* From 7f77092ac74129e7aa98dd875288266074deb0b5 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Thu, 24 Apr 2014 18:28:24 +0200 Subject: [PATCH 15/30] put jetcore step at the end --- RecoTracker/IterativeTracking/python/iterativeTk_cff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/iterativeTk_cff.py b/RecoTracker/IterativeTracking/python/iterativeTk_cff.py index 1300ae1914905..cd0c98e864a57 100644 --- a/RecoTracker/IterativeTracking/python/iterativeTk_cff.py +++ b/RecoTracker/IterativeTracking/python/iterativeTk_cff.py @@ -1,13 +1,13 @@ import FWCore.ParameterSet.Config as cms from RecoTracker.IterativeTracking.InitialStep_cff import * -from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import * from RecoTracker.IterativeTracking.DetachedTripletStep_cff import * from RecoTracker.IterativeTracking.LowPtTripletStep_cff import * from RecoTracker.IterativeTracking.PixelPairStep_cff import * from RecoTracker.IterativeTracking.MixedTripletStep_cff import * from RecoTracker.IterativeTracking.PixelLessStep_cff import * from RecoTracker.IterativeTracking.TobTecStep_cff import * +from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import * from RecoTracker.FinalTrackSelectors.earlyGeneralTracks_cfi import * from RecoTracker.IterativeTracking.MuonSeededStep_cff import * @@ -16,13 +16,13 @@ from RecoTracker.ConversionSeedGenerators.ConversionStep_cff import * iterTracking = cms.Sequence(InitialStep* - JetCoreRegionalStep * DetachedTripletStep* LowPtTripletStep* PixelPairStep* MixedTripletStep* PixelLessStep* TobTecStep* + JetCoreRegionalStep * earlyGeneralTracks* muonSeededStep* preDuplicateMergingGeneralTracks* From 3f6d57ad90cfae71df014cdb5bcd881b5ebcfeb4 Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 12 May 2014 15:26:12 +0200 Subject: [PATCH 16/30] new schema for traj filters --- .../python/JetCoreRegionalStep_cff.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index d85c6238bcb50..3cf00d478b7ad 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -81,14 +81,11 @@ ) # QUALITY CUTS DURING TRACK BUILDING -import TrackingTools.TrajectoryFiltering.TrajectoryFilterESProducer_cfi -jetCoreRegionalStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilterESProducer_cfi.trajectoryFilterESProducer.clone( - ComponentName = 'jetCoreRegionalStepTrajectoryFilter', - filterPset = TrackingTools.TrajectoryFiltering.TrajectoryFilterESProducer_cfi.trajectoryFilterESProducer.filterPset.clone( +import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff +jetCoreRegionalStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone( minimumNumberOfHits = 3, minPt = 0.1 - ) - ) +) import TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi jetCoreRegionalStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi.Chi2MeasurementEstimator.clone( @@ -98,11 +95,10 @@ ) # TRACK BUILDING -import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilderESProducer_cfi -jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilderESProducer_cfi.GroupedCkfTrajectoryBuilder.clone( - ComponentName = 'jetCoreRegionalStepTrajectoryBuilder', +import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi +jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone( MeasurementTrackerName = '', - trajectoryFilterName = 'jetCoreRegionalStepTrajectoryFilter', + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('jetCoreRegionalStepTrajectoryFilter')), #clustersToSkip = cms.InputTag('jetCoreRegionalStepClusters'), maxCand = 50, estimator = cms.string('jetCoreRegionalStepChi2Est'), From 6f58740dddce97d40339be03a56430c40ed0a28d Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 13 May 2014 15:37:08 +0200 Subject: [PATCH 17/30] fix measurementtracker usage --- RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 3cf00d478b7ad..993a1912a0e7a 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -67,7 +67,7 @@ JetSrc = cms.InputTag( "jetsForCoreTracking" ), vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), measurementTrackerName = cms.string( "MeasurementTrackerEvent" ), - howToUseMeasurementTracker = cms.double( 1.0 ) + howToUseMeasurementTracker = cms.double( -1.0 ) ) ) jetCoreRegionalStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'jetCoreRegionalStepSeedLayers' From c799aeba0bcfd828a62db974a4e3120dfedf1ea4 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 14 May 2014 09:03:50 +0200 Subject: [PATCH 18/30] fix cone size and switch to calo jets --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 9 +++++---- .../plugins/SeedFromConsecutiveHitsCreator.cc | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 993a1912a0e7a..f70cef832ae0e 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -5,9 +5,9 @@ # run only if there are high pT jets from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets iter0TrackRefsForJets = trackRefsForJets.clone(src = cms.InputTag('initialStepTracks')) -from RecoJets.JetProducers.ak4TrackJets_cfi import ak4TrackJets -ak4TrackJetsForTrk = ak4TrackJets.clone(src = cms.InputTag('iter0TrackRefsForJets'),srcPVs = cms.InputTag('pixelVertices')) -jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4TrackJetsForTrk"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) +from RecoJets.JetProducers.ak4CaloJets_cfi import ak4CaloJets +ak4CaloJetsForTrk = ak4CaloJets.clone(srcPVs = cms.InputTag('pixelVertices')) +jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4CaloJetsForTrk"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) # care only at tracks from main PV import RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi @@ -65,6 +65,7 @@ deltaPhiRegion = cms.double( 0.10 ), deltaEtaRegion = cms.double( 0.10 ), JetSrc = cms.InputTag( "jetsForCoreTracking" ), +# JetSrc = cms.InputTag( "ak5CaloJets" ), vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), measurementTrackerName = cms.string( "MeasurementTrackerEvent" ), howToUseMeasurementTracker = cms.double( -1.0 ) @@ -147,7 +148,7 @@ ) #end of clone # Final sequence -JetCoreRegionalStep = cms.Sequence(iter0TrackRefsForJets*ak4TrackJetsForTrk*jetsForCoreTracking* +JetCoreRegionalStep = cms.Sequence(iter0TrackRefsForJets*ak4CaloJetsForTrk*jetsForCoreTracking* firstStepPrimaryVertices* firstStepGoodPrimaryVertices* #jetCoreRegionalStepClusters* diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc index f04eb31bf1af0..d29fe5fb6d754 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc @@ -85,8 +85,8 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol C[0][0] = std::max(sin2Theta/sqr(ptMin), minC00); float zErr = vertexErr.czz(); float transverseErr = vertexErr.cxx(); // assume equal cxx cyy - float deltaEta = (etaPhiRegion->etaRange().first-etaPhiRegion->etaRange().first)/2.; - float deltaPhi = (etaPhiRegion->phiMargin().right()-etaPhiRegion->phiMargin().left())/2.; + float deltaEta = (etaPhiRegion->etaRange().first-etaPhiRegion->etaRange().second)/2.; + float deltaPhi = (etaPhiRegion->phiMargin().right()+etaPhiRegion->phiMargin().left())/2.; C[1][1] = deltaEta*deltaEta*4; //2 sigma of what given in input C[2][2] = deltaPhi*deltaPhi*4; C[3][3] = transverseErr; From 2b8de5362a338cd0d2703dda484859c93ab701b9 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 14 May 2014 14:15:40 +0200 Subject: [PATCH 19/30] make track independent caloTowers for caloJets to be used as JetCoreTracking input --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index f70cef832ae0e..60104131e6754 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -6,7 +6,9 @@ from RecoJets.JetProducers.TracksForJets_cff import trackRefsForJets iter0TrackRefsForJets = trackRefsForJets.clone(src = cms.InputTag('initialStepTracks')) from RecoJets.JetProducers.ak4CaloJets_cfi import ak4CaloJets -ak4CaloJetsForTrk = ak4CaloJets.clone(srcPVs = cms.InputTag('pixelVertices')) +from RecoLocalCalo.CaloTowersCreator.calotowermaker_cfi import calotowermaker +caloTowerForTrk = calotowermaker.clone(hbheInput=cms.InputTag('hbheprereco')) +ak4CaloJetsForTrk = ak4CaloJets.clone(srcPVs = cms.InputTag('pixelVertices'), src= cms.InputTag('caloTowerForTrk')) jetsForCoreTracking = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4CaloJetsForTrk"), cut = cms.string("pt > 100 && abs(eta) < 2.5")) # care only at tracks from main PV @@ -148,7 +150,7 @@ ) #end of clone # Final sequence -JetCoreRegionalStep = cms.Sequence(iter0TrackRefsForJets*ak4CaloJetsForTrk*jetsForCoreTracking* +JetCoreRegionalStep = cms.Sequence(iter0TrackRefsForJets*caloTowerForTrk*ak4CaloJetsForTrk*jetsForCoreTracking* firstStepPrimaryVertices* firstStepGoodPrimaryVertices* #jetCoreRegionalStepClusters* From e5b6dcd3cf03b7bae29f7c630a2a462158b498a5 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 14 May 2014 15:05:07 +0200 Subject: [PATCH 20/30] default at 0.2 instead of 0.1 --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index 60104131e6754..fb4b425768962 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -64,8 +64,8 @@ originRadius = cms.double( 0.2 ), ptMin = cms.double( 10. ), originHalfLength = cms.double( 0.2 ), - deltaPhiRegion = cms.double( 0.10 ), - deltaEtaRegion = cms.double( 0.10 ), + deltaPhiRegion = cms.double( 0.20 ), + deltaEtaRegion = cms.double( 0.20 ), JetSrc = cms.InputTag( "jetsForCoreTracking" ), # JetSrc = cms.InputTag( "ak5CaloJets" ), vertexSrc = cms.InputTag( "firstStepGoodPrimaryVertices" ), From be9a89fc4b89c1170ad0f4d6a31ca434319deb2d Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 15 May 2014 09:20:26 +0200 Subject: [PATCH 21/30] add hbheprereco to RECO --- .../Configuration/python/RecoLocalCalo_EventContent_cff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py b/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py index 64f30d8e3afb1..c690097501c6d 100644 --- a/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py +++ b/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py @@ -23,7 +23,8 @@ ) #RECO content RecoLocalCaloRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_hbhereco_*_*', + outputCommands = cms.untracked.vstring('keep *_hbhereco_*_*', + 'keep *_hbheprereco_*_*', 'keep *_hfreco_*_*', 'keep *_horeco_*_*', 'keep HBHERecHitsSorted_hbherecoMB_*_*', From 28012761c6d5a61a6ca5db23452f573eb4487199 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 15 May 2014 16:36:04 +0200 Subject: [PATCH 22/30] consider tracks from iter7 as good as the early steps. Change trackmerger to prefer tracks with more pixel hits --- RecoParticleFlow/PFProducer/src/PFAlgo.cc | 2 ++ RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc | 1 + RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc | 1 + RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc | 1 + RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc | 3 ++- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RecoParticleFlow/PFProducer/src/PFAlgo.cc b/RecoParticleFlow/PFProducer/src/PFAlgo.cc index 34d338ea08982..ab668581d4cc2 100644 --- a/RecoParticleFlow/PFProducer/src/PFAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFAlgo.cc @@ -1939,6 +1939,7 @@ void PFAlgo::processBlock( const reco::PFBlockRef& blockref, case TrackBase::iter2: case TrackBase::iter3: case TrackBase::iter4: + case TrackBase::iter7: blowError = 1.; break; case TrackBase::iter5: @@ -2396,6 +2397,7 @@ void PFAlgo::processBlock( const reco::PFBlockRef& blockref, case TrackBase::iter2: case TrackBase::iter3: case TrackBase::iter4: + case TrackBase::iter7: break; case TrackBase::iter5: case TrackBase::iter6: diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc index 160a44caa56d9..8e87085aed4d2 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc @@ -2515,6 +2515,7 @@ unsigned int PFEGammaAlgo::whichTrackAlgo(const reco::TrackRef& trackRef) { case TrackBase::iter0: case TrackBase::iter1: case TrackBase::iter2: + case TrackBase::iter7: Algo = 0; break; case TrackBase::iter3: diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc b/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc index f1f64a691ff98..f708dfcbce25b 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc @@ -371,6 +371,7 @@ unsigned int PFEGammaFilters::whichTrackAlgo(const reco::TrackRef& trackRef) { case TrackBase::iter0: case TrackBase::iter1: case TrackBase::iter2: + case TrackBase::iter7: Algo = 0; break; case TrackBase::iter3: diff --git a/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc b/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc index f2fc48a120430..bef4ba3fbd27e 100644 --- a/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc +++ b/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc @@ -500,6 +500,7 @@ bool PFElecTkProducer::isFifthStep(reco::PFRecTrackRef pfKfTrack) { case TrackBase::iter0: case TrackBase::iter1: case TrackBase::iter2: + case TrackBase::iter7: Algo = 0; break; case TrackBase::iter3: diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index cee56951efab2..e9d8dbc5a0245 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -336,8 +336,9 @@ namespace cms algo[i]=track->algo(); int validHits=track->numberOfValidHits(); + int validPixelHits=track->hitPattern().numberOfValidPixelHits(); int lostHits=track->numberOfLostHits(); - score[i] = foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2(); + score[i] = foundHitBonus_*validPixelHits+foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2(); rh1[i].reserve(validHits) ; From 4fafdc6377c82628778c95ea9bae7f75f04a1d34 Mon Sep 17 00:00:00 2001 From: Andrea Date: Fri, 16 May 2014 12:16:10 +0200 Subject: [PATCH 23/30] add priority mechanism in track merger --- .../python/earlyGeneralTracks_cfi.py | 1 + .../FinalTrackSelectors/src/TrackListMerger.cc | 12 ++++++++---- .../FinalTrackSelectors/src/TrackListMerger.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py index 43c27b8b64310..ac41e63b0b1bc 100644 --- a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py +++ b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py @@ -11,6 +11,7 @@ cms.InputTag('tobTecStepTracks')), hasSelector=cms.vint32(1,1,1,1,1,1,1,1), indivShareFrac=cms.vdouble(1.0,0.19,0.16,0.19,0.13,0.11,0.11,0.09),#using 0.19 for jetCoreRegionalStep? + priorities=cms.vdouble(1,0.5,1,1,1,1,1,1), selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStep"), cms.InputTag("jetCoreRegionalStepSelector","jetCoreRegionalStep"), cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"), diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index e9d8dbc5a0245..5e827ce99a3eb 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -122,6 +122,7 @@ namespace cms foundHitBonus_ = conf.getParameter("FoundHitBonus"); lostHitPenalty_ = conf.getParameter("LostHitPenalty"); indivShareFrac_=conf.getParameter >("indivShareFrac"); + priority_=conf.getParameter >("priorities"); std::string qualityStr = conf.getParameter("newQuality"); if (qualityStr != "") { @@ -161,6 +162,10 @@ namespace cms // edm::LogWarning("TrackListMerger") << "No indivShareFrac for " << trackProducersTags <<". Using default value of 1"; indivShareFrac_.push_back(1.0); } + for (unsigned int i = priority_.size(); i < numTrkColl; i++) { + // edm::LogWarning("TrackListMerger") << "No priorty for " << trackProducersTags <<". Using default value of 1"; + priority_.push_back(1.0); + } trkQualMod_=conf.getParameter("writeOnlyTrkQuals"); if ( trkQualMod_) { @@ -336,9 +341,8 @@ namespace cms algo[i]=track->algo(); int validHits=track->numberOfValidHits(); - int validPixelHits=track->hitPattern().numberOfValidPixelHits(); int lostHits=track->numberOfLostHits(); - score[i] = foundHitBonus_*validPixelHits+foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2(); + score[i] = foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2(); rh1[i].reserve(validHits) ; @@ -450,11 +454,11 @@ namespace cms if ( dupfound ) { float score2 = score[k2]; constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score - if ( score1 - score2 > almostSame ) { + if (priority_[collNum] > priority_[collNum2] || score1 - score2 > almostSame ) { selected[j]=0; selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[i]=true; - } else if ( score2 - score1 > almostSame ) { + } else if (priority_[collNum] < priority_[collNum2] || score2 - score1 > almostSame ) { selected[i]=0; selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[j]=true; diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h index 5732a6da1aa80..e879014dc8262 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h @@ -91,6 +91,7 @@ namespace cms float foundHitBonus_; float lostHitPenalty_; std::vector indivShareFrac_; + std::vector priority_; std::vector< std::vector< int> > listsToMerge_; std::vector promoteQuality_; From fdb4eb4ff8b7595f628582acc258ea50ac2acfe2 Mon Sep 17 00:00:00 2001 From: Andrea Date: Fri, 16 May 2014 12:19:38 +0200 Subject: [PATCH 24/30] add priority mechanism in track merger --- RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index 5e827ce99a3eb..6408e3fe1a14c 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -122,7 +122,9 @@ namespace cms foundHitBonus_ = conf.getParameter("FoundHitBonus"); lostHitPenalty_ = conf.getParameter("LostHitPenalty"); indivShareFrac_=conf.getParameter >("indivShareFrac"); - priority_=conf.getParameter >("priorities"); + if(conf.exists("priorities")){ + priority_=conf.getParameter >("priorities"); + } std::string qualityStr = conf.getParameter("newQuality"); if (qualityStr != "") { From 55f1b905bc161531d6479b8fa7454896ce24c312 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sun, 18 May 2014 10:07:29 +0200 Subject: [PATCH 25/30] fix proiority logic --- .../FinalTrackSelectors/src/TrackListMerger.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index 6408e3fe1a14c..08fcd531f144e 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -455,12 +455,21 @@ namespace cms if ( dupfound ) { float score2 = score[k2]; - constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score - if (priority_[collNum] > priority_[collNum2] || score1 - score2 > almostSame ) { + constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score]} + + if (priority_[collNum] > priority_[collNum2] ) { + selected[j]=0; + selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1 + trkUpdated[i]=true; + } else if (priority_[collNum] < priority_[collNum2] ) { + selected[i]=0; + selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1 + trkUpdated[j]=true; + }else if (score1 - score2 > almostSame ) { selected[j]=0; selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[i]=true; - } else if (priority_[collNum] < priority_[collNum2] || score2 - score1 > almostSame ) { + } else if (score2 - score1 > almostSame ) { selected[i]=0; selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[j]=true; From 46e5710e46ae23f65aac010e8e5fef6bb4d97e22 Mon Sep 17 00:00:00 2001 From: Marco Rovere Date: Wed, 4 Jun 2014 21:35:22 +0200 Subject: [PATCH 26/30] Add a boolean flag, with false as default if missing from the config, to tell SeedFromConsecutiveHitsCreator to recompute the initial seed kinematic taking into account the direction of the possible eta-phi region used to limit the seeding area --- .../python/JetCoreRegionalStep_cff.py | 1 + .../plugins/SeedFromConsecutiveHitsCreator.cc | 2 +- .../plugins/SeedFromConsecutiveHitsCreator.h | 54 ++++++++++--------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index fb4b425768962..aae2cf2ba49dc 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -82,6 +82,7 @@ # FilterStripHits = cms.bool(False), # ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter') ) +jetCoreRegionalStepSeeds.SeedCreatorPSet.forceKinematicWithRegionDirection = cms.bool( True ) # QUALITY CUTS DURING TRACK BUILDING import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc index a2a894bec18c5..ef668dceb8c1f 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.cc @@ -64,7 +64,7 @@ void SeedFromConsecutiveHitsCreator::makeSeed(TrajectorySeedCollection & seedCol CurvilinearTrajectoryError error = initialError(sin2Theta); FreeTrajectoryState fts(kine, error); - if(region->direction().x()!=0) // a direction was given, check if it is an etaPhi region + if(region->direction().x()!=0 && forceKinematicWithRegionDirection_) // a direction was given, check if it is an etaPhi region { const RectangularEtaPhiTrackingRegion * etaPhiRegion = dynamic_cast(region); if(etaPhiRegion) { diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.h b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.h index a4b497795c2d1..b3847924dccbf 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.h +++ b/RecoTracker/TkSeedGenerator/plugins/SeedFromConsecutiveHitsCreator.h @@ -22,33 +22,36 @@ class SeedFromConsecutiveHitsCreator : public SeedCreator { public: SeedFromConsecutiveHitsCreator( const edm::ParameterSet & cfg) - : thePropagatorLabel (cfg.getParameter("propagator")) - , theBOFFMomentum (cfg.existsAs("SeedMomentumForBOFF") ? cfg.getParameter("SeedMomentumForBOFF") : 5.0) - , theOriginTransverseErrorMultiplier(cfg.existsAs("OriginTransverseErrorMultiplier") ? cfg.getParameter("OriginTransverseErrorMultiplier") : 1.0) - , theMinOneOverPtError (cfg.existsAs("MinOneOverPtError") ? cfg.getParameter("MinOneOverPtError") : 1.0) - , TTRHBuilder (cfg.existsAs("TTRHBuilder") ? cfg.getParameter("TTRHBuilder") : std::string("WithTrackAngle")) + : thePropagatorLabel (cfg.getParameter("propagator")) + , theBOFFMomentum (cfg.existsAs("SeedMomentumForBOFF") ? cfg.getParameter("SeedMomentumForBOFF") : 5.0) + , theOriginTransverseErrorMultiplier(cfg.existsAs("OriginTransverseErrorMultiplier") ? cfg.getParameter("OriginTransverseErrorMultiplier") : 1.0) + , theMinOneOverPtError (cfg.existsAs("MinOneOverPtError") ? cfg.getParameter("MinOneOverPtError") : 1.0) + , TTRHBuilder (cfg.existsAs("TTRHBuilder") ? cfg.getParameter("TTRHBuilder") : std::string("WithTrackAngle")) // 2014/02/11 mia: // we should get rid of the boolean parameter useSimpleMF, // and use only a string magneticField [instead of SimpleMagneticField] // or better an edm::ESInputTag (at the moment HLT does not handle ESInputTag) - , useSimpleMF_(false) - , mfName_("") - { + , useSimpleMF_(false) + , mfName_("") + , forceKinematicWithRegionDirection_(cfg.existsAs("forceKinematicWithRegionDirection") ? cfg.getParameter("forceKinematicWithRegionDirection") : false) + { if (cfg.exists("SimpleMagneticField")) { useSimpleMF_ = true; mfName_ = cfg.getParameter("SimpleMagneticField"); } } - SeedFromConsecutiveHitsCreator( - const std::string & propagator = "PropagatorWithMaterial", double seedMomentumForBOFF = -5.0, - double aOriginTransverseErrorMultiplier = 1.0, double aMinOneOverPtError = 1.0, const std::string & bname="WithTrackAngle") - : thePropagatorLabel(propagator) - , theBOFFMomentum(seedMomentumForBOFF) - , theOriginTransverseErrorMultiplier(aOriginTransverseErrorMultiplier) - , theMinOneOverPtError(aMinOneOverPtError) - , TTRHBuilder(bname) - , useSimpleMF_(false) { } + SeedFromConsecutiveHitsCreator( + const std::string & propagator = "PropagatorWithMaterial", double seedMomentumForBOFF = -5.0, + double aOriginTransverseErrorMultiplier = 1.0, double aMinOneOverPtError = 1.0, const std::string & bname="WithTrackAngle") + : thePropagatorLabel(propagator) + , theBOFFMomentum(seedMomentumForBOFF) + , theOriginTransverseErrorMultiplier(aOriginTransverseErrorMultiplier) + , theMinOneOverPtError(aMinOneOverPtError) + , TTRHBuilder(bname) + , useSimpleMF_(false) + , forceKinematicWithRegionDirection_(false) + { } //dtor virtual ~SeedFromConsecutiveHitsCreator(); @@ -58,7 +61,7 @@ class SeedFromConsecutiveHitsCreator : public SeedCreator { const edm::EventSetup& es, const SeedComparitor *filter) GCC11_FINAL; - // make job + // make job // fill seedCollection with the "TrajectorySeed" virtual void makeSeed(TrajectorySeedCollection & seedCollection, const SeedingHitSet & hits) GCC11_FINAL; @@ -72,17 +75,17 @@ class SeedFromConsecutiveHitsCreator : public SeedCreator { bool checkHit( const TrajectoryStateOnSurface &tsos, - SeedingHitSet::ConstRecHitPointer hit) const dso_hidden; + SeedingHitSet::ConstRecHitPointer hit) const dso_hidden; + - CurvilinearTrajectoryError initialError(float sin2Theta) const dso_hidden; - + void buildSeed(TrajectorySeedCollection & seedCollection, const SeedingHitSet & hits, const FreeTrajectoryState & fts) const dso_hidden; - SeedingHitSet::RecHitPointer - refitHit(SeedingHitSet::ConstRecHitPointer hit, + SeedingHitSet::RecHitPointer + refitHit(SeedingHitSet::ConstRecHitPointer hit, const TrajectoryStateOnSurface & state) const dso_hidden; protected: @@ -91,7 +94,7 @@ class SeedFromConsecutiveHitsCreator : public SeedCreator { double theBOFFMomentum; double theOriginTransverseErrorMultiplier; double theMinOneOverPtError; - + const TrackingRegion * region = nullptr; const SeedComparitor *filter = nullptr; edm::ESHandle tracker; @@ -102,9 +105,10 @@ class SeedFromConsecutiveHitsCreator : public SeedCreator { std::string TTRHBuilder; bool useSimpleMF_; std::string mfName_; + bool forceKinematicWithRegionDirection_; TkClonerImpl cloner; }; -#endif +#endif From 0923ef2726fcb634e4ae291ffe7a1d4d76138e2d Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Sun, 8 Jun 2014 18:35:34 +0200 Subject: [PATCH 27/30] Revert "fix proiority logic" This reverts commit 55f1b905bc161531d6479b8fa7454896ce24c312. --- .../FinalTrackSelectors/src/TrackListMerger.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index 08fcd531f144e..6408e3fe1a14c 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -455,21 +455,12 @@ namespace cms if ( dupfound ) { float score2 = score[k2]; - constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score]} - - if (priority_[collNum] > priority_[collNum2] ) { - selected[j]=0; - selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1 - trkUpdated[i]=true; - } else if (priority_[collNum] < priority_[collNum2] ) { - selected[i]=0; - selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1 - trkUpdated[j]=true; - }else if (score1 - score2 > almostSame ) { + constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score + if (priority_[collNum] > priority_[collNum2] || score1 - score2 > almostSame ) { selected[j]=0; selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[i]=true; - } else if (score2 - score1 > almostSame ) { + } else if (priority_[collNum] < priority_[collNum2] || score2 - score1 > almostSame ) { selected[i]=0; selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[j]=true; From 6f169866028929a620c1694da236517c4cb1af2b Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Sun, 8 Jun 2014 18:35:37 +0200 Subject: [PATCH 28/30] Revert "add priority mechanism in track merger" This reverts commit fdb4eb4ff8b7595f628582acc258ea50ac2acfe2. --- RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index 6408e3fe1a14c..5e827ce99a3eb 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -122,9 +122,7 @@ namespace cms foundHitBonus_ = conf.getParameter("FoundHitBonus"); lostHitPenalty_ = conf.getParameter("LostHitPenalty"); indivShareFrac_=conf.getParameter >("indivShareFrac"); - if(conf.exists("priorities")){ - priority_=conf.getParameter >("priorities"); - } + priority_=conf.getParameter >("priorities"); std::string qualityStr = conf.getParameter("newQuality"); if (qualityStr != "") { From 4c7a4e36660d7181b337b97017d2a9b354c70ecc Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Sun, 8 Jun 2014 18:35:40 +0200 Subject: [PATCH 29/30] Revert "add priority mechanism in track merger" This reverts commit 4fafdc6377c82628778c95ea9bae7f75f04a1d34. --- .../python/earlyGeneralTracks_cfi.py | 1 - .../FinalTrackSelectors/src/TrackListMerger.cc | 12 ++++-------- .../FinalTrackSelectors/src/TrackListMerger.h | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py index ac41e63b0b1bc..43c27b8b64310 100644 --- a/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py +++ b/RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py @@ -11,7 +11,6 @@ cms.InputTag('tobTecStepTracks')), hasSelector=cms.vint32(1,1,1,1,1,1,1,1), indivShareFrac=cms.vdouble(1.0,0.19,0.16,0.19,0.13,0.11,0.11,0.09),#using 0.19 for jetCoreRegionalStep? - priorities=cms.vdouble(1,0.5,1,1,1,1,1,1), selectedTrackQuals = cms.VInputTag(cms.InputTag("initialStep"), cms.InputTag("jetCoreRegionalStepSelector","jetCoreRegionalStep"), cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"), diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc index 5e827ce99a3eb..e9d8dbc5a0245 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.cc @@ -122,7 +122,6 @@ namespace cms foundHitBonus_ = conf.getParameter("FoundHitBonus"); lostHitPenalty_ = conf.getParameter("LostHitPenalty"); indivShareFrac_=conf.getParameter >("indivShareFrac"); - priority_=conf.getParameter >("priorities"); std::string qualityStr = conf.getParameter("newQuality"); if (qualityStr != "") { @@ -162,10 +161,6 @@ namespace cms // edm::LogWarning("TrackListMerger") << "No indivShareFrac for " << trackProducersTags <<". Using default value of 1"; indivShareFrac_.push_back(1.0); } - for (unsigned int i = priority_.size(); i < numTrkColl; i++) { - // edm::LogWarning("TrackListMerger") << "No priorty for " << trackProducersTags <<". Using default value of 1"; - priority_.push_back(1.0); - } trkQualMod_=conf.getParameter("writeOnlyTrkQuals"); if ( trkQualMod_) { @@ -341,8 +336,9 @@ namespace cms algo[i]=track->algo(); int validHits=track->numberOfValidHits(); + int validPixelHits=track->hitPattern().numberOfValidPixelHits(); int lostHits=track->numberOfLostHits(); - score[i] = foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2(); + score[i] = foundHitBonus_*validPixelHits+foundHitBonus_*validHits - lostHitPenalty_*lostHits - track->chi2(); rh1[i].reserve(validHits) ; @@ -454,11 +450,11 @@ namespace cms if ( dupfound ) { float score2 = score[k2]; constexpr float almostSame = 0.01f; // difference rather than ratio due to possible negative values for score - if (priority_[collNum] > priority_[collNum2] || score1 - score2 > almostSame ) { + if ( score1 - score2 > almostSame ) { selected[j]=0; selected[i]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[i]=true; - } else if (priority_[collNum] < priority_[collNum2] || score2 - score1 > almostSame ) { + } else if ( score2 - score1 > almostSame ) { selected[i]=0; selected[j]=10+newQualityMask; // add 10 to avoid the case where mask = 1 trkUpdated[j]=true; diff --git a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h index e879014dc8262..5732a6da1aa80 100644 --- a/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h +++ b/RecoTracker/FinalTrackSelectors/src/TrackListMerger.h @@ -91,7 +91,6 @@ namespace cms float foundHitBonus_; float lostHitPenalty_; std::vector indivShareFrac_; - std::vector priority_; std::vector< std::vector< int> > listsToMerge_; std::vector promoteQuality_; From f7e6c674989ff399a2b604c3d9e0c7991bca018c Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 10 Jun 2014 18:19:35 +0200 Subject: [PATCH 30/30] fix TrajectoryBuilderPSet --- .../IterativeTracking/python/JetCoreRegionalStep_cff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py index aae2cf2ba49dc..aafaa4ae0ee48 100644 --- a/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py +++ b/RecoTracker/IterativeTracking/python/JetCoreRegionalStep_cff.py @@ -114,8 +114,9 @@ import RecoTracker.CkfPattern.CkfTrackCandidates_cfi jetCoreRegionalStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone( src = cms.InputTag('jetCoreRegionalStepSeeds'), - TrajectoryBuilder = 'jetCoreRegionalStepTrajectoryBuilder', maxSeedsBeforeCleaning = cms.uint32(10000), + TrajectoryBuilderPSet = cms.PSet( refToPSet_ = cms.string('jetCoreRegionalStepTrajectoryBuilder')), + NavigationSchool = cms.string('SimpleNavigationSchool'), ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput #numHitsForSeedCleaner = cms.int32(50), #onlyPixelHitsForSeedCleaner = cms.bool(True),