ATLAS Offline Software
InnerDetector
InDetMonitoring
SCT_Monitoring
python
SCTPostProcessing.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
#
4
def
effcomb
(inputs):
5
import
ROOT
6
rv = ROOT.TH1F(
'SctEffDistribution;Efficiency;Links'
,
'SCT Efficiency Distribution'
, 500, 0, 1)
7
plots = [_[1][0]
for
_
in
inputs]
# all plots passed as first element of list
8
rv.GetXaxis().SetTitle(
'Efficiency'
)
9
rv.GetYaxis().SetTitle(
'Links'
)
10
for
plot
in
plots:
11
for
xbin
in
range
(plot.GetNbinsX()):
12
for
ybin
in
range
(plot.GetNbinsY()):
13
if
(plot.GetBinEntries(plot.GetBin(xbin,ybin))==0):
14
continue
15
rv.Fill(plot.GetBinContent(xbin,ybin))
16
return
[rv]
17
18
def
conf
(inputs, label, thr):
19
import
ROOT
20
rh = ROOT.TH1F(
'SCTConfNew'
,
'Num of Problematic Modules in All Region'
, 5, -0.5, 4.5)
21
for
l
in
range
(len(label)):
22
rh.GetXaxis().SetBinLabel(l+1,label[l])
23
for
i
in
range
(len(inputs[0][1])):
24
plots = [_[1][i]
for
_
in
inputs]
# all plots passed as first element of list
25
if
i < 3:
26
#for plot in plots:
27
for
m
in
range
(
int
(len(plots)/2)):
28
plot0 = plots[2*m]
29
plot1 = plots[2*m+1]
30
for
xbin
in
range
(plot0.GetNbinsX()):
31
for
ybin
in
range
(plot0.GetNbinsY()):
32
if
(plot0.GetBinContent(xbin+1,ybin+1) > thr[i]
or
plot1.GetBinContent(xbin+1,ybin+1) > thr[i]):
33
rh.Fill(i)
34
else
:
35
#use only first plot as all others are replicas (only for Masked and flagged links plots)
36
rh.Fill(i,plots[0].GetBinContent(4))
37
return
[rh]
CaloCellPos2Ntuple.int
int
Definition:
CaloCellPos2Ntuple.py:24
SCTPostProcessing.effcomb
def effcomb(inputs)
Definition:
SCTPostProcessing.py:4
plotBeamSpotVxVal.range
range
Definition:
plotBeamSpotVxVal.py:195
SCTPostProcessing.conf
def conf(inputs, label, thr)
Definition:
SCTPostProcessing.py:18
if
if(febId1==febId2)
Definition:
LArRodBlockPhysicsV0.cxx:567
Generated on Thu Nov 7 2024 21:25:40 for ATLAS Offline Software by
1.8.18