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 _iterations_muonSeeded = [
60 "MuonSeededStepInOut",
61 "MuonSeededStepOutIn",
64 _iterations_muonSeeded_trackingPhase2PU140 = [
65 "MuonSeededStepInOut",
66 "MuonSeededStepOutIn",
68 _multipleSeedProducers = {
69 "MixedTripletStep": [
"A",
"B"],
70 "TobTecStep": [
"Pair",
"Tripl"],
72 _multipleSeedProducers_trackingLowPU = {
73 "MixedTripletStep": [
"A",
"B"],
75 _multipleSeedProducers_trackingPhase1 = {
76 "PixelPairStep": [
"A",
"B"],
77 "MixedTripletStep": [
"A",
"B"],
78 "TobTecStep": [
"Pair",
"Tripl"],
80 _multipleSeedProducers_trackingPhase2PU140 = {}
81 _oldStyleHasSelector = set([
92 _trackClusterRemoverBase = _trackClusterRemover.clone(
94 pixelClusters =
"siPixelClusters",
95 stripClusters =
"siStripClusters",
96 TrackQuality =
'highPurity',
97 minNumberOfLayersWithMeasBeforeFiltering = 0,
100 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
101 pp_on_AA_2018.toModify(_trackClusterRemoverBase, TrackQuality =
'tight')
104 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
105 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
107 phase2pixelClusters =
"siPixelClusters",
108 phase2OTClusters =
"siPhase2Clusters",
109 TrackQuality =
'highPurity',
110 minNumberOfLayersWithMeasBeforeFiltering = 0,
114 return iteration[0].lower()+iteration[1:]
122 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
125 if iteration
in _oldStyleHasSelector:
126 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
130 return pre+
":QualityMasks"
136 return _nonDefaultEras
140 for it
in globals()[
"_iterations"+postfix]:
141 task.add(modDict[it+
'Task'])
145 muonVariable =
"_iterations_muonSeeded"+postfix
146 iterations = globals()[
"_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
148 if includeSequenceName:
155 iters = globals()[
"_iterations"+postfix]
157 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
159 multipleSeedProducers =
None
162 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
163 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
167 for i
in globals().get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
180 module = _trackClusterRemoverBase.clone()
181 if eraName ==
"trackingPhase2PU140":
182 module = globals().get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
184 iters = globals()[
"_iterations"+postfix]
186 ind = iters.index(iteration)
192 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
193 prevIter = iters[ind-1]
196 trajectories =
_tracks(prevIter),
199 if eraName
in [
"trackingPhase2PU140"]:
200 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
201 elif eraName ==
"trackingLowPU":
202 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
204 customize[
"trackClassifier"] =
_classifier(prevIter)
206 return module.clone(**customize)