4 import FWCore.ParameterSet.Config
as cms
7 _nonDefaultEraNames = [
"trackingLowPU",
"trackingPhase1",
"trackingPhase1QuadProp",
"trackingPhase1PU70",
"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",
48 "JetCoreRegionalStep",
50 _iterations_trackingPhase1QuadProp = _iterations_trackingPhase1
51 _iterations_trackingPhase1PU70 = [
61 _iterations_trackingPhase2PU140 = [
69 _iterations_muonSeeded = [
70 "MuonSeededStepInOut",
71 "MuonSeededStepOutIn",
74 _iterations_muonSeeded_trackingPhase2PU140 = [
75 "MuonSeededStepInOut",
76 "MuonSeededStepOutIn",
78 _multipleSeedProducers = {
79 "MixedTripletStep": [
"A",
"B"],
80 "TobTecStep": [
"Pair",
"Tripl"],
82 _multipleSeedProducers_trackingLowPU = {
83 "MixedTripletStep": [
"A",
"B"],
85 _multipleSeedProducers_trackingPhase1 = _multipleSeedProducers
86 _multipleSeedProducers_trackingPhase1QuadProp = _multipleSeedProducers_trackingPhase1
87 _multipleSeedProducers_trackingPhase1PU70 = _multipleSeedProducers_trackingLowPU
88 _multipleSeedProducers_trackingPhase2PU140 = {}
89 _oldStyleHasSelector = set([
100 _trackClusterRemoverBase = _trackClusterRemover.clone(
102 pixelClusters =
"siPixelClusters",
103 stripClusters =
"siStripClusters",
104 TrackQuality =
'highPurity',
105 minNumberOfLayersWithMeasBeforeFiltering = 0,
109 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi
import phase2trackClusterRemover
as _phase2trackClusterRemover
110 _trackClusterRemoverBase_trackingPhase2PU140 = _phase2trackClusterRemover.clone(
112 phase2pixelClusters =
"siPixelClusters",
113 phase2OTClusters =
"siPhase2Clusters",
114 TrackQuality =
'highPurity',
115 minNumberOfLayersWithMeasBeforeFiltering = 0,
119 return iteration[0].lower()+iteration[1:]
127 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
130 if iteration
in _oldStyleHasSelector:
131 return pre+
"Selector:" + (
"QualityMasks" if oldStyleQualityMasks
else pre)
135 return pre+
":QualityMasks" 141 return _nonDefaultEras
145 for it
in globals()[
"_iterations"+postfix]:
150 muonVariable =
"_iterations_muonSeeded"+postfix
151 iterations = globals()[
"_iterations"+postfix] + globals().
get(muonVariable, _iterations_muonSeeded)
153 if includeSequenceName:
160 iters = globals()[
"_iterations"+postfix]
162 multipleSeedProducers = globals()[
"_multipleSeedProducers"+postfix]
164 multipleSeedProducers =
None 167 if multipleSeedProducers
is not None and i
in multipleSeedProducers:
168 ret.extend([seeder+m
for m
in multipleSeedProducers[i]])
172 for i
in globals().
get(
"_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
185 module = _trackClusterRemoverBase.clone()
186 if eraName ==
"trackingPhase2PU140":
187 module = globals().
get(
"_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
189 iters = globals()[
"_iterations"+postfix]
191 ind = iters.index(iteration)
197 raise Exception(
"Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
198 prevIter = iters[ind-1]
201 trajectories =
_tracks(prevIter),
204 if eraName
in [
"trackingPhase1PU70",
"trackingPhase2PU140"]:
205 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True)
206 elif eraName ==
"trackingLowPU":
207 customize[
"overrideTrkQuals"] =
_classifier(prevIter, oldStyle=
True, oldStyleQualityMasks=
True)
209 customize[
"trackClassifier"] =
_classifier(prevIter)
211 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 createEarlySequence(eraName, postfix, modDict)
def _clusterRemover(iteration)
def trackProducers(postfix)
def seedProducers(postfix)
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def _modulePrefix(iteration)
T get(const Candidate &c)