4 import FWCore.ParameterSet.Config
as cms
7 _nonDefaultEraNames = [
"trackingLowPU",
"trackingPhase1",
"trackingPhase2PU140"]
10 _defaultEra = (_defaultEraName,
"",
None)
12 (_name,
"_"+_name, getattr(__import__(
'Configuration.Eras.Modifier_'+_name+
'_cff',globals(),locals(),[_name],0),_name)) \
13 for _name
in _nonDefaultEraNames
16 _allEras = [_defaultEra] + _nonDefaultEras
21 "DetachedTripletStep",
27 "JetCoreRegionalStep",
29 _iterations_trackingLowPU = [
33 "DetachedTripletStep",
38 _iterations_trackingPhase1 = [
44 "DetachedTripletStep",
51 from Configuration.ProcessModifiers.displacedTracking_cff
import displacedTracking
52 displacedTracking.toModify(_iterations_trackingPhase1, func=
lambda x: x.append(
'DisplacedGeneralStep'))
54 _iterations_trackingPhase1.append(
'JetCoreRegionalStep')
56 _iterations_trackingPhase2PU140_VS = cms.PSet(names = cms.vstring(
64 from Configuration.ProcessModifiers.vectorHits_cff
import vectorHits
65 vectorHits.toModify(_iterations_trackingPhase2PU140_VS.names, func=
lambda x: x.append(
'PixelLessStep'))
66 from Configuration.ProcessModifiers.trackingIters01_cff
import trackingIters01
67 trackingIters01.toModify(_iterations_trackingPhase2PU140_VS, names = [
"InitialStep",
"HighPtTripletStep"])
69 _iterations_trackingPhase2PU140 = _iterations_trackingPhase2PU140_VS.names.value()
71 from Configuration.ProcessModifiers.jetCoreInPhase2_cff
import jetCoreInPhase2
72 jetCoreInPhase2.toModify(_iterations_trackingPhase2PU140, func=
lambda x: x.append(
'JetCoreRegionalStep'))
74 _iterations_muonSeeded = [
75 "MuonSeededStepInOut",
76 "MuonSeededStepOutIn",
78 _iterations_muonSeeded_trackingPhase1 = [
79 "MuonSeededStepInOut",
80 "MuonSeededStepOutIn",
83 _iterations_muonSeeded_trackingPhase2PU140_VS = cms.PSet(names = cms.vstring(
84 "MuonSeededStepInOut",
85 "MuonSeededStepOutIn",
87 trackingIters01.toModify(_iterations_muonSeeded_trackingPhase2PU140_VS, names = [])
88 _iterations_muonSeeded_trackingPhase2PU140 = _iterations_muonSeeded_trackingPhase2PU140_VS.names.value()
90 _multipleSeedProducers = {
91 "MixedTripletStep": [
"A",
"B"],
92 "TobTecStep": [
"Pair",
"Tripl"],
94 _multipleSeedProducers_trackingLowPU = {
95 "MixedTripletStep": [
"A",
"B"],
97 _multipleSeedProducers_trackingPhase1 = {
98 "PixelPairStep": [
"A",
"B"],
99 "MixedTripletStep": [
"A",
"B"],
100 "TobTecStep": [
"Pair",
"Tripl"],
102 from Configuration.ProcessModifiers.seedingDeepCore_cff
import seedingDeepCore
103 seedingDeepCore.toModify(_multipleSeedProducers_trackingPhase1, func=
lambda x: x.update({
"JetCoreRegionalStep": [
"Barrel",
"Endcap"]}))
106 _multipleSeedProducers_trackingPhase2PU140 = {}
107 _oldStyleHasSelector = set([
117 from Configuration.ProcessModifiers.displacedRegionalTracking_cff
import displacedRegionalTracking
118 displacedRegionalTracking.toModify(_iterations_muonSeeded_trackingPhase1, func=
lambda x: x.append(
'DisplacedRegionalStep'))
119 displacedRegionalTracking.toModify(_multipleSeedProducers_trackingPhase1, func=
lambda x: x.update({
'DisplacedRegionalStep': [
'Pair',
'Tripl']}))
122 _trackClusterRemoverBase = _trackClusterRemover.clone(
124 pixelClusters =
"siPixelClusters",
125 stripClusters =
"siStripClusters",
126 TrackQuality =
'highPurity',
127 minNumberOfLayersWithMeasBeforeFiltering = 0,
130 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
131 from Configuration.ProcessModifiers.trackdnn_cff
import trackdnn
132 (pp_on_AA & (~trackdnn) ).toModify(_trackClusterRemoverBase, TrackQuality =
'tight')
135 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
136 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
138 phase2pixelClusters =
"siPixelClusters",
139 phase2OTClusters =
"siPhase2Clusters",
140 TrackQuality =
'highPurity',
141 minNumberOfLayersWithMeasBeforeFiltering = 0,
145 return iteration[0].lower()+iteration[1:]
153 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
156 if iteration
in _oldStyleHasSelector:
157 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
161 return pre+
":QualityMasks" 167 return _nonDefaultEras
171 for it
in globals()[
"_iterations"+postfix]:
172 task.add(modDict[it+
'Task'])
176 muonVariable =
"_iterations_muonSeeded"+postfix
177 iterations = globals()[
"_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
179 if includeSequenceName:
186 iters = globals()[
"_iterations"+postfix]
188 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
190 multipleSeedProducers =
None 193 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
194 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
198 for i
in globals().get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
214 module = _trackClusterRemoverBase.clone()
215 if eraName ==
"trackingPhase2PU140":
216 module = globals().get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
218 iters = globals()[
"_iterations"+postfix]
222 ind = iters.index(iteration)
if iteration !=
"DisplacedRegionalStep" else len(iters)
228 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
229 prevIter = iters[ind-1]
232 if prevIter ==
"JetCoreRegionalStep":
233 prevIter = iters[ind-2]
236 trajectories =
_tracks(prevIter),
239 if eraName
in [
"trackingPhase2PU140"]:
240 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
241 elif eraName ==
"trackingLowPU":
242 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
244 customize[
"trackClassifier"] =
_classifier(prevIter)
246 return module.clone(**customize)
def clusterRemoverForIter(iteration, eraName="", postfix="", module=None)
def iterationAlgos(postfix, includeSequenceName=False)
def _seedOrTrackProducers(postfix, typ)
def replace(string, replacements)
def _clusterRemover(iteration)
def trackProducers(postfix)
def seedProducers(postfix)
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def createEarlyTask(eraName, postfix, modDict)
def _modulePrefix(iteration)