ATLAS Offline Software
TrackVisualizationTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
5 
11 
12 
13 #include <filesystem>
14 #include <format>
15 
16 #include "TMarker.h"
17 #include "TROOT.h"
18 #include "TStyle.h"
19 #include "TLegend.h"
20 #include "TH1F.h"
21 
22 namespace {
23  using namespace MuonR4;
24  constexpr int truthColor = kOrange +2;
25 
26  constexpr int ColorBarrel = kRed;
27  constexpr int ColorEndcapA = kBlue;
28  constexpr int ColorEndcapC = kGreen +2;
29  constexpr double inM = 1./ Gaudi::Units::m;
30 
31  constexpr double extraMargin = 50.*Gaudi::Units::cm * inM;
32 
33  std::unique_ptr<TMarker> drawMarker(const Amg::Vector2D& pos, const int mStyle, const int mColor, const int mSize = 2) {
34  auto marker = std::make_unique<TMarker>(pos.x(), pos.y(), mStyle);
35  marker->SetMarkerColor(mColor);
36  marker->SetMarkerSize(mSize);
37  return marker;
38  }
39 
40  inline int stationMarkerSyle(const Muon::MuonStationIndex::ChIndex ch,
41  const bool openMarker, const bool onSeed) {
44  case Inner:
45  case BarrelExtended:
46  case Extended:
47  return onSeed ? (openMarker ? kOpenTriangleUp : kFullTriangleUp)
48  : (openMarker ? kOpenTriangleDown : kFullTriangleDown);
49  case Middle:
50  return onSeed ? (openMarker ? kOpenCrossX : kFullCrossX)
51  : (openMarker ? kOpenCross : kFullCross);
52  case Outer:
53  return onSeed ? (openMarker ? kOpenFourTrianglesX: kFullFourTrianglesX)
54  : (openMarker ? kOpenThreeTriangles : kFullThreeTriangles);
55  default:
56  return 0;
57  }
58  }
59  std::string removeNonAlphaNum(std::string str) {
60  str.erase(std::remove_if(str.begin(),str.end(),
61  [](const unsigned char c){
62  return !std::isalnum(c);
63  }), str.end());
64  return str;
65  }
66 }
67 
68 namespace MuonValR4{
69 
70  void TrackVisualizationTool::PlotLegend::addColor(const int color, const std::string& label){
71  if (colors.find(color)!= colors.end()) {
72  return;
73  }
74  auto box = MuonValR4::drawBox(0.,0,1,1, color, MuonValR4::fullFilling);
75  legend->AddEntry(box.get(), label.c_str(), "F");
76  colors.insert(std::make_pair(color, std::move(box)));
77  }
78  void TrackVisualizationTool::PlotLegend::addMarker(const int marker, const std::string& label){
79  if (markers.find(marker)!= markers.end()) {
80  return;
81  }
82  auto tMarker = drawMarker(Amg::Vector2D::Zero(), marker, kBlack);
83  legend->AddEntry(tMarker.get(), label.c_str(), "P");
84  markers.insert(std::make_pair(marker, std::move(tMarker)));
85  }
88  return BoundBox_t{std::array{1.e9,1.e9}, std::array{-1.e9,-1.e9}};
89  }
90 
92 
94  if (!m_outFile) return;
95  ATH_MSG_INFO("Close summary pdf & root file "<<m_allCanName);
96  if (m_summaryCan) {
97  m_summaryCan->cd();
98  m_summaryCan->SaveAs((m_allCanName +".pdf]").c_str());
99  m_summaryCan.reset();
100  }
101  m_outFile.reset();
102  }
104  const Amg::Vector2D& posOnCylinder,
105  const DisplayView view) {
106  using enum DisplayView;
107  if (view == RZ) {
108  return Amg::Vector2D{ posOnCylinder[1]*inM, posOnCylinder[0]*inM};
109  }
110  const CxxUtils::sincos phi{phiV};
111  return posOnCylinder[0] * inM * Amg::Vector2D{phi.cs, phi.sn};
112  }
115  return StatusCode::SUCCESS;
116  }
118  if (m_canvasLimit > 0) {
119  if (m_canvasPrefix.value().empty() || m_allCanName.value().empty()) {
120  ATH_MSG_FATAL("Please define "<<m_canvasPrefix<<" && "<<m_allCanName);
121  return StatusCode::FAILURE;
122  }
123  if (m_saveSummaryPDF) {
124  m_summaryCan = std::make_unique<TCanvas>("all", "all", m_canvasWidth, m_canvasHeight);
125  m_summaryCan->SaveAs((m_allCanName +".pdf[").c_str());
126  }
127  m_outFile = std::make_unique<TFile>( (m_allCanName +".root").c_str(), "RECREATE");
128  if (m_saveSinglePDFs) {
129  std::filesystem::create_directories("Plots/" + m_canvasPrefix);
130  }
131  gROOT->SetStyle("ATLAS");
132  TStyle* plotStyle = gROOT->GetStyle("ATLAS");
133  plotStyle->SetOptTitle(0);
134  plotStyle->SetHistLineWidth(1.);
135  plotStyle->SetPalette(kViridis);
136  }
138  return StatusCode::SUCCESS;
139  }
140  void TrackVisualizationTool::displaySeeds(const EventContext& ctx,
141  const MsTrackSeeder& seederObj,
142  const xAOD::MuonSegmentContainer& segments,
143  const MsTrackSeedContainer& seeds,
144  const std::string& extraLabel) const {
145  displaySeeds(ctx, seederObj, segments, seeds, extraLabel, PrimitivesVec_t{});
146  }
147  void TrackVisualizationTool::displaySeeds(const EventContext& ctx,
148  const MsTrackSeeder& seederObj,
149  const xAOD::MuonSegmentContainer& segments,
150  const MsTrackSeedContainer& seeds,
151  const std::string& extraLabel,
152  PrimitivesVec_t && extPrimitives) const {
153  if (m_canvCounter >= m_canvasLimit || segments.empty()) {
154  return;
155  }
156  std::lock_guard guard{s_mutex};
157  if (m_canvCounter >= m_canvasLimit) {
158  return;
159  }
160  unsigned int nPrim = extPrimitives.size();
161  displaySeeds(ctx, seederObj, DisplayView::RZ, segments, seeds, extraLabel, extPrimitives);
162  extPrimitives.resize(nPrim);
163  displaySeeds(ctx, seederObj, DisplayView::XY, segments, seeds, extraLabel, extPrimitives);
164  if ((++m_canvCounter) >= m_canvasLimit) {
166  }
167  }
168  void TrackVisualizationTool::displaySeeds(const EventContext& ctx,
169  const MsTrackSeeder& seeder,
170  const DisplayView view,
171  const xAOD::MuonSegmentContainer& segments,
172  const MsTrackSeedContainer& seeds,
173  const std::string& extraLabel,
174  PrimitivesVec_t& extPrimitives) const{
175 
176  const unsigned nPrim = extPrimitives.size();
177  PlotLegend legend{0.005,0.005, 0.6,0.1};
179  fillTruthSeedPoints(ctx, seeder, view, legend, extPrimitives);
181  auto boundBox = emptyBounds();
182 
183  auto onSeed = [&seeds](const xAOD::MuonSegment* segment,
184  const Location loc) {
185  return std::ranges::any_of(seeds,[segment, loc](const MsTrackSeed& seed){
186  return seed.location() == loc && std::ranges::find(seed.segments(), segment) != seed.segments().end();
187  });
188  };
189 
190 
191  for (const xAOD::MuonSegment* segment: segments) {
192  using enum Location;
193  using namespace Muon;
194  const MuonGMR4::SpectrometerSector* msSector = detailedSegment(*segment)->msSector();
195  const auto chIdx = segment->chamberIndex();
196  const int mColor = msSector->barrel() ? ColorBarrel : (msSector->side() > 0 ? ColorEndcapA : ColorEndcapC);
197  const double phi = segment->direction().phi();
198  for (const Location loc : {Barrel, Endcap}) {
199  const Amg::Vector2D projPos{seeder.expressOnCylinder(*segment, loc)};
200  if (!seeder.withinBounds(projPos, loc)) {
201  continue;
202  }
203  const bool isGood = onSeed(segment, loc);
204  const int mStyle = stationMarkerSyle(chIdx, false, isGood);
205  const Amg::Vector2D markerPos{viewVector(phi, projPos, view)};
206  extPrimitives.emplace_back(drawMarker(markerPos, mStyle, mColor));
207 
208  if (view == DisplayView::XY) {
209  const double r = markerPos.mag() + extraMargin;
210  boundBox[0].expand(-r, r);
211  boundBox[1].expand(-r, r);
212  } else {
213  boundBox[0].expand(markerPos[0] - extraMargin, markerPos[0] + extraMargin);
214  boundBox[1].expand(markerPos[1] - extraMargin, markerPos[1] + extraMargin);
215  }
216  legend.addMarker(mStyle, std::format("{:}{:}", MuonStationIndex::layerName(MuonStationIndex::toLayerIndex(chIdx)),
217  isGood ? "" : " (discarded)"));
218  legend.addColor(mColor, msSector->barrel() ? "Barrel" : msSector->side() > 0 ? "Endcap A" : "Endcap C");
219  }
220  }
221  for (const MsTrackSeed& seed : seeds) {
222  const Amg::Vector3D& pos{seed.position()};
223  extPrimitives.emplace_back(drawMarker(viewVector(pos.phi(), Amg::Vector2D{pos.perp(), pos.z()}, view),
224  kFullDiamond, kBlack));
225  legend.addMarker(kFullDiamond, "track seed");
226  }
228  const Muon::MuonSectorMapping sectorMap{};
229  for (unsigned int s = 1; s<=16 ; ++s) {
230  if (view != DisplayView::XY) {
231  break;
232  }
233  const double phi = sectorMap.sectorPhi(s);
234  const double dPhi = sectorMap.sectorWidth(s);
235 
236  const int lStyle = s%2 ? kDashed : kDotted;
237  const double r = boundBox[0].max();
238  const CxxUtils::sincos phiM{phi-dPhi}, phiP{phi+dPhi};
239  const Amg::Vector2D e1{r * phiM.cs, r * phiM.sn};
240  const Amg::Vector2D e2{r * phiP.cs, r * phiP.sn};
241 
242  auto theLine = std::make_unique<TLine>(0.,0., e1.x(), e1.y());
243  theLine->SetLineStyle(lStyle);
244  extPrimitives.insert(extPrimitives.begin() + nPrim, std::move(theLine));
245  theLine = std::make_unique<TLine>(0.,0., e2.x(), e2.y());
246  theLine->SetLineStyle(lStyle);
247  extPrimitives.insert(extPrimitives.begin() + nPrim, std::move(theLine));
248  theLine = std::make_unique<TLine>(e1.x(), e1.y(), e2.x(), e2.y());
249  theLine->SetLineStyle(lStyle);
250  extPrimitives.insert(extPrimitives.begin() + nPrim, std::move(theLine));
251  }
252  auto canvas = makeCanvas(ctx, boundBox, view == DisplayView::XY ?
253  std::tie("x [m]", "y [m]") : std::tie("z [m]", "R [m]"));
254 
255  for (auto& prim: extPrimitives){
256  prim->Draw();
257  }
258  legend.legend->SetBorderSize(0);
259  legend.legend->SetNColumns(4);
260  legend.legend->Draw();
261  std::stringstream canvasName{};
262  canvasName<<m_canvasPrefix.value()<<"_"<<ctx.eventID().event_number()
263  <<"_SeedDisplay"<<(view == DisplayView::XY ? "XY" : "RZ");
264  if (!extraLabel.empty()) canvasName<<"_"<<removeNonAlphaNum(extraLabel);
265  ATH_MSG_VERBOSE("Save new plot "<<canvasName.str());
266  if (m_saveSinglePDFs) {
267  canvas->SaveAs(std::format("Plots/{:}/{:}.pdf", m_canvasPrefix.value(), canvasName.str()).c_str());
268  }
269  if (m_saveSummaryPDF) {
270  canvas->SaveAs((m_allCanName+".pdf").c_str());
271  }
272  m_outFile->WriteObject(canvas.get(), canvasName.str().c_str());
273  }
274  void TrackVisualizationTool::fillTruthSeedPoints(const EventContext& ctx,
275  const MsTrackSeeder& seeder,
276  const DisplayView view,
277  PlotLegend& legend,
278  PrimitivesVec_t& drawPrim) const {
279  const xAOD::MuonSegmentContainer* truthSegs{nullptr};
280  if (!SG::get(truthSegs,m_truthSegKey, ctx).isSuccess()) {
281  THROW_EXCEPTION("Failed to fetch the truth segment container");
282  }
283  if (!truthSegs) {
284  return;
285  }
286  bool addedEntry{false};
287  for (const xAOD::MuonSegment* segment: *truthSegs) {
288  const auto chIdx = segment->chamberIndex();
289  const int mStyle = stationMarkerSyle(chIdx, false, true);
290  const double phi = segment->direction().phi();
291 
292  using enum Location;
293  for (const Location loc : {Barrel, Endcap}) {
294  const Amg::Vector2D projected{seeder.expressOnCylinder(*segment, loc)};
295  if (!seeder.withinBounds(projected, loc)) {
296  continue;
297  }
298  drawPrim.push_back(drawMarker(viewVector(phi, projected, view), mStyle, truthColor, 3));
300  addedEntry = true;
301  }
302  }
303  if (addedEntry) {
304  legend.addColor(truthColor, "truth");
305  }
306  }
307 
308  std::unique_ptr<TCanvas> TrackVisualizationTool::makeCanvas(const EventContext& ctx,
309  const BoundBox_t& bounds,
310  const AxisLabels_t& axisLabels) const {
311  std::stringstream canvasName{};
312  canvasName<<name()<<"_"<<ctx.eventID().event_number()<<"_"<<m_canvCounter;
313  ATH_MSG_VERBOSE("Create new canvas "<<canvasName.str());
314  auto canvas = std::make_unique<TCanvas>(canvasName.str().c_str(), "all", m_canvasWidth, m_canvasHeight);
315  canvas->cd();
316  TH1F* frame = canvas->DrawFrame(bounds[0].min(), bounds[1].min(),bounds[0].max(), bounds[1].max());
317  frame->GetXaxis()->SetTitle(std::get<0>(axisLabels).c_str());
318  frame->GetYaxis()->SetTitle(std::get<1>(axisLabels).c_str());
319  return canvas;
320  }
321 }
MuonValR4::fullFilling
constexpr int fullFilling
Definition: VisualizationHelpers.h:21
MuonValR4::TrackVisualizationTool::PlotLegend
Helper struct to administer the markers & colors that are added to the legend.
Definition: TrackVisualizationTool.h:60
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
beamspotman.r
def r
Definition: beamspotman.py:672
Muon::MuonStationIndex::LayerIndex::Outer
@ Outer
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
color
Definition: jFexInputByteStreamTool.cxx:25
MuonGMR4::SpectrometerSector::side
int8_t side() const
Returns the side of the MS-sector 1 -> A side ; -1 -> C side.
Definition: SpectrometerSector.cxx:57
MuonGMR4::SpectrometerSector
A spectrometer sector forms the envelope of all chambers that are placed in the same MS sector & laye...
Definition: SpectrometerSector.h:40
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
vtune_athena.format
format
Definition: vtune_athena.py:14
MuonValR4::TrackVisualizationTool::DisplayView::XY
@ XY
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
MuonR4::MsTrackSeeder::withinBounds
bool withinBounds(const Amg::Vector2D &projPos, const Location loc) const
Returns whether the expression on the cylinder is within the surface bounds.
Definition: MsTrackSeeder.cxx:33
MuonValR4::TrackVisualizationTool::BoundBox_t
Acts::RangeXD< 2, double > BoundBox_t
Helper struct to determine the canvas ranges to be shown.
Definition: TrackVisualizationTool.h:86
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
VisualizationHelpers.h
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonR4::MsTrackSeed
Definition: MsTrackSeed.h:18
MuonValR4::TrackVisualizationTool::m_truthSegKey
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_truthSegKey
Key to the truth segment selection to draw the segment parameters.
Definition: TrackVisualizationTool.h:139
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MsTrackSeeder.h
Muon::MuonStationIndex::LayerIndex::BarrelExtended
@ BarrelExtended
EE.
MuonValR4::TrackVisualizationTool::makeCanvas
std::unique_ptr< TCanvas > makeCanvas(const EventContext &ctx, const BoundBox_t &bounds, const AxisLabels_t &axisLabels) const
Creates a new TCanvas for drawing.
Definition: TrackVisualizationTool.cxx:308
Muon::MuonStationIndex::LayerIndex::Inner
@ Inner
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:41
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
MuonValR4::TrackVisualizationTool::m_saveSummaryPDF
Gaudi::Property< bool > m_saveSummaryPDF
If set to true a summary Canvas is created.
Definition: TrackVisualizationTool.h:146
MuonValR4::TrackVisualizationTool::AxisLabels_t
std::tuple< std::string, std::string > AxisLabels_t
tuple to declare the axis labels
Definition: TrackVisualizationTool.h:90
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
MatrixUtils.h
MuonValR4::TrackVisualizationTool::m_canvasPrefix
Gaudi::Property< std::string > m_canvasPrefix
Prefix of the individual canvas file names <MANDATORY>
Definition: TrackVisualizationTool.h:150
MuonValR4::TrackVisualizationTool::m_saveSinglePDFs
Gaudi::Property< bool > m_saveSinglePDFs
If set to true each canvas is saved into a dedicated pdf file.
Definition: TrackVisualizationTool.h:143
python.Include.marker
string marker
Definition: Include.py:21
MuonR4::MsTrackSeed::Location
Location
Enum defining whether the seed is made in the endcap / barrel.
Definition: MsTrackSeed.h:21
MuonValR4::TrackVisualizationTool::DisplayView::RZ
@ RZ
MuonValR4::TrackVisualizationTool::s_mutex
static std::mutex s_mutex
Abrivation of the helper struct to determine the Canvas dimensions.
Definition: TrackVisualizationTool.h:162
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:7
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
MuonValR4::TrackVisualizationTool::m_canvasHeight
Gaudi::Property< unsigned > m_canvasHeight
Definition: TrackVisualizationTool.h:153
MuonValR4::TrackVisualizationTool::DisplayView
DisplayView
Enumeration to toggle whether the seeds shall be painted in x-y or R-z view.
Definition: TrackVisualizationTool.h:101
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition: ReadCondHandle.h:287
DeMoAtlasDataLoss.canvas
dictionary canvas
Definition: DeMoAtlasDataLoss.py:187
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonGMR4::SpectrometerSector::barrel
bool barrel() const
Returns whether the sector is placed in the barrel.
Definition: SpectrometerSector.cxx:65
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
MuonValR4::TrackVisualizationTool::PlotLegend::colors
LegendEntry_t colors
Definition: TrackVisualizationTool.h:80
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonValR4::TrackVisualizationTool::m_allCanName
Gaudi::Property< std::string > m_allCanName
Name of the summary canvas & the ROOT file to save the monitoring plots.
Definition: TrackVisualizationTool.h:148
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MuonValR4::TrackVisualizationTool::finalize
virtual StatusCode finalize() override final
Definition: TrackVisualizationTool.cxx:113
MuonR4::Segment::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:39
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonValR4::TrackVisualizationTool::viewVector
static Amg::Vector2D viewVector(const double phi, const Amg::Vector2D &posOnCylinder, const DisplayView view)
Transforms the projected vector into the actual view, if it's xy then an external phi is needed to pl...
Definition: TrackVisualizationTool.cxx:103
MuonValR4::TrackVisualizationTool::emptyBounds
static BoundBox_t emptyBounds()
Createes a new empty range box ready for shrinkin useage.
Definition: TrackVisualizationTool.cxx:87
MuonValR4::TrackVisualizationTool::PlotLegend::legend
std::unique_ptr< TLegend > legend
Definition: TrackVisualizationTool.h:77
MuonValR4
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
Definition: IPatternVisualizationTool.h:23
lumiFormat.array
array
Definition: lumiFormat.py:91
TrackingHelpers.h
MuonValR4::TrackVisualizationTool::fillTruthSeedPoints
void fillTruthSeedPoints(const EventContext &ctx, const MuonR4::MsTrackSeeder &seeder, const DisplayView view, PlotLegend &legend, PrimitivesVec_t &drawPrim) const
Add the truth segments to the canvas.
Definition: TrackVisualizationTool.cxx:274
plotBeamSpotVxVal.legend
legend
Definition: plotBeamSpotVxVal.py:97
Muon::MuonStationIndex::LayerIndex::Extended
@ Extended
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CoreClass.markers
list markers
Definition: CoreClass.py:17
Muon::MuonStationIndex::layerName
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:153
MuonValR4::TrackVisualizationTool::m_canvasLimit
Gaudi::Property< unsigned > m_canvasLimit
Maximum canvases to draw.
Definition: TrackVisualizationTool.h:141
MuonR4::MsTrackSeeder
Helper class to group muon sgements that may belong to a muon trajectory.
Definition: MsTrackSeeder.h:25
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
MuonValR4::TrackVisualizationTool::m_canvasWidth
Gaudi::Property< unsigned > m_canvasWidth
Canvas dimensions.
Definition: TrackVisualizationTool.h:152
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
MuonValR4::TrackVisualizationTool::PlotLegend::addColor
void addColor(const int color, const std::string &label)
Add new color legend entry.
Definition: TrackVisualizationTool.cxx:70
MuonSectorMapping.h
MuonValR4::TrackVisualizationTool::PlotLegend::addMarker
void addMarker(const int marker, const std::string &label)
Add new Marker style to the legend entry.
Definition: TrackVisualizationTool.cxx:78
Muon::MuonStationIndex::LayerIndex::Middle
@ Middle
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
MuonValR4::TrackVisualizationTool::Location
MuonR4::MsTrackSeed::Location Location
Enumeration to toggle whether the segment shall displayed on the barrel/endcap.
Definition: TrackVisualizationTool.h:84
MuonValR4::TrackVisualizationTool::displaySeeds
virtual void displaySeeds(const EventContext &ctx, const MuonR4::MsTrackSeeder &seederObj, const xAOD::MuonSegmentContainer &segments, const MuonR4::MsTrackSeedContainer &seeds, const std::string &extraLabel) const override final
Displays all segments on the representative cylinder in the R-Z & X-Y plane and draws the markers of ...
Definition: TrackVisualizationTool.cxx:140
MuonR4::MsTrackSeedContainer
std::vector< MsTrackSeed > MsTrackSeedContainer
Definition: MsTrackSeed.h:61
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, float &out)
Definition: TauGNNUtils.cxx:412
MuonValR4::TrackVisualizationTool::initialize
virtual StatusCode initialize() override final
Definition: TrackVisualizationTool.cxx:117
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:39
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
Muon::MuonSectorMapping
Definition: MuonSectorMapping.h:20
str
Definition: BTagTrackIpAccessor.cxx:11
Muon::MuonStationIndex::toLayerIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
MuonValR4::TrackVisualizationTool::closeSummaryCanvas
void closeSummaryCanvas() const
Closes the summary canvas & closes the associated ROOT file.
Definition: TrackVisualizationTool.cxx:93
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
MuonR4::MsTrackSeeder::expressOnCylinder
Amg::Vector2D expressOnCylinder(const xAOD::MuonSegment &segment, const Location loc) const
Expresses the segment on the cylinder surface.
Definition: MsTrackSeeder.cxx:15
python.compressB64.c
def c
Definition: compressB64.py:93
TrackVisualizationTool.h
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
drawFromPickle.view
view
Definition: drawFromPickle.py:294