1 from __future__
import print_function
7 import FWCore.ParameterSet.Config
as cms
12 _minPhi = process.trackValidatorTrackingOnly.histoProducerAlgoBlock.minPhi.value()
13 _maxPhi = process.trackValidatorTrackingOnly.histoProducerAlgoBlock.maxPhi.value()
14 _nPhi = process.trackValidatorTrackingOnly.histoProducerAlgoBlock.nintPhi.value()
15 _binPhi = (_maxPhi - _minPhi) / _nPhi
16 process.generalTracksL1L2 = _cutsRecoTracks.clone(
20 minPhi=_minPhi+_binPhi*14, maxPhi=_minPhi+_binPhi*19)
21 process.generalTracksL2L3 = process.generalTracksL1L2.clone(
22 minRapidity = -0.9, maxRapidity = 2,
23 minPhi=_minPhi+_binPhi*33, maxPhi=_minPhi+_binPhi + 2*math.pi)
25 print(
"L1L2 %f %f" % (process.generalTracksL1L2.minPhi.value(), process.generalTracksL1L2.maxPhi.value()))
26 print(
"L2L3 %f %f" % (process.generalTracksL2L3.minPhi.value(), process.generalTracksL2L3.maxPhi.value()))
28 from CommonTools.RecoAlgos.trackingParticleRefSelector_cfi
import trackingParticleRefSelector
as _trackingParticleRefSelector
29 process.trackingParticlesL1L2 = _trackingParticleRefSelector.clone(
34 minRapidity = process.generalTracksL1L2.minRapidity.value(),
35 maxRapidity = process.generalTracksL1L2.maxRapidity.value(),
37 minPhi = process.generalTracksL1L2.minPhi.value(),
38 maxPhi = process.generalTracksL1L2.maxPhi.value(),
40 process.trackingParticlesL2L3 = process.trackingParticlesL1L2.clone(
41 minRapidity = process.generalTracksL2L3.minRapidity.value(),
42 maxRapidity = process.generalTracksL2L3.maxRapidity.value(),
43 minPhi = process.generalTracksL2L3.minPhi.value(),
44 maxPhi = process.generalTracksL2L3.maxPhi.value(),
46 process.tracksPreValidationTrackingOnly += (
47 process.trackingParticlesL1L2 +
48 process.trackingParticlesL2L3 +
49 process.generalTracksL1L2 +
50 process.generalTracksL2L3
53 process.trackValidatorTrackingOnlyL1L2 = process.trackValidatorTrackingOnly.clone(
54 dirName = process.trackValidatorTrackingOnly.dirName.value().
replace(
"Track/",
"TrackL1L2/"),
55 label_tp_effic =
"trackingParticlesL1L2",
56 label_tp_effic_refvector =
True,
57 label = [
"generalTracksL1L2"],
59 process.trackValidatorTrackingOnlyL2L3 = process.trackValidatorTrackingOnlyL1L2.clone(
60 dirName = process.trackValidatorTrackingOnlyL1L2.dirName.value().
replace(
"L1L2",
"L2L3"),
61 label_tp_effic =
"trackingParticlesL2L3",
62 label = [
"generalTracksL2L3"],
64 process.trackValidatorsTrackingOnly += (
65 process.trackValidatorTrackingOnlyL1L2 +
66 process.trackValidatorTrackingOnlyL2L3
68 for trkColl
in process.trackValidatorTrackingOnly.label:
69 if "ByAlgoMask" in trkColl:
continue
70 if "Pt09" in trkColl
and not trkColl
in [
"generalTracksPt09",
"cutsRecoTracksPt09Hp"]:
continue
71 if trkColl !=
"generalTracks":
72 selL1L2 = getattr(process, trkColl).
clone(src=
"generalTracksL1L2")
73 selL2L3 = getattr(process, trkColl).
clone(src=
"generalTracksL2L3")
75 selL1L2Name = trkColl.replace(
"Pt09",
"Pt09L1L2")
76 selL2L3Name = trkColl.replace(
"Pt09",
"Pt09L2L3")
78 selL1L2Name = trkColl.replace(
"cutsRecoTracks",
"cutsRecoTracksL1L2")
79 selL2L3Name = trkColl.replace(
"cutsRecoTracks",
"cutsRecoTracksL2L3")
80 setattr(process, selL1L2Name, selL1L2)
81 setattr(process, selL2L3Name, selL2L3)
82 process.tracksPreValidationTrackingOnly += (selL1L2+selL2L3)
83 process.trackValidatorTrackingOnlyL1L2.label.append(selL1L2Name)
84 process.trackValidatorTrackingOnlyL2L3.label.append(selL2L3Name)
86 for midfix
in [
"Building",
"Seeding"]:
87 label =
"trackValidator%sTrackingOnly" % midfix
88 mtv = getattr(process, label)
90 dirName = mtv.dirName.value()[:-1] +
"L1L2/",
91 label_tp_effic =
"trackingParticlesL1L2",
92 label_tp_effic_refvector =
True,
94 mvaLabels = cms.PSet(),
97 mtvL2L3 = mtvL1L2.clone(
98 dirName = mtvL1L2.dirName.value().
replace(
"L1L2",
"L2L3"),
99 label_tp_effic =
"trackingParticlesL2L3",
101 setattr(process, label+
"L1L2", mtvL1L2)
102 setattr(process, label+
"L2L3", mtvL2L3)
103 process.trackValidatorsTrackingOnly += (
107 for trkColl
in mtv.label:
108 selL1L2 = process.generalTracksL1L2.clone(src=trkColl)
109 selL2L3 = process.generalTracksL2L3.clone(src=trkColl)
110 selL1L2Name = trkColl+
"L1L2"
111 selL2L3Name = trkColl+
"L2L3"
112 setattr(process, selL1L2Name, selL1L2)
113 setattr(process, selL2L3Name, selL2L3)
114 process.tracksPreValidationTrackingOnly += (selL1L2+selL2L3)
116 mtvL1L2.label.append(selL1L2Name)
117 mtvL2L3.label.append(selL2L3Name)