Skip to content

Commit

Permalink
Introduce procModifier for parabolic magnetic field in track building…
Browse files Browse the repository at this point in the history
…, for default iterative tracking
  • Loading branch information
mmasciov committed May 5, 2023
1 parent b0b0e73 commit 1e4d158
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FWCore.ParameterSet.Config as cms

# This modifier removes the looper tracks reconstruction
trackingParabolicMf = cms.Modifier()
4 changes: 4 additions & 0 deletions RecoTracker/CkfPattern/python/CkfTrackCandidates_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
TrajectoryBuilderPSet = dict(refToPSet_ = cms.string('GroupedCkfTrajectoryBuilder')),
maxSeedsBeforeCleaning = 5000,
)

ckfTrackCandidatesIterativeDefault = ckfTrackCandidates.clone(
TrajectoryBuilderPSet = dict(refToPSet_ = cms.string('GroupedCkfTrajectoryBuilderIterativeDefault')),
)
13 changes: 12 additions & 1 deletion RecoTracker/CkfPattern/python/CkfTrajectories_cfi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import FWCore.ParameterSet.Config as cms

# for parabolic magnetic field
from Configuration.ProcessModifiers.trackingParabolicMf_cff import trackingParabolicMf

#
# This cfi should be included to run the CkfTrajectoryMaker
#
Expand Down Expand Up @@ -32,4 +35,12 @@
MeasurementTrackerEvent = cms.InputTag("MeasurementTrackerEvent")
)


ckfTrajectoriesIterativeDefault = ckfTrajectories.clone(
TrajectoryBuilder = cms.string('GroupedCkfTrajectoryBuilderIterativeDefault'),
TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('GroupedCkfTrajectoryBuilderIterativeDefault')),
)
trackingParabolicMf.toModify(ckfTrajectoriesIterativeDefault,
NavigationSchool='SimpleNavigationSchoolParabolicMf')
trackingParabolicMf.toModify(ckfTrajectoriesIterativeDefault.TransientInitialStateEstimatorParameters,
propagatorAlongTISE ='PropagatorWithMaterialParabolicMf',
propagatorOppositeTISE='PropagatorWithMaterialParabolicMfOpposite')
8 changes: 7 additions & 1 deletion RecoTracker/CkfPattern/python/CkfTrajectoryBuilder_cfi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import FWCore.ParameterSet.Config as cms

#for parabolic magnetic field
from Configuration.ProcessModifiers.trackingParabolicMf_cff import trackingParabolicMf

#to resolve the refToPSet_
from TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff import CkfBaseTrajectoryFilter_block

Expand All @@ -21,4 +24,7 @@
seedAs5DHit = cms.bool(False)
)


CkfTrajectoryBuilderIterativeDefault = CkfTrajectoryBuilder.clone()
trackingParabolicMf.toModify(CkfTrajectoryBuilderIterativeDefault,
propagatorAlong = 'PropagatorWithMaterialParabolicMf',
propagatorOpposite = 'PropagatorWithMaterialParabolicMfOpposite')
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import FWCore.ParameterSet.Config as cms

# for parabolic magnetic field
from Configuration.ProcessModifiers.trackingParabolicMf_cff import trackingParabolicMf

# to resolve the refToPSet_
from TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff import CkfBaseTrajectoryFilter_block

Expand Down Expand Up @@ -41,3 +44,8 @@
maxPtForLooperReconstruction = cms.double(0.),
maxDPhiForLooperReconstruction = cms.double(2.),
)

GroupedCkfTrajectoryBuilderIterativeDefault = GroupedCkfTrajectoryBuilder.clone()
trackingParabolicMf.toModify(GroupedCkfTrajectoryBuilderIterativeDefault,
propagatorAlong='PropagatorWithMaterialParabolicMf',
propagatorOpposite='PropagatorWithMaterialParabolicMfOpposite')
8 changes: 4 additions & 4 deletions RecoTracker/IterativeTracking/python/DetachedQuadStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
from Configuration.Eras.Modifier_fastSim_cff import fastSim

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -150,7 +150,7 @@

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
detachedQuadStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
detachedQuadStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'detachedQuadStepTrajectoryFilter'),
maxCand = 3,
alwaysUseInvalidHits = True,
Expand All @@ -174,7 +174,7 @@
)

import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
detachedQuadStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
detachedQuadStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'detachedQuadStepSeeds',
clustersToSkip = 'detachedQuadStepClusters',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
Expand All @@ -183,7 +183,7 @@
TrajectoryBuilderPSet = dict(refToPSet_ = 'detachedQuadStepTrajectoryBuilder'),
TrajectoryCleaner = 'detachedQuadStepTrajectoryCleanerBySharedHits',
doSeedingRegionRebuilding = True,
useHitsSplitting = True
useHitsSplitting = True,
)
trackingPhase2PU140.toModify(detachedQuadStepTrackCandidates,
clustersToSkip = '',
Expand Down
12 changes: 5 additions & 7 deletions RecoTracker/IterativeTracking/python/DetachedTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 as _tracker_apv_vfp30_2016
import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg

#for fastsim
# for fastsim
from Configuration.Eras.Modifier_fastSim_cff import fastSim
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -181,7 +181,7 @@

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
detachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
detachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'detachedTripletStepTrajectoryFilter'),
maxCand = 3,
alwaysUseInvalidHits = True,
Expand All @@ -199,15 +199,15 @@
# MAKING OF TRACK CANDIDATES
import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
# Give handle for CKF for HI
_detachedTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
_detachedTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'detachedTripletStepSeeds',
clustersToSkip = 'detachedTripletStepClusters',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
numHitsForSeedCleaner = 50,
onlyPixelHitsForSeedCleaner = True,
TrajectoryBuilderPSet = dict(refToPSet_ = 'detachedTripletStepTrajectoryBuilder'),
doSeedingRegionRebuilding = True,
useHitsSplitting = True
useHitsSplitting = True,
)
detachedTripletStepTrackCandidates = _detachedTripletStepTrackCandidatesCkf.clone()

Expand Down Expand Up @@ -263,8 +263,6 @@
fastSim.toModify(detachedTripletStepTracks,TTRHBuilder = 'WithoutRefit')

# TRACK SELECTION AND QUALITY FLAG SETTING.


from RecoTracker.FinalTrackSelectors.TrackMVAClassifierPrompt_cfi import *
from RecoTracker.FinalTrackSelectors.TrackMVAClassifierDetached_cfi import *
detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
Expand Down
10 changes: 5 additions & 5 deletions RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
from Configuration.Eras.Modifier_fastSim_cff import fastSim

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -189,15 +189,15 @@

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi as _GroupedCkfTrajectoryBuilder_cfi
highPtTripletStepTrajectoryBuilder = _GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
highPtTripletStepTrajectoryBuilder = _GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'highPtTripletStepTrajectoryFilter'),
alwaysUseInvalidHits = True,
maxCand = 3,
estimator = 'highPtTripletStepChi2Est',
maxDPhiForLooperReconstruction = 2.0,
# 0.63 GeV is the maximum pT for a charged particle to loop within the 1.1m radius
# of the outermost Tracker barrel layer (with B=3.8T)
maxPtForLooperReconstruction = 0.7
maxPtForLooperReconstruction = 0.7,
)
trackingNoLoopers.toModify(highPtTripletStepTrajectoryBuilder,
maxPtForLooperReconstruction = 0.0)
Expand All @@ -209,15 +209,15 @@

# MAKING OF TRACK CANDIDATES
import RecoTracker.CkfPattern.CkfTrackCandidates_cfi as _CkfTrackCandidates_cfi
highPtTripletStepTrackCandidates = _CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
highPtTripletStepTrackCandidates = _CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'highPtTripletStepSeeds',
clustersToSkip = 'highPtTripletStepClusters',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
numHitsForSeedCleaner = 50,
onlyPixelHitsForSeedCleaner = True,
TrajectoryBuilderPSet = dict(refToPSet_ = 'highPtTripletStepTrajectoryBuilder'),
doSeedingRegionRebuilding = True,
useHitsSplitting = True
useHitsSplitting = True,
)

from Configuration.ProcessModifiers.trackingMkFitHighPtTripletStep_cff import trackingMkFitHighPtTripletStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,24 @@
)

import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'initialStepTrajectoryFilterPreSplitting'),
alwaysUseInvalidHits = True,
maxCand = 3,
estimator = 'initialStepChi2Est',
)

import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'initialStepSeedsPreSplitting',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
numHitsForSeedCleaner = 50,
onlyPixelHitsForSeedCleaner = True,
TrajectoryBuilderPSet = dict(refToPSet_ = 'initialStepTrajectoryBuilderPreSplitting'),
doSeedingRegionRebuilding = True,
useHitsSplitting = True,
MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting',
)
initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'

from Configuration.ProcessModifiers.trackingMkFitInitialStepPreSplitting_cff import trackingMkFitInitialStepPreSplitting
from RecoTracker.MkFit.mkFitGeometryESProducer_cfi import mkFitGeometryESProducer
Expand Down
6 changes: 3 additions & 3 deletions RecoTracker/IterativeTracking/python/InitialStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 as _tracker_apv_vfp30_2016
from Configuration.Eras.Modifier_fastSim_cff import fastSim

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -197,7 +197,7 @@


import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
initialStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
initialStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'initialStepTrajectoryFilter'),
alwaysUseInvalidHits = True,
maxCand = 3,
Expand All @@ -219,7 +219,7 @@

import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
# Give handle for CKF for HI
_initialStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
_initialStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'initialStepSeeds',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
numHitsForSeedCleaner = 50,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FWCore.ParameterSet.Config as cms

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -147,7 +147,7 @@
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
#need to also load the refToPSet_ used by GroupedCkfTrajectoryBuilder
CkfBaseTrajectoryFilter_block = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.CkfBaseTrajectoryFilter_block
jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'jetCoreRegionalStepTrajectoryFilter'),
maxCand = 50,
estimator = 'jetCoreRegionalStepChi2Est',
Expand All @@ -156,7 +156,7 @@
)
trackingNoLoopers.toModify(jetCoreRegionalStepTrajectoryBuilder,
maxPtForLooperReconstruction = 0.0)
jetCoreRegionalStepBarrelTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
jetCoreRegionalStepBarrelTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'jetCoreRegionalStepBarrelTrajectoryFilter'),
maxCand = 50,
estimator = 'jetCoreRegionalStepChi2Est',
Expand Down Expand Up @@ -191,7 +191,7 @@

# MAKING OF TRACK CANDIDATES
import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
jetCoreRegionalStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
jetCoreRegionalStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'jetCoreRegionalStepSeeds',
maxSeedsBeforeCleaning = 10000,
TrajectoryBuilderPSet = dict(refToPSet_ = 'jetCoreRegionalStepTrajectoryBuilder'),
Expand Down Expand Up @@ -231,7 +231,6 @@
src = 'jetCoreRegionalStepEndcapTrackCandidates',
)


from Configuration.Eras.Modifier_fastSim_cff import fastSim
import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
_fastSim_jetCoreRegionalStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
Expand Down
6 changes: 3 additions & 3 deletions RecoTracker/IterativeTracking/python/LowPtQuadStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
from Configuration.Eras.Modifier_fastSim_cff import fastSim

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -137,7 +137,7 @@

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
lowPtQuadStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
lowPtQuadStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'lowPtQuadStepTrajectoryFilter'),
maxCand = 4,
estimator = 'lowPtQuadStepChi2Est',
Expand All @@ -164,7 +164,7 @@
trackingPhase2PU140.toModify(lowPtQuadStepTrajectoryCleanerBySharedHits, fractionShared = 0.09)

import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
lowPtQuadStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
lowPtQuadStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'lowPtQuadStepSeeds',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
numHitsForSeedCleaner = 50,
Expand Down
7 changes: 3 additions & 4 deletions RecoTracker/IterativeTracking/python/LowPtTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
from Configuration.Eras.Modifier_fastSim_cff import fastSim

#for dnn classifier
# for dnn classifier
from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary

Expand Down Expand Up @@ -209,7 +209,7 @@

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
lowPtTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
lowPtTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
trajectoryFilter = dict(refToPSet_ = 'lowPtTripletStepTrajectoryFilter'),
maxCand = 4,
estimator = 'lowPtTripletStepChi2Est',
Expand All @@ -230,7 +230,7 @@
# MAKING OF TRACK CANDIDATES
import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
# Give handle for CKF for HI
_lowPtTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
_lowPtTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
src = 'lowPtTripletStepSeeds',
### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
numHitsForSeedCleaner = 50,
Expand All @@ -242,7 +242,6 @@
TrajectoryCleaner = 'lowPtTripletStepTrajectoryCleanerBySharedHits',
)
lowPtTripletStepTrackCandidates = _lowPtTripletStepTrackCandidatesCkf.clone()

trackingPhase2PU140.toModify(lowPtTripletStepTrackCandidates,
clustersToSkip = '',
phase2clustersToSkip = 'lowPtTripletStepClusters'
Expand Down
Loading

0 comments on commit 1e4d158

Please sign in to comment.