Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate 2017 tracking to eras #13477

Merged
merged 4 commits into from
Mar 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions RecoMuon/Configuration/python/DisplacedMuonSeededStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

###### Muon reconstruction module #####
from RecoMuon.MuonIdentification.earlyMuons_cfi import earlyDisplacedMuons
from RecoTracker.IterativeTracking.MuonSeededStep_cff import *

###### SEEDER MODELS ######
#for displaced global muons
import RecoTracker.SpecialSeedGenerators.outInSeedsFromStandaloneMuons_cfi
muonSeededSeedsOutInDisplaced = RecoTracker.SpecialSeedGenerators.outInSeedsFromStandaloneMuons_cfi.outInSeedsFromStandaloneMuons.clone(
src = "earlyDisplacedMuons",
)
muonSeededSeedsOutInDisplaced.fromVertex = cms.bool(False)
###------------- MeasurementEstimator, defining the searcgh window for pattern recongnition ----------------
#for displaced global muons
import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi
muonSeededMeasurementEstimatorForOutInDisplaced = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
ComponentName = cms.string('muonSeededMeasurementEstimatorForOutInDisplaced'),
MaxChi2 = cms.double(30.0), ## was 30 ## TO BE TUNED
Expand All @@ -20,7 +21,8 @@

###------------- TrajectoryFilter, defining selections on the trajectories while building them ----------------
#for displaced global muons
muonSeededTrajectoryFilterForOutInDisplaced = muonSeededTrajectoryFilterForInOut.clone()
import RecoTracker.IterativeTracking.MuonSeededStep_cff
muonSeededTrajectoryFilterForOutInDisplaced = RecoTracker.IterativeTracking.MuonSeededStep_cff.muonSeededTrajectoryFilterForInOut.clone()
muonSeededTrajectoryFilterForOutInDisplaced.constantValueForLostHitsFractionFilter = 10 ## allow more lost hits
muonSeededTrajectoryFilterForOutInDisplaced.minimumNumberOfHits = 5 ## allow more lost hits
###------------- TrajectoryBuilders ----------------
Expand Down Expand Up @@ -55,19 +57,19 @@
)

#for displaced global muons
muonSeededTracksOutInDisplacedClassifier = muonSeededTracksOutInClassifier.clone()
muonSeededTracksOutInDisplacedClassifier = RecoTracker.IterativeTracking.MuonSeededStep_cff.muonSeededTracksOutInClassifier.clone()
muonSeededTracksOutInDisplacedClassifier.src='muonSeededTracksOutInDisplaced'


#for displaced global muons
muonSeededStepCoreDisplaced = cms.Sequence(
muonSeededSeedsInOut + muonSeededTrackCandidatesInOut + muonSeededTracksInOut +
cms.SequencePlaceholder("muonSeededStepCoreInOut") +
muonSeededSeedsOutInDisplaced + muonSeededTrackCandidatesOutInDisplaced + muonSeededTracksOutInDisplaced
)

#for displaced global muons
muonSeededStepExtraDisplaced = cms.Sequence(
muonSeededTracksInOutClassifier +
cms.SequencePlaceholder("muonSeededStepExtraInOut") +
muonSeededTracksOutInDisplacedClassifier
)
#for displaced global muons
Expand All @@ -85,5 +87,5 @@
#for displaced global muons
muonSeededStepDebugDisplaced = cms.Sequence(
muonSeededSeedsOutInDisplacedAsTracks + muonSeededTrackCandidatesOutInDisplacedAsTracks +
muonSeededSeedsInOutAsTracks + muonSeededTrackCandidatesInOutAsTracks
cms.SequencePlaceholder("muonSeededStepDebugInOut")
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
useInnermostState = cms.bool(True),
ttrhBuilderName = cms.string("WithAngleAndTemplate")
)
# This customization will be removed once we get the templates for
# phase1 pixel
from Configuration.StandardSequences.Eras import eras
eras.phase1Pixel.toModify(duplicateDisplacedTrackCandidates, ttrhBuilderName = "WithTrackAngle") # FIXME
#for displaced global muons
mergedDuplicateDisplacedTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
src = cms.InputTag("duplicateDisplacedTrackCandidates","candidates"),
Expand Down
4 changes: 4 additions & 0 deletions RecoMuon/GlobalTrackingTools/python/GlobalMuonRefitter_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@
RefitFlag = cms.bool( True )
)

# These customizations will be removed once we get the templates for
# phase1 pixel
from Configuration.StandardSequences.Eras import eras
eras.phase1Pixel.toModify(GlobalMuonRefitter, TrackerRecHitBuilder = 'WithTrackAngle') # FIXME
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,12 @@
RefitFlag = cms.bool(True)
),
)

# This customization will be removed once we get the templates for
# phase1 pixel
from Configuration.StandardSequences.Eras import eras
eras.phase1Pixel.toModify(GlobalTrajectoryBuilderCommon, # FIXME
TrackerRecHitBuilder = 'WithTrackAngle',
TrackTransformer = dict(TrackerRecHitBuilder = 'WithTrackAngle'),
GlbRefitterParameters = dict(TrackerRecHitBuilder = 'WithTrackAngle'),
)
5 changes: 5 additions & 0 deletions RecoMuon/MuonIdentification/python/TrackerKinkFinder_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
Propagator = cms.string('SmartPropagatorAnyRKOpposite'),
)
)

# This customization will be removed once we get the templates for
# phase1 pixel
from Configuration.StandardSequences.Eras import eras
eras.phase1Pixel.toModify(TrackerKinkFinderParametersBlock, TrackerKinkFinderParameters = dict(TrackerRecHitBuilder = 'WithTrackAngle')) # FIXME
4 changes: 4 additions & 0 deletions RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@
)
)

# These customizations will be removed once we get the templates for
# phase1 pixel
from Configuration.StandardSequences.Eras import eras
eras.phase1Pixel.toModify(MuonTrackLoaderForGLB, TrackLoaderParameters = dict(TTRHBuilder = 'WithTrackAngle')) # FIXME
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@
)


# This customization will be removed once we get the templates for
# phase1 pixel
from Configuration.StandardSequences.Eras import eras
eras.phase1Pixel.toModify(trackerDrivenElectronSeeds, TTRHBuilder = 'WithTrackAngle') # FIXME
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras

# moving to the block. Will delete the PSet once transition is done
PixelTripletLargeTipGenerator = cms.PSet(
Expand All @@ -11,4 +12,5 @@
extraHitRPhitolerance = cms.double(0.032),
extraHitRZtolerance = cms.double(0.037)
)
eras.trackingPhase1.toModify(PixelTripletLargeTipGenerator, maxElement = 0)

125 changes: 119 additions & 6 deletions RecoTracker/ConversionSeedGenerators/python/ConversionStep_cff.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras

from RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi import *

from RecoTracker.ConversionSeedGenerators.PhotonConversionTrajectorySeedProducerFromSingleLeg_cfi import *
from RecoTracker.ConversionSeedGenerators.ConversionStep2_cff import *

from RecoLocalTracker.SubCollectionProducers.trackClusterRemover_cfi import *
convClusters = trackClusterRemover.clone(
from RecoLocalTracker.SubCollectionProducers.trackClusterRemover_cfi import trackClusterRemover as _trackClusterRemover
_convClustersBase = _trackClusterRemover.clone(
maxChi2 = cms.double(30.0),
trajectories = cms.InputTag("tobTecStepTracks"),
pixelClusters = cms.InputTag("siPixelClusters"),
stripClusters = cms.InputTag("siStripClusters"),
oldClusterRemovalInfo = cms.InputTag("tobTecStepClusters"),
trackClassifier = cms.InputTag('tobTecStep',"QualityMasks"),
TrackQuality = cms.string('highPurity'),
)
convClusters = _convClustersBase.clone(
trackClassifier = cms.InputTag('tobTecStep',"QualityMasks"),
)
eras.trackingPhase1.toReplaceWith(convClusters, _convClustersBase.clone(
overrideTrkQuals = "tobTecStepSelector:tobTecStep",
))

convLayerPairs = cms.EDProducer("SeedingLayersEDProducer",
layerList = cms.vstring('BPix1+BPix2',
Expand Down Expand Up @@ -201,13 +207,115 @@
skipClusters = cms.InputTag('convClusters'),
)
)

eras.trackingPhase1.toModify(convLayerPairs,
layerList = [
'BPix1+BPix2',

'BPix2+BPix3',
'BPix2+FPix1_pos',
'BPix2+FPix1_neg',
'BPix2+FPix2_pos',
'BPix2+FPix2_neg',

'FPix1_pos+FPix2_pos',
'FPix1_neg+FPix2_neg',

'BPix3+TIB1',
'BPix3+TIB2',

'TIB1+TID1_pos',
'TIB1+TID1_neg',
'TIB1+TID2_pos',
'TIB1+TID2_neg',
'TIB1+TIB2',
'TIB1+TIB3',

'TIB2+TID1_pos',
'TIB2+TID1_neg',
'TIB2+TID2_pos',
'TIB2+TID2_neg',
'TIB2+TIB3',
'TIB2+TIB4',

'TIB3+TIB4',
'TIB3+TOB1',
'TIB3+TID1_pos',
'TIB3+TID1_neg',

'TIB4+TOB1',
'TIB4+TOB2',

'TOB1+TOB2',
'TOB1+TOB3',
'TOB1+TEC1_pos',
'TOB1+TEC1_neg',

'TOB2+TOB3',
'TOB2+TOB4',
'TOB2+TEC1_pos',
'TOB2+TEC1_neg',

#NB: re-introduce these combinations when large displaced
# tracks, reconstructed only in TOB will be available
# For instance think at the OutIn Ecal Seeded tracks
#'TOB3+TOB4',
#'TOB3+TOB5',
#'TOB3+TEC1_pos',
#'TOB3+TEC1_neg',
#
#'TOB4+TOB5',
#'TOB4+TOB6',
#
#'TOB5+TOB6',

'TID1_pos+TID2_pos',
'TID2_pos+TID3_pos',
'TID3_pos+TEC1_pos',

'TID1_neg+TID2_neg',
'TID2_neg+TID3_neg',
'TID3_neg+TEC1_neg',

'TEC1_pos+TEC2_pos',
'TEC2_pos+TEC3_pos',
'TEC3_pos+TEC4_pos',
'TEC4_pos+TEC5_pos',
'TEC5_pos+TEC6_pos',
'TEC6_pos+TEC7_pos',
'TEC7_pos+TEC8_pos',

'TEC1_neg+TEC2_neg',
'TEC2_neg+TEC3_neg',
'TEC3_neg+TEC4_neg',
'TEC4_neg+TEC5_neg',
'TEC5_neg+TEC6_neg',
'TEC6_neg+TEC7_neg',
'TEC7_neg+TEC8_neg'
#other combinations could be added
],
BPix = dict(TTRHBuilder = "TTRHBuilderWithoutAngle4PixelPairs"),
FPix = dict(TTRHBuilder = "TTRHBuilderWithoutAngle4PixelPairs"),
TIB1 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: since the value just repeats dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")) you could declare that as a variable and just use the variable for each assigned value.

_clusterChargeCut = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone"))
eras.trackingPhase1.toModify(convLayerPairs,
...
                           TIB1 = _clusterChargeCut,
                           TIB2 = _clusterChargeCut,
                           ...
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also remove copy-paste by having single instances of TIB, TID, and TOB instead of explicitly repeating them for all layers (the underlaying code supports that and that's used elsewhere in tracking configuration). Point taken, but I'd leave it for later cleanup unless something else needing fixes pops up in the review.

TIB2 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TIB3 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TIB4 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TID1 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TID2 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TID3 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TEC = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TOB1 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TOB2 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TOB3 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TOB4 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TOB5 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
TOB6 = dict(clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")),
)

photonConvTrajSeedFromSingleLeg.TrackRefitter = cms.InputTag('generalTracks')
photonConvTrajSeedFromSingleLeg.primaryVerticesTag = cms.InputTag('firstStepPrimaryVertices')
#photonConvTrajSeedFromQuadruplets.TrackRefitter = cms.InputTag('generalTracks')
#photonConvTrajSeedFromQuadruplets.primaryVerticesTag = cms.InputTag('pixelVertices')

eras.trackingPhase1.toModify(photonConvTrajSeedFromSingleLeg, primaryVerticesTag = "pixelVertices")

# TRACKER DATA CONTROL

Expand All @@ -233,12 +341,17 @@

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
convCkfTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
_convCkfTrajectoryBuilderBase = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
trajectoryFilter = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryFilter')),
minNrOfHitsForRebuild = 3,
maxCand = 1,
)
convCkfTrajectoryBuilder = _convCkfTrajectoryBuilderBase.clone(
estimator = cms.string('convStepChi2Est')
)
eras.trackingPhase1.toReplaceWith(convCkfTrajectoryBuilder, _convCkfTrajectoryBuilderBase.clone(
maxCand = 2,
))

# MAKING OF TRACK CANDIDATES
import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras

photonConvTrajSeedFromSingleLeg = cms.EDProducer("PhotonConversionTrajectorySeedProducerFromSingleLeg",
TrackRefitter = cms.InputTag('TrackRefitter',''),
Expand Down Expand Up @@ -44,3 +45,12 @@
TTRHBuilder = cms.string('WithTrackAngle')
)
)
eras.trackingPhase1.toModify(photonConvTrajSeedFromSingleLeg,
ClusterCheckPSet = dict(
MaxNumberOfCosmicClusters = 1000000,
MaxNumberOfPixelClusters = 100000,
cut = 'strip < 1000000 && pixel < 100000 && (strip < 100000 + 20*pixel) && (pixel < 20000 + 0.1*strip)'
),
OrderedHitsFactoryPSet = dict(maxElement = 100000),
RegionFactoryPSet = dict(RegionPSet = dict(ptMin = 0.3)),
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras

from RecoTracker.FinalTrackSelectors.DuplicateTrackMerger_cfi import *
from RecoTracker.FinalTrackSelectors.DuplicateListMerger_cfi import *
Expand All @@ -7,6 +8,9 @@
duplicateTrackCandidates.source = cms.InputTag("preDuplicateMergingGeneralTracks")
duplicateTrackCandidates.useInnermostState = True
duplicateTrackCandidates.ttrhBuilderName = "WithAngleAndTemplate"
# This customization will be removed once we get the templates for
# phase1 pixel
eras.phase1Pixel.toModify(duplicateTrackCandidates, ttrhBuilderName = "WithTrackAngle") # FIXME

import RecoTracker.TrackProducer.TrackProducer_cfi
mergedDuplicateTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone()
Expand Down
27 changes: 27 additions & 0 deletions RecoTracker/FinalTrackSelectors/python/earlyGeneralTracks_cfi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras
from RecoTracker.FinalTrackSelectors.TrackCollectionMerger_cfi import *

import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
Expand All @@ -21,3 +22,29 @@
"pixelLessStep",
"tobTecStep"
]

# For Phase1PU70
from RecoTracker.FinalTrackSelectors.trackListMerger_cfi import trackListMerger as _trackListMerger
eras.trackingPhase1.toReplaceWith(earlyGeneralTracks, _trackListMerger.clone(
TrackProducers = ['initialStepTracks',
'highPtTripletStepTracks',
'lowPtQuadStepTracks',
'lowPtTripletStepTracks',
'detachedQuadStepTracks',
'mixedTripletStepTracks',
'pixelPairStepTracks',
'tobTecStepTracks'],
hasSelector = [1,1,1,1,1,1,1,1],
indivShareFrac = [1.0,0.16,0.095,0.09,0.095,0.095,0.095,0.08],
selectedTrackQuals = [cms.InputTag("initialStepSelector","initialStep"),
cms.InputTag("highPtTripletStepSelector","highPtTripletStep"),
cms.InputTag("lowPtQuadStepSelector","lowPtQuadStep"),
cms.InputTag("lowPtTripletStepSelector","lowPtTripletStep"),
cms.InputTag("detachedQuadStep"),
cms.InputTag("mixedTripletStep"),
cms.InputTag("pixelPairStepSelector","pixelPairStep"),
cms.InputTag("tobTecStepSelector","tobTecStep")],
setsToMerge = [cms.PSet( tLists=cms.vint32(0,1,2,3,4,5,6,7), pQual=cms.bool(True) ) ],
copyExtras = True,
makeReKeyedSeeds = cms.untracked.bool(False)
))
Loading