ATLAS Offline Software
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | 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 void displaySeeds (const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds) 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, 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...
 
virtual void displayTrackSeedObj (const EventContext &ctx, const MuonR4::MsTrackSeed &seed, const OptBoundPars_t &parsToExt, const std::string &objName="") const override final
 Visualizes the measurements of the segments on the track seed together with their predicted local line parameters as an obj file. 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 Canvas_t = IRootVisualizationService::ICanvasObject
 
using Edges = Canvas_t::AxisRanges
 
using Location = MuonR4::MsTrackSeed::Location
 Enumeration to toggle whether the segment shall displayed on the barrel/endcap. More...
 

Private Member Functions

void displaySeeds (const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const DisplayView view, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds, 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, Canvas_t &canvas) const
 Add the truth segments to the canvas. More...
 

Static Private Member Functions

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

ToolHandle< ActsTrk::IExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool" ,"" }
 Track extrapolation tool. More...
 
ServiceHandle< IRootVisualizationServicem_visualSvc {this, "VisualSvc", "MuonValR4::RootVisualizationService"}
 Service handle of the visualization service. More...
 
IRootVisualizationService::ClientToken m_clientToken {}
 Token to present to the visualization service such that the display froms this tool are grouped together. More...
 
SG::ReadHandleKey< xAOD::MuonSegmentContainerm_truthSegKey {this, "TruthSegkey", "MuonTruthSegments"}
 Key to the truth segment selection to draw the segment parameters. More...
 
SG::ReadHandleKey< ActsTrk::GeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
 Dependency on the geometry alignment. 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", true}
 If set to true a summary Canvas is created. More...
 
Gaudi::Property< std::string > m_subDir {this, "outSubDir", ""}
 Define the subdirectory in which the plots shall be saved. More...
 
Gaudi::Property< std::string > m_canvasPrefix {this, "CanvasPreFix", "MsTrackValid"}
 Prefix of the individual canvas file names <MANDATORY>
More...
 
std::atomic< bool > m_plotsDone {false}
 Flag toggling whether all Canvases have been exhausted. More...
 
std::atomic< unsigned > m_objCounter {0}
 How many obj have been produced. More...
 

Detailed Description

Definition at line 19 of file TrackVisualizationTool.h.

Member Typedef Documentation

◆ Canvas_t

Definition at line 64 of file TrackVisualizationTool.h.

◆ Edges

Definition at line 65 of file TrackVisualizationTool.h.

◆ Location

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

Definition at line 93 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 95 of file TrackVisualizationTool.h.

95 {RZ, XY};

Constructor & Destructor Documentation

◆ ~TrackVisualizationTool()

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

Destructor.

Member Function Documentation

◆ 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,
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
extPrimitivesExtra TObjects that should be additionally painted onto the Canvases

First add the truth points

Draw the sector map

Definition at line 141 of file TrackVisualizationTool.cxx.

146  {
147 
148  auto canvas = m_visualSvc->prepareCanvas(ctx, m_clientToken, std::format("SeedDisplay{:}",
149  view == DisplayView::XY ? "XY" : "RZ" ));
150 
151  if (!canvas) {
152  m_plotsDone = true;
153  return;
154  }
155  canvas->setAxisTitles(view == DisplayView::XY ? "x [m]" : "z [m]",
156  view == DisplayView::XY ? "y [m]" : "R [m]");
157 
158  PlotLegend legend{0.005,0.005, 0.6,0.1};
160  fillTruthSeedPoints(ctx, seeder, view, legend, *canvas);
161 
162  auto onSeed = [&seeds](const xAOD::MuonSegment* segment,
163  const Location loc) {
164  return std::ranges::any_of(seeds,[segment, loc](const MsTrackSeed& seed){
165  return seed.location() == loc && std::ranges::find(seed.segments(), segment) != seed.segments().end();
166  });
167  };
168 
169  const ActsTrk::GeometryContext* gctx{nullptr};
170  if (!SG::get(gctx, m_geoCtxKey, ctx).isSuccess()) {
171  THROW_EXCEPTION("Failed to fetch the geometry context "<<m_geoCtxKey.fullKey());
172  }
173  bool drawnPoint{false};
174 
175  for (const xAOD::MuonSegment* segment: segments) {
176  using enum Location;
178  using namespace Muon;
179  const MuonGMR4::SpectrometerSector* msSector = detailedSegment(*segment)->msSector();
180  const auto chIdx = segment->chamberIndex();
181  const int mColor = msSector->barrel() ? ColorBarrel : (msSector->side() > 0 ? ColorEndcapA : ColorEndcapC);
182 
183  for (const auto secProj : {leftOverlap, center, rightOverlap}) {
184  if (!sectorMap.insideSector(segment->sector() + Acts::toUnderlying(secProj),
185  segment->position().phi())){
186  continue;
187  }
188 
189  for (const Location loc : {Barrel, Endcap}) {
190  const Amg::Vector2D projPos{seeder.expressOnCylinder(*gctx, *segment, loc, secProj)};
191  if (!seeder.withinBounds(projPos, loc)) {
192  continue;
193  }
194  drawnPoint = true;
195  const bool isGood = onSeed(segment, loc);
196  const int mStyle = stationMarkerSyle(chIdx, false, isGood);
197  const double phi = seeder.projectedPhi(segment->sector(), secProj);
198  const Amg::Vector2D markerPos{viewVector(phi, projPos, view)};
199  extPrimitives.emplace_back(drawMarker(markerPos, mStyle, mColor));
200 
201  if (view == DisplayView::XY) {
202  const double r = markerPos.mag() + extraMargin;
203  canvas->expandPad(r, r);
204  canvas->expandPad(-r, -r);
205  } else {
206  canvas->expandPad(markerPos[0] - extraMargin, markerPos[1] - extraMargin);
207  canvas->expandPad(markerPos[0] + extraMargin, markerPos[1] + extraMargin);
208  }
209  legend.addMarker(mStyle, std::format("{:}{:}", MuonStationIndex::layerName(MuonStationIndex::toLayerIndex(chIdx)),
210  isGood ? "" : " (discarded)"));
211  legend.addColor(mColor, msSector->barrel() ? "Barrel" : msSector->side() > 0 ? "Endcap A" : "Endcap C");
212  }
213  }
214  }
215  if (!drawnPoint) {
216  canvas->trash();
217  return;
218  }
219  for (const MsTrackSeed& seed : seeds) {
220  const Amg::Vector3D& pos{seed.position()};
221  canvas->add(drawMarker(viewVector(pos.phi(), Amg::Vector2D{pos.perp(), pos.z()}, view),
222  kFullDiamond, kBlack));
223  legend.addMarker(kFullDiamond, "track seed");
224  }
226  for (unsigned int s = 1; s<=16 ; ++s) {
227  if (view != DisplayView::XY) {
228  break;
229  }
230  const double phi = sectorMap.sectorPhi(s);
231  const double dPhi = sectorMap.sectorWidth(s);
232 
233  const int lStyle = s%2 ? kDashed : kDotted;
234  const double r = canvas->corner(Edges::xHigh);
235  const CxxUtils::sincos phiM{phi-dPhi}, phiP{phi+dPhi};
236  const Amg::Vector2D e1{r * phiM.cs, r * phiM.sn};
237  const Amg::Vector2D e2{r * phiP.cs, r * phiP.sn};
238 
239  auto theLine = std::make_unique<TLine>(0.,0., e1.x(), e1.y());
240  theLine->SetLineStyle(lStyle);
241  extPrimitives.insert(extPrimitives.begin(), std::move(theLine));
242  theLine = std::make_unique<TLine>(0.,0., e2.x(), e2.y());
243  theLine->SetLineStyle(lStyle);
244  extPrimitives.insert(extPrimitives.begin(), std::move(theLine));
245  theLine = std::make_unique<TLine>(e1.x(), e1.y(), e2.x(), e2.y());
246  theLine->SetLineStyle(lStyle);
247  extPrimitives.insert(extPrimitives.begin(), std::move(theLine));
248  }
249  legend.fillPrimitives(*canvas);
250  }

◆ displaySeeds() [2/3]

void MuonValR4::TrackVisualizationTool::displaySeeds ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seederObj,
const xAOD::MuonSegmentContainer segments,
const MuonR4::MsTrackSeedContainer seeds 
) 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

Definition at line 123 of file TrackVisualizationTool.cxx.

126  {
127  displaySeeds(ctx, seederObj, segments, seeds, PrimitivesVec_t{});
128  }

◆ displaySeeds() [3/3]

void MuonValR4::TrackVisualizationTool::displaySeeds ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seederObj,
const xAOD::MuonSegmentContainer segments,
const MuonR4::MsTrackSeedContainer seeds,
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
extPrimitivesExtra TObjects that should be additionally painted onto the Canvases

Definition at line 129 of file TrackVisualizationTool.cxx.

133  {
134  if (m_plotsDone || segments.empty()) {
135  return;
136  }
137  displaySeeds(ctx, seederObj, DisplayView::RZ, segments, seeds, clone(extPrimitives));
138  displaySeeds(ctx, seederObj, DisplayView::XY, segments, seeds, std::move(extPrimitives));
139 
140  }

◆ displayTrackSeedObj()

void MuonValR4::TrackVisualizationTool::displayTrackSeedObj ( const EventContext &  ctx,
const MuonR4::MsTrackSeed seed,
const OptBoundPars_t &  parsToExt,
const std::string &  objName = "" 
) const
finaloverridevirtual

Visualizes the measurements of the segments on the track seed together with their predicted local line parameters as an obj file.

If parameters to extrapolate are parsed, then they're extrapolated to the end of the world and the trajectory is added to the obj

Parameters
ctxEventContext to fetch the conditions data & the event information
seedMsTrack to visualize
parsToExtParameters to extrapolate on top
objNameExtra token to be added to the file name

Definition at line 296 of file TrackVisualizationTool.cxx.

299  {
300  if (m_objCounter >= m_canvasLimit) {
301  return;
302  }
303  const ActsTrk::GeometryContext* gctx{nullptr};
304  SG::get(gctx, m_geoCtxKey, ctx).ignore();
305 
306  Acts::ObjVisualization3D visualHelper{};
307  const std::string subDir = std::format("./ObjDisplays/{:}/", m_subDir.value());
308  ensureDirectory(subDir);
309  if (parsToExt.ok() && m_extrapolationTool.isEnabled()) {
310  MuonValR4::drawPropagation(m_extrapolationTool->propagationSteps(ctx, *parsToExt).first,
311  visualHelper);
312  }
313  std::string segStr{removeNonAlphaNum(objName)};
314  for (const xAOD::MuonSegment* seg : seed.segments()) {
315  MuonValR4::drawSegmentMeasurements(*gctx,* seg, visualHelper);
316  MuonValR4::drawSegmentLine(*gctx,*seg, visualHelper);
317  segStr += std::format("_{:}", MuonR4::printID(*seg));
318  }
319 
320  unsigned fileVersion{0};
321  std::string finalStr{};
322  while (finalStr.empty() || std::filesystem::exists(finalStr)) {
323  finalStr = std::format("{:}/{:}_{:}_{:}_{:}.obj", subDir,
324  m_clientToken.preFixName, ctx.eventID().event_number(), ++fileVersion, segStr);
325  }
326  visualHelper.write(finalStr);
327  ++m_objCounter;
328  }

◆ fillTruthSeedPoints()

void MuonValR4::TrackVisualizationTool::fillTruthSeedPoints ( const EventContext &  ctx,
const MuonR4::MsTrackSeeder seeder,
const DisplayView  view,
PlotLegend legend,
Canvas_t canvas 
) 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
canvasReference to the canvas to which the drawn markers are appended to

Definition at line 251 of file TrackVisualizationTool.cxx.

255  {
256  const xAOD::MuonSegmentContainer* truthSegs{nullptr};
257  if (!SG::get(truthSegs,m_truthSegKey, ctx).isSuccess()) {
258  THROW_EXCEPTION("Failed to fetch the truth segment container");
259  }
260  if (!truthSegs) {
261  return;
262  }
263  const ActsTrk::GeometryContext* gctx{nullptr};
264  if (!SG::get(gctx, m_geoCtxKey, ctx).isSuccess()) {
265  THROW_EXCEPTION("Failed to fetch the geometry context "<<m_geoCtxKey.fullKey());
266  }
267 
268  bool addedEntry{false};
269  for (const xAOD::MuonSegment* segment: *truthSegs) {
270  const auto chIdx = segment->chamberIndex();
271  const int mStyle = stationMarkerSyle(chIdx, false, true);
272 
273  using enum Location;
275  for (const auto secProj : {leftOverlap, center, rightOverlap}) {
276  if (!sectorMap.insideSector(segment->sector() + Acts::toUnderlying(secProj),
277  segment->position().phi())){
278  continue;
279  }
280  for (const Location loc : {Barrel, Endcap}) {
281  const Amg::Vector2D projected{seeder.expressOnCylinder(*gctx, *segment, loc, secProj)};
282  if (!seeder.withinBounds(projected, loc)) {
283  continue;
284  }
285  const double phi = MsTrackSeeder::projectedPhi(segment->sector(), secProj);
286  canvas.add(drawMarker(viewVector(phi, projected, view), mStyle, truthColor, 3));
288  addedEntry = true;
289  }
290  }
291  }
292  if (addedEntry) {
293  legend.addColor(truthColor, "truth");
294  }
295  }

◆ initialize()

StatusCode MuonValR4::TrackVisualizationTool::initialize ( )
finaloverridevirtual

Definition at line 106 of file TrackVisualizationTool.cxx.

106  {
107  if (m_canvasLimit > 0) {
113  ATH_CHECK(m_visualSvc.retrieve());
114  ATH_CHECK(m_visualSvc->registerClient(m_clientToken));
115  } else {
116  m_plotsDone = true;
117  }
120  ATH_CHECK(m_extrapolationTool.retrieve(EnableTool{!m_extrapolationTool.empty()}));
121  return StatusCode::SUCCESS;
122  }

◆ 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 96 of file TrackVisualizationTool.cxx.

98  {
99  using enum DisplayView;
100  if (view == RZ) {
101  return Amg::Vector2D{ posOnCylinder[1]*inM, posOnCylinder[0]*inM};
102  }
103  const CxxUtils::sincos phi{phiV};
104  return posOnCylinder[0] * inM * Amg::Vector2D{phi.cs, phi.sn};
105  }

Member Data Documentation

◆ m_canvasLimit

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

Maximum canvases to draw.

Definition at line 140 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 148 of file TrackVisualizationTool.h.

◆ m_clientToken

IRootVisualizationService::ClientToken MuonValR4::TrackVisualizationTool::m_clientToken {}
private

Token to present to the visualization service such that the display froms this tool are grouped together.

Definition at line 134 of file TrackVisualizationTool.h.

◆ m_extrapolationTool

ToolHandle<ActsTrk::IExtrapolationTool> MuonValR4::TrackVisualizationTool::m_extrapolationTool {this, "ExtrapolationTool" ,"" }
private

Track extrapolation tool.

Definition at line 129 of file TrackVisualizationTool.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsTrk::GeometryContext> MuonValR4::TrackVisualizationTool::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Dependency on the geometry alignment.

Definition at line 138 of file TrackVisualizationTool.h.

◆ m_objCounter

std::atomic<unsigned> MuonValR4::TrackVisualizationTool::m_objCounter {0}
mutableprivate

How many obj have been produced.

Definition at line 152 of file TrackVisualizationTool.h.

◆ m_plotsDone

std::atomic<bool> MuonValR4::TrackVisualizationTool::m_plotsDone {false}
mutableprivate

Flag toggling whether all Canvases have been exhausted.

Definition at line 150 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 142 of file TrackVisualizationTool.h.

◆ m_saveSummaryPDF

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

If set to true a summary Canvas is created.

Definition at line 144 of file TrackVisualizationTool.h.

◆ m_subDir

Gaudi::Property<std::string> MuonValR4::TrackVisualizationTool::m_subDir {this, "outSubDir", ""}
private

Define the subdirectory in which the plots shall be saved.

Definition at line 146 of file TrackVisualizationTool.h.

◆ m_truthSegKey

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

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

Definition at line 136 of file TrackVisualizationTool.h.

◆ m_visualSvc

ServiceHandle<IRootVisualizationService> MuonValR4::TrackVisualizationTool::m_visualSvc {this, "VisualSvc", "MuonValR4::RootVisualizationService"}
private

Service handle of the visualization service.

Definition at line 131 of file TrackVisualizationTool.h.


The documentation for this class was generated from the following files:
MuonValR4::IRootVisualizationService::ClientToken::preFixName
std::string preFixName
Prefix name of the saved Canvas.
Definition: IRootVisualizationService.h:41
MuonR4::printID
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
Definition: TrackingHelpers.cxx:15
MuonValR4::IRootVisualizationService::ClientToken::subDirectory
std::string subDirectory
Subdirectory in which the plots are written.
Definition: IRootVisualizationService.h:43
beamspotman.r
def r
Definition: beamspotman.py:672
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
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
vtune_athena.format
format
Definition: vtune_athena.py:14
MuonValR4::TrackVisualizationTool::DisplayView::XY
@ XY
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:138
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:172
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
MuonValR4::IRootVisualizationService::ClientToken::saveSinglePlots
bool saveSinglePlots
Save single plots.
Definition: IRootVisualizationService.h:47
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
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:136
MuonValR4::TrackVisualizationTool::m_clientToken
IRootVisualizationService::ClientToken m_clientToken
Token to present to the visualization service such that the display froms this tool are grouped toget...
Definition: TrackVisualizationTool.h:134
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
MuonValR4::removeNonAlphaNum
std::string removeNonAlphaNum(std::string str)
Removes all non-alpha numerical characters from a string.
Definition: FileHelpers.cxx:10
MuonValR4::TrackVisualizationTool::m_saveSummaryPDF
Gaudi::Property< bool > m_saveSummaryPDF
If set to true a summary Canvas is created.
Definition: TrackVisualizationTool.h:144
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
TauClusterVars::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
Definition: ConstituentLoaderTauCluster.cxx:119
MuonValR4::TrackVisualizationTool::m_canvasPrefix
Gaudi::Property< std::string > m_canvasPrefix
Prefix of the individual canvas file names <MANDATORY>
Definition: TrackVisualizationTool.h:148
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:142
MuonValR4::clone
std::vector< std::unique_ptr< TObject > > clone(const std::vector< std::unique_ptr< TObject >> &cloneMe)
Definition: VisualizationHelpers.cxx:13
MuonValR4::IRootVisualizationService::ClientToken::canvasLimit
std::size_t canvasLimit
How many canvases are drawn at maximum in a job.
Definition: IRootVisualizationService.h:45
MuonValR4::TrackVisualizationTool::DisplayView::RZ
@ RZ
MuonValR4::drawSegmentLine
void drawSegmentLine(const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewLine, const double standardLength=1.*Gaudi::Units::m)
Draw a segment line inside the obj file.
Definition: ObjVisualizationHelpers.cxx:46
DetType::Barrel
@ Barrel
Definition: DetType.h:14
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:22
MuonValR4::TrackVisualizationTool::m_visualSvc
ServiceHandle< IRootVisualizationService > m_visualSvc
Service handle of the visualization service.
Definition: TrackVisualizationTool.h:131
MuonR4::MsTrackSeeder::expressOnCylinder
Amg::Vector2D expressOnCylinder(const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, const Location loc, const SectorProjector proj) const
Expresses the segment on the cylinder surface.
Definition: MsTrackSeeder.cxx:151
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:95
MuonR4::MsTrackSeeder::projectedPhi
static double projectedPhi(const int sector, const SectorProjector proj)
Returns the projected phi for a given sector and projector.
Definition: MsTrackSeeder.cxx:93
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:283
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
MuonValR4::drawPropagation
void drawPropagation(const std::vector< Acts::detail::Step > &steps, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewLine)
Draws the recorded propagation steps as a polygon line.
Definition: ObjVisualizationHelpers.cxx:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
ActsTrk::GeometryContext
Definition: GeometryContext.h:28
MuonR4::Segment::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:39
MuonValR4::TrackVisualizationTool::m_objCounter
std::atomic< unsigned > m_objCounter
How many obj have been produced.
Definition: TrackVisualizationTool.h:152
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
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:96
MuonValR4::TrackVisualizationTool::m_extrapolationTool
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
Definition: TrackVisualizationTool.h:129
MuonValR4::TrackVisualizationTool::displaySeeds
virtual void displaySeeds(const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds) 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:123
xAOD::MuonSegment_v1::position
Amg::Vector3D position() const
Returns the position as Amg::Vector.
Definition: MuonSegment_v1.cxx:15
plotBeamSpotVxVal.legend
legend
Definition: plotBeamSpotVxVal.py:97
RunTileCalibRec.fileVersion
fileVersion
Definition: RunTileCalibRec.py:494
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:140
MuonValR4::TrackVisualizationTool::m_geoCtxKey
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
Dependency on the geometry alignment.
Definition: TrackVisualizationTool.h:138
MuonValR4::drawSegmentMeasurements
void drawSegmentMeasurements(const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, Acts::ObjVisualization3D &visualHelper, const Acts::ViewConfig &viewConfig=Acts::s_viewSensitive)
Draw all uncalibrated measurements associated to the segment.
Definition: ObjVisualizationHelpers.cxx:81
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonValR4::IRootVisualizationService::ClientToken::saveSummaryPlot
bool saveSummaryPlot
Save a summary pdf.
Definition: IRootVisualizationService.h:49
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
xAOD::MuonSegment_v1::sector
int sector() const
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:93
MuonValR4::TrackVisualizationTool::fillTruthSeedPoints
void fillTruthSeedPoints(const EventContext &ctx, const MuonR4::MsTrackSeeder &seeder, const DisplayView view, PlotLegend &legend, Canvas_t &canvas) const
Add the truth segments to the canvas.
Definition: TrackVisualizationTool.cxx:251
MuonR4::MsTrackSeeder::SectorProjector
SectorProjector
Enumeration to select the sector projection.
Definition: MsTrackSeeder.h:60
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:39
MuonValR4::TrackVisualizationTool::m_subDir
Gaudi::Property< std::string > m_subDir
Define the subdirectory in which the plots shall be saved.
Definition: TrackVisualizationTool.h:146
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
Muon::MuonStationIndex::toLayerIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
MuonValR4::IRootVisualizationService::ICanvasObject::AxisRanges::xHigh
@ xHigh
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:27
MuonValR4::TrackVisualizationTool::m_plotsDone
std::atomic< bool > m_plotsDone
Flag toggling whether all Canvases have been exhausted.
Definition: TrackVisualizationTool.h:150
MuonValR4::ensureDirectory
void ensureDirectory(const std::string &path)
Ensures that the subdirectory in the path is created.
Definition: FileHelpers.cxx:17
xAOD::MuonSegment_v1::chamberIndex
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
drawFromPickle.view
view
Definition: drawFromPickle.py:294