Belle II Software  release-08-01-10
CDCSVGDisplayModule Class Reference
Inheritance diagram for CDCSVGDisplayModule:
Collaboration diagram for CDCSVGDisplayModule:

Public Member Functions

def __init__ (self, output_folder=tempfile.gettempdir(), 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 28 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  output_folder = tempfile.gettempdir(),
  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 34 of file __init__.py.

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

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 329 of file __init__.py.

◆ beginRun()

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

Definition at line 412 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 350 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 360 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 264 of file __init__.py.

◆ endRun()

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

Definition at line 1050 of file __init__.py.

◆ event()

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

Definition at line 419 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 367 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 1064 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 1075 of file __init__.py.

◆ terminate()

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

Reimplemented in QueueDrawer.

Definition at line 1057 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 133 of file __init__.py.

◆ draw_hits

draw_hits

Switch to draw the CDCHits.

Default: active

Definition at line 91 of file __init__.py.

◆ draw_interaction_point

draw_interaction_point

Switch to draw the interaction point.

Default: active

Definition at line 82 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 148 of file __init__.py.

◆ draw_mcparticle_id

draw_mcparticle_id

Switch to draw the MCParticle::getArrayIndex property.

Default: inactive

Definition at line 97 of file __init__.py.

◆ draw_mcparticle_pdgcode

draw_mcparticle_pdgcode

Switch to draw the MCParticle::getPDGCode property.

Default: inactive

Definition at line 100 of file __init__.py.

◆ draw_mcparticle_primary

draw_mcparticle_primary

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

Default: inactive

Definition at line 103 of file __init__.py.

◆ draw_mcparticle_trajectories

draw_mcparticle_trajectories

Switch to draw the ideal trajectory of the MCParticle.

Default: inactive

Definition at line 106 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 151 of file __init__.py.

◆ draw_mcsegments

draw_mcsegments

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

Default: inactive

Definition at line 145 of file __init__.py.

◆ draw_mcsegmenttriples

draw_mcsegmenttriples

Switch to draw the segment triples from Monte Carlo truth.

Default: inactive

Definition at line 154 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 142 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 137 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 122 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 125 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 118 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 115 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 112 of file __init__.py.

◆ draw_simhits

draw_simhits

Switch to draw the CDCSimHits with momentum information.

Default: inactive

Definition at line 109 of file __init__.py.

◆ draw_superlayer_boundaries

draw_superlayer_boundaries

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 85 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 94 of file __init__.py.

◆ draw_walls

draw_walls

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 88 of file __init__.py.


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