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  MuonRecoChainTester
 
class  PatternVisualizationTool
 
class  RpcMeasurementVariables
 
class  SimHitTester
 
class  SpacePointTesterModule
 
class  TesterModuleBase
 
class  TgcStripVariables
 

Typedefs

using TruthHitCol = std::unordered_set< const xAOD::MuonSimHit * >
 
using TruthSegmentSet = PatternVisualizationTool::TruthSegmentSet
 

Functions

unsigned int countMatched (const TruthHitCol &truthHits, const TruthHitCol &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< 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...
 

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

◆ TruthHitCol

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

Definition at line 21 of file MuonHoughTransformTester.cxx.

◆ TruthSegmentSet

Definition at line 56 of file PatternVisualizationTool.cxx.

Function Documentation

◆ countMatched()

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

Definition at line 22 of file MuonHoughTransformTester.cxx.

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

◆ drawBox()

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 31 of file VisualizationHelpers.cxx.

34  {
35  auto box = std::make_unique<TBox>(boxCenter[view] - 0.5*boxWidth, boxCenter.z() - 0.5*boxHeight,
36  boxCenter[view] + 0.5*boxWidth, boxCenter.z() + 0.5*boxHeight);
37  box->SetFillColor(color);
38  box->SetLineColor(color);
39  box->SetFillStyle(fillStyle);
40  box->SetFillColorAlpha(color, 0.8);
41  return box;
42  }

◆ 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 11 of file VisualizationHelpers.cxx.

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

◆ 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 22 of file VisualizationHelpers.cxx.

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

◆ 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 43 of file VisualizationHelpers.cxx.

46  {
47  const auto [pos, dir] = makeLine(pars);
48  const double x1 = (pos + Amg::intersect<3>(pos,dir,Amg::Vector3D::UnitZ(), lowEnd).value_or(0.)* dir)[view];
49  const double x2 = (pos + Amg::intersect<3>(pos,dir,Amg::Vector3D::UnitZ(), highEnd).value_or(0.)* dir)[view];
50  auto seedLine = std::make_unique<TLine>(x1, lowEnd, x2, highEnd);
51  seedLine->SetLineColor(color);
52  seedLine->SetLineWidth(2);
53  seedLine->SetLineStyle(lineStyle);
54  return seedLine;
55  }

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
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
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:30
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
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
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