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 = [
64 from Configuration.ProcessModifiers.vectorHits_cff
import vectorHits
65 vectorHits.toModify(_iterations_trackingPhase2PU140, func=
lambda x: x.append(
'PixelLessStep'))
66 _iterations_muonSeeded = [
67 "MuonSeededStepInOut",
68 "MuonSeededStepOutIn",
71 _iterations_muonSeeded_trackingPhase2PU140 = [
72 "MuonSeededStepInOut",
73 "MuonSeededStepOutIn",
75 _multipleSeedProducers = {
76 "MixedTripletStep": [
"A",
"B"],
77 "TobTecStep": [
"Pair",
"Tripl"],
79 _multipleSeedProducers_trackingLowPU = {
80 "MixedTripletStep": [
"A",
"B"],
82 _multipleSeedProducers_trackingPhase1 = {
83 "PixelPairStep": [
"A",
"B"],
84 "MixedTripletStep": [
"A",
"B"],
85 "TobTecStep": [
"Pair",
"Tripl"],
87 from Configuration.ProcessModifiers.seedingDeepCore_cff
import seedingDeepCore
88 seedingDeepCore.toModify(_multipleSeedProducers_trackingPhase1, func=
lambda x: x.update({
"JetCoreRegionalStep": [
"Barrel",
"Endcap"]}))
91 _multipleSeedProducers_trackingPhase2PU140 = {}
92 _oldStyleHasSelector = set([
103 _trackClusterRemoverBase = _trackClusterRemover.clone(
105 pixelClusters =
"siPixelClusters",
106 stripClusters =
"siStripClusters",
107 TrackQuality =
'highPurity',
108 minNumberOfLayersWithMeasBeforeFiltering = 0,
111 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
112 pp_on_AA.toModify(_trackClusterRemoverBase, TrackQuality =
'tight')
115 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
116 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
118 phase2pixelClusters =
"siPixelClusters",
119 phase2OTClusters =
"siPhase2Clusters",
120 TrackQuality =
'highPurity',
121 minNumberOfLayersWithMeasBeforeFiltering = 0,
125 return iteration[0].lower()+iteration[1:]
133 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
136 if iteration
in _oldStyleHasSelector:
137 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
141 return pre+
":QualityMasks"
147 return _nonDefaultEras
151 for it
in globals()[
"_iterations"+postfix]:
152 task.add(modDict[it+
'Task'])
156 muonVariable =
"_iterations_muonSeeded"+postfix
157 iterations = globals()[
"_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
159 if includeSequenceName:
166 iters = globals()[
"_iterations"+postfix]
168 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
170 multipleSeedProducers =
None
173 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
174 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
178 for i
in globals().get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
191 module = _trackClusterRemoverBase.clone()
192 if eraName ==
"trackingPhase2PU140":
193 module = globals().get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
195 iters = globals()[
"_iterations"+postfix]
197 ind = iters.index(iteration)
203 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
204 prevIter = iters[ind-1]
207 trajectories =
_tracks(prevIter),
210 if eraName
in [
"trackingPhase2PU140"]:
211 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
212 elif eraName ==
"trackingLowPU":
213 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
215 customize[
"trackClassifier"] =
_classifier(prevIter)
217 return module.clone(**customize)
def _seedOrTrackProducers
def clusterRemoverForIter