Belle II Software  release-05-01-25
CDCSVGDisplayModule Class Reference
Inheritance diagram for CDCSVGDisplayModule:
Collaboration diagram for CDCSVGDisplayModule:

Public Member Functions

def __init__ (self, output_folder="/tmp", interactive=True)
 
def drawoptions (self)
 
def all_drawoptions (self)
 
def draw_wires (self)
 
def draw_wires (self, draw_wires)
 
def initialize (self)
 
def beginRun (self)
 
def event (self)
 
def endRun (self)
 
def terminate (self)
 
def new_output_basename (self)
 
def new_output_filename (self)
 

Public Attributes

 interactive
 Switch if the module shall show the event to the user and wait to continue or just generate the images.
 
 output_folder
 Folder the images shall be saved to.
 
 animate
 Switch to make an animated event display by means of animated SVG.
 
 forward_fade
 Switch to make the color of segments and tracks fade out in the forward direction.
 
 use_cpp
 Flag to use cpp.
 
 use_python
 Flag to use python.
 
 draw_interaction_point
 Switch to draw the interaction point. More...
 
 draw_superlayer_boundaries
 Switch to draw the superlayer boundaries. More...
 
 draw_walls
 Switch to draw the superlayer boundaries. More...
 
 draw_hits
 Switch to draw the CDCHits. More...
 
 draw_takenflag
 Switch to draw the CDCHits colored by the associated CDCWireHit taken flag. More...
 
 draw_mcparticle_id
 Switch to draw the MCParticle::getArrayIndex property. More...
 
 draw_mcparticle_pdgcode
 Switch to draw the MCParticle::getPDGCode property. More...
 
 draw_mcparticle_primary
 Switch to draw the MCParticle::hasStatus(c_PrimaryParticle) property. More...
 
 draw_mcparticle_trajectories
 Switch to draw the ideal trajectory of the MCParticle. More...
 
 draw_simhits
 Switch to draw the CDCSimHits with momentum information. More...
 
 draw_simhit_tof
 Switch to draw the CDCSimHits color coded by their time of flight. More...
 
 draw_simhit_posflag
 Switch to draw the CDCSimHits color coded by their getPosFlag() property. More...
 
 draw_simhit_pdgcode
 Switch to draw the CDCSimHits color coded by their getPDGCode() property. More...
 
 draw_simhit_bkgtag
 Switch to draw the CDCSimHits color coded by their getBackgroundTag() property. More...
 
 draw_simhit_isbkg
 Switch to draw the CDCSimHits red for getBackgroundTag() != bg_none. More...
 
 draw_nloops
 Switch to draw the CDCHit colored by the number of loops passed.
 
 draw_connect_tof
 Switch to draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo particle. More...
 
 draw_rlinfo
 Switch to draw the CDCSimHits color coded by their local right left passage information. More...
 
 draw_reassigned
 Switch to draw the CDCSimHits color coded by their reassignement information to a different MCParticle. More...
 
 draw_mcsegments
 Switch to draw the Monte Carlo segments as generated in CDCMCTrackStore. More...
 
 draw_mcaxialsegmentpairs
 Switch to draw the axial to axial segment pairs from Monte Carlo truth. More...
 
 draw_mcsegmentpairs
 Switch to draw the axial to stereo segment pairs from Monte Carlo truth. More...
 
 draw_mcsegmenttriples
 Switch to draw the segment triples from Monte Carlo truth. More...
 
 draw_superclusters
 Switch to draw the clusters generated by the finder.
 
 draw_clusters
 Switch to draw the clusters generated by the finder.
 
 draw_segments
 Switch to draw the segments generated by the finder.
 
 draw_segment_trajectories
 Switch to draw the trajectories fitted to the segments generated by the finder.
 
 draw_tangentsegments
 Switch to draw the tangent segments generated by the finder.
 
 draw_segment_mctrackids
 Switch to draw the segments generated by the finder colored with the Monte Carlo track id.
 
 draw_segment_fbinfos
 Switch to draw the segments generated by the finder colored by the coalignment information (forward, backward, undetermined)
 
 draw_segment_firstInTrackIds
 Switch to draw the segments generated by the finder colored by the frist in track hit id.
 
 draw_segment_lastInTrackIds
 Switch to draw the segments generated by the finder colored by the second in track hit id.
 
 draw_segment_firstNPassedSuperLayers
 Switch to draw the segments generated by the finder colored by the number of passed superlayers assoziated to the first hit in the segment.
 
 draw_segment_lastNPassedSuperLayers
 Switch to draw the segments generated by the finder colored by the number of passed superlayers assoziated to the last hit in the segment.
 
 draw_axialsegmentpairs
 Switch to draw the axial stereo segment pairs generated by the finder.
 
 draw_segmentpairs
 Switch to draw the axial stereo segment pairs generated by the finder.
 
 draw_segmenttriples
 Switch to draw the segment triples generated by the finder.
 
 draw_segmenttriple_trajectories
 Switch to draw the trajectories fitted to the segment triples generated by the finder.
 
 draw_tracks
 Switch to draw the tracks generated by the finder.
 
 draw_track_trajectories
 Switch to draw the trajectories of the tracks generated by the finder.
 
 draw_recotracks
 Draw the output RecoTracks.
 
 draw_mcrecotracks
 Draw the MC reference RecoTracks.
 
 draw_recotrack_matching
 Draw the output RecoTracks pattern recognition matching status.
 
 draw_mcrecotrack_matching
 Draw the MC reference RecoTracks pattern recognition matching status.
 
 draw_recotrack_seed_trajectories
 Draw the output track seed trajectories.
 
 draw_recotrack_fit_trajectories
 Draw the output trackpoint trajectories.
 
 draw_wrong_rl_infos_in_segments
 Draw a red cdc hit of the rl info of the segment reco hits is wrong, else a green one.
 
 draw_wrong_rl_infos_in_tracks
 Draw a red cdc hit of the rl info of the track reco hits is wrong, else a green one.
 
 cdc_hits_store_array_name
 Name of the CDC Hits store array.
 
 reco_tracks_store_array_name
 Name of the RecoTracks store array.
 
 mc_reco_tracks_store_array_name
 Name of the Monte Carlo reference RecoTracks store array.
 
 cdc_wire_hit_cluster_store_obj_name
 Name of the CDC Wire Hit Clusters.
 
 cdc_segment_vector_store_obj_name
 Name of the CDC Reco Segment Vector.
 
 file_number
 Current file's number (used for making output filename)
 
 filename_prefix
 Filename prefix.
 
 use_time_in_filename
 Use time instead of prefix in filename.
 
 prefilled_cppplotter
 prefilled default is to use the C++ plotter
 
 prefilled_plotter
 prefilled default is to use the python plotter
 

Private Attributes

 _draw_wires
 Switch to draw the wires.
 

Detailed Description

Personal two dimensional event display based on scalable vector graphics

Definition at line 25 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  output_folder = "/tmp",
  interactive = True 
)
Constructor method

Parameters
----------
output_folder : str
    Target folder for the output
interactive : bool, optional
    Switch to display each event to the user and ask to continue after each event
    Defaults to True

Definition at line 31 of file __init__.py.

31  def __init__(self, output_folder="/tmp", interactive=True):
32  """
33  Constructor method
34 
35  Parameters
36  ----------
37  output_folder : str
38  Target folder for the output
39  interactive : bool, optional
40  Switch to display each event to the user and ask to continue after each event
41  Defaults to True
42  """
43 
44  super(CDCSVGDisplayModule, self).__init__()
45  # call constructor of base class, required!
46 
47 
48  self.interactive = interactive
49 
50 
51  self.output_folder = output_folder
52 
53  # List of drawing options
54 
55  # Animate the display by uncovering the drawn objects in order of their time of flight
56  # This can be seen in most standard browsers. Note however that you should switch of
57  # the wires in this case to reduce the rendering load.
58 
59  self.animate = False
60 
61 
62  self.forward_fade = False
63 
64  # The following options can be used independent of the track finder
65  # to view Monte Carlo information after the simulation is done
66 
67 
68  self.use_cpp = True
69 
70 
71  self.use_python = False
72 
73 
74  self._draw_wires = True
75  # This is wrapped by an extra property,
76  # because it should always be deactivated in case the scene is animated
77 
78 
79  self.draw_interaction_point = True
80 
81 
82  self.draw_superlayer_boundaries = False
83 
84 
85  self.draw_walls = False
86 
87 
88  self.draw_hits = True
89 
90 
91  self.draw_takenflag = False
92 
93 
94  self.draw_mcparticle_id = False
95 
96 
97  self.draw_mcparticle_pdgcode = False
98 
99 
100  self.draw_mcparticle_primary = False
101 
102 
103  self.draw_mcparticle_trajectories = False
104 
105 
106  self.draw_simhits = False
107 
108 
109  self.draw_simhit_tof = False
110 
111 
112  self.draw_simhit_posflag = False
113 
114 
115  self.draw_simhit_pdgcode = False
116 
117 
119  self.draw_simhit_bkgtag = False
120 
121 
122  self.draw_simhit_isbkg = False
123 
124 
125  self.draw_nloops = False
126 
127 
130  self.draw_connect_tof = False
131 
132 
134  self.draw_rlinfo = False
135 
136 
139  self.draw_reassigned = False
140 
141 
142  self.draw_mcsegments = False
143 
144 
145  self.draw_mcaxialsegmentpairs = False
146 
147 
148  self.draw_mcsegmentpairs = False # <- not implemented at the moment
149 
150 
151  self.draw_mcsegmenttriples = False
152 
153  # Those are only available if the local track finder is in the module chain
154  # and specific compile time flags enable to transportation of this data
155 
156 
157  self.draw_superclusters = False
158 
159 
160  self.draw_clusters = False
161 
162 
163  self.draw_segments = False
164 
165 
166  self.draw_segment_trajectories = False
167 
168 
169  self.draw_tangentsegments = False
170 
171 
172  self.draw_segment_mctrackids = False
173 
174 
176  self.draw_segment_fbinfos = False
177 
178 
179  self.draw_segment_firstInTrackIds = False
180 
181 
182  self.draw_segment_lastInTrackIds = False
183 
184 
186  self.draw_segment_firstNPassedSuperLayers = False
187 
188 
190  self.draw_segment_lastNPassedSuperLayers = False
191 
192 
193  self.draw_axialsegmentpairs = False
194 
195 
196  self.draw_segmentpairs = False
197 
198 
199  self.draw_segmenttriples = False
200 
201 
202  self.draw_segmenttriple_trajectories = False
203 
204 
205  self.draw_tracks = False
206 
207 
208  self.draw_track_trajectories = False
209 
210  # Those are only available, if any track finder is in the module chain (not tested for others than the local track finder)
211 
212 
213  self.draw_recotracks = False
214 
215 
216  self.draw_mcrecotracks = False
217 
218 
219  self.draw_recotrack_matching = False
220 
221 
222  self.draw_mcrecotrack_matching = False
223 
224 
225  self.draw_recotrack_seed_trajectories = False
226 
227 
228  self.draw_recotrack_fit_trajectories = False
229 
230 
231  self.draw_wrong_rl_infos_in_segments = False
232 
233 
234  self.draw_wrong_rl_infos_in_tracks = False
235 
236 
237  self.cdc_hits_store_array_name = "CDCHits"
238 
239 
240  self.reco_tracks_store_array_name = "RecoTracks"
241 
242 
243  self.mc_reco_tracks_store_array_name = "MCRecoTracks"
244 
245 
246  self.cdc_wire_hit_cluster_store_obj_name = "CDCWireHitClusterVector"
247 
248 
249  self.cdc_segment_vector_store_obj_name = 'CDCSegment2DVector'
250 
251 
252  self.file_number = 0
253 
254 
255  self.filename_prefix = "CDCDisplay"
256 
257 
258  self.use_time_in_filename = False
259 

Member Function Documentation

◆ all_drawoptions()

def all_drawoptions (   self)
Property that collects the all names of the draw options to a list.
Note that some draw options only make sense after running the CDC
cellular automaton track finder.
@return list of strings naming the different switches that can be activated.

Definition at line 326 of file __init__.py.

◆ beginRun()

def beginRun (   self)
Begin run method of the module. Empty here.

Definition at line 409 of file __init__.py.

◆ draw_wires() [1/2]

def draw_wires (   self)
Getter for the draw option that indicates if all wires shall be drawn.
Since this has some performance impact in animated events the wires
are prevented from being drawn in this case.

Definition at line 347 of file __init__.py.

◆ draw_wires() [2/2]

def draw_wires (   self,
  draw_wires 
)
Setter for the option to draw all wires.

Definition at line 357 of file __init__.py.

◆ drawoptions()

def drawoptions (   self)
Property that collects the various names of the draw options to a list
that are not related to the CDC cellular automaton track finder.
@return list of strings naming the different switches that can be activated.

Definition at line 261 of file __init__.py.

◆ endRun()

def endRun (   self)
endRun methode of the module. Empty here.

Definition at line 1047 of file __init__.py.

◆ event()

def event (   self)
Event method of the module. Draws the event into a new svg file.

Definition at line 416 of file __init__.py.

◆ initialize()

def initialize (   self)
Initialisation method of the module.
Creates the output folder if it is not present yet.

Definition at line 364 of file __init__.py.

◆ new_output_basename()

def new_output_basename (   self)
Generates a new unique name for the current event without the folder prefix

Definition at line 1061 of file __init__.py.

◆ new_output_filename()

def new_output_filename (   self)
Generates a new unique name for the current event with the folder prefix

Reimplemented in QueueDrawer.

Definition at line 1072 of file __init__.py.

◆ terminate()

def terminate (   self)
teminate methode of the module. Empty here.

Reimplemented in QueueDrawer.

Definition at line 1054 of file __init__.py.

Member Data Documentation

◆ draw_connect_tof

draw_connect_tof

Switch to draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo particle.

Default: inactive

Definition at line 130 of file __init__.py.

◆ draw_hits

draw_hits

Switch to draw the CDCHits.

Default: active

Definition at line 88 of file __init__.py.

◆ draw_interaction_point

draw_interaction_point

Switch to draw the interaction point.

Default: active

Definition at line 79 of file __init__.py.

◆ draw_mcaxialsegmentpairs

draw_mcaxialsegmentpairs

Switch to draw the axial to axial segment pairs from Monte Carlo truth.

Default: inactive

Definition at line 145 of file __init__.py.

◆ draw_mcparticle_id

draw_mcparticle_id

Switch to draw the MCParticle::getArrayIndex property.

Default: inactive

Definition at line 94 of file __init__.py.

◆ draw_mcparticle_pdgcode

draw_mcparticle_pdgcode

Switch to draw the MCParticle::getPDGCode property.

Default: inactive

Definition at line 97 of file __init__.py.

◆ draw_mcparticle_primary

draw_mcparticle_primary

Switch to draw the MCParticle::hasStatus(c_PrimaryParticle) property.

Default: inactive

Definition at line 100 of file __init__.py.

◆ draw_mcparticle_trajectories

draw_mcparticle_trajectories

Switch to draw the ideal trajectory of the MCParticle.

Default: inactive

Definition at line 103 of file __init__.py.

◆ draw_mcsegmentpairs

draw_mcsegmentpairs

Switch to draw the axial to stereo segment pairs from Monte Carlo truth.

Default: inactive

Definition at line 148 of file __init__.py.

◆ draw_mcsegments

draw_mcsegments

Switch to draw the Monte Carlo segments as generated in CDCMCTrackStore.

Default: inactive

Definition at line 142 of file __init__.py.

◆ draw_mcsegmenttriples

draw_mcsegmenttriples

Switch to draw the segment triples from Monte Carlo truth.

Default: inactive

Definition at line 151 of file __init__.py.

◆ draw_reassigned

draw_reassigned

Switch to draw the CDCSimHits color coded by their reassignement information to a different MCParticle.

Default: inactive

Definition at line 139 of file __init__.py.

◆ draw_rlinfo

draw_rlinfo

Switch to draw the CDCSimHits color coded by their local right left passage information.

Default: inactive

Definition at line 134 of file __init__.py.

◆ draw_simhit_bkgtag

draw_simhit_bkgtag

Switch to draw the CDCSimHits color coded by their getBackgroundTag() property.

Default: inactive

Definition at line 119 of file __init__.py.

◆ draw_simhit_isbkg

draw_simhit_isbkg

Switch to draw the CDCSimHits red for getBackgroundTag() != bg_none.

Default: inactive

Definition at line 122 of file __init__.py.

◆ draw_simhit_pdgcode

draw_simhit_pdgcode

Switch to draw the CDCSimHits color coded by their getPDGCode() property.

Default: inactive

Definition at line 115 of file __init__.py.

◆ draw_simhit_posflag

draw_simhit_posflag

Switch to draw the CDCSimHits color coded by their getPosFlag() property.

Default: inactive

Definition at line 112 of file __init__.py.

◆ draw_simhit_tof

draw_simhit_tof

Switch to draw the CDCSimHits color coded by their time of flight.

Default: inactive

Definition at line 109 of file __init__.py.

◆ draw_simhits

draw_simhits

Switch to draw the CDCSimHits with momentum information.

Default: inactive

Definition at line 106 of file __init__.py.

◆ draw_superlayer_boundaries

draw_superlayer_boundaries

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 82 of file __init__.py.

◆ draw_takenflag

draw_takenflag

Switch to draw the CDCHits colored by the associated CDCWireHit taken flag.

Default: active

Definition at line 91 of file __init__.py.

◆ draw_walls

draw_walls

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 85 of file __init__.py.


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