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 _multipleSeedProducers_trackingPhase2PU140 = {}
88 _oldStyleHasSelector = set([
99 _trackClusterRemoverBase = _trackClusterRemover.clone(
101 pixelClusters =
"siPixelClusters",
102 stripClusters =
"siStripClusters",
103 TrackQuality =
'highPurity',
104 minNumberOfLayersWithMeasBeforeFiltering = 0,
107 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
108 pp_on_AA.toModify(_trackClusterRemoverBase, TrackQuality =
'tight')
111 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
112 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
114 phase2pixelClusters =
"siPixelClusters",
115 phase2OTClusters =
"siPhase2Clusters",
116 TrackQuality =
'highPurity',
117 minNumberOfLayersWithMeasBeforeFiltering = 0,
121 return iteration[0].lower()+iteration[1:]
129 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
132 if iteration
in _oldStyleHasSelector:
133 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
137 return pre+
":QualityMasks"
143 return _nonDefaultEras
147 for it
in globals()[
"_iterations"+postfix]:
148 task.add(modDict[it+
'Task'])
152 muonVariable =
"_iterations_muonSeeded"+postfix
153 iterations = globals()[
"_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
155 if includeSequenceName:
162 iters = globals()[
"_iterations"+postfix]
164 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
166 multipleSeedProducers =
None
169 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
170 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
174 for i
in globals().get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
187 module = _trackClusterRemoverBase.clone()
188 if eraName ==
"trackingPhase2PU140":
189 module = globals().get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
191 iters = globals()[
"_iterations"+postfix]
193 ind = iters.index(iteration)
199 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
200 prevIter = iters[ind-1]
203 trajectories =
_tracks(prevIter),
206 if eraName
in [
"trackingPhase2PU140"]:
207 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
208 elif eraName ==
"trackingLowPU":
209 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
211 customize[
"trackClassifier"] =
_classifier(prevIter)
213 return module.clone(**customize)