Skip to content
Snippets Groups Projects
Commit 8cbb1653 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'more-min-bias-trigger-dq' into 'master'

Updates to HLT mb_sptrk chains monitoring

See merge request atlas/athena!42125
parents 2acb71cf 2d3fb72f
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!42125Updates to HLT mb_sptrk chains monitoring
...@@ -90,27 +90,38 @@ dir HLT { ...@@ -90,27 +90,38 @@ dir HLT {
} }
dir Tracking { dir Tracking {
dir HLT_mb_sptrk_L1RD0_FILLED { dir HLT_mb_sptrk_L1RD0_FILLED {
hist efficiency_low_mult { hist efficiencyLowMult {
output = HLT/Run3/TRMBI/SHIFTER output = HLT/Run3/TRMBI/SHIFTER
description = "Normal: Quick rise to almost 100% for 1,2 tracks, no eff. drop for higher multiplicities" description = Normal: Quick rise to almost 100% for 1,2 tracks, no eff. drop for higher multiplicities
} }
hist nTrkOfflineLowMult {
output = HLT/Run3/TRMBI/SHIFTER
description = Normal: Quick rise to almost 100% for 1,2 tracks, no eff. drop for higher multiplicities
}
hist nTrkOnlineLowMult {
output = HLT/Run3/TRMBI/SHIFTER
description = Normal: Sharp rise at ntrk ==1, (literally has to be a step function)
}
} }
dir HLT_mb_sp.* { dir HLT_mb_sp.* {
hist efficiency_low_mult {
output = HLT/Run3/TRMBI/SHIFTER/SPTRK
description = "Normal: Quick rise to almost 100% for 1,2 tracks, no eff. drop for higher multiplicities"
}
hist nTrkRatio { hist nTrkRatio {
output = HLT/Run3/TRMBI/EXPERT/SPTRK output = HLT/Run3/TRMBI/EXPERT/SPTRK
description = "Normal: narrow peak slightly below 1 (0.9), if much below it means online tracking has to many fakes" description = Normal: narrow peak slightly below 1 (0.9), if much below it means online tracking has to many fakes
} }
} }
dir HLT_.*hmt.* { dir HLT_.*hmt.* {
hist nTrkOffline_vs_decision { hist efficiencyAnyMult {
output = HLT/Run3/TRMBI/SHIFTER/SPTRK output = HLT/Run3/TRMBI/SHIFTER/SPTRK
description = "Normal: Typical trigger turn-on, should be reaching max around the threshold specified in the trigger name" description = Normal: Typical trigger turn-on, should be reaching max around the threshold specified in the trigger name
}
hist nTrkOnline {
output = HLT/Run3/TRMBI/EXPERT/SPTRK
description = Normal: exponent like distribution with a hard cut from the left side
}
hist nTrkOffline {
output = HLT/Run3/TRMBI/EXPERT/SPTRK
description = Normal: exponent like distribution with a soft cut from the left side
} }
} }
} }
......
...@@ -11,11 +11,11 @@ def TrigSPTRK(configFlags): ...@@ -11,11 +11,11 @@ def TrigSPTRK(configFlags):
from AthenaMonitoring import AthMonitorCfgHelper from AthenaMonitoring import AthMonitorCfgHelper
monConfig = AthMonitorCfgHelper(configFlags, "HLTMinBiasTrkMonAlg") monConfig = AthMonitorCfgHelper(configFlags, "HLTMBSPTRKMonAlg")
from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentFactory import CompFactory
alg = monConfig.addAlgorithm(CompFactory.HLTMinBiasTrkMonAlg, "HLTMinBiasTrkMonAlg") alg = monConfig.addAlgorithm(CompFactory.HLTMinBiasTrkMonAlg, "HLTMBSPTRKMonAlg")
trkSel = CompFactory.InDet.InDetTrackSelectionTool( trkSel = CompFactory.InDet.InDetTrackSelectionTool(
"InDetTrackSelectionTool_TightPrimary", CutLevel="TightPrimary" "InDetTrackSelectionTool_TightPrimary", CutLevel="TightPrimary"
) )
...@@ -26,191 +26,46 @@ def TrigSPTRK(configFlags): ...@@ -26,191 +26,46 @@ def TrigSPTRK(configFlags):
mbEffAllGroup = monConfig.addGroup(alg, "EffAll", topPath="HLT/MinBiasMon/") mbEffAllGroup = monConfig.addGroup(alg, "EffAll", topPath="HLT/MinBiasMon/")
length = len(alg.triggerList) length = len(alg.triggerList)
mbEffAllGroup.defineHistogram( mbEffAllGroup.defineHistogram( "PurityPassed,whichTrigger", type="TH2D", title=";Purity;trigger passed", xbins=2, xmin=0, xmax=2, xlabels=["0 track", ">0 tracks"],
"PurityPassed,whichTrigger", ybins=length, ymin=0, ymax=length, ylabels=list(alg.triggerList) )
type="TH2D", mbEffAllGroup.defineHistogram( "whichTrigger", title="count of triggers;HLT", xbins=length, xmin=0, xmax=length, xlabels=list(alg.triggerList) )
title=";Purity;trigger passed",
xbins=2,
xmin=0,
xmax=2,
xlabels=["0 track", ">0 tracks"],
ybins=length,
ymin=0,
ymax=length,
ylabels=list(alg.triggerList),
)
mbEffAllGroup.defineHistogram(
"whichTrigger",
title="count of triggers;HLT",
xbins=length,
xmin=0,
xmax=length,
xlabels=list(alg.triggerList),
)
for chain in alg.triggerList: for chain in alg.triggerList:
mbEffGroup = monConfig.addGroup( mbEffGroup = monConfig.addGroup(
alg, chain + "_Tracking", topPath="HLT/MinBiasMon/Tracking/" + chain + "/" alg, chain + "_Tracking", topPath="HLT/MinBiasMon/Tracking/" + chain + "/"
) )
mbEffGroup.defineHistogram(
"decision,nTrkOffline", mbEffGroup.defineHistogram( "decision,nTrkOffline;efficiencyAnyMult", type="TEfficiency", title="Efficiency;Offline Good nTrk", xbins=100, xmin=0, xmax=400 )
type="TEfficiency", mbEffGroup.defineHistogram( "decision,nTrkOffline;efficiencyLowMult", type="TEfficiency", title="Efficiency;Offline Good nTrk", xbins=50, xmin=0, xmax=50 )
title="Efficiency;Offline Good nTrk", mbEffGroup.defineHistogram( "nTrkOffline;nTrkOfflineLowMult", title="Number of tracks reconstructed offline;track counts", xbins=50, xmin=-1, xmax=50 )
xbins=100,
xmin=0, mbEffGroup.defineHistogram( "nTrkOffline", title="Number of tracks reconstructed offline;track counts", xbins=100, xmin=-1, xmax=400 )
xmax=1000, mbEffGroup.defineHistogram( "nTrkOnline;nTrkOnlineLowMult", title="Number of tracks reconstructed online;track counts", xbins=50, xmin=-1, xmax=50 )
) mbEffGroup.defineHistogram( "nTrkOnline", title="Number of tracks reconstructed online;track counts", xbins=100, xmin=-1, xmax=400 )
mbEffGroup.defineHistogram( mbEffGroup.defineHistogram( "nTrkRatio", title="Number of tracks reconstructed online/offline;track counts online/offline", xbins=100, xmin=-1, xmax=4 )
"decision,nTrkOffline;efficiency_low_mult", mbEffGroup.defineHistogram( "decision,nTrkOnline", type="TEfficiency", title="Efficiency (step curve);Online nTrk", xbins=1000, xmin=0, xmax=1000 ) # expert plots
type="TEfficiency", mbEffGroup.defineHistogram( "trkSelOfflineRatio", path="Expert", title="Number of tracks reconstructed offline(selected)/offline; N sel/all", xbins=100, xmin=0.1, xmax=1.9 )
title="Efficiency;Offline Good nTrk", mbEffGroup.defineHistogram( "nTrkOnline,nTrkOffline", type="TH2F", path="Expert", title=";N online tracks;N offline tracks", xbins=20, xmin=0, xmax=400, ybins=20, ymin=0, ymax=400 )
xbins=50,
xmin=0,
xmax=50,
)
mbEffGroup.defineHistogram(
"nTrkRatio",
title="Number of tracks reconstructed online/offline;track counts online/offline",
xbins=100,
xmin=-1,
xmax=4,
)
mbEffGroup.defineHistogram(
"decision,nTrk",
type="TEfficiency",
title="Efficiency (step curve);Online nTrk",
xbins=1000,
xmin=0,
xmax=1000,
)
# expert plots
mbEffGroup.defineHistogram(
"trkSelOfflineRatio",
path="Expert",
title="Number of tracks reconstructed offline(selected)/offline; N sel/all",
xbins=100,
xmin=-1,
xmax=4,
)
mbEffGroup.defineHistogram(
"nTrkOnline,nTrkOffline",
type="TH2F",
path="Expert",
title=";N online tracks;N oflfine tracks",
xbins=20,
xmin=0,
xmax=2000,
ybins=20,
ymin=0,
ymax=2000,
)
mbSpGroup = monConfig.addGroup( mbSpGroup = monConfig.addGroup(
alg, alg,
chain + "_SpacePoints", chain + "_SpacePoints",
topPath="HLT/MinBiasMon/SPacePoints/" + chain + "/", topPath="HLT/MinBiasMon/SpacePoints/" + chain + "/",
) )
mbSpGroup.defineHistogram( mbSpGroup.defineHistogram( "PixelCL;PixelCLNarrowRange", title="Number of SP in whole Pixels detector for all events", xbins=100, xmin=0, xmax=100 )
"PixelCL;PixelCLNarrowRange", mbSpGroup.defineHistogram( "PixelCL;PixelCLWideRange", title="Number of SP in whole Pixels detector for all events", xbins=100, xmin=0, xmax=30000 )
title="Number of SP in whole Pixels detector for all events", mbSpGroup.defineHistogram( "PixBarr_SP", title="Number of SP for all events in Barrel", xbins=100, xmin=0, xmax=30000 )
xbins=100, mbSpGroup.defineHistogram( "PixECA_SP", title="Number of SP for all events in ECA", xbins=100, xmin=0, xmax=30000 )
xmin=0, mbSpGroup.defineHistogram( "PixECC_SP", title="Number of SP for all events in ECC", xbins=100, xmin=0, xmax=30000 )
xmax=100, mbSpGroup.defineHistogram( "SctTot", title="Number of SP in whole SCT detector for all events", xbins=100, xmin=0, xmax=120000 )
) mbSpGroup.defineHistogram( "SctBarr_SP", title="Number of SCT_SP for all events in Barrel", xbins=100, xmin=0, xmax=50000 )
mbSpGroup.defineHistogram( mbSpGroup.defineHistogram( "SctECA_SP", title="Number of SCT_SP for all events in ECA", xbins=100, xmin=0, xmax=50000 )
"PixelCL;PixelCLWideRange", mbSpGroup.defineHistogram( "SctECC_SP", title="Number of SCT_SP for all events in ECC", xbins=100, xmin=0, xmax=50000 )
title="Number of SP in whole Pixels detector for all events",
xbins=100,
xmin=0,
xmax=30000,
)
mbSpGroup.defineHistogram(
"PixBarr_SP",
title="Number of SP for all events in Barrel",
xbins=100,
xmin=0,
xmax=30000,
)
mbSpGroup.defineHistogram(
"PixECA_SP",
title="Number of SP for all events in ECA",
xbins=100,
xmin=0,
xmax=30000,
)
mbSpGroup.defineHistogram(
"PixECC_SP",
title="Number of SP for all events in ECC",
xbins=100,
xmin=0,
xmax=30000,
)
mbSpGroup.defineHistogram(
"SctTot",
title="Number of SP in whole SCT detector for all events",
xbins=100,
xmin=0,
xmax=120000,
)
mbSpGroup.defineHistogram(
"SctBarr_SP",
title="Number of SCT_SP for all events in Barrel",
xbins=100,
xmin=0,
xmax=50000,
)
mbSpGroup.defineHistogram(
"SctECA_SP",
title="Number of SCT_SP for all events in ECA",
xbins=100,
xmin=0,
xmax=50000,
)
mbSpGroup.defineHistogram(
"SctECC_SP",
title="Number of SCT_SP for all events in ECC",
xbins=100,
xmin=0,
xmax=50000,
)
# expert plots # expert plots
mbSpGroup.defineHistogram( mbSpGroup.defineHistogram( "SctECA_SP,SctECC_SP", type="TH2F", title="SctECA_SP;SctECC_SP", xbins=100, xmin=0, xmax=100, ybins=100, ymin=0, ymax=100 )
"SctECA_SP,SctECC_SP", mbSpGroup.defineHistogram( "PixECA_SP,PixECC_SP", type="TH2F", title="PixECA_SP;PixECC_SP", xbins=100, xmin=0, xmax=100, ybins=100, ymin=0, ymax=100 )
type="TH2F", mbSpGroup.defineHistogram( "SctBarr_SP,PixBarr_SP", type="TH2F", title="SctBarr_SP;PixBarr_SP", xbins=100, xmin=0, xmax=100, ybins=100, ymin=0, ymax=100 )
path="Expert",
title="SctECA_SP;SctECC_SP",
xbins=100,
xmin=0,
xmax=100,
ybins=100,
ymin=0,
ymax=100,
)
mbSpGroup.defineHistogram(
"PixECA_SP,PixECC_SP",
type="TH2F",
path="Expert",
title="PixECA_SP;PixECC_SP",
xbins=100,
xmin=0,
xmax=100,
ybins=100,
ymin=0,
ymax=100,
)
mbSpGroup.defineHistogram(
"SctBarr_SP,PixBarr_SP",
type="TH2F",
path="Expert",
title="SctBarr_SP;PixBarr_SP",
xbins=100,
xmin=0,
xmax=100,
ybins=100,
ymin=0,
ymax=100,
)
return monConfig.result() return monConfig.result()
...@@ -221,8 +76,6 @@ if __name__ == "__main__": ...@@ -221,8 +76,6 @@ if __name__ == "__main__":
Configurable.configurableRun3Behavior = 1 Configurable.configurableRun3Behavior = 1
# Setup logs
from AthenaCommon.Constants import DEBUG
# Set the Athena configuration flags # Set the Athena configuration flags
from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaConfiguration.AllConfigFlags import ConfigFlags
...@@ -232,9 +85,7 @@ if __name__ == "__main__": ...@@ -232,9 +85,7 @@ if __name__ == "__main__":
# ConfigFlags.Input.Files = ['/afs/cern.ch/user/s/somadutt/public/testUPC2.AOD.pool.root'] #Local HI-UPC file # ConfigFlags.Input.Files = ['/afs/cern.ch/user/s/somadutt/public/testUPC2.AOD.pool.root'] #Local HI-UPC file
# data AOD file # data AOD file
# ConfigFlags.Input.Files = ["myAOD.pool.root"]
# ConfigFlags.Input.Files = ['/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2020-05-22T2142/TrigAnalysisTest/test_trigAna_RDOtoT0Mon_mt1_build/AOD.pool.root']
ConfigFlags.Input.Files = ["myAOD.pool.root"]
# ConfigFlags.Input.isMC = True #un-Comment this line for MC AOD files, comment for data-AOD files # ConfigFlags.Input.isMC = True #un-Comment this line for MC AOD files, comment for data-AOD files
ConfigFlags.Output.HISTFileName = "TestMonitorOutput.root" ConfigFlags.Output.HISTFileName = "TestMonitorOutput.root"
...@@ -250,8 +101,8 @@ if __name__ == "__main__": ...@@ -250,8 +101,8 @@ if __name__ == "__main__":
cfg.merge(TrigSPTRK(ConfigFlags)) cfg.merge(TrigSPTRK(ConfigFlags))
# If you want to turn on more detailed messages ... # If you want to turn on more detailed messages ...
# cfg.getEventAlgo('HLTMinBiasTrkMonAlg').OutputLevel = 2 # DEBUG #either this line or the next works!! from AthenaCommon.Constants import DEBUG
cfg.getEventAlgo("HLTMinBiasTrkMonAlg").OutputLevel = DEBUG # DEBUG cfg.getEventAlgo("HLTMBSPTRKMonAlg").OutputLevel = DEBUG
cfg.printConfig(withDetails=True) # set True for exhaustive info cfg.printConfig(withDetails=True) # set True for exhaustive info
with open("cfg.pkl", "wb") as f: with open("cfg.pkl", "wb") as f:
cfg.store(f) cfg.store(f)
......
...@@ -131,12 +131,12 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext &context) co ...@@ -131,12 +131,12 @@ StatusCode HLTMinBiasTrkMonAlg::monitorTrkCounts(const EventContext &context) co
if ( ! (passBits & TrigDefs::EF_prescaled) ) if ( ! (passBits & TrigDefs::EF_prescaled) )
{ {
auto decision = Scalar<int>("decision", trigDecTool->isPassed(trig, TrigDefs::requireDecision) ? 1 : 0); auto decision = Scalar<int>("decision", trigDecTool->isPassed(trig, TrigDefs::requireDecision) ? 1 : 0);
auto nTrk = Scalar("nTrkOnline", trkCountsHandle->at(0)->getDetail<int>("ntrks")); auto nTrkOnline = Scalar("nTrkOnline", trkCountsHandle->at(0)->getDetail<int>("ntrks"));
auto whichtrigger = Scalar<std::string>("whichTrigger", trig); auto whichtrigger = Scalar<std::string>("whichTrigger", trig);
double nTrkRatio = offlineTrkHandle->size() > 0 ? static_cast<double>(offlineTrkHandle->size()) / static_cast<double>(trkCountsHandle->at(0)->getDetail<int>("ntrks")) : -1.0; double nTrkRatio = offlineTrkHandle->size() > 0 ? static_cast<double>(offlineTrkHandle->size()) / static_cast<double>(trkCountsHandle->at(0)->getDetail<int>("ntrks")) : -1.0;
auto trkRatio = Scalar("nTrkRatio", nTrkRatio); auto trkRatio = Scalar("nTrkRatio", nTrkRatio);
fill(trig + "_Tracking", nTrkOffline, nAllTrkOffline, decision, whichtrigger, trkRatio, nMBTrkTrkOfflineRatio); fill(trig + "_Tracking", nTrkOffline, nAllTrkOffline, nTrkOnline, decision, whichtrigger, trkRatio, nMBTrkTrkOfflineRatio);
fill("EffAll", decision, whichtrigger); fill("EffAll", decision, whichtrigger);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment