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,
101 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
102 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
104 phase2pixelClusters =
"siPixelClusters",
105 phase2OTClusters =
"siPhase2Clusters",
106 TrackQuality =
'highPurity',
107 minNumberOfLayersWithMeasBeforeFiltering = 0,
111 return iteration[0].lower()+iteration[1:]
119 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
122 if iteration
in _oldStyleHasSelector:
123 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
127 return pre+
":QualityMasks" 133 return _nonDefaultEras
137 for it
in globals()[
"_iterations"+postfix]:
138 task.add(modDict[it+
'Task'])
142 muonVariable =
"_iterations_muonSeeded"+postfix
143 iterations = globals()[
"_iterations"+postfix] + globals().
get(muonVariable, _iterations_muonSeeded)
145 if includeSequenceName:
152 iters = globals()[
"_iterations"+postfix]
154 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
156 multipleSeedProducers =
None 159 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
160 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
164 for i
in globals().
get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
177 module = _trackClusterRemoverBase.clone()
178 if eraName ==
"trackingPhase2PU140":
179 module = globals().
get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
181 iters = globals()[
"_iterations"+postfix]
183 ind = iters.index(iteration)
189 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
190 prevIter = iters[ind-1]
193 trajectories =
_tracks(prevIter),
196 if eraName
in [
"trackingPhase2PU140"]:
197 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
198 elif eraName ==
"trackingLowPU":
199 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
201 customize[
"trackClassifier"] =
_classifier(prevIter)
203 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)
T get(const Candidate &c)