From a0c682601c4024c391fdd46458cadd593716c5a3 Mon Sep 17 00:00:00 2001 From: Juliette Date: Sun, 10 May 2020 11:05:19 +0200 Subject: [PATCH 1/2] first attempt to add tpEtaGreater2p7 plots --- Validation/RecoTrack/python/plotting/html.py | 5 +++++ .../RecoTrack/python/plotting/trackingPlots.py | 1 + .../scripts/makeTrackValidationPlots.py | 2 ++ Validation/RecoTrack/test/trackingCompare.py | 17 +++++++++-------- .../test/trackingPerformanceValidation.py | 1 + 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/html.py b/Validation/RecoTrack/python/plotting/html.py index 572f4df74ddec..a76601813fc3f 100644 --- a/Validation/RecoTrack/python/plotting/html.py +++ b/Validation/RecoTrack/python/plotting/html.py @@ -48,6 +48,7 @@ def _lowerFirst(s): _fromPVName = "Tracks from PV" _fromPVAllTPName = "Tracks from PV (all TPs)" _tpPtLess09Name = "All tracks (TP pT < 0.9 GeV)" +_tpEtaGreater2p7Name = "All tracks (TP |eta| > 2.7)" _conversionName = "Tracks for conversions" _gsfName = "Electron GSF tracks" _bhadronName = "All tracks (B-hadron TPs)" @@ -85,6 +86,8 @@ def _ptCut(s): ("tpPtLess09_highPurityByOriginalAlgo", _toOriAlgo(_allToHP(_tpPtLess09Name))), ("tpPtLess09_ByAlgoMask", _toAlgoMask(_tpPtLess09Name)), ("tpPtLess09_highPurityByAlgoMask", _toAlgoMask(_allToHP(_tpPtLess09Name))), + ("tpEtaGreater2p7_", _tpEtaGreater2p7Name), + ("tpEtaGreater2p7_highPurity", _allToHP(_tpEtaGreater2p7Name)), ("btvLike", _allToBTV(_allName)), ("ak4PFJets", "AK4 PF jets"), ("allTPEffic_", _allTPEfficName), @@ -181,6 +184,8 @@ def _ptCut(s): ("highPurityPt09", "High purity tracks (pT>0.9 GeV)"), ("tpPtLess09", _tpPtLess09Name), ("tpPtLess09_highPurity", _allToHP(_tpPtLess09Name)), + ("tpEtaGreater2p7", _tpEtaGreater2p7Name), + ("tpEtaGreater2p7_highPurity", _allToHP(_tpEtaGreater2p7Name)), ("btvLike", "BTV-like"), ("ak4PFJets", "AK4 PF jets"), ("allTPEffic", _allTPEfficName), diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index 18e38d0294aa7..70a11c004c5c5 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -1363,6 +1363,7 @@ def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, only plotter.appendTable(summaryName, folders, TrackingSummaryTable(section="ak4PFJets", collection=TrackingSummaryTable.AK4PFJets)) _appendTrackingPlots("Track", "", _simBasedPlots+_recoBasedPlots) _appendTrackingPlots("TrackTPPtLess09", "tpPtLess09", _simBasedPlots) +_appendTrackingPlots("TrackTPEtaGreater2p7", "tpEtaGreater2p7", _simBasedPlots) _appendTrackingPlots("TrackAllTPEffic", "allTPEffic", _simBasedPlots, onlyForPileup=True) _appendTrackingPlots("TrackFromPV", "fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=True) _appendTrackingPlots("TrackFromPVAllTP", "fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=True) diff --git a/Validation/RecoTrack/scripts/makeTrackValidationPlots.py b/Validation/RecoTrack/scripts/makeTrackValidationPlots.py index 3ed400a376641..ac458352c3dd0 100755 --- a/Validation/RecoTrack/scripts/makeTrackValidationPlots.py +++ b/Validation/RecoTrack/scripts/makeTrackValidationPlots.py @@ -47,6 +47,7 @@ def main(opts): "fromPV": limitProcessing, "fromPVAllTP": limitProcessing, "tpPtLess09": limitProcessing, + "tpEtaGreater2p7": limitProcessing, "seeding": limitProcessing, "building": limitProcessing, "bhadron": limitProcessing, @@ -60,6 +61,7 @@ def main(opts): "fromPV": ignore, "fromPVAllTP": ignore, "tpPtLess09": limitRelVal, + "tpEtaGreater2p7": limitRelVal, "seeding": ignore, "bhadron": limitRelVal, } diff --git a/Validation/RecoTrack/test/trackingCompare.py b/Validation/RecoTrack/test/trackingCompare.py index e52c1977ba5b6..483f572c44e38 100755 --- a/Validation/RecoTrack/test/trackingCompare.py +++ b/Validation/RecoTrack/test/trackingCompare.py @@ -70,14 +70,15 @@ def __call__(self, algo, quality): # "plot set" is not in the dictionary, full set of plots will be # produced for it limitSubFolders = { - "": limit, # The default set (signal TrackingParticles for efficiency, all TrackingParticles for fakes) - "tpPtLess09": limit, # Efficiency for TrackingParticles with pT < 0.9 GeV - "allTPEffic": ignore, # Efficiency with all TrackingParticles - "bhadron": limit, # Efficiency with B-hadron TrackingParticles - "fromPV": limit, # Tracks from PV, signal TrackingParticles for efficiency and fakes - "fromPVAllTP": limit, # Tracks from PV, all TrackingParticles for fakes - "building": ignore, # Built tracks (as opposed to selected tracks in above) - "seeding": ignore, # Seeds + "": limit, # The default set (signal TrackingParticles for efficiency, all TrackingParticles for fakes) + "tpPtLess09": limit, # Efficiency for TrackingParticles with pT < 0.9 GeV + "tpEtaGreater2p7": limit, # Efficiency for TrackingParticles with |eta| > 2.7 (phase 2) + "allTPEffic": ignore, # Efficiency with all TrackingParticles + "bhadron": limit, # Efficiency with B-hadron TrackingParticles + "fromPV": limit, # Tracks from PV, signal TrackingParticles for efficiency and fakes + "fromPVAllTP": limit, # Tracks from PV, all TrackingParticles for fakes + "building": ignore, # Built tracks (as opposed to selected tracks in above) + "seeding": ignore, # Seeds } # arguments to be passed to tracking val.doPlots() below kwargs_tracking["limitSubFoldersOnlyTo"]=limitSubFolders diff --git a/Validation/RecoTrack/test/trackingPerformanceValidation.py b/Validation/RecoTrack/test/trackingPerformanceValidation.py index e987e90c50425..bfcf1db00fca5 100755 --- a/Validation/RecoTrack/test/trackingPerformanceValidation.py +++ b/Validation/RecoTrack/test/trackingPerformanceValidation.py @@ -206,6 +206,7 @@ def ignore(a, q): # filter out the pT>0.9 GeV track selection "": limitRelVal, "tpPtLess09": limitRelVal, + "tpEtaGreater2p7": limitRelVal, "allTPEffic": limitRelVal, "fromPV": limitRelVal, "fromPVAllTP": limitRelVal, From 1d560f6e33bf046dcd7c9feec07b9a576dda3906 Mon Sep 17 00:00:00 2001 From: Juliette Date: Mon, 11 May 2020 09:49:49 +0200 Subject: [PATCH 2/2] add reco plots, generaletagreater2p7, and cutsrecoetagreater2p7 --- Validation/RecoTrack/python/plotting/trackingPlots.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index 70a11c004c5c5..d3525d8664b3e 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -632,8 +632,8 @@ def _mapCollectionToAlgoQuality(collName): collNameLow = collNameLow[:i_seeds] algo = None - prefixes = ["cutsreco", "cutsrecofrompv", "cutsrecofrompv2", "cutsrecofrompvalltp"] - if collNameLow in ["general", "generalfrompv"]+prefixes: + prefixes = ["cutsreco", "cutsrecofrompv", "cutsrecofrompv2", "cutsrecofrompvalltp", "cutsrecoetagreater2p7"] + if collNameLow in ["general", "generalfrompv", "generaletagreater2p7"]+prefixes: algo = "ootb" else: def testColl(coll): @@ -1363,7 +1363,7 @@ def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, only plotter.appendTable(summaryName, folders, TrackingSummaryTable(section="ak4PFJets", collection=TrackingSummaryTable.AK4PFJets)) _appendTrackingPlots("Track", "", _simBasedPlots+_recoBasedPlots) _appendTrackingPlots("TrackTPPtLess09", "tpPtLess09", _simBasedPlots) -_appendTrackingPlots("TrackTPEtaGreater2p7", "tpEtaGreater2p7", _simBasedPlots) +_appendTrackingPlots("TrackTPEtaGreater2p7", "tpEtaGreater2p7", _simBasedPlots+_recoBasedPlots) _appendTrackingPlots("TrackAllTPEffic", "allTPEffic", _simBasedPlots, onlyForPileup=True) _appendTrackingPlots("TrackFromPV", "fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=True) _appendTrackingPlots("TrackFromPVAllTP", "fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=True)