Skip to content

Commit

Permalink
Synchronise with CMSSW_11_2_0_pre7
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Oct 20, 2020
1 parent 093694e commit 69a720b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import FWCore.ParameterSet.Config as cms

from RecoLocalTracker.SiPixelRecHits.PixelCPEParmError_cfi import *
from RecoLocalTracker.SiStripRecHitConverter.StripCPEfromTrackAngle_cfi import *
from RecoLocalTracker.SiStripRecHitConverter.SiStripRecHitMatcher_cfi import *
from RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilder_cfi import *
Expand Down
5 changes: 5 additions & 0 deletions Validation/RecoTrack/python/PostProcessorTracker_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,25 +173,30 @@ def _addNoFlow(module):
"cotThetares_vs_eta '#sigma(cot(#theta)) vs #eta' cotThetares_vs_eta",
"cotThetares_vs_pt '#sigma(cot(#theta)) vs p_{T}' cotThetares_vs_pt",
"h_dxypulleta 'd_{xy} Pull vs #eta' dxypull_vs_eta",
"h_dxypullpt 'd_{xy} Pull vs p_{T}' dxypull_vs_pt",
"dxyres_vs_eta '#sigma(d_{xy}) vs #eta' dxyres_vs_eta",
"dxyres_vs_phi '#sigma(d_{xy}) vs #phi' dxyres_vs_phi",
"dxyres_vs_pt '#sigma(d_{xy}) vs p_{T}' dxyres_vs_pt",
"h_dzpulleta 'd_{z} Pull vs #eta' dzpull_vs_eta",
"h_dzpullpt 'd_{z} Pull vs p_{T}' dzpull_vs_pt",
"dzres_vs_eta '#sigma(d_{z}) vs #eta' dzres_vs_eta",
"dzres_vs_phi '#sigma(d_{z}) vs #phi' dzres_vs_phi",
"dzres_vs_pt '#sigma(d_{z}) vs p_{T}' dzres_vs_pt",
"etares_vs_eta '#sigma(#eta) vs #eta' etares_vs_eta",
"h_phipulleta '#phi Pull vs #eta' phipull_vs_eta",
"h_phipullpt '#phi Pull vs p_{T}' phipull_vs_pt",
"h_phipullphi '#phi Pull vs #phi' phipull_vs_phi",
"phires_vs_eta '#sigma(#phi) vs #eta' phires_vs_eta",
"phires_vs_phi '#sigma(#phi) vs #phi' phires_vs_phi",
"phires_vs_pt '#sigma(#phi) vs p_{T}' phires_vs_pt",
"h_ptpulleta 'p_{T} Pull vs #eta' ptpull_vs_eta",
"h_ptpullpt 'p_{T} Pull vs p_{T}' ptpull_vs_pt",
"h_ptpullphi 'p_{T} Pull vs #phi' ptpull_vs_phi",
"ptres_vs_eta '#sigma(p_{T}) vs #eta' ptres_vs_eta",
"ptres_vs_phi '#sigma(p_{T}) vs #phi' ptres_vs_phi",
"ptres_vs_pt '#sigma(p_{T}) vs p_{T}' ptres_vs_pt",
"h_thetapulleta '#theta Pull vs #eta' thetapull_vs_eta",
"h_thetapullpt '#theta Pull vs p_{T}' thetapull_vs_pt",
"h_thetapullphi '#theta Pull vs #phi' thetapull_vs_phi"
),
cumulativeDists = cms.untracked.vstring(
Expand Down
15 changes: 14 additions & 1 deletion Validation/RecoTrack/python/TrackValidation_cff.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import
import FWCore.ParameterSet.Config as cms

import SimTracker.TrackAssociatorProducers.trackAssociatorByChi2_cfi
from SimTracker.TrackAssociatorProducers.trackAssociatorByChi2_cfi import *
from SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi import *
from SimTracker.TrackAssociation.trackingParticleRecoTrackAsssociation_cfi import *
import Validation.RecoTrack.MultiTrackValidator_cfi
Expand Down Expand Up @@ -353,6 +353,11 @@ def _getMVASelectors(postfix):
ptMin = 0,
)

#ByChi2 association (for jetCore usage, not used by default)
MTVTrackAssociationByChi2 = trackingParticleRecoTrackAsssociation.clone(
associator = cms.InputTag('trackAssociatorByChi2')
)

# Select jets for JetCore tracking
highPtJets = cms.EDFilter("CandPtrSelector", src = cms.InputTag("ak4CaloJets"), cut = cms.string("pt()>1000"))
highPtJetsForTrk = highPtJetsForTrk = highPtJets.clone(src = "ak4CaloJetsForTrk")
Expand All @@ -364,6 +369,7 @@ def _getMVASelectors(postfix):
trackValidator = Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone(
useLogPt = cms.untracked.bool(True),
dodEdxPlots = True,
# associators=cms.untracked.VInputTag('MTVTrackAssociationByChi2'), #uncomment for byChi2 assoc. for jetcore studies (1/5)
doPVAssociationPlots = True
#,minpT = cms.double(-1)
#,maxpT = cms.double(3)
Expand All @@ -387,6 +393,7 @@ def _getMVASelectors(postfix):
locals()["_generalTracksHp"+_postfix],
"generalTracksPt09",
"cutsRecoTracksBtvLike",
"cutsRecoTracksJetCoreRegionalStepByOriginalAlgo",
]
)
_setForEra(trackValidator.histoProducerAlgoBlock, _eraName, _era, seedingLayerSets=locals()["_seedingLayerSets"+_postfix])
Expand Down Expand Up @@ -537,6 +544,9 @@ def _getMVASelectors(postfix):
trackValidatorBuilding = _trackValidatorSeedingBuilding.clone(
dirName = "Tracking/TrackBuilding/",
doMVAPlots = True,
doResolutionPlotsForLabels = ['jetCoreRegionalStepTracks'],
# associators = ["trackAssociatorByChi2"], #uncomment for byChi2 assoc. for jetcore studies (2/5)
# UseAssociators = True, #uncomment for byChi2 assoc. for jetcore studies (3/5)
)
trackValidatorBuildingPreSplitting = trackValidatorBuilding.clone(
associators = ["quickTrackAssociatorByHitsPreSplitting"],
Expand Down Expand Up @@ -653,6 +663,8 @@ def _uniqueFirstLayers(layerList):
tracksValidationTruth = cms.Task(
tpClusterProducer,
tpClusterProducerPreSplitting,
# trackAssociatorByChi2, #uncomment for byChi2 assoc. for jetcore studies (4/5)
# MTVTrackAssociationByChi2, #uncomment for byChi2 assoc. for jetcore studies (5/5)
quickTrackAssociatorByHits,
quickTrackAssociatorByHitsPreSplitting,
trackingParticleRecoTrackAsssociation,
Expand Down Expand Up @@ -844,6 +856,7 @@ def _uniqueFirstLayers(layerList):
dirName = "Tracking/TrackSeeding/",
label = _seedSelectors,
doSeedPlots = True,
doResolutionPlotsForLabels = [ "seedTracksjetCoreRegionalStepSeeds",]
)
trackValidatorSeedingPreSplittingTrackingOnly = trackValidatorSeedingTrackingOnly.clone(
associators = ["quickTrackAssociatorByHitsPreSplitting"],
Expand Down
10 changes: 6 additions & 4 deletions Validation/RecoTrack/python/plotting/trackingPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
_maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
_minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
_minMaxMVA = [-1.025, -0.5, 0, 0.5, 1.025]
_maxDRJ = 0.1

def _minMaxResidual(ma):
return ([-x for x in ma], ma)
Expand Down Expand Up @@ -216,7 +217,7 @@ def _makeMVAPlots(num, hp=False):
)
_effandfakeDeltaRPU = PlotGroup("effandfakeDeltaRPU",
_makeEffFakeDupPlots("dr" , "#DeltaR", effopts=dict(xtitle="TP min #DeltaR"), fakeopts=dict(xtitle="track min #DeltaR"), common=dict(xlog=True)) +
_makeEffFakeDupPlots("drj" , "#DeltaR(track, jet)", effopts=dict(xtitle="#DeltaR(TP, jet)", ytitle="efficiency vs #DeltaR(TP, jet"), fakeopts=dict(xtitle="#DeltaR(track, jet)"), common=dict(xlog=True))+
_makeEffFakeDupPlots("drj" , "#DeltaR(track, jet)", effopts=dict(xtitle="#DeltaR(TP, jet)", ytitle="efficiency vs #DeltaR(TP, jet"), fakeopts=dict(xtitle="#DeltaR(track, jet)"), common=dict(xlog=True, xmax=_maxDRJ))+
_makeEffFakeDupPlots("pu" , "PU" , common=dict(xtitle="Pileup", xmin=_minPU, xmax=_maxPU)),
legendDy=_legendDy_4rows
)
Expand Down Expand Up @@ -262,7 +263,7 @@ def _makeMVAPlots(num, hp=False):
)
_dupandfakeDeltaRPU = PlotGroup("dupandfakeDeltaRPU",
_makeFakeDupPileupPlots("dr" , "#DeltaR", xquantity="min #DeltaR", common=dict(xlog=True)) +
_makeFakeDupPileupPlots("drj" , "#DeltaR(track, jet)", xtitle="#DeltaR(track, jet)", common=dict(xlog=True)) +
_makeFakeDupPileupPlots("drj" , "#DeltaR(track, jet)", xtitle="#DeltaR(track, jet)", common=dict(xlog=True, xmax=_maxDRJ)) +
_makeFakeDupPileupPlots("pu" , "PU" , xtitle="Pileup", common=dict(xmin=_minPU, xmax=_maxPU)),
ncols=3
)
Expand Down Expand Up @@ -373,6 +374,7 @@ def _makeMVAPlots(num, hp=False):
fallback={"name": "chi2_vs_eta", "profileX": True}),
Plot("ptres_vs_eta_Mean", scale=100, title="", xtitle="TP #eta (PCA to beamline)", ytitle="< #delta p_{T} / p_{T} > (%)", ymin=_minResidualPt, ymax=_maxResidualPt),
Plot("chi2mean_vs_pt", title="", xtitle="p_{T}", ytitle="< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5], xlog=True, fallback={"name": "chi2_vs_pt", "profileX": True}),
Plot("chi2mean_vs_drj", title="", xtitle="#DeltaR(track, jet)", ytitle="< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5], xlog=True, xmax=_maxDRJ, fallback={"name": "chi2_vs_drj", "profileX": True}),
Plot("ptres_vs_pt_Mean", title="", xtitle="p_{T}", ytitle="< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt,xlog=True)
])
_common = {"stat": True, "fit": True, "normalizeToUnitArea": True, "drawStyle": "hist", "drawCommand": "", "xmin": -10, "xmax": 10, "ylog": True, "ymin": 5e-5, "ymax": [0.01, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025], "ratioUncertainty": False}
Expand Down Expand Up @@ -441,7 +443,7 @@ def _makeMVAPlots(num, hp=False):
)
_extDistDeltaR = PlotGroup("distDeltaR",
_makeDistPlots("dr" , "min #DeltaR", common=dict(xlog=True)) +
_makeDistPlots("drj" , "#DeltaR(track, jet)", common=dict(xlog=True)),
_makeDistPlots("drj" , "#DeltaR(track, jet)", common=dict(xlog=True, xmax=_maxDRJ)),
ncols=2, legendDy=_legendDy_2rows,
)
_extDistSeedingPlots = _makeDistPlots("seedingLayerSet", "seeding layers", common=dict(xtitle="", **_seedingLayerSet_common))
Expand Down Expand Up @@ -512,7 +514,7 @@ def _makeMVAPlots(num, hp=False):
)
_extDistSimDeltaR = PlotGroup("distsimDeltaR",
_makeDistSimPlots("dr" , "min #DeltaR", common=dict(xlog=True)) +
_makeDistSimPlots("drj" , "#DeltaR(TP, jet)", common=dict(xlog=True)),
_makeDistSimPlots("drj" , "#DeltaR(TP, jet)", common=dict(xlog=True, xmax=_maxDRJ)),
ncols=2, legendDy=_legendDy_2rows,
)

Expand Down

0 comments on commit 69a720b

Please sign in to comment.