Belle II Software  release-06-02-00
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 27 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 33 of file __init__.py.

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

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

◆ beginRun()

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

Definition at line 411 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 349 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 359 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 263 of file __init__.py.

◆ endRun()

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

Definition at line 1049 of file __init__.py.

◆ event()

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

Definition at line 418 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 366 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 1063 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 1074 of file __init__.py.

◆ terminate()

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

Reimplemented in QueueDrawer.

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

◆ draw_hits

draw_hits

Switch to draw the CDCHits.

Default: active

Definition at line 90 of file __init__.py.

◆ draw_interaction_point

draw_interaction_point

Switch to draw the interaction point.

Default: active

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

◆ draw_mcparticle_id

draw_mcparticle_id

Switch to draw the MCParticle::getArrayIndex property.

Default: inactive

Definition at line 96 of file __init__.py.

◆ draw_mcparticle_pdgcode

draw_mcparticle_pdgcode

Switch to draw the MCParticle::getPDGCode property.

Default: inactive

Definition at line 99 of file __init__.py.

◆ draw_mcparticle_primary

draw_mcparticle_primary

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

Default: inactive

Definition at line 102 of file __init__.py.

◆ draw_mcparticle_trajectories

draw_mcparticle_trajectories

Switch to draw the ideal trajectory of the MCParticle.

Default: inactive

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

◆ draw_mcsegments

draw_mcsegments

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

Default: inactive

Definition at line 144 of file __init__.py.

◆ draw_mcsegmenttriples

draw_mcsegmenttriples

Switch to draw the segment triples from Monte Carlo truth.

Default: inactive

Definition at line 153 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 141 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 136 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 121 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 124 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 117 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 114 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 111 of file __init__.py.

◆ draw_simhits

draw_simhits

Switch to draw the CDCSimHits with momentum information.

Default: inactive

Definition at line 108 of file __init__.py.

◆ draw_superlayer_boundaries

draw_superlayer_boundaries

Switch to draw the superlayer boundaries.

Default: inactive

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

◆ draw_walls

draw_walls

Switch to draw the superlayer boundaries.

Default: inactive

Definition at line 87 of file __init__.py.


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