CMS 3D CMS Logo

DisplacedMuonSeededStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ###### Muon reconstruction module #####
4 from RecoMuon.MuonIdentification.earlyMuons_cfi import earlyDisplacedMuons
5 
6 ###### SEEDER MODELS ######
7 #for displaced global muons
8 import RecoTracker.SpecialSeedGenerators.outInSeedsFromStandaloneMuons_cfi
9 muonSeededSeedsOutInDisplaced = RecoTracker.SpecialSeedGenerators.outInSeedsFromStandaloneMuons_cfi.outInSeedsFromStandaloneMuons.clone(
10  src = "earlyDisplacedMuons",
11 )
12 muonSeededSeedsOutInDisplaced.fromVertex = cms.bool(False)
13 ###------------- MeasurementEstimator, defining the searcgh window for pattern recongnition ----------------
14 #for displaced global muons
16 muonSeededMeasurementEstimatorForOutInDisplaced = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
17  ComponentName = cms.string('muonSeededMeasurementEstimatorForOutInDisplaced'),
18  MaxChi2 = cms.double(30.0), ## was 30 ## TO BE TUNED
19  nSigma = cms.double(3.), ## was 3 ## TO BE TUNED
20 )
21 
22 ###------------- TrajectoryFilter, defining selections on the trajectories while building them ----------------
23 #for displaced global muons
25 muonSeededTrajectoryFilterForOutInDisplaced = RecoTracker.IterativeTracking.MuonSeededStep_cff.muonSeededTrajectoryFilterForInOut.clone()
26 muonSeededTrajectoryFilterForOutInDisplaced.constantValueForLostHitsFractionFilter = 10 ## allow more lost hits
27 muonSeededTrajectoryFilterForOutInDisplaced.minimumNumberOfHits = 5 ## allow more lost hits
28 ###------------- TrajectoryBuilders ----------------
29 #for displaced global muons
30 muonSeededTrajectoryBuilderForOutInDisplaced = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
31  foundHitBonus = cms.double(1000.0),
32  lostHitPenalty = cms.double(1.0),
33  maxCand = cms.int32(3),
34  estimator = cms.string('muonSeededMeasurementEstimatorForOutInDisplaced'),
35  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('muonSeededTrajectoryFilterForOutInDisplaced')),
36  inOutTrajectoryFilter = cms.PSet(refToPSet_ = cms.string('muonSeededTrajectoryFilterForOutInDisplaced')), # not sure if it is used
37  minNrOfHitsForRebuild = cms.int32(5),
38  requireSeedHitsInRebuild = cms.bool(True),
39  keepOriginalIfRebuildFails = cms.bool(False),
40 )
41 ######## TRACK CANDIDATE MAKERS
42 #for displaced global muons
43 muonSeededTrackCandidatesOutInDisplaced = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
44  src = cms.InputTag("muonSeededSeedsOutInDisplaced"),
45  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string("muonSeededTrajectoryBuilderForOutInDisplaced")),
46  TrajectoryCleaner = cms.string('muonSeededTrajectoryCleanerBySharedHits'),
47  numHitsForSeedCleaner = cms.int32(50),
48  onlyPixelHitsForSeedCleaner = cms.bool(False),
49 )
50 
51 ######## TRACK PRODUCERS
52 #for displaced global muon
53 muonSeededTracksOutInDisplaced = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
54  src = cms.InputTag("muonSeededTrackCandidatesOutInDisplaced"),
55  AlgorithmName = cms.string('muonSeededStepOutIn'),
56  Fitter = cms.string("muonSeededFittingSmootherWithOutliersRejectionAndRK"),
57 )
58 
59 #for displaced global muons
60 muonSeededTracksOutInDisplacedClassifier = RecoTracker.IterativeTracking.MuonSeededStep_cff.muonSeededTracksOutInClassifier.clone()
61 muonSeededTracksOutInDisplacedClassifier.src='muonSeededTracksOutInDisplaced'
62 
63 
64 #for displaced global muons
65 muonSeededStepCoreDisplacedTask = cms.Task(
66  cms.TaskPlaceholder("muonSeededStepCoreInOutTask"),
67  muonSeededSeedsOutInDisplaced , muonSeededTrackCandidatesOutInDisplaced , muonSeededTracksOutInDisplaced
68 )
69 muonSeededStepCoreDisplaced = cms.Sequence(muonSeededStepCoreDisplacedTask)
70 
71 #for displaced global muons
72 muonSeededStepExtraDisplacedTask = cms.Task(
73  cms.TaskPlaceholder("muonSeededStepExtraInOutTask"),
74  muonSeededTracksOutInDisplacedClassifier
75 )
76 muonSeededStepExtraDisplaced = cms.Sequence(muonSeededStepExtraDisplacedTask)
77 
78 #for displaced global muons
79 muonSeededStepDisplacedTask = cms.Task(
80  earlyDisplacedMuons ,
81  muonSeededStepCoreDisplacedTask ,
82  muonSeededStepExtraDisplacedTask
83 )
84 muonSeededStepDisplaced = cms.Sequence(muonSeededStepDisplacedTask)
85 
86 ##### MODULES FOR DEBUGGING ###############3
87 #for displaced global muons
88 muonSeededSeedsOutInDisplacedAsTracks = cms.EDProducer("FakeTrackProducerFromSeed", src = cms.InputTag("muonSeededSeedsOutInDisplaced"))
89 #for displaced global muons
90 muonSeededTrackCandidatesOutInDisplacedAsTracks = cms.EDProducer("FakeTrackProducerFromCandidate", src = cms.InputTag("muonSeededTrackCandidatesOutInDisplaced"))
91 #for displaced global muons
92 muonSeededStepDebugDisplacedTask = cms.Task(
93  cms.TaskPlaceholder("muonSeededStepDebugInOutTask"),
94  muonSeededSeedsOutInDisplacedAsTracks , muonSeededTrackCandidatesOutInDisplacedAsTracks
95 )
96 muonSeededStepDebugDisplaced = cms.Sequence(muonSeededStepDebugDisplacedTask)