13 _minPhi = process.trackValidatorTrackingOnly.histoProducerAlgoBlock.minPhi.value()
14 _maxPhi = process.trackValidatorTrackingOnly.histoProducerAlgoBlock.maxPhi.value()
15 _nPhi = process.trackValidatorTrackingOnly.histoProducerAlgoBlock.nintPhi.value()
16 _binPhi = (_maxPhi - _minPhi) / _nPhi
17 process.generalTracksL1L2 = _cutsRecoTracks.clone(
21 minPhi=_minPhi+_binPhi*14, maxPhi=_minPhi+_binPhi*19)
22 process.generalTracksL2L3 = process.generalTracksL1L2.clone(
23 minRapidity = -0.9, maxRapidity = 2,
24 minPhi=_minPhi+_binPhi*33, maxPhi=_minPhi+_binPhi + 2*math.pi)
26 print(
"L1L2 %f %f" % (process.generalTracksL1L2.minPhi.value(), process.generalTracksL1L2.maxPhi.value()))
27 print(
"L2L3 %f %f" % (process.generalTracksL2L3.minPhi.value(), process.generalTracksL2L3.maxPhi.value()))
29 from CommonTools.RecoAlgos.trackingParticleRefSelector_cfi
import trackingParticleRefSelector
as _trackingParticleRefSelector
30 process.trackingParticlesL1L2 = _trackingParticleRefSelector.clone(
35 minRapidity = process.generalTracksL1L2.minRapidity.value(),
36 maxRapidity = process.generalTracksL1L2.maxRapidity.value(),
38 minPhi = process.generalTracksL1L2.minPhi.value(),
39 maxPhi = process.generalTracksL1L2.maxPhi.value(),
41 process.trackingParticlesL2L3 = process.trackingParticlesL1L2.clone(
42 minRapidity = process.generalTracksL2L3.minRapidity.value(),
43 maxRapidity = process.generalTracksL2L3.maxRapidity.value(),
44 minPhi = process.generalTracksL2L3.minPhi.value(),
45 maxPhi = process.generalTracksL2L3.maxPhi.value(),
47 process.tracksPreValidationTrackingOnly += (
48 process.trackingParticlesL1L2 +
49 process.trackingParticlesL2L3 +
50 process.generalTracksL1L2 +
51 process.generalTracksL2L3
54 process.trackValidatorTrackingOnlyL1L2 = process.trackValidatorTrackingOnly.clone(
55 dirName = process.trackValidatorTrackingOnly.dirName.value().
replace(
"Track/",
"TrackL1L2/"),
56 label_tp_effic =
"trackingParticlesL1L2",
57 label_tp_effic_refvector =
True,
58 label = [
"generalTracksL1L2"],
60 process.trackValidatorTrackingOnlyL2L3 = process.trackValidatorTrackingOnlyL1L2.clone(
61 dirName = process.trackValidatorTrackingOnlyL1L2.dirName.value().
replace(
"L1L2",
"L2L3"),
62 label_tp_effic =
"trackingParticlesL2L3",
63 label = [
"generalTracksL2L3"],
65 process.trackValidatorsTrackingOnly += (
66 process.trackValidatorTrackingOnlyL1L2 +
67 process.trackValidatorTrackingOnlyL2L3
69 for trkColl
in process.trackValidatorTrackingOnly.label:
70 if "ByAlgoMask" in trkColl:
continue
71 if "Pt09" in trkColl
and not trkColl
in [
"generalTracksPt09",
"cutsRecoTracksPt09Hp"]:
continue
72 if trkColl !=
"generalTracks":
73 selL1L2 = getattr(process, trkColl).
clone(src=
"generalTracksL1L2")
74 selL2L3 = getattr(process, trkColl).
clone(src=
"generalTracksL2L3")
76 selL1L2Name = trkColl.replace(
"Pt09",
"Pt09L1L2")
77 selL2L3Name = trkColl.replace(
"Pt09",
"Pt09L2L3")
79 selL1L2Name = trkColl.replace(
"cutsRecoTracks",
"cutsRecoTracksL1L2")
80 selL2L3Name = trkColl.replace(
"cutsRecoTracks",
"cutsRecoTracksL2L3")
81 setattr(process, selL1L2Name, selL1L2)
82 setattr(process, selL2L3Name, selL2L3)
83 process.tracksPreValidationTrackingOnly += (selL1L2+selL2L3)
84 process.trackValidatorTrackingOnlyL1L2.label.append(selL1L2Name)
85 process.trackValidatorTrackingOnlyL2L3.label.append(selL2L3Name)
87 for midfix
in [
"Building",
"Seeding"]:
88 label =
"trackValidator%sTrackingOnly" % midfix
89 mtv = getattr(process, label)
91 dirName = mtv.dirName.value()[:-1] +
"L1L2/",
92 label_tp_effic =
"trackingParticlesL1L2",
93 label_tp_effic_refvector =
True,
95 mvaLabels = cms.PSet(),
98 mtvL2L3 = mtvL1L2.clone(
99 dirName = mtvL1L2.dirName.value().
replace(
"L1L2",
"L2L3"),
100 label_tp_effic =
"trackingParticlesL2L3",
102 setattr(process, label+
"L1L2", mtvL1L2)
103 setattr(process, label+
"L2L3", mtvL2L3)
104 process.trackValidatorsTrackingOnly += (
108 for trkColl
in mtv.label:
109 selL1L2 = process.generalTracksL1L2.clone(src=trkColl)
110 selL2L3 = process.generalTracksL2L3.clone(src=trkColl)
111 selL1L2Name = trkColl+
"L1L2"
112 selL2L3Name = trkColl+
"L2L3"
113 setattr(process, selL1L2Name, selL1L2)
114 setattr(process, selL2L3Name, selL2L3)
115 process.tracksPreValidationTrackingOnly += (selL1L2+selL2L3)
117 mtvL1L2.label.append(selL1L2Name)
118 mtvL2L3.label.append(selL2L3Name)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
def customiseMTVForBPix123Holes