CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
customizeInitialStepOnly Namespace Reference

Functions

def customizeInitialStepOnly
 
def customizeInitialStepOnlyNoMTV
 
def removePath
 

Function Documentation

def customizeInitialStepOnly.customizeInitialStepOnly (   process)

Definition at line 8 of file customizeInitialStepOnly.py.

References removePath().

8 
9 def customizeInitialStepOnly(process):
10  # Customize reconstruction
11  process.trackerClusterCheck.PixelClusterCollectionLabel = 'siPixelClustersPreSplitting'
12  process.initialStepSeedLayers.FPix.HitProducer = 'siPixelRecHitsPreSplitting'
13  process.initialStepSeedLayers.BPix.HitProducer = 'siPixelRecHitsPreSplitting'
14  process.initialStepHitQuadruplets.SeedComparitorPSet.clusterShapeCacheSrc = "siPixelClusterShapeCachePreSplitting"
15  process.initialStepSeeds.SeedComparitorPSet.ClusterShapeCacheSrc = "siPixelClusterShapeCachePreSplitting"
16  if hasattr(process, "initialStepTrackCandidatesMkFitHits"):
17  process.initialStepTrackCandidatesMkFitHits.pixelRecHits = "siPixelRecHitsPreSplitting"
18  if hasattr(process.initialStepTrackCandidates, "MeasurementTrackerEvent"):
19  process.initialStepTrackCandidates.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
20  process.initialStepTracks.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
21  process.iterTrackingTask = cms.Task(process.trackerClusterCheck,
22  process.InitialStepTask)
23 
24  # Customize MTV
25  for selector in [
26  process.cutsRecoTracksInitialStep,
27  process.cutsRecoTracksPt09InitialStep,
28  process.cutsRecoTracksFromPVInitialStep,
29  process.cutsRecoTracksFromPVPt09InitialStep,
30  ]:
31  selector.algorithm = []
32  selector.quality = []
33  selector.src = "initialStepTracks"
34  selector.vertexTag = "firstStepPrimaryVertices"
35 
36  process.trackingParticleRecoTrackAsssociationPreSplitting = process.trackingParticleRecoTrackAsssociation.clone(
37  label_tr = "initialStepTracks",
38  associator = "quickTrackAssociatorByHitsPreSplitting",
39  )
40  process.VertexAssociatorByPositionAndTracksPreSplitting = process.VertexAssociatorByPositionAndTracks.clone(
41  trackAssociation = "trackingParticleRecoTrackAsssociationPreSplitting"
42  )
43 
44 
45  def setInput(mtvs, labels):
46  for mtv in mtvs:
47  mod = getattr(process, mtv)
48  mod.label = labels
49  mod.label_vertex = "firstStepPrimaryVertices"
50  if mod.UseAssociators.value():
51  mod.associators = ["quickTrackAssociatorByHitsPreSplitting"]
52  else:
53  mod.associators = ["trackingParticleRecoTrackAsssociationPreSplitting"]
54  mod.vertexAssociator = "VertexAssociatorByPositionAndTracksPreSplitting"
55  mod.trackCollectionForDrCalculation = "initialStepTracks"
56  mod.dodEdxPlots = False
57  mod.doResolutionPlotsForLabels = []
58 
59  setInput(["trackValidatorTrackingOnly", "trackValidatorAllTPEfficTrackingOnly",
60  "trackValidatorTPPtLess09TrackingOnly", "trackValidatorBHadronTrackingOnly"],
61  ["cutsRecoTracksInitialStep", "cutsRecoTracksPt09InitialStep"])
62  setInput(["trackValidatorFromPVTrackingOnly", "trackValidatorFromPVAllTPTrackingOnly"],
63  ["cutsRecoTracksFromPVInitialStep", "cutsRecoTracksFromPVPt09InitialStep"])
64  setInput(["trackValidatorSeedingTrackingOnly"], ["seedTracksinitialStepSeeds"])
65  setInput(["trackValidatorBuilding"], ["initialStepTracks"])
66  process.trackValidatorBuilding.mvaLabels = cms.untracked.PSet(initialStepTracks = cms.untracked.vstring('initialStep'))
67 
68  process.tracksPreValidationTrackingOnly = cms.Task(
69  process.cutsRecoTracksInitialStep,
70  process.cutsRecoTracksPt09InitialStep,
71  process.cutsRecoTracksFromPVInitialStep,
72  process.cutsRecoTracksFromPVPt09InitialStep,
73  process.tracksValidationTruth,
74  process.trackingParticlesSignal,
75  process.trackingParticlesBHadron,
76  process.trackingParticleRecoTrackAsssociationPreSplitting,
77  process.VertexAssociatorByPositionAndTracksPreSplitting,
78  )
79  process.trackValidatorsTrackingOnly.remove(process.trackValidatorConversionTrackingOnly)
80  process.trackValidatorsTrackingOnly.remove(process.trackValidatorSeedingPreSplittingTrackingOnly)
81  process.trackValidatorsTrackingOnly.remove(process.trackValidatorBuildingPreSplitting)
82 
83  # Remove vertex validation
84  process.globalPrevalidationTrackingOnly.remove(process.vertexValidationTrackingOnly)
85 
86  # Remove DQM
87  removePath(process, "dqmoffline_step")
88  removePath(process, "dqmofflineOnPAT_step")
89 
90  # Remove RECO output if it exists
91  removePath(process, "RECOSIMoutput_step")
92 
93  return process
94 
def customizeInitialStepOnly.customizeInitialStepOnlyNoMTV (   process)

Definition at line 95 of file customizeInitialStepOnly.py.

References removePath().

95 
97  process = customizeInitialStepOnly(process)
98 
99  process.options.wantSummary = cms.untracked.bool(True)
100 
101  # Remove validation
102  removePath(process, "prevalidation_step")
103  removePath(process, "validation_step")
104  removePath(process, "DQMoutput_step")
105 
106  # Minimize the rest
107  process.RawToDigiTask = cms.Task(
108  process.siPixelDigis,
109  process.siStripDigis
110  )
111  process.reconstruction_trackingOnly = cms.Sequence(
112  process.trackerlocalreco +
113  process.offlineBeamSpot +
114  process.siPixelClusterShapeCachePreSplitting +
115  process.MeasurementTrackerEventPreSplitting,
116  process.iterTrackingTask
117  )
118  process.trackerlocalrecoTask.remove(process.clusterSummaryProducer)
119  process.iterTrackingTask.remove(process.ak4CaloJetsForTrk)
120  process.iterTrackingTask.remove(process.caloTowerForTrk)
121  process.iterTrackingTask.remove(process.firstStepPrimaryVertices)
122  process.iterTrackingTask.remove(process.firstStepPrimaryVerticesUnsorted)
123  process.iterTrackingTask.remove(process.initialStepTrackRefsForJets)
124  process.iterTrackingTask.remove(process.initialStepClassifier1)
125  process.iterTrackingTask.remove(process.initialStep)
126 
127  # Add a dummy output module to trigger the (minimal) prefetching
128  process.out = cms.OutputModule("AsciiOutputModule",
129  outputCommands = cms.untracked.vstring(
130  "keep *_initialStepTracks_*_*",
131  ),
132  verbosity = cms.untracked.uint32(0)
133  )
134  process.outPath = cms.EndPath(process.out)
135  process.schedule = cms.Schedule(process.raw2digi_step, process.reconstruction_step, process.outPath)
136 
137  # Minimize printouts
138  process.MessageLogger.cerr.FwkReport.reportEvery = 100
139  process.MessageLogger.cerr.default.limit = 1
140  process.MessageLogger.suppressWarning.extend([
141  "initialStepTrackCandidatesMkFitInput",
142  "initialStepTrackCandidatesMkFit",
143  "initialStepTrackCandidates",
144  "initialStepTracks",
145  ])
146 
147  return process
def customizeInitialStepOnly.removePath (   process,
  pname 
)

Definition at line 3 of file customizeInitialStepOnly.py.

Referenced by customizeInitialStepOnly(), and customizeInitialStepOnlyNoMTV().

3 
4 def removePath(process, pname):
5  if hasattr(process, pname):
6  process.schedule.remove(getattr(process, pname))
7  delattr(process, pname)