Skip to content

Update to the PPS layouts #1350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 17 additions & 56 deletions dqmgui/layouts/shift_ctpps_T0_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro

CTPPSCommonLayout(dqmitems, "Pixel ROC hits vs LS "+sector, *rows)


# RP state per LS plot
rows = list()
row = list()
row.append("CTPPS/common/rpstate per LS")
rows.append(row)
CTPPSCommonLayout(dqmitems, "RP state per LS", *rows)


###
# CTPPS Strips
###

# layouts with no overlays
for plot in [ "active planes", "vfats with any problem", "track XY profile" ]:
rows = list()
Expand Down Expand Up @@ -95,21 +108,8 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro
###
# CTPPS Pixel
###
for plot in ["hit multiplicity in planes"]:
rows = list()
row = list()
for station in pixelstations:
row.append("CTPPS/TrackingPixel/sector 45/"+station+"/fr_hr/"+plot)
rows.append(row)

row = list()
for station in pixelstations:
row.append("CTPPS/TrackingPixel/sector 56/"+station+"/fr_hr/"+plot)
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)

for plot in ["number of fired planes per event","ROCs hits multiplicity per event","track intercept point","number of tracks per event","Error Code"]:
for plot in ["number of fired planes per event"]:
rows = list()
row = list()
for station in pixelstations:
Expand All @@ -123,24 +123,6 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)

for sector in sectors:
rows = list()
for station in pixelstations:
row = list()
row.append("CTPPS/TrackingPixel/"+sector+"/"+station+"/fr_hr/"+
"ROCs hits multiplicity per event vs LS")
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, "ROC hits vs LS "+sector, *rows)

for plot in ["Pixel planes activity"]:
rows = list()
row = list()
row.append("CTPPS/TrackingPixel/"+plot)
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)

for plot in ["hits position"]:
for sector in sectors:
for station in pixelstations:
Expand All @@ -159,16 +141,6 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro

CTPPSTrackingPixelLayout(dqmitems, plot+":" +sector+" "+station+" fr_hr", *rows)

for plot in ["Errors in FED"]:
rows = list()
for fed in pix_feds:
row = list()
row.append("CTPPS/TrackingPixel/Errors in FED"+fed)
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)


####################################################################################################
# Diamond layouts
####################################################################################################
Expand All @@ -178,10 +150,10 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro
def CTPPSTimingDiamondLayout(i, p, *rows): i["00 Shift/CTPPS/TimingDiamond/" + p] = DQMItem(layout=rows)

# layouts with no overlays
TimingPlots = [ "active planes", "event category", "leading edge (le and te)", "time over threshold", "hits in planes", "hits in planes lumisection", "HPTDC Errors" ]
TimingDrawOpt = [ {'xmax':"10"}, {'drawopts':"colztext"}, {'xmax':"25"}, {'xmin':"0", 'xmax':"25"}, {'withref':"no"}, {'withref':"no"}, {'drawopts':"colztext"} ]
TimingPlots = [ "active planes", "event category", "time over threshold", "hits in planes", "hits in planes lumisection", "HPTDC Errors" ]
TimingDrawOpt = [ {'xmax':"10"}, {'drawopts':"colztext"}, {'xmin':"0", 'xmax':"25"}, {'withref':"no"}, {'withref':"no"}, {'drawopts':"colztext"} ]
TimingDescription = [ "It should be with peaks at 0 and 4", 'Most of the event should be in "both"',
"It should be peaked around 5 ns", "It should be a broad distribution peaked around 12 ns",
"It should be a broad distribution peaked around 12 ns",
"It should be full", 'It should be similar to "hits in planes"', "It should be empty" ]

for i in range(len(TimingPlots)):
Expand All @@ -194,14 +166,3 @@ def CTPPSTimingDiamondLayout(i, p, *rows): i["00 Shift/CTPPS/TimingDiamond/" + p

CTPPSTimingDiamondLayout(dqmitems, TimingPlots[i], *rows)


# Efficiency display for all planes
rows = list()
for station in diamond_stations:
row = list()
for plane in range(4):
hist_lead = "CTPPS/TimingDiamond/"+station+"/plane {plane_id}/Efficiency wrt pixels".format(plane_id=plane)
row.append( { "path": hist_lead, 'draw':{'drawopts':"colz"}, 'description':"It should have most of the bins to 1 or 0 outside the sensor" } )
rows.append(row)

CTPPSTimingDiamondLayout(dqmitems, "efficiency", *rows)
73 changes: 17 additions & 56 deletions dqmgui/layouts/shift_ctpps_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro

CTPPSCommonLayout(dqmitems, "Pixel ROC hits vs LS "+sector, *rows)


# RP state per LS plot
rows = list()
row = list()
row.append("CTPPS/common/rpstate per LS")
rows.append(row)
CTPPSCommonLayout(dqmitems, "RP state per LS", *rows)


###
# CTPPS Strips
###

# layouts with no overlays
for plot in [ "active planes", "vfats with any problem", "track XY profile" ]:
rows = list()
Expand Down Expand Up @@ -95,21 +108,8 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro
###
# CTPPS Pixel
###
for plot in ["hit multiplicity in planes"]:
rows = list()
row = list()
for station in pixelstations:
row.append("CTPPS/TrackingPixel/sector 45/"+station+"/fr_hr/"+plot)
rows.append(row)

row = list()
for station in pixelstations:
row.append("CTPPS/TrackingPixel/sector 56/"+station+"/fr_hr/"+plot)
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)

for plot in ["number of fired planes per event","ROCs hits multiplicity per event","track intercept point","number of tracks per event","Error Code"]:
for plot in ["number of fired planes per event"]:
rows = list()
row = list()
for station in pixelstations:
Expand All @@ -123,24 +123,6 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)

for sector in sectors:
rows = list()
for station in pixelstations:
row = list()
row.append("CTPPS/TrackingPixel/"+sector+"/"+station+"/fr_hr/"+
"ROCs hits multiplicity per event vs LS")
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, "ROC hits vs LS "+sector, *rows)

for plot in ["Pixel planes activity"]:
rows = list()
row = list()
row.append("CTPPS/TrackingPixel/"+plot)
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)

for plot in ["hits position"]:
for sector in sectors:
for station in pixelstations:
Expand All @@ -159,16 +141,6 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro

CTPPSTrackingPixelLayout(dqmitems, plot+":" +sector+" "+station+" fr_hr", *rows)

for plot in ["Errors in FED"]:
rows = list()
for fed in pix_feds:
row = list()
row.append("CTPPS/TrackingPixel/Errors in FED"+fed)
rows.append(row)

CTPPSTrackingPixelLayout(dqmitems, plot, *rows)


####################################################################################################
# Diamond layouts
####################################################################################################
Expand All @@ -178,10 +150,10 @@ def CTPPSCommonLayout(i, p, *rows): i["00 Shift/CTPPS/" + p] = DQMItem(layout=ro
def CTPPSTimingDiamondLayout(i, p, *rows): i["00 Shift/CTPPS/TimingDiamond/" + p] = DQMItem(layout=rows)

# layouts with no overlays
TimingPlots = [ "active planes", "event category", "leading edge (le and te)", "time over threshold", "hits in planes", "hits in planes lumisection", "HPTDC Errors" ]
TimingDrawOpt = [ {'xmax':"10"}, {'drawopts':"colztext"}, {'xmax':"25"}, {'xmin':"0", 'xmax':"25"}, {'withref':"no"}, {'withref':"no"}, {'drawopts':"colztext"} ]
TimingPlots = [ "active planes", "event category", "time over threshold", "hits in planes", "hits in planes lumisection", "HPTDC Errors" ]
TimingDrawOpt = [ {'xmax':"10"}, {'drawopts':"colztext"}, {'xmin':"0", 'xmax':"25"}, {'withref':"no"}, {'withref':"no"}, {'drawopts':"colztext"} ]
TimingDescription = [ "It should be with peaks at 0 and 4", 'Most of the event should be in "both"',
"It should be peaked around 5 ns", "It should be a broad distribution peaked around 12 ns",
"It should be a broad distribution peaked around 12 ns",
"It should be full", 'It should be similar to "hits in planes"', "It should be empty" ]

for i in range(len(TimingPlots)):
Expand All @@ -194,14 +166,3 @@ def CTPPSTimingDiamondLayout(i, p, *rows): i["00 Shift/CTPPS/TimingDiamond/" + p

CTPPSTimingDiamondLayout(dqmitems, TimingPlots[i], *rows)


# Efficiency display for all planes
rows = list()
for station in diamond_stations:
row = list()
for plane in range(4):
hist_lead = "CTPPS/TimingDiamond/"+station+"/plane {plane_id}/Efficiency wrt pixels".format(plane_id=plane)
row.append( { "path": hist_lead, 'draw':{'drawopts':"colz"}, 'description':"It should have most of the bins to 1 or 0 outside the sensor" } )
rows.append(row)

CTPPSTimingDiamondLayout(dqmitems, "efficiency", *rows)
25 changes: 24 additions & 1 deletion dqmgui/style/CTPPSRenderPlugin.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "DQM/DQMRenderPlugin.h"

#include "TH1F.h"
#include "TProfile.h"
#include "TH2F.h"
#include "TCanvas.h"
#include "TStyle.h"
Expand All @@ -27,6 +28,8 @@ class CTPPSRenderPlugin : public DQMRenderPlugin

if (dynamic_cast<TH1F*>(o.object))
preDrawTH1F(c, o);
if (dynamic_cast<TProfile*>(o.object))
preDrawTProfile(c, o);

if (dynamic_cast<TH2F*>(o.object))
preDrawTH2F(c, o);
Expand All @@ -40,6 +43,8 @@ class CTPPSRenderPlugin : public DQMRenderPlugin

if (dynamic_cast<TH1F*>(o.object))
postDrawTH1F(c, o);
if (dynamic_cast<TProfile*>(o.object))
postDrawTProfile(c, o);

if (dynamic_cast<TH2F*>(o.object))
postDrawTH2F(c, o);
Expand All @@ -65,6 +70,16 @@ class CTPPSRenderPlugin : public DQMRenderPlugin
obj->SetLineWidth(2);
}

void preDrawTProfile(TCanvas *, const VisDQMObject &o)
{
TProfile* obj = dynamic_cast<TProfile*>(o.object);
assert(obj);

obj->SetLineWidth(2);
gStyle->SetOptStat(0);
obj->SetStats(kFALSE);
}

void preDrawTH2F(TCanvas *, const VisDQMObject &o)
{
TH2F* obj = dynamic_cast<TH2F*>(o.object);
Expand All @@ -85,7 +100,10 @@ class CTPPSRenderPlugin : public DQMRenderPlugin
gStyle->SetOptStat(0);
obj->SetStats(kFALSE);
gStyle->SetPalette(1);
if(o.name.find("ROCs hits multiplicity per event vs LS") != std::string::npos)
if(
(o.name.find("ROCs hits multiplicity per event vs LS") != std::string::npos) ||
(o.name.find("track intercept point") != std::string::npos)
)
gPad->SetLogz(1);
}

Expand All @@ -95,6 +113,11 @@ class CTPPSRenderPlugin : public DQMRenderPlugin
c->SetGridy();
}

void postDrawTProfile(TCanvas *c, const VisDQMObject &)
{
c->SetGridy();
}

void postDrawTH2F(TCanvas *c, const VisDQMObject &)
{
c->SetGridx();
Expand Down