ATLAS Offline Software
Classes | Typedefs | Functions | Variables
MuonValR4 Namespace Reference

Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a validation NTuple with identifier and drift circle info. More...

Classes

class  IPatternVisualizationTool
 Helper tool to visualize a pattern recogntion incident or a certain stage of the segment fit. More...
 
class  MdtCalibDbAlgTest
 
class  MdtDriftCircleVariables
 
class  MdtTwinDriftCircleVariables
 
class  MmClusterVariables
 
class  MuonHitTesterAlg
 
class  MuonHoughTransformTester
 
class  MuonPatternRecognitionTestTree
 
class  MuonRecoChainTester
 
struct  ObjectMatching
 helper struct to associate truth to reco segments and hough seeds
More...
 
class  PatternVisualizationTool
 
class  RpcMeasurementVariables
 
class  SimHitTester
 
class  SpacePointTesterModule
 
class  TesterModuleBase
 
class  TgcStripVariables
 

Typedefs

using simHitSet = std::unordered_set< const xAOD::MuonSimHit * >
 
using LabeledSegmentSet = PatternVisualizationTool::LabeledSegmentSet
 

Functions

unsigned int countMatched (const simHitSet &truthHits, const simHitSet &recoHits)
 
std::unique_ptr< TEllipse > drawDriftCircle (const Amg::Vector3D &center, const double radius, const int color=kViolet, const int fillStyle=hollowFilling)
 Create a TEllipse for drawing a drift circle. More...
 
std::unique_ptr< TBox > drawBox (const Amg::Vector3D &boxCenter, const double boxWidth, const double boxHeight, const int color=kGreen+2, const int fillStyle=hollowFilling, const int view=objViewEta)
 Creates a box for drawing, e.g strip measurements. More...
 
std::unique_ptr< TBox > drawBox (const double x1, const double y1, const double x2, const double y2, const int color=kGreen+2, const int fillStyle=hollowFilling)
 Creates a box for drawing, e.g strip measurements. More...
 
std::unique_ptr< TLine > drawLine (const MuonR4::SegmentFit::Parameters &pars, const double lowEnd, const double highEnd, const int color=kRed+1, const int lineStyle=kDashed, const int view=objViewEta)
 
std::unique_ptr< TLatex > drawLabel (const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
 Create a TLatex label,. More...
 
std::unique_ptr< TLatex > drawAtlasLabel (const double xPos, const double yPos, const std::string &status="Internal")
 Create a ATLAS label. More...
 
std::unique_ptr< TLatex > drawLumiSqrtS (const double xPos, const double yPos, const std::string_view sqrtS="14", const std::string_view lumi="")
 Create a luminosity sqrtS label. More...
 

Variables

constexpr int hollowFilling = 0
 Filling codes for hollow / fullFilling / hatched filling. More...
 
constexpr int fullFilling = 1001
 
constexpr int hatchedFilling = 3344
 
constexpr int objViewEta = MuonR4::SegmentFit::toInt(MuonR4::SegmentFit::AxisDefs::eta)
 ObjectView. More...
 
constexpr int objViewPhi = MuonR4::SegmentFit::toInt(MuonR4::SegmentFit::AxisDefs::phi)
 

Detailed Description

Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a validation NTuple with identifier and drift circle info.

Module to dump the basic properties of the TgcStrip collection.

Module to dump the basic properties of the RpcMeasurement collection.

Module to dump the basic properties of the MmCluster collection.

Module to dump the basic properties of the MdtTwinDriftCircle collection.

Module to dump the basic properties of the MdtDriftCircle collection.

Typedef Documentation

◆ LabeledSegmentSet

Definition at line 57 of file PatternVisualizationTool.cxx.

◆ simHitSet

using MuonValR4::simHitSet = typedef std::unordered_set<const xAOD::MuonSimHit*>

Definition at line 19 of file MuonHoughTransformTester.cxx.

Function Documentation

◆ countMatched()

unsigned int MuonValR4::countMatched ( const simHitSet truthHits,
const simHitSet recoHits 
)

Definition at line 20 of file MuonHoughTransformTester.cxx.

21  {
22  unsigned int matched{0};
23  for (const xAOD::MuonSimHit* reco : recoHits) {
24  matched += truthHits.count(reco);
25  }
26  return matched;
27  }

◆ drawAtlasLabel()

std::unique_ptr< TLatex > MuonValR4::drawAtlasLabel ( const double  xPos,
const double  yPos,
const std::string &  status = "Internal" 
)

Create a ATLAS label.

Parameters
xPosx-position of the label on the Canvas
yPosy-position of the label on the Canvas
statusATLAS label status to be drawn

Definition at line 63 of file VisualizationHelpers.cxx.

64  {
65  return drawLabel( "#font[72]{ATLAS} "+status, xPos, yPos);
66  }

◆ drawBox() [1/2]

std::unique_ptr< TBox > MuonValR4::drawBox ( const Amg::Vector3D boxCenter,
const double  boxWidth,
const double  boxHeight,
const int  color = kGreen +2,
const int  fillStyle = hollowFilling,
const int  view = objViewEta 
)

Creates a box for drawing, e.g strip measurements.

Parameters
boxCenterCenter of the box to be placed expressed in chamber frame coordinates
boxWidthWidth of the drawn box
boxHeightHeight of the drawn box
colorColor of the surrounding line & filling
fillStyleBox fill style
viewIs the box placed in the y-z or in the x-z plane

Definition at line 32 of file VisualizationHelpers.cxx.

35  {
36  return drawBox(boxCenter[view] - 0.5*boxWidth, boxCenter.z() - 0.5*boxHeight,
37  boxCenter[view] + 0.5*boxWidth, boxCenter.z() + 0.5*boxHeight,
38  color, fillStyle);
39  }

◆ drawBox() [2/2]

std::unique_ptr< TBox > MuonValR4::drawBox ( const double  x1,
const double  y1,
const double  x2,
const double  y2,
const int  color = kGreen +2,
const int  fillStyle = hollowFilling 
)

Creates a box for drawing, e.g strip measurements.

Parameters
x1Left edge location
y1Bottom edge location
x2Right edge location
y2TopEdgeLocation
colorColor of the surrounding line & filling
fillStyleBox fill style
viewIs the box placed in the y-z or in the x-z plane

Definition at line 40 of file VisualizationHelpers.cxx.

42  {
43  auto box = std::make_unique<TBox>(x1,y1,x2,y2);
44  box->SetFillColor(color);
45  box->SetLineColor(color);
46  box->SetFillStyle(fillStyle);
47  box->SetFillColorAlpha(color, 0.8);
48  return box;
49  }

◆ drawDriftCircle()

std::unique_ptr< TEllipse > MuonValR4::drawDriftCircle ( const Amg::Vector3D center,
const double  radius,
const int  color = kViolet,
const int  fillStyle = hollowFilling 
)

Create a TEllipse for drawing a drift circle.

Parameters
centerPosition of the drift cirle expressed in the chambers frame y-coordinate corresponds to the tube layer z-coordinate corresponds to the tube in the layer
radiusRadius of the drift circle to draw
colorColor of the circle to draw
fillStyleStyle to pick the filling of the circle

Definition at line 12 of file VisualizationHelpers.cxx.

14  {
15  auto ellipse = std::make_unique<TEllipse>(center.y(), center.z(), radius);
16  ellipse->SetLineColor(color);
17  ellipse->SetFillStyle(fillStyle);
18  ellipse->SetLineWidth(1);
19  ellipse->SetFillColorAlpha(color, 0.2);
20  return ellipse;
21  }

◆ drawLabel()

std::unique_ptr< TLatex > MuonValR4::drawLabel ( const std::string &  text,
const double  xPos,
const double  yPos,
const unsigned int  fontSize = 18 
)

Create a TLatex label,.

Parameters
textLabel text
xPosx-position of the label on the Canvas
yPosy-position of the label on the Canvas
fontSizeSize of the label font

Definition at line 23 of file VisualizationHelpers.cxx.

25  {
26  auto tl = std::make_unique<TLatex>(xPos, yPos, text.c_str());
27  tl->SetNDC();
28  tl->SetTextFont(43);
29  tl->SetTextSize(fontSize);
30  return tl;
31  }

◆ drawLine()

std::unique_ptr< TLine > MuonValR4::drawLine ( const MuonR4::SegmentFit::Parameters pars,
const double  lowEnd,
const double  highEnd,
const int  color = kRed +1,
const int  lineStyle = kDashed,
const int  view = objViewEta 
)

Definition at line 50 of file VisualizationHelpers.cxx.

53  {
54  const auto [pos, dir] = makeLine(pars);
55  const double x1 = (pos + Amg::intersect<3>(pos,dir,Amg::Vector3D::UnitZ(), lowEnd).value_or(0.)* dir)[view];
56  const double x2 = (pos + Amg::intersect<3>(pos,dir,Amg::Vector3D::UnitZ(), highEnd).value_or(0.)* dir)[view];
57  auto seedLine = std::make_unique<TLine>(x1, lowEnd, x2, highEnd);
58  seedLine->SetLineColor(color);
59  seedLine->SetLineWidth(2);
60  seedLine->SetLineStyle(lineStyle);
61  return seedLine;
62  }

◆ drawLumiSqrtS()

std::unique_ptr< TLatex > MuonValR4::drawLumiSqrtS ( const double  xPos,
const double  yPos,
const std::string_view  sqrtS = "14",
const std::string_view  lumi = "" 
)

Create a luminosity sqrtS label.

Parameters
xPosx-position of the label on the Canvas
yPosy-position of the label on the Canvas
sqrtSCentre of mass energy [TeV]
lumiLuminosity [fb^{-1}]. If less <0 not drawn

Definition at line 67 of file VisualizationHelpers.cxx.

70  {
71  return drawLabel(std::format("#sqrt{{s}}={0} TeV {1}{2}", sqrtS, lumi, lumi.empty() ? "" : "fb^{-1}"), xPos, yPos);
72  }

Variable Documentation

◆ fullFilling

constexpr int MuonValR4::fullFilling = 1001
constexpr

Definition at line 20 of file VisualizationHelpers.h.

◆ hatchedFilling

constexpr int MuonValR4::hatchedFilling = 3344
constexpr

Definition at line 21 of file VisualizationHelpers.h.

◆ hollowFilling

constexpr int MuonValR4::hollowFilling = 0
constexpr

Filling codes for hollow / fullFilling / hatched filling.

Definition at line 19 of file VisualizationHelpers.h.

◆ objViewEta

constexpr int MuonValR4::objViewEta = MuonR4::SegmentFit::toInt(MuonR4::SegmentFit::AxisDefs::eta)
constexpr

ObjectView.

Definition at line 24 of file VisualizationHelpers.h.

◆ objViewPhi

constexpr int MuonValR4::objViewPhi = MuonR4::SegmentFit::toInt(MuonR4::SegmentFit::AxisDefs::phi)
constexpr

Definition at line 25 of file VisualizationHelpers.h.

make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
color
Definition: jFexInputByteStreamTool.cxx:25
vtune_athena.format
format
Definition: vtune_athena.py:14
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
MuonValR4::drawBox
std::unique_ptr< TBox > drawBox(const Amg::Vector3D &boxCenter, const double boxWidth, const double boxHeight, const int color=kGreen+2, const int fillStyle=hollowFilling, const int view=objViewEta)
Creates a box for drawing, e.g strip measurements.
Definition: VisualizationHelpers.cxx:32
MuonR4::SegmentFit::makeLine
std::pair< Amg::Vector3D, Amg::Vector3D > makeLine(const Parameters &pars)
Returns the parsed parameters into an Eigen line parametrization.
Definition: SegmentFitterEventData.cxx:26
MuonValR4::drawLabel
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
Definition: VisualizationHelpers.cxx:23
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
beamspotman.dir
string dir
Definition: beamspotman.py:623
python.ElectronD3PDObject.matched
matched
Definition: ElectronD3PDObject.py:138
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
merge.status
status
Definition: merge.py:17
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
MuonSegmentReaderConfig.reco
reco
Definition: MuonSegmentReaderConfig.py:133
drawFromPickle.view
view
Definition: drawFromPickle.py:294