12 from .svgdrawing
import attributemaps
13 from .
import svgdrawing
14 from datetime
import datetime
19 from ROOT
import Belle2
22 from ROOT
import gSystem
23 gSystem.Load(
'libframework')
24 gSystem.Load(
'libcdc')
25 gSystem.Load(
'libtracking')
31 Personal two dimensional event display based on scalable vector graphics
34 def __init__(self, output_folder=tempfile.gettempdir(), interactive=
True):
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
47 super(CDCSVGDisplayModule, self).
__init__()
266 Property that collects the various names of the draw options to a list
267 that are not related to the CDC cellular automaton track finder.
268 @return list of strings naming the different switches that can be activated.
273 'draw_superlayer_boundaries',
275 'draw_interaction_point',
276 'draw_mcparticle_id',
277 'draw_mcparticle_pdgcode',
278 'draw_mcparticle_primary',
279 'draw_mcparticle_trajectories',
283 'draw_simhit_posflag',
284 'draw_simhit_pdgcode',
285 'draw_simhit_bkgtag',
293 'draw_recotrack_matching',
294 'draw_mcrecotrack_matching',
295 'draw_recotrack_seed_trajectories',
296 'draw_recotrack_fit_trajectories',
322 if not hasattr(self, name):
323 raise NameError(
'%s is not a valid draw option. Fix the misspelling.'
331 Property that collects the all names of the draw options to a list.
332 Note that some draw options only make sense after running the CDC
333 cellular automaton track finder.
334 @return list of strings naming the different switches that can be activated.
339 draw_options = [option
for option
in self.__dict__
340 if option.startswith(
'draw_')]
341 _draw_options = [option[1:]
for option
in self.__dict__
342 if option.startswith(
'_draw_')]
344 result.extend(draw_options)
345 result.extend(_draw_options)
352 Getter for the draw option that indicates if all wires shall be drawn.
353 Since this has some performance impact in animated events the wires
354 are prevented from being drawn in this case.
362 Setter for the option to draw all wires.
369 Initialisation method of the module.
370 Creates the output folder if it is not present yet.
374 if not os.path.exists(output_folder):
375 print(
"CDCSVGDisplay.__init__ : Output folder '", output_folder,
377 answer = input(
'Create it? (y or n)')
379 os.makedirs(output_folder)
394 theCDCWireTopology = \
398 cppplotter.drawWires(theCDCWireTopology)
400 plotter.draw(theCDCWireTopology)
410 segment_relation_filter.initialize()
414 Begin run method of the module. Empty here.
421 Event method of the module. Draws the event into a new svg file.
426 cppplotter = self.prefilled_cppplotter.clone()
428 plotter = self.prefilled_plotter.clone()
430 self.file_number += 1
445 basf2.B2INFO(
"Skip empty event")
452 cppplotter.drawHits(self.cdc_hits_store_array_name,
'ZeroDriftLengthColorMap',
'ZeroDriftLengthStrokeWidthMap')
454 styleDict = {
'stroke': attributemaps.ZeroDriftLengthColorMap(),
455 'stroke-width': attributemaps.ZeroDriftLengthStrokeWidthMap()}
456 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
459 if self.draw_takenflag:
461 cppplotter.drawHits(self.cdc_hits_store_array_name,
'TakenFlagColorMap',
'')
463 styleDict = {
'stroke': attributemaps.TakenFlagColorMap(), }
464 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
467 if self.draw_mcparticle_id:
469 cppplotter.drawHits(self.cdc_hits_store_array_name,
'MCParticleColorMap',
'')
471 styleDict = {
'stroke': attributemaps.MCParticleColorMap()}
472 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
475 if self.draw_mcparticle_pdgcode:
477 cppplotter.drawHits(self.cdc_hits_store_array_name,
'MCPDGCodeColorMap',
'')
479 styleDict = {
'stroke': attributemaps.MCPDGCodeColorMap()}
480 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
483 if self.draw_mcparticle_primary:
485 cppplotter.drawHits(self.cdc_hits_store_array_name,
'MCPrimaryColorMap',
'')
487 styleDict = {
'stroke': attributemaps.MCPrimaryColorMap()}
488 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
491 if self.draw_simhits:
493 cppplotter.drawSimHits(self.cdc_hits_store_array_name,
'',
'.2')
497 simHits_related_to_hits = [hit.getRelated(
'CDCSimHits')
498 for hit
in hit_storearray]
499 styleDict = {
'stroke-width':
'0.2'}
500 plotter.draw_iterable(simHits_related_to_hits, **styleDict)
503 if self.draw_simhit_posflag:
505 cppplotter.drawHits(self.cdc_hits_store_array_name,
'PosFlagColorMap',
'')
507 styleDict = {
'stroke': attributemaps.PosFlagColorMap()}
508 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
514 cppplotter.drawHits(self.cdc_hits_store_array_name,
'RLColorMap',
'')
516 styleDict = {
'stroke': attributemaps.RLColorMap()}
517 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
520 if self.draw_simhit_tof:
522 cppplotter.drawHits(self.cdc_hits_store_array_name,
'TOFColorMap',
'')
524 styleDict = {
'stroke': attributemaps.TOFColorMap()}
525 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
528 if self.draw_simhit_pdgcode:
530 cppplotter.drawHits(self.cdc_hits_store_array_name,
"SimHitPDGCodeColorMap",
"")
532 def color_map(iHit, hit):
533 simHit = hit.getRelated(
'CDCSimHits')
534 pdgCode = simHit.getPDGCode()
536 attributemaps.MCPDGCodeColorMap.color_by_pdgcode.get(pdgCode,
540 styleDict = {
'stroke': color_map}
541 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
544 if self.draw_simhit_bkgtag:
546 cppplotter.drawHits(self.cdc_hits_store_array_name,
'BackgroundTagColorMap',
'')
548 styleDict = {
'stroke': attributemaps.BackgroundTagColorMap()}
549 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
552 if self.draw_simhit_isbkg:
554 cppplotter.drawHits(self.cdc_hits_store_array_name,
'SimHitIsBkgColorMap',
'')
556 def color_map(iHit, hit):
557 simHit = hit.getRelated(
'CDCSimHits')
558 bkgTag = simHit.getBackgroundTag()
559 color = (
'gray' if bkgTag
else 'red')
562 styleDict = {
'stroke': color_map}
563 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
569 cppplotter.drawHits(self.cdc_hits_store_array_name,
'NLoops',
'')
571 print(
'No Python-function defined')
573 if self.draw_connect_tof:
575 cppplotter.drawSimHitsConnectByToF(self.cdc_hits_store_array_name,
"black",
".2")
578 if cdchits_storearray:
579 simhits_related_to_cdchit = [cdchit.getRelated(
'CDCSimHits')
580 for cdchit
in cdchits_storearray]
583 simhits_by_mcparticle = {}
584 for simhit
in simhits_related_to_cdchit:
585 mcparticle = simhit.getRelated(
'MCParticles')
586 if not mcparticle ==
None:
587 mcTrackId = mcparticle.getArrayIndex()
588 simhits_by_mcparticle.setdefault(mcTrackId, [])
589 simhits_by_mcparticle[mcTrackId].append(simhit)
591 for simhits_for_mcparticle
in list(simhits_by_mcparticle.values()):
592 simhits_for_mcparticle.sort(key=
lambda simhit:
593 simhit.getFlightTime())
595 nSimHits = len(simhits_for_mcparticle)
596 for iSimHit
in range(nSimHits - 1):
597 fromSimHit = simhits_for_mcparticle[iSimHit]
598 toSimHit = simhits_for_mcparticle[iSimHit + 1]
600 styleDict = {
'stroke-width':
'0.2',
"stroke":
"black"}
602 fromHit = fromSimHit.getRelated(self.cdc_hits_store_array_name)
603 toHit = toSimHit.getRelated(self.cdc_hits_store_array_name)
618 plotter.draw(tangent, **styleDict)
621 if self.draw_reassigned:
623 cppplotter.drawHits(self.cdc_hits_store_array_name,
'ReassignedSecondaryMap',
'')
625 styleDict = {
'stroke': attributemaps.ReassignedSecondaryMap()}
626 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
629 if self.draw_mcsegments:
632 cppplotter.drawHits(self.cdc_hits_store_array_name,
'MCSegmentIdColorMap',
'')
634 styleDict = {
'stroke': attributemaps.MCSegmentIdColorMap()}
635 plotter.draw_storearray(self.cdc_hits_store_array_name, **styleDict)
638 if self.draw_superclusters:
640 cppplotter.drawClusters(
'CDCWireHitSuperClusterVector',
643 styleDict = {
'stroke': attributemaps.listColors}
644 plotter.draw_storevector(
'CDCWireHitSuperClusterVector', **styleDict)
647 if self.draw_clusters:
649 cppplotter.drawClusters(self.cdc_wire_hit_cluster_store_obj_name,
652 styleDict = {
'stroke': attributemaps.listColors}
653 plotter.draw_storevector(self.cdc_wire_hit_cluster_store_obj_name, **styleDict)
657 if self.draw_segments:
659 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
662 styleDict = {
'stroke': attributemaps.listColors}
663 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
665 if self.draw_segment_mctrackids:
668 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
669 "SegmentMCTrackIdColorMap",
"")
671 styleDict = {
'stroke': attributemaps.SegmentMCTrackIdColorMap()}
672 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
674 if self.draw_segment_fbinfos:
676 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
677 "SegmentFBInfoColorMap",
"")
679 styleDict = {
'stroke': attributemaps.SegmentFBInfoColorMap()}
680 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
682 if self.draw_segment_firstInTrackIds:
684 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
685 "SegmentFirstInTrackIdColorMap",
"")
688 {
'stroke': attributemaps.SegmentFirstInTrackIdColorMap()}
689 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
691 if self.draw_segment_lastInTrackIds:
693 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
694 "SegmentLastInTrackIdColorMap",
"")
697 {
'stroke': attributemaps.SegmentLastInTrackIdColorMap()}
698 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
700 if self.draw_segment_firstNPassedSuperLayers:
703 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
704 "SegmentFirstNPassedSuperLayersColorMap",
"")
707 {
'stroke': attributemaps.SegmentFirstNPassedSuperLayersColorMap()}
708 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
710 if self.draw_segment_lastNPassedSuperLayers:
713 cppplotter.drawSegments(self.cdc_segment_vector_store_obj_name,
714 "SegmentLastNPassedSuperLayersColorMap",
"")
717 {
'stroke': attributemaps.SegmentLastNPassedSuperLayersColorMap()}
718 plotter.draw_storevector(self.cdc_segment_vector_store_obj_name, **styleDict)
720 if self.draw_segmentpairs:
722 cppplotter.drawSegmentPairs(
'CDCSegmentPairs',
'black',
'')
724 styleDict = {
"stroke":
"black"}
725 plotter.draw_storearray(
'CDCSegmentPairs', **styleDict)
728 if self.draw_mcaxialsegmentpairs:
730 cppplotter.drawMCAxialSegmentPairs(self.cdc_segment_vector_store_obj_name,
"black",
'')
733 if segment_storevector:
734 segments = segment_storevector.obj().unwrap()
735 axial_segments = [segment
for segment
in segments
736 if segment.getStereoType() == 0]
738 mc_axial_segment_pair_segment_filter = \
740 axial_segment_pair_relations = \
742 for startSegment
in axial_segments
743 for endSegment
in axial_segments)
745 def is_good_pair(pair):
746 weight = mc_axial_segment_pair_segment_filter(pair)
747 return weight == weight
749 good_axial_segment_pair_relations = [pair
for pair
in
750 axial_segment_pair_relations
if is_good_pair(pair)]
751 styleDict = {
"stroke":
"black"}
752 plotter.draw_iterable(good_axial_segment_pair_relations, **styleDict)
754 if self.draw_mcsegmentpairs:
756 cppplotter.drawMCSegmentPairs(self.cdc_segment_vector_store_obj_name,
"black",
'')
758 print(
'No Python-function defined')
760 if self.draw_mcsegmenttriples:
762 cppplotter.drawMCSegmentTriples(self.cdc_segment_vector_store_obj_name,
'',
'')
765 if segment_storevector:
766 segments = segment_storevector.obj().unwrap()
767 axial_segments = [segment
for segment
in segments
768 if segment.getStereoType() == 0]
770 stereo_segments = [segment
for segment
in segments
771 if segment.getStereoType() != 0]
774 mc_axial_segment_pair_segment_filter = \
776 mc_segment_lookup = \
781 middleSegment, endSegment)
for startSegment
in
782 axial_segments
for middleSegment
in stereo_segments
783 for endSegment
in axial_segments)
785 def is_good_triple(triple):
786 start = triple.getStartSegment()
787 middle = triple.getMiddleSegment()
788 end = triple.getEndSegment()
791 mc_axial_segment_pair_segment_filter(triple)
793 if not pairWeight == pairWeight:
796 startToMiddleFBInfo = \
797 mc_segment_lookup.areAlignedInMCTrack(start, middle)
798 if abs(startToMiddleFBInfo) > 1:
801 middleToEndFBInfo = \
802 mc_segment_lookup.areAlignedInMCTrack(middle, end)
803 if abs(middleToEndFBInfo) > 1:
806 if startToMiddleFBInfo == middleToEndFBInfo:
811 good_segment_triples = [triple
for triple
in segment_triples
812 if is_good_triple(triple)]
814 styleDict = {
"stroke":
"black"}
815 plotter.draw_iterable(good_segment_triples, **styleDict)
818 if self.draw_tangentsegments:
820 print(
'No CPP-function defined')
822 styleDict = {
'stroke-width':
'0.2'}
823 plotter.draw_storearray(
'CDCTangentSegments', **styleDict)
826 if self.draw_axialsegmentpairs:
828 cppplotter.drawAxialSegmentPairs(
'CDCAxialSegmentPairVector',
'',
'')
830 styleDict = {
'stroke': attributemaps.listColors}
831 plotter.draw_storevector(
'CDCAxialSegmentPairVector', **styleDict)
834 if self.draw_segmenttriples:
836 cppplotter.drawSegmentTriples(
'CDCSegmentTripleVector',
'',
'')
838 styleDict = {
'stroke': attributemaps.listColors}
839 plotter.draw_storevector(
'CDCSegmentTriples', **styleDict)
844 cppplotter.drawTracks(
'CDCTrackVector',
'',
'')
846 styleDict = {
'stroke': attributemaps.listColors}
847 plotter.draw_storevector(
'CDCTrackVector', **styleDict)
850 if self.draw_wrong_rl_infos_in_tracks:
853 cppplotter.drawWrongRLHitsInTracks(
'CDCTrackVector')
855 styleDict = {
'stroke': attributemaps.WrongRLColorMap()}
860 wrapped_vector = pystoreobj.obj()
861 vector = wrapped_vector.get()
864 plotter.draw_iterable(list(track.items()), **styleDict)
866 if self.draw_wrong_rl_infos_in_segments:
869 cppplotter.drawWrongRLHitsInSegments(self.cdc_segment_vector_store_obj_name)
871 styleDict = {
'stroke': attributemaps.WrongRLColorMap()}
876 wrapped_vector = pystoreobj.obj()
877 vector = wrapped_vector.get()
880 plotter.draw_iterable(list(track.items()), **styleDict)
883 if self.draw_recotracks:
885 cppplotter.drawRecoTracks(self.reco_tracks_store_array_name,
'ListColors',
'')
887 styleDict = {
'stroke': attributemaps.listColors}
888 plotter.draw_storearray(self.reco_tracks_store_array_name, **styleDict)
891 if self.draw_mcrecotracks:
893 cppplotter.drawRecoTracks(self.mc_reco_tracks_store_array_name,
'ListColors',
'')
895 styleDict = {
'stroke': attributemaps.listColors}
896 plotter.draw_storearray(self.mc_reco_tracks_store_array_name, **styleDict)
899 if self.draw_recotrack_matching:
901 cppplotter.drawRecoTracks(self.reco_tracks_store_array_name,
'MatchingStatus',
'')
903 print(
'No Python-function defined')
906 if self.draw_mcrecotrack_matching:
908 cppplotter.drawRecoTracks(self.mc_reco_tracks_store_array_name,
'MCMatchingStatus',
'')
910 print(
'No Python-function defined')
913 if self.draw_interaction_point:
915 cppplotter.drawInteractionPoint()
917 plotter.draw_interaction_point()
920 if self.draw_superlayer_boundaries:
922 cppplotter.drawSuperLayerBoundaries()
924 plotter.draw_superlayer_boundaries()
929 cppplotter.drawOuterCDCWall(
'black')
930 cppplotter.drawInnerCDCWall(
'black')
932 styleDict = {
'stroke':
'black'}
933 plotter.draw_outer_cdc_wall(**styleDict)
934 plotter.draw_inner_cdc_wall(**styleDict)
937 if self.draw_mcparticle_trajectories:
939 cppplotter.drawMCParticleTrajectories(
"MCParticles",
'black',
'')
941 print(
"Python backend can not draw mc particles")
944 if self.draw_segment_trajectories:
946 cppplotter.drawSegmentTrajectories(self.cdc_segment_vector_store_obj_name,
950 if segment_storevector:
951 segments = segment_storevector.obj().unwrap()
953 iterTrajectories = (segment.getTrajectory2D()
for segment
in segments)
954 plotter.draw_iterable(iterTrajectories)
957 if self.draw_segmenttriple_trajectories:
958 cppplotter.drawSegmentTripleTrajectories(
"CDCSegmentTriples",
963 if segmentTriple_storearray:
964 iterSegmentTriples = iter(segmentTriple_storearray)
965 iterTrajectories = (segmentTriple.getTrajectory2D()
966 for segmentTriple
in iterSegmentTriples)
967 plotter.draw_iterable(iterTrajectories)
970 if self.draw_track_trajectories:
972 cppplotter.drawTrackTrajectories(
"CDCTrackVector",
975 styleDict = {
'stroke': attributemaps.listColors}
977 if track_storevector:
978 tracks = track_storevector.obj().unwrap()
979 iterTrajectories = (cdcTrack.getStartTrajectory3D().getTrajectory2D()
980 for cdcTrack
in tracks)
981 plotter.draw_iterable(iterTrajectories, **styleDict)
984 if self.draw_recotrack_seed_trajectories:
987 if recotrack_storearray:
988 def color_map(iTrajectory, trajectory):
990 return attributemaps.listColors[iTrajectory
991 % len(attributemaps.listColors)]
993 styleDict = {
'stroke': color_map}
996 for recotrack
in recotrack_storearray:
997 tMomentum = recotrack.getMomentumSeed()
998 charge = recotrack.getChargeSeed()
999 tPosition = recotrack.getPositionSeed()
1000 time = recotrack.getTimeSeed()
1010 trajectories.append(trajectory)
1012 plotter.draw_iterable(trajectories, **styleDict)
1015 raise NotImplementedError
1017 if self.draw_recotrack_fit_trajectories:
1019 cppplotter.drawRecoTrackTrajectories(self.reco_tracks_store_array_name,
'',
'')
1022 raise NotImplementedError
1024 fileName = self.new_output_filename()
1025 cppfileName = self.new_output_filename()
1028 cppplotter.saveFile(cppfileName)
1030 plotter.saveSVGFile(fileName)
1032 if self.interactive:
1034 print(
" Use the 'display' command to show the svg file", fileName,
1035 'generated for the last event')
1037 print(
" Use the 'display' command to show the svg file", cppfileName,
1038 'generated for the last event with cpp')
1042 subprocess.Popen([
'eog', fileName])
1044 subprocess.Popen([
'eog', cppfileName])
1048 input(
'Hit enter for next event')
1052 endRun methode of the module. Empty here.
1059 teminate methode of the module. Empty here.
1066 Generates a new unique name for the current event without the folder prefix
1069 if self.use_time_in_filename:
1070 output_basename = datetime.now().isoformat() +
'.svg'
1072 output_basename = self.filename_prefix + str(self.file_number).zfill(4) +
'.svg'
1073 return output_basename
1077 Generates a new unique name for the current event with the folder prefix
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.
Class representing a pair of reconstructed axial segements in adjacent superlayer.
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
static const CDCMCSegment2DLookUp & getInstance()
Getter for the singletone instance.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Class representing a two dimensional reconstructed hit in the central drift chamber.
Helper class to generated the svg image from the various tracking objects.
Class representing a triple of reconstructed segements in adjacent superlayer.
Class representating a linear track piece between two oriented wire hits.
Particle trajectory as it is seen in xy projection represented as a circle.
Class representing a hit wire in the central drift chamber.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
Filter for the constuction of axial to axial segment pairs based on simple criterions.
Filter for the constuction of segment pairs based on simple criteria without the common fit.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
A three dimensional vector.
draw_recotrack_fit_trajectories
Draw the output trackpoint trajectories.
draw_superclusters
Switch to draw the clusters generated by the finder.
draw_track_trajectories
Switch to draw the trajectories of the tracks generated by the finder.
use_time_in_filename
Use time instead of prefix in filename.
draw_tracks
Switch to draw the tracks generated by the finder.
prefilled_cppplotter
prefilled default is to use the C++ plotter
forward_fade
Switch to make the color of segments and tracks fade out in the forward direction.
draw_simhits
Switch to draw the CDCSimHits with momentum information.
_draw_wires
Switch to draw the wires.
draw_segment_trajectories
Switch to draw the trajectories fitted to the segments generated by the finder.
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.
draw_takenflag
Switch to draw the CDCHits colored by the associated CDCWireHit taken flag.
def all_drawoptions(self)
draw_mcsegmentpairs
Switch to draw the axial to stereo segment pairs from Monte Carlo truth.
draw_recotrack_matching
Draw the output RecoTracks pattern recognition matching status.
draw_mcaxialsegmentpairs
Switch to draw the axial to axial segment pairs from Monte Carlo truth.
draw_mcparticle_pdgcode
Switch to draw the MCParticle::getPDGCode property.
interactive
Switch if the module shall show the event to the user and wait to continue or just generate the image...
draw_rlinfo
Switch to draw the CDCSimHits color coded by their local right left passage information.
draw_connect_tof
Switch to draw the CDCSimHits connected in the order of their getFlightTime for each Monte Carlo part...
draw_segmentpairs
Switch to draw the axial stereo segment pairs generated by the finder.
draw_simhit_bkgtag
Switch to draw the CDCSimHits color coded by their getBackgroundTag() property.
draw_simhit_tof
Switch to draw the CDCSimHits color coded by their time of flight.
draw_walls
Switch to draw the superlayer boundaries.
draw_recotracks
Draw the output RecoTracks.
draw_segmenttriple_trajectories
Switch to draw the trajectories fitted to the segment triples generated by the finder.
mc_reco_tracks_store_array_name
Name of the Monte Carlo reference RecoTracks store array.
draw_segment_fbinfos
Switch to draw the segments generated by the finder colored by the coalignment information (forward,...
draw_recotrack_seed_trajectories
Draw the output track seed trajectories.
draw_segment_lastNPassedSuperLayers
Switch to draw the segments generated by the finder colored by the number of passed superlayers assoz...
draw_nloops
Switch to draw the CDCHit colored by the number of loops passed.
draw_hits
Switch to draw the CDCHits.
cdc_hits_store_array_name
Name of the CDC Hits store array.
animate
Switch to make an animated event display by means of animated SVG.
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.
use_python
Flag to use python.
draw_simhit_isbkg
Switch to draw the CDCSimHits red for getBackgroundTag() != bg_none.
draw_segment_lastInTrackIds
Switch to draw the segments generated by the finder colored by the second in track hit id.
cdc_wire_hit_cluster_store_obj_name
Name of the CDC Wire Hit Clusters.
def new_output_basename(self)
draw_mcparticle_id
Switch to draw the MCParticle::getArrayIndex property.
reco_tracks_store_array_name
Name of the RecoTracks store array.
draw_clusters
Switch to draw the clusters generated by the finder.
draw_axialsegmentpairs
Switch to draw the axial stereo segment pairs generated by the finder.
draw_interaction_point
Switch to draw the interaction point.
draw_mcrecotracks
Draw the MC reference RecoTracks.
draw_simhit_posflag
Switch to draw the CDCSimHits color coded by their getPosFlag() property.
draw_superlayer_boundaries
Switch to draw the superlayer boundaries.
def new_output_filename(self)
draw_segmenttriples
Switch to draw the segment triples generated by the finder.
draw_mcrecotrack_matching
Draw the MC reference RecoTracks pattern recognition matching status.
draw_mcsegments
Switch to draw the Monte Carlo segments as generated in CDCMCTrackStore.
def draw_wires(self, draw_wires)
draw_mcsegmenttriples
Switch to draw the segment triples from Monte Carlo truth.
draw_tangentsegments
Switch to draw the tangent segments generated by the finder.
draw_reassigned
Switch to draw the CDCSimHits color coded by their reassignement information to a different MCParticl...
draw_simhit_pdgcode
Switch to draw the CDCSimHits color coded by their getPDGCode() property.
filename_prefix
Filename prefix.
draw_mcparticle_primary
Switch to draw the MCParticle::hasStatus(c_PrimaryParticle) property.
draw_segment_firstNPassedSuperLayers
Switch to draw the segments generated by the finder colored by the number of passed superlayers assoz...
draw_segment_firstInTrackIds
Switch to draw the segments generated by the finder colored by the frist in track hit id.
draw_mcparticle_trajectories
Switch to draw the ideal trajectory of the MCParticle.
draw_segment_mctrackids
Switch to draw the segments generated by the finder colored with the Monte Carlo track id.
prefilled_plotter
prefilled default is to use the python plotter
def __init__(self, output_folder=tempfile.gettempdir(), interactive=True)
draw_segments
Switch to draw the segments generated by the finder.
output_folder
Folder the images shall be saved to.
cdc_segment_vector_store_obj_name
Name of the CDC Reco Segment Vector.
file_number
Current file's number (used for making output filename)