Skip to content
Snippets Groups Projects
Commit 0759cdc6 authored by Cristiano Sebastiani's avatar Cristiano Sebastiani Committed by Adam Edward Barton
Browse files

SCT monitoring: added configuration files for the new-style postprocessing

parent 7e01a0a6
No related branches found
No related tags found
No related merge requests found
#
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# Separate blocks with ---
#
---
Input: [
'SCT(?P<sec>[A-E]*)/Noise/noiseoccupancymaptrigger(?P<sec2>[ECm,ECp]*)_(?P<L>\d)_(?P<S>\d)',
'SCT(?P<sec>[A-E]*)/eff/ineff.*_(?P<L>\d)_(?P<S>\d)',
'SCT(?P<sec>[A-E]*)/errors/Errors/SCT_NumberOfErrors(?P=sec)_(?P<L>\d)_(?P<S>\d)',
'GENERAL/errors/Masked\ Links',
#'GENERAL/errors/Flagged\ Links', #Location of this hist yet to be defined
]
Output: [ 'SCTConfNew' ]
Function: SCT_Monitoring.SCTPostProcessing.conf
Parameters: { label: ['Noisy','Inefficieny','Errors','Masked Links','Flagged Links'], thr: [150,0.1,0.7] }
Description: SCTCONF
---
Input: [ 'SCT(?P<sec>[EC,B,EA]*)/eff/[m_,p_]*eff_(?P<L>\d)_(?P<S>\d)$' ]
Output: [ 'SctEffDistribution' ]
Function: SCT_Monitoring.SCTPostProcessing.effcomb
Description: Combining
#
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
#
def effcomb(inputs):
import ROOT
rv = ROOT.TH1F('SctEffDistribution;Efficiency;Links', 'SCT Efficiency Distribution', 500, 0, 1)
plots = [_[1][0] for _ in inputs] # all plots passed as first element of list
rv.GetXaxis().SetTitle('Efficiency')
rv.GetYaxis().SetTitle('Links')
for plot in plots:
for xbin in range(plot.GetNbinsX()):
for ybin in range(plot.GetNbinsY()):
if(plot.GetBinEntries(plot.GetBin(xbin,ybin))==0):
continue
rv.Fill(plot.GetBinContent(xbin,ybin))
return [rv]
def conf(inputs, label, thr):
import ROOT
rh = ROOT.TH1F('SCTConfNew', 'Num of Problematic Modules in All Region', 5, -0.5, 4.5)
for l in range(len(label)):
rh.GetXaxis().SetBinLabel(l+1,label[l])
for i in range(len(inputs[0][1])):
plots = [_[1][i] for _ in inputs] # all plots passed as first element of list
if i < 3:
#for plot in plots:
for m in range(int(len(plots)/2)):
plot0 = plots[2*m]
plot1 = plots[2*m+1]
for xbin in range(plot0.GetNbinsX()):
for ybin in range(plot0.GetNbinsY()):
if (plot0.GetBinContent(xbin+1,ybin+1) > thr[i] or plot1.GetBinContent(xbin+1,ybin+1) > thr[i]):
rh.Fill(i)
else:
#use only first plot as all others are replicas (only for Masked and flagged links plots)
rh.Fill(i,plots[0].GetBinContent(4))
return [rh]
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