Belle II Software development
CDCSVGPlotter.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/display/EventDataPlotter.h>
11
12namespace Belle2 {
17 namespace TrackFindingCDC {
18
19 template <class T>
20 class Styling;
21
24
25 public:
29 CDCSVGPlotter(bool animate = false, bool forwardFade = false);
30
35
39 void drawWires(const CDCWireTopology& cdcWireTopology);
40
45
50 void drawSuperLayerBoundaries(const std::string& stroke);
51
56 void drawOuterCDCWall(const std::string& stroke);
57
62 void drawInnerCDCWall(const std::string& stroke);
63
70 void drawHits(const std::string& storeArrayName,
71 const std::string& stroke,
72 const std::string& strokeWidth);
73
80 void drawSimHits(const std::string& storeArrayName,
81 const std::string& stroke,
82 const std::string& strokeWidth);
83
90 void drawClusters(const std::string& storeObjName,
91 const std::string& stroke,
92 const std::string& strokeWidth);
93
100 void drawSegments(const std::string& storeObjName,
101 const std::string& stroke,
102 const std::string& strokeWidth);
103
110 void drawSegmentTrajectories(const std::string& storeObjName,
111 const std::string& stroke,
112 const std::string& strokeWidth);
113
120 void drawSegmentPairs(const std::string& storeObjName,
121 const std::string& stroke,
122 const std::string& strokeWidth);
123
130 void drawAxialSegmentPairs(const std::string& storeObjName,
131 const std::string& stroke,
132 const std::string& strokeWidth);
133
140 void drawSegmentTriples(const std::string& storeObjName,
141 const std::string& stroke,
142 const std::string& strokeWidth);
143
150 void drawSegmentTripleTrajectories(const std::string& storeObjName,
151 const std::string& stroke,
152 const std::string& strokeWidth);
153
160 void drawTracks(const std::string& storeObjName,
161 const std::string& stroke,
162 const std::string& strokeWidth);
163
170 void drawTrackTrajectories(const std::string& storeObjName,
171 const std::string& stroke,
172 const std::string& strokeWidth);
173
180 void drawRecoTracks(const std::string& storeArrayName,
181 const std::string& stroke,
182 const std::string& strokeWidth);
183
190 void drawRecoTrackTrajectories(const std::string& storeArrayName,
191 const std::string& stroke,
192 const std::string& strokeWidth);
193
200 void drawMCParticleTrajectories(const std::string& storeArrayName,
201 const std::string& stroke,
202 const std::string& strokeWidth);
203
204 public:
205 /* *** Section with some more complex operations *** */
206
211 void drawWrongRLHitsInSegments(const std::string& segmentsStoreObjName);
212
217 void drawWrongRLHitsInTracks(const std::string& tracksStoreObjName);
218
219 private:
224 template<class ACDCHitCollection>
225 void drawWrongRLHits(const std::string& storeObjName);
226
227 public:
234 void drawSimHitsConnectByToF(const std::string& simHitStoreArrayName,
235 const std::string& stroke,
236 const std::string& strokeWidth);
237
249 void drawMCSegmentPairs(const std::string& segmentsStoreObjName,
250 const std::string& stroke,
251 const std::string& strokeWidth);
252
264 void drawMCAxialSegmentPairs(const std::string& segmentsStoreObjName,
265 const std::string& stroke,
266 const std::string& strokeWidth);
267
279 void drawMCSegmentTriples(const std::string& segmentsStoreObjName,
280 const std::string& stroke,
281 const std::string& strokeWidth);
282
283 public:
288 std::string saveFile(const std::string& fileName = "display.svg");
289
290 private:
300 template<class AItem, bool a_drawTrajectories = false>
301 void drawStoreArray(const std::string& storeArrayName, Styling<AItem>& styling);
302
312 template<class AItem, bool a_drawTrajectories = false>
313 void drawStoreVector(const std::string& storeObjName, Styling<AItem>& styling);
314
321 template <bool a_drawTrajectory = false, class AIterable, class AStyling>
322 void drawIterable(const AIterable& items, AStyling& styling);
323
325 template <bool a_drawTrajectory = false, class AObject>
326 void draw(const AObject& object, const AttributeMap& attributeMap);
327
328 private:
331 };
332 }
334}
Helper class to generated the svg image from the various tracking objects.
Definition: CDCSVGPlotter.h:23
void drawInteractionPoint()
Draws the interaction point.
CDCSVGPlotter * clone()
Make a copy of the current status of the plotter.
void drawAxialSegmentPairs(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draw the axial to axial segment pairs.
void drawSegmentTriples(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draw the axial, stereo, axial segment triples.
void drawRecoTrackTrajectories(const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
Draw RecoTracks trajectories.
void drawIterable(const AIterable &items, AStyling &styling)
Draw every element of an iterable object.
void drawMCAxialSegmentPairs(const std::string &segmentsStoreObjName, const std::string &stroke, const std::string &strokeWidth)
Draws the Monte Carlo true CDCAxialSegmentPairs.
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.
void draw(const AObject &object, const AttributeMap &attributeMap)
Draws the object or its trajectory with the given attributes.
void drawHits(const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
Draws CDCHits.
void drawWrongRLHits(const std::string &storeObjName)
Draw the CDCRLWireHits in the ACDCHitCollection colored by the match of the right left passage inform...
void drawInnerCDCWall(const std::string &stroke)
Draws the inner CDCWall.
void drawWrongRLHitsInTracks(const std::string &tracksStoreObjName)
Draw the CDCRLWireHits in the CDCTracks colored by the match of the right left passage informations.
void drawTrackTrajectories(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draws trajectories of the tracks.
void drawOuterCDCWall(const std::string &stroke)
Draws the outer CDCWall.
void drawSuperLayerBoundaries(const std::string &stroke)
Draws the individual super layer boundaries.
void drawMCSegmentTriples(const std::string &segmentsStoreObjName, const std::string &stroke, const std::string &strokeWidth)
Draws the Monte Carlo true CDCSegmentTriples.
void drawSegmentTripleTrajectories(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draw the trajectories of the axial, stereo, axial segment triples.
void drawMCSegmentPairs(const std::string &segmentsStoreObjName, const std::string &stroke, const std::string &strokeWidth)
Draws the Monte Carlo true CDCSegmentPairs.
std::string saveFile(const std::string &fileName="display.svg")
Save the current dom object representation to disk.
void drawStoreArray(const std::string &storeArrayName, Styling< AItem > &styling)
Function Template for drawing the elements of a given StoreArray.
void drawWrongRLHitsInSegments(const std::string &segmentsStoreObjName)
Draw the CDCRLWireHits in the CDCSegments colored by the match of the right left passage informations...
void drawSegmentTrajectories(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draws SegmentTrajectories.
void drawMCParticleTrajectories(const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
Draw MCParticles.
void drawSegmentPairs(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draw the axial to stereo segment pairs.
void drawClusters(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draws CDCWireHitClusters.
void drawTracks(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draws CDCTracks.
void drawStoreVector(const std::string &storeObjName, Styling< AItem > &styling)
Function Template for drawing the elements of a given StoreVector.
void drawRecoTracks(const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
Draw RecoTracks.
EventDataPlotter m_eventdataPlotter
The plotter instance to translate event data objects to svg expressions.
void drawSegments(const std::string &storeObjName, const std::string &stroke, const std::string &strokeWidth)
Draws CDCSegments.
void drawSimHits(const std::string &storeArrayName, const std::string &stroke, const std::string &strokeWidth)
Draws CDCSimHits.
void drawWires(const CDCWireTopology &cdcWireTopology)
Draws the wires.
Class representating the sense wire arrangement in the whole of the central drift chamber.
A class that can plot event related data types.
Interface for a mapping of object and an index to styling attributes.
Definition: Styling.h:32
Abstract base class for different kinds of events.