CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  fromVertex = False
12 )
13 ###------------- MeasurementEstimator, defining the searcgh window for pattern recongnition ----------------
14 #for displaced global muons
16 muonSeededMeasurementEstimatorForOutInDisplaced = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
17  ComponentName = 'muonSeededMeasurementEstimatorForOutInDisplaced',
18  MaxChi2 = 30.0, ## was 30 ## TO BE TUNED
19  nSigma = 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  constantValueForLostHitsFractionFilter = 10, ## allow more lost hits
27  minimumNumberOfHits = 5 ## allow more lost hits
28 )
29 ###------------- TrajectoryBuilders ----------------
30 #for displaced global muons
31 muonSeededTrajectoryBuilderForOutInDisplaced = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
32  foundHitBonus = 1000.0,
33  lostHitPenalty = 1.0,
34  maxCand = 3,
35  estimator = 'muonSeededMeasurementEstimatorForOutInDisplaced',
36  trajectoryFilter = dict(refToPSet_ = 'muonSeededTrajectoryFilterForOutInDisplaced'),
37  inOutTrajectoryFilter = dict(refToPSet_ = 'muonSeededTrajectoryFilterForOutInDisplaced'), # not sure if it is used
38  minNrOfHitsForRebuild = 5,
39  requireSeedHitsInRebuild = True,
40  keepOriginalIfRebuildFails = False,
41 )
42 ######## TRACK CANDIDATE MAKERS
43 #for displaced global muons
44 muonSeededTrackCandidatesOutInDisplaced = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
45  src = "muonSeededSeedsOutInDisplaced",
46  TrajectoryBuilderPSet = dict(refToPSet_ = "muonSeededTrajectoryBuilderForOutInDisplaced"),
47  TrajectoryCleaner = 'muonSeededTrajectoryCleanerBySharedHits',
48  numHitsForSeedCleaner = cms.int32(50),
49  onlyPixelHitsForSeedCleaner = cms.bool(False),
50 )
51 
52 ######## TRACK PRODUCERS
53 #for displaced global muon
54 muonSeededTracksOutInDisplaced = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
55  src = "muonSeededTrackCandidatesOutInDisplaced",
56  AlgorithmName = 'muonSeededStepOutIn',
57  Fitter = "muonSeededFittingSmootherWithOutliersRejectionAndRK",
58 )
59 
60 #for displaced global muons
61 muonSeededTracksOutInDisplacedClassifier = RecoTracker.IterativeTracking.MuonSeededStep_cff.muonSeededTracksOutInClassifier.clone(
62  src='muonSeededTracksOutInDisplaced'
63 )
64 
65 #for displaced global muons
66 muonSeededStepCoreDisplacedTask = cms.Task(
67  cms.TaskPlaceholder("muonSeededStepCoreInOutTask"),
68  muonSeededSeedsOutInDisplaced , muonSeededTrackCandidatesOutInDisplaced , muonSeededTracksOutInDisplaced
69 )
70 muonSeededStepCoreDisplaced = cms.Sequence(muonSeededStepCoreDisplacedTask)
71 
72 #for displaced global muons
73 muonSeededStepExtraDisplacedTask = cms.Task(
74  cms.TaskPlaceholder("muonSeededStepExtraInOutTask"),
75  muonSeededTracksOutInDisplacedClassifier
76 )
77 muonSeededStepExtraDisplaced = cms.Sequence(muonSeededStepExtraDisplacedTask)
78 
79 #for displaced global muons
80 muonSeededStepDisplacedTask = cms.Task(
81  earlyDisplacedMuons ,
82  muonSeededStepCoreDisplacedTask ,
83  muonSeededStepExtraDisplacedTask
84 )
85 muonSeededStepDisplaced = cms.Sequence(muonSeededStepDisplacedTask)
86 
87 ##### MODULES FOR DEBUGGING ###############3
88 #for displaced global muons
89 muonSeededSeedsOutInDisplacedAsTracks = cms.EDProducer("FakeTrackProducerFromSeed", src = cms.InputTag("muonSeededSeedsOutInDisplaced"))
90 #for displaced global muons
91 muonSeededTrackCandidatesOutInDisplacedAsTracks = cms.EDProducer("FakeTrackProducerFromCandidate", src = cms.InputTag("muonSeededTrackCandidatesOutInDisplaced"))
92 #for displaced global muons
93 muonSeededStepDebugDisplacedTask = cms.Task(
94  cms.TaskPlaceholder("muonSeededStepDebugInOutTask"),
95  muonSeededSeedsOutInDisplacedAsTracks , muonSeededTrackCandidatesOutInDisplacedAsTracks
96 )
97 muonSeededStepDebugDisplaced = cms.Sequence(muonSeededStepDebugDisplacedTask)