Belle II Software  release-08-01-10
CDCSVGPlotter Class Reference

Helper class to generated the svg image from the various tracking objects. More...

#include <CDCSVGPlotter.h>

Collaboration diagram for CDCSVGPlotter:

Public Member Functions

 CDCSVGPlotter (bool animate=false, bool forwardFade=false)
 Constructor.
 
CDCSVGPlotterclone ()
 Make a copy of the current status of the plotter.
 
void drawWires (const CDCWireTopology &cdcWireTopology)
 Draws the wires.
 
void drawInteractionPoint ()
 Draws the interaction point.
 
void drawSuperLayerBoundaries (const std::string &stroke)
 Draws the individual super layer boundaries. More...
 
void drawOuterCDCWall (const std::string &stroke)
 Draws the outer CDCWall. More...
 
void drawInnerCDCWall (const std::string &stroke)
 Draws the inner CDCWall. More...
 
void drawHits (const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
 Draws CDCHits. More...
 
void drawSimHits (const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
 Draws CDCSimHits. More...
 
void drawClusters (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws CDCWireHitClusters. More...
 
void drawSegments (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws CDCSegments. More...
 
void drawSegmentTrajectories (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws SegmentTrajectories. More...
 
void drawSegmentPairs (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draw the axial to stereo segment pairs. More...
 
void drawAxialSegmentPairs (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draw the axial to axial segment pairs. More...
 
void drawSegmentTriples (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draw the axial, stereo, axial segment triples. More...
 
void drawSegmentTripleTrajectories (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draw the trajectories of the axial, stereo, axial segment triples. More...
 
void drawTracks (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws CDCTracks. More...
 
void drawTrackTrajectories (const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws trajectories of the tracks. More...
 
void drawRecoTracks (const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
 Draw RecoTracks. More...
 
void drawRecoTrackTrajectories (const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
 Draw RecoTracks trajectories. More...
 
void drawMCParticleTrajectories (const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
 Draw MCParticles. More...
 
void drawWrongRLHitsInSegments (const std::string &segmentsStoreObjName)
 Draw the CDCRLWireHits in the CDCSegments colored by the match of the right left passage informations. More...
 
void drawWrongRLHitsInTracks (const std::string &tracksStoreObjName)
 Draw the CDCRLWireHits in the CDCTracks colored by the match of the right left passage informations. More...
 
void drawSimHitsConnectByToF (const std::string &simHitStoreArrayName, const std::string &stroke, const std::string &strokeWidth)
 Draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo particle. More...
 
void drawMCSegmentPairs (const std::string &segmentsStoreObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws the Monte Carlo true CDCSegmentPairs. More...
 
void drawMCAxialSegmentPairs (const std::string &segmentsStoreObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws the Monte Carlo true CDCAxialSegmentPairs. More...
 
void drawMCSegmentTriples (const std::string &segmentsStoreObjName, const std::string &stroke, const std::string &strokeWidth)
 Draws the Monte Carlo true CDCSegmentTriples. More...
 
std::string saveFile (const std::string &fileName="display.svg")
 Save the current dom object representation to disk. More...
 

Private Member Functions

template<class ACDCHitCollection >
void drawWrongRLHits (const std::string &storeObjName)
 Draw the CDCRLWireHits in the ACDCHitCollection colored by the match of the right left passage informations. More...
 
template<class AItem , bool a_drawTrajectories = false>
void drawStoreArray (const std::string &storeArrayName, Styling< AItem > &styling)
 Function Template for drawing the elements of a given StoreArray. More...
 
template<class AItem , bool a_drawTrajectories = false>
void drawStoreVector (const std::string &storeObjName, Styling< AItem > &styling)
 Function Template for drawing the elements of a given StoreVector. More...
 
template<bool a_drawTrajectory = false, class AIterable , class AStyling >
void drawIterable (const AIterable &items, AStyling &styling)
 Draw every element of an iterable object. More...
 
template<bool a_drawTrajectory = false, class AObject >
void draw (const AObject &object, const AttributeMap &attributeMap)
 Draws the object or its trajectory with the given attributes.
 

Private Attributes

EventDataPlotter m_eventdataPlotter
 The plotter instance to translate event data objects to svg expressions.
 

Detailed Description

Helper class to generated the svg image from the various tracking objects.

Definition at line 23 of file CDCSVGPlotter.h.

Member Function Documentation

◆ drawAxialSegmentPairs()

void drawAxialSegmentPairs ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw the axial to axial segment pairs.

Parameters
storeObjNameThe name of the StoreVector containing the CDCAxialSegmentPairs.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCAxialSegmentPair and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCAxialSegmentPair and its id to a stroke-width.

Definition at line 222 of file CDCSVGPlotter.cc.

225 {
227  if (stroke != "") styling.setStroke(stroke);
228  if (strokeWidth != "") styling.setStrokeWidth(strokeWidth);
229  drawStoreVector<const CDCAxialSegmentPair>(storeObjName, styling);
230 }
void setStrokeWidth(const std::string &mappingName)
Legacy method to set the mapping on how to match a object to the stroke width.
Definition: Styling.h:173
void setStroke(const std::string &mappingName)
Legacy method to set the mapping on how to match a object to the stroke color.
Definition: Styling.h:163
Class template for coloring objects with stroke colors prepared to be the default color cycle.
Definition: Styling.h:185

◆ drawClusters()

void drawClusters ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws CDCWireHitClusters.

Parameters
storeObjNameThe name of the StoreVector containing the CDCWireHitClusters.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 191 of file CDCSVGPlotter.cc.

◆ drawHits()

void drawHits ( const std::string &  storeArrayName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws CDCHits.

Parameters
storeArrayNameThe name of the StoreArray containing the CDCHits.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 155 of file CDCSVGPlotter.cc.

◆ drawInnerCDCWall()

void drawInnerCDCWall ( const std::string &  stroke)

Draws the inner CDCWall.

Parameters
strokeThe color to be used for drawing.

Definition at line 143 of file CDCSVGPlotter.cc.

◆ drawIterable()

void drawIterable ( const AIterable &  items,
AStyling &  styling 
)
private

Draw every element of an iterable object.

Template Parameters
a_drawTrajectorySwitch to draw the fitted trajectory from the object instead.
Parameters
itemsAn iterable object (StoreArray, std::vector...).
stylingStyling object from which drawing attributes are constructed

◆ drawMCAxialSegmentPairs()

void drawMCAxialSegmentPairs ( const std::string &  segmentsStoreObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws the Monte Carlo true CDCAxialSegmentPairs.

This routine creates the true axial segment pairs from the stored segments to get an overview which cases the segment triple reconstruction should cover.

Parameters
segmentsStoreObjNameThe name of the StoreVector containing the CDCSegment2Ds, from which the pair should be constructed.
strokeColor of the lines to be drawn.
strokeWidthWidth of the lines to be drawn.

Definition at line 471 of file CDCSVGPlotter.cc.

◆ drawMCParticleTrajectories()

void drawMCParticleTrajectories ( const std::string &  storeArrayName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw MCParticles.

Parameters
storeArrayNameThe name of the StoreArray containing the RecoTracks.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 305 of file CDCSVGPlotter.cc.

◆ drawMCSegmentPairs()

void drawMCSegmentPairs ( const std::string &  segmentsStoreObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws the Monte Carlo true CDCSegmentPairs.

This routine creates the true segment pairs from the stored segments to get an overview which cases the segment triple reconstruction should cover.

Parameters
segmentsStoreObjNameThe name of the StoreVector containing the CDCSegment2Ds, from which the pair should be constructed.
strokeColor of the lines to be drawn.
strokeWidthWidth of the lines to be drawn.

Definition at line 511 of file CDCSVGPlotter.cc.

◆ drawMCSegmentTriples()

void drawMCSegmentTriples ( const std::string &  segmentsStoreObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws the Monte Carlo true CDCSegmentTriples.

This routine creates the true segment triples from the stored segments to get an overview which cases the segment triple reconstruction should cover.

Parameters
segmentsStoreObjNameThe name of the StoreVector containing the CDCSegment2Ds, from which the pair should be constructed.
strokeColor of the lines to be drawn.
strokeWidthWidth of the lines to be drawn.

Definition at line 567 of file CDCSVGPlotter.cc.

◆ drawOuterCDCWall()

void drawOuterCDCWall ( const std::string &  stroke)

Draws the outer CDCWall.

Parameters
strokeThe color to be used for drawing.

Definition at line 136 of file CDCSVGPlotter.cc.

◆ drawRecoTracks()

void drawRecoTracks ( const std::string &  storeArrayName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw RecoTracks.

Parameters
storeArrayNameThe name of the StoreArray containing the RecoTracks.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 284 of file CDCSVGPlotter.cc.

◆ drawRecoTrackTrajectories()

void drawRecoTrackTrajectories ( const std::string &  storeArrayName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw RecoTracks trajectories.

Parameters
storeArrayNameThe name of the StoreArray containing the RecoTracks.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 294 of file CDCSVGPlotter.cc.

◆ drawSegmentPairs()

void drawSegmentPairs ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw the axial to stereo segment pairs.

Parameters
storeObjNameThe name of the StoreVector containing the CDCSegmentPairs.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCSegmentPair and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCSegmentPair and its id to a stroke-width.

Definition at line 232 of file CDCSVGPlotter.cc.

◆ drawSegments()

void drawSegments ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws CDCSegments.

Parameters
storeObjNameThe name of the StoreVector containing the CDCSegments.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 201 of file CDCSVGPlotter.cc.

◆ drawSegmentTrajectories()

void drawSegmentTrajectories ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws SegmentTrajectories.

Parameters
storeObjNameThe name of the StoreVector containing the CDCSegments.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 211 of file CDCSVGPlotter.cc.

◆ drawSegmentTriples()

void drawSegmentTriples ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw the axial, stereo, axial segment triples.

Parameters
storeObjNameThe name of the StoreVector containing the CDCSegmentTriples.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCSegmentTriple and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCSegmentTriple and its id to a stroke-width.

Definition at line 242 of file CDCSVGPlotter.cc.

◆ drawSegmentTripleTrajectories()

void drawSegmentTripleTrajectories ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw the trajectories of the axial, stereo, axial segment triples.

Parameters
storeObjNameThe name of the StoreVector containing the CDCSegmentTriples.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCSegmentTriple and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCSegmentTriple and its id to a stroke-width.

Definition at line 252 of file CDCSVGPlotter.cc.

◆ drawSimHits()

void drawSimHits ( const std::string &  storeArrayName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws CDCSimHits.

Parameters
storeArrayNameThe name of the StoreArray containing the CDCSimHits.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCSimHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCSimHit and its id to a stroke-width.

Definition at line 165 of file CDCSVGPlotter.cc.

◆ drawSimHitsConnectByToF()

void drawSimHitsConnectByToF ( const std::string &  simHitStoreArrayName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo particle.

Parameters
simHitStoreArrayNameThe name of the StoreArray containing the CDCSimHits.
strokeColor of the lines to be drawn.
strokeWidthWidth of the lines to be drawn.

Definition at line 316 of file CDCSVGPlotter.cc.

◆ drawStoreArray()

void drawStoreArray ( const std::string &  storeArrayName,
Styling< AItem > &  styling 
)
private

Function Template for drawing the elements of a given StoreArray.

Needs to know the type of the objects in the StoreArray and the right styling for these objects.

Template Parameters
a_drawTrajectoriesSwitch to draw the fitted trajectory from the object instead.
Parameters
storeArrayNameThe name of the StoreArray containing the objects.
stylingFunctional object to construct attributes for each object to be drawn

◆ drawStoreVector()

void drawStoreVector ( const std::string &  storeObjName,
Styling< AItem > &  styling 
)
private

Function Template for drawing the elements of a given StoreVector.

Needs to know the type of the objects in the store objects and the right styling for these objects.

Template Parameters
a_drawTrajectoriesSwitch to draw the fitted trajectory from the object instead.
Parameters
storeObjNamename of the StoreObject containing the objects.
stylingFunctional object to construct attributes for each object to be drawn

◆ drawSuperLayerBoundaries()

void drawSuperLayerBoundaries ( const std::string &  stroke)

Draws the individual super layer boundaries.

Parameters
strokeThe color to be used for drawing.

Definition at line 129 of file CDCSVGPlotter.cc.

◆ drawTracks()

void drawTracks ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws CDCTracks.

Parameters
storeObjNameThe name of the StoreVector containing the CDCTracks.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCSegmentTriple and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCSegmentTriple and its id to a stroke-width.

Definition at line 263 of file CDCSVGPlotter.cc.

◆ drawTrackTrajectories()

void drawTrackTrajectories ( const std::string &  storeObjName,
const std::string &  stroke,
const std::string &  strokeWidth 
)

Draws trajectories of the tracks.

Parameters
storeObjNameThe name of the StoreVector containing the CDCTracks.
strokeEither the color to be used for drawing or the name of the method, which maps the CDCHit and its id to a color.
strokeWidthEither the stroke-width to be used for drawing or the name of the method, which maps the CDCHit and its id to a stroke-width.

Definition at line 273 of file CDCSVGPlotter.cc.

◆ drawWrongRLHits()

void drawWrongRLHits ( const std::string &  storeObjName)
private

Draw the CDCRLWireHits in the ACDCHitCollection colored by the match of the right left passage informations.

It respects hit collections reconstructed backwards to have the opposite rl informations.

◆ drawWrongRLHitsInSegments()

void drawWrongRLHitsInSegments ( const std::string &  segmentsStoreObjName)

Draw the CDCRLWireHits in the CDCSegments colored by the match of the right left passage informations.

It respects segments reconstructed backwards to have the opposite rl informations

Definition at line 403 of file CDCSVGPlotter.cc.

◆ drawWrongRLHitsInTracks()

void drawWrongRLHitsInTracks ( const std::string &  tracksStoreObjName)

Draw the CDCRLWireHits in the CDCTracks colored by the match of the right left passage informations.

It respects tracks reconstructed backwards to have the opposite rl informations

Definition at line 408 of file CDCSVGPlotter.cc.

◆ saveFile()

std::string saveFile ( const std::string &  fileName = "display.svg")

Save the current dom object representation to disk.

Parameters
fileNameThe Name of the saved file. Defaults to "display.svg".

Definition at line 614 of file CDCSVGPlotter.cc.


The documentation for this class was generated from the following files: