![]() |
ATLAS Offline Software
|
#include <PatternVisualizationTool.h>
Public Types | |
| using | LabeledSegmentSet = std::unordered_set<const xAOD::MuonSegment*> |
Public Member Functions | |
| virtual StatusCode | initialize () override final |
| virtual void | visualizeBucket (const EventContext &ctx, const MuonR4::SpacePointBucket &bucket, const std::string &extraLabel) const override final |
| virtual void | visualizeBucket (const EventContext &ctx, const MuonR4::SpacePointBucket &bucket, const std::string &extraLabel, PrimitiveVec &&extraPaints) const override final |
| virtual void | visualizeSeed (const EventContext &ctx, const MuonR4::SegmentSeed &seed, const std::string &extraLabel) const override final |
| virtual void | visualizeSeed (const EventContext &ctx, const MuonR4::SegmentSeed &seed, const std::string &extraLabel, PrimitiveVec &&extraPaints) const override final |
| virtual void | visualizeAccumulator (const EventContext &ctx, const MuonR4::HoughPlane &accumulator, const Acts::HoughTransformUtils::HoughAxisRanges &axisRanges, const MaximumVec &maxima, const std::string &extraLabel) const override final |
| virtual void | visualizeAccumulator (const EventContext &ctx, const MuonR4::HoughPlane &accumulator, const Acts::HoughTransformUtils::HoughAxisRanges &axisRanges, const MaximumVec &maxima, const std::string &extraLabel, PrimitiveVec &&extraPaints) const override final |
| virtual void | visualizeSegment (const EventContext &ctx, const MuonR4::Segment &segment, const std::string &extraLabel) const override final |
| virtual void | visualizeSegment (const EventContext &ctx, const MuonR4::Segment &segment, const std::string &extraLabel, PrimitiveVec &&extraPaints) const override final |
| virtual LabeledSegmentSet | getLabeledSegments (const std::vector< const MuonR4::SpacePoint * > &hits) const override final |
| Returns whether the hit has been used on the labeled segments we refer to (e.g. | |
| virtual LabeledSegmentSet | getLabeledSegments (const std::vector< const xAOD::UncalibratedMeasurement * > &hits) const override final |
| virtual bool | isLabeled (const MuonR4::SpacePoint &hit) const override final |
| Fetches all labeled (e.g. | |
| virtual bool | isLabeled (const xAOD::UncalibratedMeasurement &hit) const override final |
| template<class SpacePointType> | |
| const SpacePoint * | drawHit (const SpacePointType &hit, Canvas_t &canvas, const unsigned int view, unsigned int fillStyle) const |
Private Types | |
| using | Canvas_t = IRootVisualizationService::ICanvasObject |
| using | Edges = Canvas_t::AxisRanges |
| using | SegLink_t = ElementLink<xAOD::MuonSegmentContainer> |
| using | SegLinkVec_t = std::vector<SegLink_t> |
| using | SegLinkDecor_t = SG::AuxElement::ConstAccessor<SegLinkVec_t> |
Private Member Functions | |
| template<class SpacePointType> | |
| bool | drawHits (const MuonR4::SpacePointBucket &bucket, const std::vector< SpacePointType > &hitsToDraw, Canvas_t &canvasDim, unsigned int view) const |
| Translates the Spacepoint information into TObjects that are dawn on the canvas & evaluates the size of the box surrounding the event. | |
| template<class SpacePointType> | |
| const MuonR4::SpacePoint * | drawHit (const SpacePointType &hit, Canvas_t &canvas, const unsigned int view, unsigned int fillStyle) const |
| Converts a Hit into a particular TBox/ TEllipse for drawing. | |
| template<class SpacePointType> | |
| void | writeChi2 (const MuonR4::SegmentFit::Parameters &pars, const std::vector< SpacePointType > &hits, Canvas_t &canvas, const double legX=0.2, double startLegY=0.8, const double endLegY=0.3) const |
| Writes the chi2 of the hits onto the Canvas. | |
| void | paintSimHits (const EventContext &ctx, const xAOD::MuonSegment &truthSeg, Canvas_t &canvas, const int view) const |
| Paints the truth sim hits associated with the segment. | |
Private Attributes | |
| ServiceHandle< IRootVisualizationService > | m_visualSvc {this, "VisualSvc", "MuonValR4::RootVisualizationService"} |
| Service handle of the visualization service. | |
| IRootVisualizationService::ClientToken | m_clientToken {} |
| Token to present to the visualization service such that the display froms this tool are grouped together. | |
| Gaudi::Property< unsigned int > | m_canvasLimit {this, "CanvasLimits", 5000} |
| Maximum canvases to draw. | |
| Gaudi::Property< bool > | m_saveSinglePDFs {this, "saveSinglePDFs", false} |
| If set to true each canvas is saved into a dedicated pdf file. | |
| Gaudi::Property< bool > | m_saveSummaryPDF {this, "saveSummaryPDF", false} |
| If set to true a summary Canvas is created. | |
| Gaudi::Property< std::string > | m_canvasPrefix {this, "CanvasPreFix", ""} |
| Prefix of the individual canvas file names <MANDATORY> | |
| Gaudi::Property< std::string > | m_subDir {this, "outSubDir", ""} |
| Define the subdirectory in which the plots shall be saved. | |
| Gaudi::Property< bool > | m_displayBucket {this, "displayBucket", true} |
| Display the surrounding hits from the bucket not part of the seed. | |
| Gaudi::Property< bool > | m_accumlIsEta {this, "AccumulatorsInEtaPlane", true} |
| Swtich toggling whether the accumulator view are in the eta or phi plane. | |
| Gaudi::Property< bool > | m_doEtaBucketViews {this,"doEtaBucketViews", true} |
| Switch to visualize the eta view of the bucket event. | |
| Gaudi::Property< bool > | m_doPhiBucketViews {this,"doPhiBucketViews", false} |
| Switch to visualize the phi view of the bucket event. | |
| Gaudi::Property< bool > | m_paintTruthHits {this, "paintTruthHits", false} |
| Switch to visualize the truth hits. | |
| SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > | m_prepContainerKeys {this, "PrdContainer", {}} |
| Declare dependency on the prep data containers. | |
| Gaudi::Property< std::set< std::string > > | m_truthSegLinks {this, "TruthSegDecors", {}} |
| List of truth segment links to fetch. | |
| SG::ReadDecorHandleKeyArray< xAOD::UncalibratedMeasurementContainer > | m_truthLinkDecorKeys {this, "LinkDecorKeys", {}} |
| Declaration of the dependency on the decorations. | |
| std::vector< SegLinkDecor_t > | m_truthLinkDecors {} |
| Gaudi::Property< bool > | m_displayOnlyTruth {this, "displayTruthOnly", false} |
| const MuonGMR4::MuonDetectorManager * | m_detMgr {nullptr} |
| pointer to the Detector manager | |
| SG::ReadHandleKey< ActsTrk::GeometryContext > | m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"} |
| Geometry context key to retrieve the alignment. | |
| ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
| Service Handle to the IMuonIdHelperSvc. | |
| std::atomic< bool > | m_plotsDone {false} |
| Flag toggling whether all Canvases have been exhausted. | |
Definition at line 28 of file PatternVisualizationTool.h.
|
private |
Definition at line 89 of file PatternVisualizationTool.h.
|
private |
Definition at line 90 of file PatternVisualizationTool.h.
| using MuonValR4::PatternVisualizationTool::LabeledSegmentSet = std::unordered_set<const xAOD::MuonSegment*> |
Definition at line 77 of file PatternVisualizationTool.h.
|
private |
Definition at line 178 of file PatternVisualizationTool.h.
|
private |
Definition at line 180 of file PatternVisualizationTool.h.
|
private |
Definition at line 179 of file PatternVisualizationTool.h.
| const SpacePoint * MuonValR4::PatternVisualizationTool::drawHit | ( | const SpacePointType & | hit, |
| Canvas_t & | canvas, | ||
| const unsigned int | view, | ||
| unsigned int | fillStyle ) const |
Don't draw any hit which is not participating in the view
Update the fill style accrodingly
Definition at line 407 of file PatternVisualizationTool.cxx.
|
private |
Converts a Hit into a particular TBox/ TEllipse for drawing.
If the hit provides information that's requested for that view. The underlying space pointer is returned and the dimensions of the canvas are updated, if the drawing was succesful
| hit | Reference to the hit to draw |
| canvas | Reference to the Canvas object to which the drawn hits are appended. The drawn hits also expand the drawn range |
| view | Draw the hit either in the eta or phi view, |
| fillStyle | Standard fill style for the box e.g. full. |
|
private |
Translates the Spacepoint information into TObjects that are dawn on the canvas & evaluates the size of the box surrounding the event.
Returns true if at least 2 objects were created.
| bucket | SpacePoint bucket from which the hits are taken. If the <DisplayBucket> is set true, the hits that were not in the subset are also painted with hollow filling |
| hitsToDraw | Primary hit collection to draw which are drawn with fullFillStyle |
| canvas | Reference to the Canvas object to which the drawn hits are appended. The drawn hits also expand the drawn range |
| view | Either the eta or the phi view? |
Definition at line 488 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Returns whether the hit has been used on the labeled segments we refer to (e.g.
truth or data Zµµ)
| hits | Vector of hits to search |
Definition at line 87 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 98 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 42 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Fetches all labeled (e.g.
by truth or Zµµ reco) segments containing at least one measurement in the list passed as arg
| hit | Reference to the hit to check |
Definition at line 76 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 80 of file PatternVisualizationTool.cxx.
|
private |
Paints the truth sim hits associated with the segment.
Hits are drawn as orange arrows
| ctx | EventContext to fetch the alignment constants |
| truthSeg | Segment made from truth sim hits |
| canvas | Reference to the Canvas object to which the drawn hits are appended |
| view | Draw the hit either in the eta or phi view |
Definition at line 200 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 129 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Check whether the canvas limit has been reached
Definition at line 137 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 283 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Check whether the canvas limit has been reached
reset the primitives
Definition at line 289 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 224 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Check whether the canvas limit has been reached
Definition at line 230 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 340 of file PatternVisualizationTool.cxx.
|
finaloverridevirtual |
Check whether the canvas limit has been reached
Definition at line 347 of file PatternVisualizationTool.cxx.
|
private |
Writes the chi2 of the hits onto the Canvas.
| pars | Parameter for which the chi2 is evaluated, |
| hits | Vector of hits to consider |
| canvas | Reference to the Canvas object to which the drawn hits are appended |
| legX | x-position of the list |
| statLegY | y-position of the first entry. The next one is 0.05 apart |
| endLeg | y-position of the last shown entry. The routine aborts if there're more hits in the event. |
Definition at line 509 of file PatternVisualizationTool.cxx.
|
private |
Swtich toggling whether the accumulator view are in the eta or phi plane.
Just affects the axis labels
Definition at line 165 of file PatternVisualizationTool.h.
|
private |
Maximum canvases to draw.
Definition at line 152 of file PatternVisualizationTool.h.
|
private |
Prefix of the individual canvas file names <MANDATORY>
Definition at line 158 of file PatternVisualizationTool.h.
|
private |
Token to present to the visualization service such that the display froms this tool are grouped together.
Definition at line 150 of file PatternVisualizationTool.h.
|
private |
pointer to the Detector manager
Definition at line 186 of file PatternVisualizationTool.h.
|
private |
Display the surrounding hits from the bucket not part of the seed.
Definition at line 162 of file PatternVisualizationTool.h.
|
private |
Definition at line 183 of file PatternVisualizationTool.h.
|
private |
Switch to visualize the eta view of the bucket event.
Definition at line 167 of file PatternVisualizationTool.h.
|
private |
Switch to visualize the phi view of the bucket event.
Definition at line 169 of file PatternVisualizationTool.h.
|
private |
Geometry context key to retrieve the alignment.
Definition at line 188 of file PatternVisualizationTool.h.
|
private |
Service Handle to the IMuonIdHelperSvc.
Definition at line 190 of file PatternVisualizationTool.h.
|
private |
Switch to visualize the truth hits.
Definition at line 171 of file PatternVisualizationTool.h.
|
mutableprivate |
Flag toggling whether all Canvases have been exhausted.
Definition at line 192 of file PatternVisualizationTool.h.
|
private |
Declare dependency on the prep data containers.
Definition at line 173 of file PatternVisualizationTool.h.
|
private |
If set to true each canvas is saved into a dedicated pdf file.
Definition at line 154 of file PatternVisualizationTool.h.
|
private |
If set to true a summary Canvas is created.
Definition at line 156 of file PatternVisualizationTool.h.
|
private |
Define the subdirectory in which the plots shall be saved.
Definition at line 160 of file PatternVisualizationTool.h.
|
private |
Declaration of the dependency on the decorations.
(Overwritten in initialize)
Definition at line 177 of file PatternVisualizationTool.h.
|
private |
Definition at line 181 of file PatternVisualizationTool.h.
|
private |
List of truth segment links to fetch.
Definition at line 175 of file PatternVisualizationTool.h.
|
private |
Service handle of the visualization service.
Definition at line 147 of file PatternVisualizationTool.h.