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",
49 "JetCoreRegionalStep",
51 _iterations_trackingPhase2PU140 = [
59 from Configuration.ProcessModifiers.vectorHits_cff
import vectorHits
60 vectorHits.toModify(_iterations_trackingPhase2PU140, func=
lambda x: x.append(
'PixelLessStep'))
61 _iterations_muonSeeded = [
62 "MuonSeededStepInOut",
63 "MuonSeededStepOutIn",
66 _iterations_muonSeeded_trackingPhase2PU140 = [
67 "MuonSeededStepInOut",
68 "MuonSeededStepOutIn",
70 _multipleSeedProducers = {
71 "MixedTripletStep": [
"A",
"B"],
72 "TobTecStep": [
"Pair",
"Tripl"],
74 _multipleSeedProducers_trackingLowPU = {
75 "MixedTripletStep": [
"A",
"B"],
77 _multipleSeedProducers_trackingPhase1 = {
78 "PixelPairStep": [
"A",
"B"],
79 "MixedTripletStep": [
"A",
"B"],
80 "TobTecStep": [
"Pair",
"Tripl"],
82 _multipleSeedProducers_trackingPhase2PU140 = {}
83 _oldStyleHasSelector = set([
94 _trackClusterRemoverBase = _trackClusterRemover.clone(
96 pixelClusters =
"siPixelClusters",
97 stripClusters =
"siStripClusters",
98 TrackQuality =
'highPurity',
99 minNumberOfLayersWithMeasBeforeFiltering = 0,
102 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
103 pp_on_AA.toModify(_trackClusterRemoverBase, TrackQuality =
'tight')
106 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
107 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
109 phase2pixelClusters =
"siPixelClusters",
110 phase2OTClusters =
"siPhase2Clusters",
111 TrackQuality =
'highPurity',
112 minNumberOfLayersWithMeasBeforeFiltering = 0,
116 return iteration[0].lower()+iteration[1:]
124 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
127 if iteration
in _oldStyleHasSelector:
128 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
132 return pre+
":QualityMasks"
138 return _nonDefaultEras
142 for it
in globals()[
"_iterations"+postfix]:
143 task.add(modDict[it+
'Task'])
147 muonVariable =
"_iterations_muonSeeded"+postfix
148 iterations = globals()[
"_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
150 if includeSequenceName:
157 iters = globals()[
"_iterations"+postfix]
159 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
161 multipleSeedProducers =
None
164 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
165 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
169 for i
in globals().get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
182 module = _trackClusterRemoverBase.clone()
183 if eraName ==
"trackingPhase2PU140":
184 module = globals().get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
186 iters = globals()[
"_iterations"+postfix]
188 ind = iters.index(iteration)
194 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
195 prevIter = iters[ind-1]
198 trajectories =
_tracks(prevIter),
201 if eraName
in [
"trackingPhase2PU140"]:
202 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
203 elif eraName ==
"trackingLowPU":
204 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
206 customize[
"trackClassifier"] =
_classifier(prevIter)
208 return module.clone(**customize)