 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/display/PrimitivePlotter.h>
14 #include <framework/datastore/StoreArray.h>
28 namespace TrackFindingCDC {
34 class CDCWireTopology;
35 class CDCWireSuperLayer;
38 class CDCTrajectory2D;
45 class CDCWireHitCluster;
50 class CDCAxialSegmentPair;
51 class CDCSegmentTriple;
56 class EventDataPlotter {
72 explicit EventDataPlotter(std::unique_ptr<PrimitivePlotter> ptrPrimitivePlotter,
74 bool forwardFade =
false);
90 const std::string
save(
const std::string& fileName);
138 return std::to_string(nanoseconds) +
"s";
257 if (ptr)
draw(*ptr, attributeMap);
264 if (not storeArray)
return;
269 template<
class ARange>
275 for (
const auto& element : range) {
282 template<
class ARange>
289 float endOpacity = 0.5;
290 int n = std::distance(std::begin(range), std::end(range));
292 float opacityFactor = std::pow(endOpacity / opacity, 1.0 / (n - 1));
293 for (
const auto& element : range) {
294 const auto opacity_str = std::to_string(opacity);
295 AttributeMap elementAttributeMap{{
"opacity", opacity_str}};
296 draw(element, elementAttributeMap);
297 opacity *= opacityFactor;
void startAnimationGroup(const Belle2::CDCSimHit &simHit)
Start a group in the underlying plotter with an animation uncovering the elements at the time of flig...
Class representing a three dimensional reconstructed hit.
Class representing a sequence of three dimensional reconstructed hits.
bool m_animate
Memory for the flag if the event data should be animated. If animation is supported is backend depend...
Class representing a pair of one reconstructed axial segement and one stereo segment in adjacent supe...
virtual void endGroup()
Indicates the end of a group of drawn elements.
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
std::unique_ptr< PrimitivePlotter > m_ptrPrimitivePlotter
Reference to the primitivePlotter instance used as backend for the draw commands.
void setCanvasWidth(float width)
Setter for the canvas width in pixels.
EventDataPlotter(bool animate=false, bool forwardFade=false)
Default constructor for ROOT compatibility. Uses an SVGPrimitivePlotter as backend.
void drawRange(const ARange &range, const AttributeMap &attributeMap=AttributeMap())
Draws a range iterable collection of drawable elements.
A two dimensional circle in its natural representation using center and radius as parameters.
A segment consisting of three dimensional reconstructed hits.
Belle2::TrackFindingCDC::AttributeMap AttributeMap
A map type for attributes names to values for additional drawing information.
float getCanvasWidth() const
Getter for the canvas width in pixels.
Particle trajectory as it is seen in xy projection represented as a circle.
const std::string save(const std::string &fileName)
Saves the current plot stead to a file.
void draw(const Belle2::TrackFindingCDC::Circle2D &circle, AttributeMap attributeMap=AttributeMap())
Draws a filled circle.
bool m_forwardFade
Memory for the flag whether the orientation of tracks segments etc should be shown as diming opacity.
void drawTrajectory(const MCParticle &mcParticle, const AttributeMap &attributeMap=AttributeMap())
Draws the trajectory that is represented by the MC particle.
void startGroup(const AttributeMap &attributeMap=AttributeMap())
Indicates the start of a group of drawn elements.
void drawOuterCDCWall(const AttributeMap &attributeMap=AttributeMap())
Draw the outer wall of the CDC.
void clear()
Clears all drawed elements from the plotter.
This is the Reconstruction Event-Data Model Track.
void endGroup()
Indicates the end of a group of drawn elements.
PrimitivePlotter::AttributeMap AttributeMap
Forward the Attributre map from the primitive plotter.
std::string getAnimationTimeFromNanoSeconds(float nanoseconds)
Converts a time given in nanoseconds to a time sting of the from "%fs".
virtual void startGroup(const AttributeMap &attributeMap=AttributeMap())
Indicates the start of a group of drawn elements.
Class representing a two dimensional reconstructed hit in the central drift chamber.
Class representing a pair of reconstructed axial segements in adjacent superlayer.
Abstract base class for different kinds of events.
Class representating a linear track piece between two oriented wire hits.
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.
An aggregation of CDCWireHits.
A base class for plots of primitive objects.
void setCanvasHeight(float height)
Setter for the canvas height in pixels The canvas height denotes the size of the image being produced...
Class representating a sense wire superlayer in the central drift chamber.
void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Draws a straight Line.
Class representing a sense wire in the central drift chamber.
A reconstructed sequence of two dimensional hits in one super layer.
void drawInteractionPoint()
Marks the position of the interaction point with a filled circle.
A Class to store the Monte Carlo particle information.
BoundingBox getBoundingBox() const
Getter for the current bounding box.
Accessor to arrays stored in the data store.
Class representing a hit wire in the central drift chamber.
Class representing a triple of reconstructed segements in adjacent superlayer.
Class representating the sense wire arrangement in the whole of the central drift chamber.
void setBoundingBox(const BoundingBox &boundingBox)
Setter for the bounding box of all drawed objects.
float getCanvasHeight() const
Getter for the canvas height in pixels.
void drawInnerCDCWall(const AttributeMap &attributeMap=AttributeMap())
Draw the inner wall of the CDC.