ATLAS Offline Software
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MuonValR4::TrackVisualizationTool Class Reference

#include <TrackVisualizationTool.h>

Inheritance diagram for MuonValR4::TrackVisualizationTool:
Collaboration diagram for MuonValR4::TrackVisualizationTool:

Classes

struct  PlotLegend
 Helper struct to administer the markers & colors that are added to the legend. More...
 

Public Member Functions

virtual ~TrackVisualizationTool ()=default
 Destructor. More...
 
virtual StatusCode initialize () override final
 
virtual StatusCode finalize () override final
 
virtual void displaySeeds (const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds, const std::string &extraLabel) const override final
 Displays all segments on the representative cylinder in the R-Z & X-Y plane and draws the markers of the successfully built seeds & truth segments. More...
 
virtual void displaySeeds (const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds, const std::string &extraLabel, PrimitivesVec_t &&extPrimitives) const override final
 Displays all segments on the representative cylinder in the R-Z & X-Y plane and draws the markers of the successfully built seeds & truth segments. More...
 

Private Types

enum  DisplayView { DisplayView::RZ, DisplayView::XY }
 Enumeration to toggle whether the seeds shall be painted in x-y or R-z view. More...
 
using Location = MuonR4::MsTrackSeed::Location
 Enumeration to toggle whether the segment shall displayed on the barrel/endcap. More...
 
using BoundBox_t = Acts::RangeXD< 2, double >
 Helper struct to determine the canvas ranges to be shown. More...
 
using AxisLabels_t = std::tuple< std::string, std::string >
 tuple to declare the axis labels More...
 

Private Member Functions

std::unique_ptr< TCanvas > makeCanvas (const EventContext &ctx, const BoundBox_t &bounds, const AxisLabels_t &axisLabels) const
 Creates a new TCanvas for drawing. More...
 
void closeSummaryCanvas () const
 Closes the summary canvas & closes the associated ROOT file. More...
 
void displaySeeds (const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const DisplayView view, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds, const std::string &extraLabel, PrimitivesVec_t &extPrimitives) const
 Actual implementation of the display seeds method with the augmentation to define the view. More...
 
void fillTruthSeedPoints (const EventContext &ctx, const MuonR4::MsTrackSeeder &seeder, const DisplayView view, PlotLegend &legend, PrimitivesVec_t &drawPrim) const
 Add the truth segments to the canvas. More...
 

Static Private Member Functions

static BoundBox_t emptyBounds ()
 Createes a new empty range box ready for shrinkin useage. More...
 
static Amg::Vector2D viewVector (const double phi, const Amg::Vector2D &posOnCylinder, const DisplayView view)
 Transforms the projected vector into the actual view, if it's xy then an external phi is needed to place the marker. More...
 

Private Attributes

SG::ReadHandleKey< xAOD::MuonSegmentContainerm_truthSegKey {this, "TruthSegkey", "TruthSegmentsR4"}
 Key to the truth segment selection to draw the segment parameters. More...
 
Gaudi::Property< unsigned > m_canvasLimit {this, "CanvasLimit", 5000}
 Maximum canvases to draw. More...
 
Gaudi::Property< bool > m_saveSinglePDFs {this, "saveSinglePDFs", true}
 If set to true each canvas is saved into a dedicated pdf file. More...
 
Gaudi::Property< bool > m_saveSummaryPDF {this, "saveSummaryPDF", false}
 If set to true a summary Canvas is created. More...
 
Gaudi::Property< std::string > m_allCanName {this, "AllCanvasName", "AllMsTrackPlots"}
 Name of the summary canvas & the ROOT file to save the monitoring plots. More...
 
Gaudi::Property< std::string > m_canvasPrefix {this, "CanvasPreFix", "MsTrackValid"}
 Prefix of the individual canvas file names <MANDATORY>
More...
 
Gaudi::Property< unsigned > m_canvasWidth {this, "CanvasWidth", 800}
 Canvas dimensions. More...
 
Gaudi::Property< unsigned > m_canvasHeight {this, "CanvasHeight", 600}
 
Gaudi::Property< std::string > m_AtlasLabel {this, "AtlasLabel", "Internal"}
 ATLAS label (Internal / Prelimnary / Simulation) More...
 
Gaudi::Property< std::string > m_sqrtSLabel {this, "SqrtSLabel", "14"}
 Centre of mass energy label. More...
 
Gaudi::Property< std::string > m_lumiLabel {this, "LumiLabel", ""}
 Luminosity label. More...
 
std::unique_ptr< TCanvas > m_summaryCan ATLAS_THREAD_SAFE {}
 
std::unique_ptr< TFile > m_outFile ATLAS_THREAD_SAFE {}
 
std::atomic< unsigned int > m_canvCounter ATLAS_THREAD_SAFE {0}
 

Static Private Attributes

static std::mutex s_mutex {}
 Abrivation of the helper struct to determine the Canvas dimensions. More...
 

Detailed Description

Definition at line 21 of file TrackVisualizationTool.h.

Member Typedef Documentation

◆ AxisLabels_t

using MuonValR4::TrackVisualizationTool::AxisLabels_t = std::tuple<std::string, std::string>
private

tuple to declare the axis labels

Definition at line 90 of file TrackVisualizationTool.h.

◆ BoundBox_t

using MuonValR4::TrackVisualizationTool::BoundBox_t = Acts::RangeXD<2, double>
private

Helper struct to determine the canvas ranges to be shown.

Definition at line 86 of file TrackVisualizationTool.h.

◆ Location

Enumeration to toggle whether the segment shall displayed on the barrel/endcap.

Definition at line 84 of file TrackVisualizationTool.h.

Member Enumeration Documentation

◆ DisplayView

Enumeration to toggle whether the seeds shall be painted in x-y or R-z view.

Enumerator
RZ 
XY 

Definition at line 101 of file TrackVisualizationTool.h.

101 {RZ, XY};

Constructor & Destructor Documentation

◆ ~TrackVisualizationTool()

virtual MuonValR4::TrackVisualizationTool::~TrackVisualizationTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ closeSummaryCanvas()

void MuonValR4::TrackVisualizationTool::closeSummaryCanvas ( ) const
private

Closes the summary canvas & closes the associated ROOT file.

Definition at line 93 of file TrackVisualizationTool.cxx.

93  {
94  if (!m_outFile) return;
95  ATH_MSG_INFO("Close summary pdf & root file "<<m_allCanName);
96  if (m_summaryCan) {
97  m_summaryCan->cd();
98  m_summaryCan->SaveAs((m_allCanName +".pdf]").c_str());
99  m_summaryCan.reset();
100  }
101  m_outFile.reset();
102  }

◆ displaySeeds() [1/3]

void MuonValR4::TrackVisualizationTool::displaySeeds ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seederObj,
const DisplayView  view,
const xAOD::MuonSegmentContainer segments,
const MuonR4::MsTrackSeedContainer seeds,
const std::string &  extraLabel,
PrimitivesVec_t &  extPrimitives 
) const
private

Actual implementation of the display seeds method with the augmentation to define the view.

Parameters
ctxEventContext to access store gate & conditions
seederObjConfigured instance of the track seeder which actually constructed the seeds.
viewActual view to display
segmentsContainer of all MS segments in the event
seedsThe constructed track seeds from the event
extraLabelExtra label to be put onto the top of the shown canvases
extPrimitivesExtra TObjects that should be additionally painted onto the Canvases

First add the truth points

Then we can add the

Draw the sector map

Definition at line 168 of file TrackVisualizationTool.cxx.

174  {
175 
176  const unsigned nPrim = extPrimitives.size();
177  PlotLegend legend{0.005,0.005, 0.6,0.1};
179  fillTruthSeedPoints(ctx, seeder, view, legend, extPrimitives);
181  auto boundBox = emptyBounds();
182 
183  auto onSeed = [&seeds](const xAOD::MuonSegment* segment,
184  const Location loc) {
185  return std::ranges::any_of(seeds,[segment, loc](const MsTrackSeed& seed){
186  return seed.location() == loc && std::ranges::find(seed.segments(), segment) != seed.segments().end();
187  });
188  };
189 
190 
191  for (const xAOD::MuonSegment* segment: segments) {
192  using enum Location;
193  using namespace Muon;
194  const MuonGMR4::SpectrometerSector* msSector = detailedSegment(*segment)->msSector();
195  const auto chIdx = segment->chamberIndex();
196  const int mColor = msSector->barrel() ? ColorBarrel : (msSector->side() > 0 ? ColorEndcapA : ColorEndcapC);
197  const double phi = segment->direction().phi();
198  for (const Location loc : {Barrel, Endcap}) {
199  const Amg::Vector2D projPos{seeder.expressOnCylinder(*segment, loc)};
200  if (!seeder.withinBounds(projPos, loc)) {
201  continue;
202  }
203  const bool isGood = onSeed(segment, loc);
204  const int mStyle = stationMarkerSyle(chIdx, false, isGood);
205  const Amg::Vector2D markerPos{viewVector(phi, projPos, view)};
206  extPrimitives.emplace_back(drawMarker(markerPos, mStyle, mColor));
207 
208  if (view == DisplayView::XY) {
209  const double r = markerPos.mag() + extraMargin;
210  boundBox[0].expand(-r, r);
211  boundBox[1].expand(-r, r);
212  } else {
213  boundBox[0].expand(markerPos[0] - extraMargin, markerPos[0] + extraMargin);
214  boundBox[1].expand(markerPos[1] - extraMargin, markerPos[1] + extraMargin);
215  }
216  legend.addMarker(mStyle, std::format("{:}{:}", MuonStationIndex::layerName(MuonStationIndex::toLayerIndex(chIdx)),
217  isGood ? "" : " (discarded)"));
218  legend.addColor(mColor, msSector->barrel() ? "Barrel" : msSector->side() > 0 ? "Endcap A" : "Endcap C");
219  }
220  }
221  for (const MsTrackSeed& seed : seeds) {
222  const Amg::Vector3D& pos{seed.position()};
223  extPrimitives.emplace_back(drawMarker(viewVector(pos.phi(), Amg::Vector2D{pos.perp(), pos.z()}, view),
224  kFullDiamond, kBlack));
225  legend.addMarker(kFullDiamond, "track seed");
226  }
228  const Muon::MuonSectorMapping sectorMap{};
229  for (unsigned int s = 1; s<=16 ; ++s) {
230  if (view != DisplayView::XY) {
231  break;
232  }
233  const double phi = sectorMap.sectorPhi(s);
234  const double dPhi = sectorMap.sectorWidth(s);
235 
236  const int lStyle = s%2 ? kDashed : kDotted;
237  const double r = boundBox[0].max();
238  const CxxUtils::sincos phiM{phi-dPhi}, phiP{phi+dPhi};
239  const Amg::Vector2D e1{r * phiM.cs, r * phiM.sn};
240  const Amg::Vector2D e2{r * phiP.cs, r * phiP.sn};
241 
242  auto theLine = std::make_unique<TLine>(0.,0., e1.x(), e1.y());
243  theLine->SetLineStyle(lStyle);
244  extPrimitives.insert(extPrimitives.begin() + nPrim, std::move(theLine));
245  theLine = std::make_unique<TLine>(0.,0., e2.x(), e2.y());
246  theLine->SetLineStyle(lStyle);
247  extPrimitives.insert(extPrimitives.begin() + nPrim, std::move(theLine));
248  theLine = std::make_unique<TLine>(e1.x(), e1.y(), e2.x(), e2.y());
249  theLine->SetLineStyle(lStyle);
250  extPrimitives.insert(extPrimitives.begin() + nPrim, std::move(theLine));
251  }
252  auto canvas = makeCanvas(ctx, boundBox, view == DisplayView::XY ?
253  std::tie("x [m]", "y [m]") : std::tie("z [m]", "R [m]"));
254 
255  for (auto& prim: extPrimitives){
256  prim->Draw();
257  }
258  legend.legend->SetBorderSize(0);
259  legend.legend->SetNColumns(4);
260  legend.legend->Draw();
261  std::stringstream canvasName{};
262  canvasName<<m_canvasPrefix.value()<<"_"<<ctx.eventID().event_number()
263  <<"_SeedDisplay"<<(view == DisplayView::XY ? "XY" : "RZ");
264  if (!extraLabel.empty()) canvasName<<"_"<<removeNonAlphaNum(extraLabel);
265  ATH_MSG_VERBOSE("Save new plot "<<canvasName.str());
266  if (m_saveSinglePDFs) {
267  canvas->SaveAs(std::format("Plots/{:}/{:}.pdf", m_canvasPrefix.value(), canvasName.str()).c_str());
268  }
269  if (m_saveSummaryPDF) {
270  canvas->SaveAs((m_allCanName+".pdf").c_str());
271  }
272  m_outFile->WriteObject(canvas.get(), canvasName.str().c_str());
273  }

◆ displaySeeds() [2/3]

void MuonValR4::TrackVisualizationTool::displaySeeds ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seederObj,
const xAOD::MuonSegmentContainer segments,
const MuonR4::MsTrackSeedContainer seeds,
const std::string &  extraLabel 
) const
finaloverridevirtual

Displays all segments on the representative cylinder in the R-Z & X-Y plane and draws the markers of the successfully built seeds & truth segments.

Parameters
ctxEventContext to access store gate & conditions
seederObjConfigured instance of the track seeder which actually constructed the seeds.
segmentsContainer of all MS segments in the event
seedsThe constructed track seeds from the event
extraLabelExtra label to be put onto the top of the shown canvases

Definition at line 140 of file TrackVisualizationTool.cxx.

144  {
145  displaySeeds(ctx, seederObj, segments, seeds, extraLabel, PrimitivesVec_t{});
146  }

◆ displaySeeds() [3/3]

void MuonValR4::TrackVisualizationTool::displaySeeds ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seederObj,
const xAOD::MuonSegmentContainer segments,
const MuonR4::MsTrackSeedContainer seeds,
const std::string &  extraLabel,
PrimitivesVec_t &&  extPrimitives 
) const
finaloverridevirtual

Displays all segments on the representative cylinder in the R-Z & X-Y plane and draws the markers of the successfully built seeds & truth segments.

Parameters
ctxEventContext to access store gate & conditions
seederObjConfigured instance of the track seeder which actually constructed the seeds.
segmentsContainer of all MS segments in the event
extraLabelExtra label to be put onto the top of the shown canvases
extPrimitivesExtra TObjects that should be additionally painted onto the Canvases

Definition at line 147 of file TrackVisualizationTool.cxx.

152  {
153  if (m_canvCounter >= m_canvasLimit || segments.empty()) {
154  return;
155  }
156  std::lock_guard guard{s_mutex};
157  if (m_canvCounter >= m_canvasLimit) {
158  return;
159  }
160  unsigned int nPrim = extPrimitives.size();
161  displaySeeds(ctx, seederObj, DisplayView::RZ, segments, seeds, extraLabel, extPrimitives);
162  extPrimitives.resize(nPrim);
163  displaySeeds(ctx, seederObj, DisplayView::XY, segments, seeds, extraLabel, extPrimitives);
164  if ((++m_canvCounter) >= m_canvasLimit) {
166  }
167  }

◆ emptyBounds()

TrackVisualizationTool::BoundBox_t MuonValR4::TrackVisualizationTool::emptyBounds ( )
staticprivate

Createes a new empty range box ready for shrinkin useage.

Definition at line 87 of file TrackVisualizationTool.cxx.

87  {
88  return BoundBox_t{std::array{1.e9,1.e9}, std::array{-1.e9,-1.e9}};
89  }

◆ fillTruthSeedPoints()

void MuonValR4::TrackVisualizationTool::fillTruthSeedPoints ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seeder,
const DisplayView  view,
PlotLegend legend,
PrimitivesVec_t &  drawPrim 
) const
private

Add the truth segments to the canvas.

Parameters
ctxEventContext to access store gate
seederObjConfigured instance of the track seeder which actually constructed the seeds.
viewActual view to display
legendReference to the legend object to add the marker / truth legends
drawPrimReference to the primitives to drawn. The markers are added to this vector

Definition at line 274 of file TrackVisualizationTool.cxx.

278  {
279  const xAOD::MuonSegmentContainer* truthSegs{nullptr};
280  if (!SG::get(truthSegs,m_truthSegKey, ctx).isSuccess()) {
281  THROW_EXCEPTION("Failed to fetch the truth segment container");
282  }
283  if (!truthSegs) {
284  return;
285  }
286  bool addedEntry{false};
287  for (const xAOD::MuonSegment* segment: *truthSegs) {
288  const auto chIdx = segment->chamberIndex();
289  const int mStyle = stationMarkerSyle(chIdx, false, true);
290  const double phi = segment->direction().phi();
291 
292  using enum Location;
293  for (const Location loc : {Barrel, Endcap}) {
294  const Amg::Vector2D projected{seeder.expressOnCylinder(*segment, loc)};
295  if (!seeder.withinBounds(projected, loc)) {
296  continue;
297  }
298  drawPrim.push_back(drawMarker(viewVector(phi, projected, view), mStyle, truthColor, 3));
300  addedEntry = true;
301  }
302  }
303  if (addedEntry) {
304  legend.addColor(truthColor, "truth");
305  }
306  }

◆ finalize()

StatusCode MuonValR4::TrackVisualizationTool::finalize ( )
finaloverridevirtual

Definition at line 113 of file TrackVisualizationTool.cxx.

113  {
115  return StatusCode::SUCCESS;
116  }

◆ initialize()

StatusCode MuonValR4::TrackVisualizationTool::initialize ( )
finaloverridevirtual

Definition at line 117 of file TrackVisualizationTool.cxx.

117  {
118  if (m_canvasLimit > 0) {
119  if (m_canvasPrefix.value().empty() || m_allCanName.value().empty()) {
120  ATH_MSG_FATAL("Please define "<<m_canvasPrefix<<" && "<<m_allCanName);
121  return StatusCode::FAILURE;
122  }
123  if (m_saveSummaryPDF) {
124  m_summaryCan = std::make_unique<TCanvas>("all", "all", m_canvasWidth, m_canvasHeight);
125  m_summaryCan->SaveAs((m_allCanName +".pdf[").c_str());
126  }
127  m_outFile = std::make_unique<TFile>( (m_allCanName +".root").c_str(), "RECREATE");
128  if (m_saveSinglePDFs) {
129  std::filesystem::create_directories("Plots/" + m_canvasPrefix);
130  }
131  gROOT->SetStyle("ATLAS");
132  TStyle* plotStyle = gROOT->GetStyle("ATLAS");
133  plotStyle->SetOptTitle(0);
134  plotStyle->SetHistLineWidth(1.);
135  plotStyle->SetPalette(kViridis);
136  }
138  return StatusCode::SUCCESS;
139  }

◆ makeCanvas()

std::unique_ptr< TCanvas > MuonValR4::TrackVisualizationTool::makeCanvas ( const EventContext &  ctx,
const BoundBox_t bounds,
const AxisLabels_t axisLabels 
) const
private

Creates a new TCanvas for drawing.

Parameters
ctxEventContext to give the canvas a unique name
boundsArray determining the x & y axis intervals
axisLabelsLabels to be shown on the x & y axis

Definition at line 308 of file TrackVisualizationTool.cxx.

310  {
311  std::stringstream canvasName{};
312  canvasName<<name()<<"_"<<ctx.eventID().event_number()<<"_"<<m_canvCounter;
313  ATH_MSG_VERBOSE("Create new canvas "<<canvasName.str());
314  auto canvas = std::make_unique<TCanvas>(canvasName.str().c_str(), "all", m_canvasWidth, m_canvasHeight);
315  canvas->cd();
316  TH1F* frame = canvas->DrawFrame(bounds[0].min(), bounds[1].min(),bounds[0].max(), bounds[1].max());
317  frame->GetXaxis()->SetTitle(std::get<0>(axisLabels).c_str());
318  frame->GetYaxis()->SetTitle(std::get<1>(axisLabels).c_str());
319  return canvas;
320  }

◆ viewVector()

Amg::Vector2D MuonValR4::TrackVisualizationTool::viewVector ( const double  phi,
const Amg::Vector2D posOnCylinder,
const DisplayView  view 
)
staticprivate

Transforms the projected vector into the actual view, if it's xy then an external phi is needed to place the marker.

Parameters
phiAngle for the xy view - taken from the segment direction
posOnCylinderProjection of the segment's position onto the seed cylinder
viewActual view to display

Definition at line 103 of file TrackVisualizationTool.cxx.

105  {
106  using enum DisplayView;
107  if (view == RZ) {
108  return Amg::Vector2D{ posOnCylinder[1]*inM, posOnCylinder[0]*inM};
109  }
110  const CxxUtils::sincos phi{phiV};
111  return posOnCylinder[0] * inM * Amg::Vector2D{phi.cs, phi.sn};
112  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/3]

std::unique_ptr<TCanvas> m_summaryCan MuonValR4::TrackVisualizationTool::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 163 of file TrackVisualizationTool.h.

◆ ATLAS_THREAD_SAFE [2/3]

std::unique_ptr<TFile> m_outFile MuonValR4::TrackVisualizationTool::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 164 of file TrackVisualizationTool.h.

◆ ATLAS_THREAD_SAFE [3/3]

std::atomic<unsigned int> m_canvCounter MuonValR4::TrackVisualizationTool::ATLAS_THREAD_SAFE {0}
mutableprivate

Definition at line 165 of file TrackVisualizationTool.h.

◆ m_allCanName

Gaudi::Property<std::string> MuonValR4::TrackVisualizationTool::m_allCanName {this, "AllCanvasName", "AllMsTrackPlots"}
private

Name of the summary canvas & the ROOT file to save the monitoring plots.

Definition at line 148 of file TrackVisualizationTool.h.

◆ m_AtlasLabel

Gaudi::Property<std::string> MuonValR4::TrackVisualizationTool::m_AtlasLabel {this, "AtlasLabel", "Internal"}
private

ATLAS label (Internal / Prelimnary / Simulation)

Definition at line 155 of file TrackVisualizationTool.h.

◆ m_canvasHeight

Gaudi::Property<unsigned> MuonValR4::TrackVisualizationTool::m_canvasHeight {this, "CanvasHeight", 600}
private

Definition at line 153 of file TrackVisualizationTool.h.

◆ m_canvasLimit

Gaudi::Property<unsigned> MuonValR4::TrackVisualizationTool::m_canvasLimit {this, "CanvasLimit", 5000}
private

Maximum canvases to draw.

Definition at line 141 of file TrackVisualizationTool.h.

◆ m_canvasPrefix

Gaudi::Property<std::string> MuonValR4::TrackVisualizationTool::m_canvasPrefix {this, "CanvasPreFix", "MsTrackValid"}
private

Prefix of the individual canvas file names <MANDATORY>

Definition at line 150 of file TrackVisualizationTool.h.

◆ m_canvasWidth

Gaudi::Property<unsigned> MuonValR4::TrackVisualizationTool::m_canvasWidth {this, "CanvasWidth", 800}
private

Canvas dimensions.

Definition at line 152 of file TrackVisualizationTool.h.

◆ m_lumiLabel

Gaudi::Property<std::string> MuonValR4::TrackVisualizationTool::m_lumiLabel {this, "LumiLabel", ""}
private

Luminosity label.

Definition at line 159 of file TrackVisualizationTool.h.

◆ m_saveSinglePDFs

Gaudi::Property<bool> MuonValR4::TrackVisualizationTool::m_saveSinglePDFs {this, "saveSinglePDFs", true}
private

If set to true each canvas is saved into a dedicated pdf file.

Definition at line 143 of file TrackVisualizationTool.h.

◆ m_saveSummaryPDF

Gaudi::Property<bool> MuonValR4::TrackVisualizationTool::m_saveSummaryPDF {this, "saveSummaryPDF", false}
private

If set to true a summary Canvas is created.

ATTENTION: There can be only one summary PDF in an athena job

Definition at line 146 of file TrackVisualizationTool.h.

◆ m_sqrtSLabel

Gaudi::Property<std::string> MuonValR4::TrackVisualizationTool::m_sqrtSLabel {this, "SqrtSLabel", "14"}
private

Centre of mass energy label.

Definition at line 157 of file TrackVisualizationTool.h.

◆ m_truthSegKey

SG::ReadHandleKey<xAOD::MuonSegmentContainer> MuonValR4::TrackVisualizationTool::m_truthSegKey {this, "TruthSegkey", "TruthSegmentsR4"}
private

Key to the truth segment selection to draw the segment parameters.

Definition at line 139 of file TrackVisualizationTool.h.

◆ s_mutex

std::mutex MuonValR4::TrackVisualizationTool::s_mutex {}
staticprivate

Abrivation of the helper struct to determine the Canvas dimensions.

Definition at line 162 of file TrackVisualizationTool.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:674
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGMR4::SpectrometerSector::side
int8_t side() const
Returns the side of the MS-sector 1 -> A side ; -1 -> C side.
Definition: SpectrometerSector.cxx:57
DetType::Endcap
@ Endcap
Definition: DetType.h:14
MuonGMR4::SpectrometerSector
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
Definition: SpectrometerSector.h:40
vtune_athena.format
format
Definition: vtune_athena.py:14
MuonValR4::TrackVisualizationTool::DisplayView::XY
@ XY
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
MuonR4::MsTrackSeeder::withinBounds
bool withinBounds(const Amg::Vector2D &projPos, const Location loc) const
Returns whether the expression on the cylinder is within the surface bounds.
Definition: MsTrackSeeder.cxx:33
MuonValR4::TrackVisualizationTool::BoundBox_t
Acts::RangeXD< 2, double > BoundBox_t
Helper struct to determine the canvas ranges to be shown.
Definition: TrackVisualizationTool.h:86
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonR4::MsTrackSeed
Definition: MsTrackSeed.h:18
MuonValR4::TrackVisualizationTool::m_truthSegKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_truthSegKey
Key to the truth segment selection to draw the segment parameters.
Definition: TrackVisualizationTool.h:139
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MuonValR4::TrackVisualizationTool::makeCanvas
std::unique_ptr< TCanvas > makeCanvas(const EventContext &ctx, const BoundBox_t &bounds, const AxisLabels_t &axisLabels) const
Creates a new TCanvas for drawing.
Definition: TrackVisualizationTool.cxx:308
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
MuonValR4::TrackVisualizationTool::m_saveSummaryPDF
Gaudi::Property< bool > m_saveSummaryPDF
If set to true a summary Canvas is created.
Definition: TrackVisualizationTool.h:146
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
MuonValR4::TrackVisualizationTool::m_canvasPrefix
Gaudi::Property< std::string > m_canvasPrefix
Prefix of the individual canvas file names <MANDATORY>
Definition: TrackVisualizationTool.h:150
MuonValR4::TrackVisualizationTool::m_saveSinglePDFs
Gaudi::Property< bool > m_saveSinglePDFs
If set to true each canvas is saved into a dedicated pdf file.
Definition: TrackVisualizationTool.h:143
MuonValR4::TrackVisualizationTool::DisplayView::RZ
@ RZ
DetType::Barrel
@ Barrel
Definition: DetType.h:14
MuonValR4::TrackVisualizationTool::s_mutex
static std::mutex s_mutex
Abrivation of the helper struct to determine the Canvas dimensions.
Definition: TrackVisualizationTool.h:162
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:7
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
MuonValR4::TrackVisualizationTool::m_canvasHeight
Gaudi::Property< unsigned > m_canvasHeight
Definition: TrackVisualizationTool.h:153
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
MuonValR4::TrackVisualizationTool::DisplayView
DisplayView
Enumeration to toggle whether the seeds shall be painted in x-y or R-z view.
Definition: TrackVisualizationTool.h:101
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
DeMoAtlasDataLoss.canvas
dictionary canvas
Definition: DeMoAtlasDataLoss.py:187
MuonGMR4::SpectrometerSector::barrel
bool barrel() const
Returns whether the sector is placed in the barrel.
Definition: SpectrometerSector.cxx:65
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:549
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonValR4::TrackVisualizationTool::m_allCanName
Gaudi::Property< std::string > m_allCanName
Name of the summary canvas & the ROOT file to save the monitoring plots.
Definition: TrackVisualizationTool.h:148
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MuonR4::Segment::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:39
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonValR4::TrackVisualizationTool::viewVector
static Amg::Vector2D viewVector(const double phi, const Amg::Vector2D &posOnCylinder, const DisplayView view)
Transforms the projected vector into the actual view, if it's xy then an external phi is needed to pl...
Definition: TrackVisualizationTool.cxx:103
MuonValR4::TrackVisualizationTool::emptyBounds
static BoundBox_t emptyBounds()
Createes a new empty range box ready for shrinkin useage.
Definition: TrackVisualizationTool.cxx:87
lumiFormat.array
array
Definition: lumiFormat.py:91
MuonValR4::TrackVisualizationTool::fillTruthSeedPoints
void fillTruthSeedPoints(const EventContext &ctx, const MuonR4::MsTrackSeeder &seeder, const DisplayView view, PlotLegend &legend, PrimitivesVec_t &drawPrim) const
Add the truth segments to the canvas.
Definition: TrackVisualizationTool.cxx:274
plotBeamSpotVxVal.legend
legend
Definition: plotBeamSpotVxVal.py:97
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Muon::MuonStationIndex::layerName
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:153
MuonValR4::TrackVisualizationTool::m_canvasLimit
Gaudi::Property< unsigned > m_canvasLimit
Maximum canvases to draw.
Definition: TrackVisualizationTool.h:141
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
MuonValR4::TrackVisualizationTool::m_canvasWidth
Gaudi::Property< unsigned > m_canvasWidth
Canvas dimensions.
Definition: TrackVisualizationTool.h:152
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
MuonValR4::TrackVisualizationTool::Location
MuonR4::MsTrackSeed::Location Location
Enumeration to toggle whether the segment shall displayed on the barrel/endcap.
Definition: TrackVisualizationTool.h:84
MuonValR4::TrackVisualizationTool::displaySeeds
virtual void displaySeeds(const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds, const std::string &extraLabel) const override final
Displays all segments on the representative cylinder in the R-Z & X-Y plane and draws the markers of ...
Definition: TrackVisualizationTool.cxx:140
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:39
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
Muon::MuonSectorMapping
Definition: MuonSectorMapping.h:20
Muon::MuonStationIndex::toLayerIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
MuonValR4::TrackVisualizationTool::closeSummaryCanvas
void closeSummaryCanvas() const
Closes the summary canvas & closes the associated ROOT file.
Definition: TrackVisualizationTool.cxx:93
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
MuonR4::MsTrackSeeder::expressOnCylinder
Amg::Vector2D expressOnCylinder(const xAOD::MuonSegment &segment, const Location loc) const
Expresses the segment on the cylinder surface.
Definition: MsTrackSeeder.cxx:15
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
drawFromPickle.view
view
Definition: drawFromPickle.py:294