![]() |
ATLAS Offline Software
|
#include <FastRecoVisualizationTool.h>
Public Member Functions | |
| virtual StatusCode | initialize () override final |
| virtual void | plotPatternBuckets (const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfoVec &&patternVisualVec) const override final |
| virtual void | plotPatternBuckets (const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfoVec &&patternVisualVec, PrimitiveVec &&extraPaints) const override final |
| virtual void | plotPatternBuckets (const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfo &&patternVisual) const override final |
| virtual void | plotPatternBuckets (const EventContext &ctx, const std::string &extraLabel, PatternHitVisualInfo &&patternVisual, 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, const Amg::Transform3D &localToGlobalBucket, Canvas_t &canvas, const View view, unsigned int fillStyle) const |
Private Types | |
| enum class | View { objViewEta = static_cast<int>(MuonValR4::objViewEta) , objViewPhi = static_cast<int>(MuonValR4::objViewPhi) , objViewZR = 2 , objViewRZ = 3 } |
| Enum for the different views. More... | |
| 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 | |
| void | plotPatternBucket (const EventContext &ctx, const std::string &extraLabel, const MuonR4::SpacePointBucket &bucket, PatternHitVisualInfo &&patternVisual, PrimitiveVec &&extraPaints) const |
| Plot a single pattern bucket. | |
| void | drawSearchWindow (const Amg::Transform3D &localToGlobalBucket, PrimitiveVec &outputContainer, const double thetaMin, const double thetaMax, const Canvas_t &canvas, const View view) const |
| Draw the search window lines in the local frame expressed by the Transform3D for eta views and in the GlobalR-GlobalZ plane for RZ/ZR views. | |
| void | drawLineResidual (const ActsTrk::GeometryContext &gctx, const Amg::Transform3D &localToGlobalBucket, PrimitiveVec &outputContainer, const MuonR4::SpacePoint *seed, const MuonR4::SpacePoint *testHit, const double lineSlope, const double Rwindow, const PatternHitVisualInfo::HitStatus status, const Canvas_t &canvas, const View view) const |
| Draw the pattern line and acceptance window for the testHit used during pattern building in the local frame expressed by the Transform3D for eta views and in the GlobalR-GlobalZ plane for RZ/ZR views. | |
| void | drawSegment (const xAOD::MuonSegment &segment, const Amg::Transform3D &localToGlobalBucket, PrimitiveVec &outputContainer, bool &drawnTrueLabel, const Canvas_t &canvas, const View view) const |
| Draw a segment on the canvas. | |
| template<class SpacePointType> | |
| bool | drawHits (const MuonR4::SpacePointBucket &bucket, const Amg::Transform3D &localToGlobalBucket, const std::vector< SpacePointType > &hitsToDraw, Canvas_t &canvasDim, const View 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, const Amg::Transform3D &localToGlobalBucket, Canvas_t &canvas, const View view, unsigned int fillStyle) const |
| Converts a Hit into a particular TBox/ TEllipse for drawing. | |
| void | paintSimHits (const ActsTrk::GeometryContext &gctx, const Amg::Transform3D &localToGlobalBucket, const xAOD::MuonSegment &truthSeg, PrimitiveVec &outputContainer, const View view) const |
| Paints the truth sim hits associated with the segment. | |
| std::unique_ptr< TLine > | drawLine (const Amg::Vector3D &lineDirection, const Amg::Vector3D &linePoint, const double lowEnd, const double highEnd, const int color=kRed+1, const int lineStyle=kDashed, const View view=View::objViewEta) const |
| Draws a line given the parameters of the line in the local frame for Eta and Phi views and in the R-Z plane for RZ (and ZR) views. | |
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. | |
| UnsignedIntegerProperty | m_canvasLimit {this, "CanvasLimits", 5000} |
| Maximum canvases to draw. | |
| BooleanProperty | m_saveSinglePDFs {this, "saveSinglePDFs", false} |
| If set to true each canvas is saved into a dedicated pdf file. | |
| BooleanProperty | m_saveSummaryPDF {this, "saveSummaryPDF", false} |
| If set to true a summary Canvas is created. | |
| StringProperty | m_canvasPrefix {this, "CanvasPreFix", ""} |
| Prefix of the individual canvas file names <MANDATORY> | |
| StringProperty | m_subDir {this, "outSubDir", ""} |
| Define the subdirectory in which the plots shall be saved. | |
| BooleanProperty | m_doEtaBucketViews {this,"doEtaBucketViews", true} |
| Switch to visualize the eta view of the bucket event. | |
| BooleanProperty | m_doPhiBucketViews {this,"doPhiBucketViews", false} |
| Switch to visualize the phi view of the bucket event. | |
| BooleanProperty | m_doRZBucketViews {this,"doRZBucketViews", false} |
| BooleanProperty | m_paintTruthHits {this, "paintTruthHits", false} |
| Switch to visualize the truth hits. | |
| BooleanProperty | m_paintTruthSegment {this, "paintTruthSegment", false} |
| Switch to visualize the truth segment. | |
| BooleanProperty | m_paintSuccessfullPatterns {this, "PaintSuccessfullPatterns", true, "Toggle the display of successfully built patterns in the visualization"} |
| Switch to visualize successfull patterns. | |
| BooleanProperty | m_paintFailedPatterns {this, "PaintFailedPatterns", false, "Toggle the display of failed patterns in the visualization"} |
| Switch to visualize failed patterns. | |
| BooleanProperty | m_paintOverlapPatterns {this, "PaintOverlapPatterns", false, "Toggle the display of overlap patterns in the visualization"} |
| Switch to visualize overlap patterns. | |
| 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 {} |
| BooleanProperty | m_displayOnlyTruth {this, "displayTruthOnly", false} |
| Toggle to print pattern buckets only if they contain truth hits. | |
| BooleanProperty | m_displayOnlyWithPattern {this, "displayOnlyWithPattern", true} |
| Toggle to print pattern buckets only if they contain pattern hits. | |
| 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 | ATLAS_THREAD_SAFE {false} |
| Flag toggling whether all Canvases have been exhausted. | |
Definition at line 28 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 66 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 67 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 230 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 232 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 231 of file FastRecoVisualizationTool.h.
|
strongprivate |
Enum for the different views.
| Enumerator | |
|---|---|
| objViewEta | |
| objViewPhi | |
| objViewZR | |
| objViewRZ | |
Definition at line 60 of file FastRecoVisualizationTool.h.
| const SpacePoint * MuonValR4::FastRecoVisualizationTool::drawHit | ( | const SpacePointType & | hit, |
| const Amg::Transform3D & | localToGlobalBucket, | ||
| Canvas_t & | canvas, | ||
| const View | 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 475 of file FastRecoVisualizationTool.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 |
| localToGlobalBucket | Bucket frame transformation, used for the conversion of the line parameters from global to local frame and viversa |
| 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 |
| localToGlobalBucket | Bucket frame transformation, used for the conversion of the line parameters from global to local frame and viversa |
| 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 579 of file FastRecoVisualizationTool.cxx.
|
private |
Draws a line given the parameters of the line in the local frame for Eta and Phi views and in the R-Z plane for RZ (and ZR) views.
| lineDirection | Line direction vector in the local frame for Eta and Phi views or in the z-y plane (convention) for RZ and ZR views |
| linePoint | Point on the line in the local frame for Eta and Phi views or in the z-y plane (convention) for RZ and ZR views |
| lowEnd | Lower boundary in Canvas-y of the line (i.e. loc Z) for Eta/Phi views, or in global R for ZR/RZ views. If the line is perpendicular to the Canvas-y/globalR axis, it will be interpreted as Canvas-x/globalZ lower limit. |
| highEnd | Upper boundary in Canvas-y of the line, (i.e. loc Z) for Eta/Phi views, or in global R for ZR/RZ views. If the line is perpendicular to the Canvas-y/globalR axis, it will be interpreted as Canvas-x/globalZ upper limit. |
| lineStyle | Style of the drawn line (cf. TAttLine documentation) |
| view | Is the line placed in the y-z or x-z plane or R-Z/Z-R planes |
For eta and phi views, we work in the local frame
In the case of a line parallel to the loc Y axis (i.e. horizontal in the Canvas)
For R-Z and Z-R views, we work in the global frame, and the limits are on R. By convention, we use the Z-y plane in 3D space to store the line parameters
Special case: line parallel to global Z axis (constant in global R)
Z along the x-axis of the canvas, R along the y-axis
R along the x-axis, Z along the y-axis
Special case: line parallel to global R axis
Z along the x-axis of the canvas, R along the y-axis
R along the x-axis, Z along the y-axis
Z along the x-axis of the canvas, R along the y-axis
R along the x-axis, Z along the y-axis
Definition at line 598 of file FastRecoVisualizationTool.cxx.
|
private |
Draw the pattern line and acceptance window for the testHit used during pattern building in the local frame expressed by the Transform3D for eta views and in the GlobalR-GlobalZ plane for RZ/ZR views.
| gctx | Geometry context needed to retrieve the seed global position and its position in the bucket frame |
| localToGlobalBucket | Bucket frame transformation, used for the conversion of the line parameters from global to local frame and viversa |
| outputContainer | Vector to which the drawn lines are appended |
| seed | Seed hit of the pattern |
| testHit | Hit being tested during pattern building |
| lineSlope | Slope of the pattern line in the GlobalR-GlobalZ plane computed during pattern building to test the testHit |
| Rwindow | Size of the acceptance window in the GlobalR direction to accept the testHit in pattern building |
| status | Status of the testHit during pattern building (e.g. accepted, rejected or replaced) |
| canvas | Reference to the Canvas object to which the drawn lines. Needed to set the line limits |
| view | Draw the line in the eta or RZ/ZR view |
In phi view we dont plot anything
We do not expect pattern lines horizontal in global Z vs global R plane
Draw the pattern line in the z-y plane of the 3D space (convention)
Determine the extremes of that line
Draw the acceptance lines in R
Draw the pattern line in the local frame of the testHit. Using the chamber phi we ensure the line is always in the y-z plane
Retrieve the seed position in the local frame of the bucket we want to draw
Determine the extremes of that line
Draw the acceptance lines in R
Definition at line 316 of file FastRecoVisualizationTool.cxx.
|
private |
Draw the search window lines in the local frame expressed by the Transform3D for eta views and in the GlobalR-GlobalZ plane for RZ/ZR views.
| localToGlobalBucket | Bucket frame transformation, used for the conversion of the line parameters from global to local frame and viversa |
| outputContainer | Vector to which the drawn lines are appended |
| thetaMin | Minimum global theta of the search window |
| thetaMax | Maximum global theta of the search window |
| canvas | Reference to the Canvas object to which the drawn lines. Needed to set the line limits |
| view | Draw the line in the eta or RZ/ZR view |
In phi view we dont plot anything
We do not expect pattern lines horizontal in global Z vs global R plane
In RZ views, we have already the slope. We draw the line in the z-y plane of the 3D space (convention)
In eta views, we need to convert the slope from global to local frame
Definition at line 274 of file FastRecoVisualizationTool.cxx.
|
private |
Draw a segment on the canvas.
| segment | Segment to draw |
| localToGlobalBucket | Bucket frame transformation, used for the conversion of the line parameters from global to local frame and viversa |
| outputContainer | Vector to which the drawn lines are appended |
| drawnTrueLabel | Boolean set to true if the label with the true segment parameters has already been drawn on the canvas. If not, it is drawn with the segment and the boolean is set to true. |
| canvas | Reference to the Canvas object to which the drawn lines. Needed to set the line limits |
| view | Draw the line in the eta or RZ/ZR view |
Compute line and direction in the global frame
Compute line and direction in the globalR-GlobalZ plane
Definition at line 406 of file FastRecoVisualizationTool.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 84 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 95 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 32 of file FastRecoVisualizationTool.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 74 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 78 of file FastRecoVisualizationTool.cxx.
|
private |
Paints the truth sim hits associated with the segment.
Hits are drawn as orange arrows
| gctx | Geometry context to fetch the alignment constants |
| truthSeg | Segment made from truth sim hits |
| outputContainer | Vector to which the drawn lines are appended |
| view | Draw the hit either in the eta or phi view |
Compute line and direction in the global frame
Definition at line 438 of file FastRecoVisualizationTool.cxx.
|
private |
Plot a single pattern bucket.
| ctx | Event Context |
| extraLabel | Extra label for the plot |
| bucket | Reference to the pattern bucket to plot |
| patternVisual | Visual information for the pattern |
| extraPaints | Additional painting instructions |
Check whether the canvas limit has been reached
Check whether to display only patterns with truth information
Check whether the pattern status is to be displayed
Check whether to display only buckets with patterns. Collect pattern hits belonging to the bucket and check the size
Prepare the canvas for drawing
Determine the view to use ad, in cae=se of Z-R view, check if we have two swap the axis (e.g. endcap)
Check the orientatation of the local y axis. If is not aligned to the global Z, we will swap the axis for RZ views
First draw the pattern hits in this bucket
Draw the search window
Print first all the lines
Check if we have the bucket hit in this pattern visual
Check if the hit has been replaced or removed
Print pattern and acceptance window lines corresponding to this bucket hit
Print pattern information on the canvas
Draw truth segments
Definition at line 143 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 126 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 133 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Definition at line 106 of file FastRecoVisualizationTool.cxx.
|
finaloverridevirtual |
Loop over the pattern visual objects. We make a plot for every combination of bucket and pattern
Definition at line 112 of file FastRecoVisualizationTool.cxx.
|
mutableprivate |
Flag toggling whether all Canvases have been exhausted.
Definition at line 247 of file FastRecoVisualizationTool.h.
|
private |
Maximum canvases to draw.
Definition at line 200 of file FastRecoVisualizationTool.h.
|
private |
Prefix of the individual canvas file names <MANDATORY>
Definition at line 206 of file FastRecoVisualizationTool.h.
|
private |
Token to present to the visualization service such that the display froms this tool are grouped together.
Definition at line 198 of file FastRecoVisualizationTool.h.
|
private |
pointer to the Detector manager
Definition at line 241 of file FastRecoVisualizationTool.h.
|
private |
Toggle to print pattern buckets only if they contain truth hits.
Definition at line 236 of file FastRecoVisualizationTool.h.
|
private |
Toggle to print pattern buckets only if they contain pattern hits.
Definition at line 238 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize the eta view of the bucket event.
Definition at line 210 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize the phi view of the bucket event.
Definition at line 212 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 213 of file FastRecoVisualizationTool.h.
|
private |
Geometry context key to retrieve the alignment.
Definition at line 243 of file FastRecoVisualizationTool.h.
|
private |
Service Handle to the IMuonIdHelperSvc.
Definition at line 245 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize failed patterns.
Definition at line 221 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize overlap patterns.
Definition at line 223 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize successfull patterns.
Definition at line 219 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize the truth hits.
Definition at line 215 of file FastRecoVisualizationTool.h.
|
private |
Switch to visualize the truth segment.
Definition at line 217 of file FastRecoVisualizationTool.h.
|
private |
Declare dependency on the prep data containers.
Definition at line 225 of file FastRecoVisualizationTool.h.
|
private |
If set to true each canvas is saved into a dedicated pdf file.
Definition at line 202 of file FastRecoVisualizationTool.h.
|
private |
If set to true a summary Canvas is created.
Definition at line 204 of file FastRecoVisualizationTool.h.
|
private |
Define the subdirectory in which the plots shall be saved.
Definition at line 208 of file FastRecoVisualizationTool.h.
|
private |
Declaration of the dependency on the decorations.
(Overwritten in initialize)
Definition at line 229 of file FastRecoVisualizationTool.h.
|
private |
Definition at line 233 of file FastRecoVisualizationTool.h.
|
private |
List of truth segment links to fetch.
Definition at line 227 of file FastRecoVisualizationTool.h.
|
private |
Service handle of the visualization service.
Definition at line 196 of file FastRecoVisualizationTool.h.