10#include <tracking/trackFindingCDC/display/PrimitivePlotter.h>
12#include <framework/datastore/StoreArray.h>
26 namespace TrackFindingCDC {
32 class CDCWireTopology;
33 class CDCWireSuperLayer;
36 class CDCTrajectory2D;
43 class CDCWireHitCluster;
48 class CDCAxialSegmentPair;
49 class CDCSegmentTriple;
70 explicit EventDataPlotter(std::unique_ptr<PrimitivePlotter> ptrPrimitivePlotter,
72 bool forwardFade =
false);
88 const std::string
save(
const std::string& fileName);
136 return std::to_string(nanoseconds) +
"s";
255 if (ptr)
draw(*ptr, attributeMap);
262 if (not storeArray)
return;
267 template<
class ARange>
273 for (
const auto& element : range) {
280 template<
class ARange>
287 float endOpacity = 0.5;
288 int n = std::distance(std::begin(range), std::end(range));
290 float opacityFactor = std::pow(endOpacity / opacity, 1.0 / (n - 1));
291 for (
const auto& element : range) {
292 const auto opacity_str = std::to_string(opacity);
293 AttributeMap elementAttributeMap{{
"opacity", opacity_str}};
294 draw(element, elementAttributeMap);
295 opacity *= opacityFactor;
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
A Class to store the Monte Carlo particle information.
This is the Reconstruction Event-Data Model Track.
Accessor to arrays stored in the data store.
A two dimensional rectangle that keeps track of the extend of a drawing.
Class representing a pair of reconstructed axial segments in adjacent superlayer.
Class representing a two dimensional reconstructed hit in the central drift chamber.
Class representing a three dimensional reconstructed hit.
A reconstructed sequence of two dimensional hits in one super layer.
A segment consisting of three dimensional reconstructed hits.
Class representing a pair of one reconstructed axial segment and one stereo segment in adjacent super...
Class representing a triple of reconstructed segments in adjacent superlayer.
Class representing a linear track piece between two oriented wire hits.
Class representing a sequence of three dimensional reconstructed hits.
Particle trajectory as it is seen in xy projection represented as a circle.
An aggregation of CDCWireHits.
Class representing a hit wire in the central drift chamber.
Class representing a sense wire superlayer in the central drift chamber.
Class representing the sense wire arrangement in the whole of the central drift chamber.
Class representing a sense wire in the central drift chamber.
A two dimensional circle in its natural representation using center and radius as parameters.
A class that can plot event related data types.
void drawInteractionPoint()
Marks the position of the interaction point with a filled circle.
float getCanvasHeight() const
Getter for the canvas height in pixels.
void setCanvasHeight(float height)
Setter for the canvas height in pixels The canvas height denotes the size of the image being produced...
void setBoundingBox(const BoundingBox &boundingBox)
Setter for the bounding box of all drawn objects.
bool m_forwardFade
Memory for the flag whether the orientation of tracks segments etc should be shown as dimming opacity...
void drawOuterCDCWall(const AttributeMap &attributeMap=AttributeMap())
Draw the outer wall of the CDC.
void drawTrajectory(const MCParticle &mcParticle, const AttributeMap &attributeMap=AttributeMap())
Draws the trajectory that is represented by the MC particle.
void drawInnerCDCWall(const AttributeMap &attributeMap=AttributeMap())
Draw the inner wall of the CDC.
float getCanvasWidth() const
Getter for the canvas width in pixels.
PrimitivePlotter::AttributeMap AttributeMap
Forward the Attribute map from the primitive plotter.
void drawRange(const ARange &range, const AttributeMap &attributeMap=AttributeMap())
Draws a range iterable collection of drawable elements.
void startGroup(const AttributeMap &attributeMap=AttributeMap())
Indicates the start of a group of drawn elements.
bool m_animate
Memory for the flag if the event data should be animated. If animation is supported is backend depend...
void setCanvasWidth(float width)
Setter for the canvas width in pixels.
void draw(const T *ptr, const AttributeMap &attributeMap=AttributeMap())
Allow the drawing of pointers checking if the pointer is nonzero.
const std::string save(const std::string &fileName)
Saves the current plot stead to a file.
BoundingBox getBoundingBox() const
Getter for the current bounding box.
std::unique_ptr< PrimitivePlotter > m_ptrPrimitivePlotter
Reference to the primitivePlotter instance used as backend for the draw commands.
void clear()
Clears all drawn elements from the plotter.
void drawSuperLayerBoundaries(const AttributeMap &attributeMap=AttributeMap())
Draw the super layer bounds of the CDC.
void drawRangeWithFade(const ARange &range, const AttributeMap &attributeMap=AttributeMap())
Draws a range iterable collection of drawable elements.
void draw(const Belle2::TrackFindingCDC::Circle2D &circle, AttributeMap attributeMap=AttributeMap())
Draws a filled circle.
void draw(const StoreArray< T > &storeArray, const AttributeMap &attributeMap=AttributeMap())
Draw store array.
void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Draws a straight Line.
void startAnimationGroup(const Belle2::CDCSimHit &simHit)
Start a group in the underlying plotter with an animation uncovering the elements at the time of flig...
void endGroup()
Indicates the end of a group of drawn elements.
std::string getAnimationTimeFromNanoSeconds(float nanoseconds)
Converts a time given in nanoseconds to a time string of the from "%fs".
A base class for plots of primitive objects.
virtual void startGroup(const AttributeMap &attributeMap=AttributeMap())
Indicates the start of a group of drawn elements.
Belle2::TrackFindingCDC::AttributeMap AttributeMap
A map type for attributes names to values for additional drawing information.
virtual void endGroup()
Indicates the end of a group of drawn elements.
Abstract base class for different kinds of events.