ATLAS Offline Software
MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "NSWGeoPlottingAlg.h"
5 
6 #include <cmath>
7 #include <format>
8 
9 #include "GaudiKernel/SystemOfUnits.h"
14 #include "TFile.h"
15 #include "TGraph.h"
16 #include "TH1.h"
17 #include "TH2D.h"
19 #include "TrkSurfaces/Surface.h"
20 
21 namespace {
22 std::string to_string(const Amg::Vector3D& v) {
23  std::stringstream sstr{};
24  sstr << "[x,y,z]=(" << v.x() << "," << v.y() << "," << v.z()
25  << ") [theta/eta/phi]=(" << (v.theta() / Gaudi::Units::degree) << ","
26  << v.eta() << "," << v.phi() << ")";
27  return sstr.str();
28 }
29 
30 } // namespace
31 namespace MuonGM{
33  auto out_file = std::make_unique<TFile>(m_outFile.value().c_str(), "RECREATE");
34  if (!out_file || !out_file->IsOpen() || out_file->IsZombie()) {
35 
36  ATH_MSG_FATAL("Failed to create the output file " << m_outFile);
37  return StatusCode::FAILURE;
38  }
39  out_file->mkdir("SinglePads");
40  out_file->mkdir("ActiveSurfaces");
41  const MmIdHelper& mm_helper = m_idHelperSvc->mmIdHelper();
42  const sTgcIdHelper& st_helper = m_idHelperSvc->stgcIdHelper();
43  for (auto& id_graph : m_nswPads) {
44  std::unique_ptr<TGraph>& graph = id_graph.second;
45  const Identifier& id = id_graph.first;
46  bool is_mm = m_idHelperSvc->isMM(id);
47  const int stEta = m_idHelperSvc->stationEta(id);
48  const int ml = is_mm ? mm_helper.multilayer(id) : st_helper.multilayer(id);
49  const int lay = is_mm ? mm_helper.gasGap(id) : st_helper.gasGap(id);
50  const std::string ch_name =
51  (is_mm ? mm_helper.stationNameString(m_idHelperSvc->stationName(id))
52  : st_helper.stationNameString(m_idHelperSvc->stationName(id))) +
53  std::to_string(std::abs(stEta)) + (stEta > 0 ? "A" : "C") +
54  std::to_string(m_idHelperSvc->stationPhi(id)) + "W" +
55  std::to_string(ml) + "L" + std::to_string(lay);
56  TDirectory* dir = out_file->GetDirectory("SinglePads");
57  dir->WriteObject(graph.get(), ch_name.c_str());
58  graph.reset();
59  const int signed_lay = layerId(id);
60  std::unique_ptr<TGraph>& lay_graph = m_nswLayers[signed_lay];
61  if (!lay_graph)
62  continue;
63  std::string lay_name = std::string{is_mm ? "MMG" : "STG"} + "W" +
64  std::to_string(ml) + (stEta > 0 ? "A" : "C") +
65  std::to_string(lay);
66  out_file->WriteObject(lay_graph.get(), lay_name.c_str());
67  lay_graph.reset();
68  std::unique_ptr<TH1>& active_area = m_nswActiveAreas[signed_lay];
69  if (!active_area)
70  continue;
71  dir = out_file->GetDirectory("ActiveSurfaces");
72 
73  dir->WriteObject(active_area.get(), lay_name.c_str());
74  active_area.reset();
75  }
76  return StatusCode::SUCCESS;
77 }
80  ATH_CHECK(m_idHelperSvc.retrieve());
83  return StatusCode::SUCCESS;
84 }
86  if (m_alg_run)
87  return StatusCode::SUCCESS;
88  ATH_MSG_INFO("Executing NSWGeoPlottingAlg for the first time");
89  const EventContext& ctx = Gaudi::Hive::currentContext();
90 
91  const MuonGM::MuonDetectorManager* detMgr{nullptr};
92 
93  ATH_CHECK(SG::get(detMgr, m_DetectorManagerKey, ctx));
94 
95  for (auto& id_graph : m_nswPads) {
96  const Identifier& id = id_graph.first;
97  std::unique_ptr<TGraph>& pad_graph = id_graph.second;
98  const bool is_mm = m_idHelperSvc->isMM(id);
99  const int signed_lay = layerId(id);
100  std::unique_ptr<TGraph>& wheel_graph = m_nswLayers[signed_lay];
101 
102  const MuonGM::MMReadoutElement* mm_roe =
103  is_mm ? detMgr->getMMReadoutElement(id) : nullptr;
104  const MuonGM::sTgcReadoutElement* st_roe =
105  is_mm ? nullptr : detMgr->getsTgcReadoutElement(id);
106 
107  const MuonGM::MuonChannelDesign* design =
108  is_mm ? mm_roe->getDesign(id) : st_roe->getDesign(id);
109 
110  const Trk::TrkDetElementBase* roe =
111  (mm_roe ? static_cast<const Trk::TrkDetElementBase*>(mm_roe)
112  : static_cast<const Trk::TrkDetElementBase*>(st_roe));
113  auto fill_graphs = [&](const Amg::Vector2D& locPos, int strip) {
114  if ((is_mm || std::abs(locPos.y()) < 1.e-3) &&
115  design->channelNumber(locPos) != strip) {
116  ATH_MSG_ALWAYS(" Backmapping of the strip number did not work for "
117  << m_idHelperSvc->toString(id) << " local pos: "
118  << locPos.x() << " " << locPos.y() << " "
119  << " " << design->channelNumber(locPos) << " vs. "
120  << strip);
121  return false;
122  }
123 
125  roe->surface(id).localToGlobal(locPos, Amg::Vector3D::Zero(), globPos);
126  if (pad_graph)
127  pad_graph->SetPoint(pad_graph->GetN(), globPos.x(), globPos.y());
128  if (wheel_graph)
129  wheel_graph->SetPoint(wheel_graph->GetN(), globPos.x(), globPos.y());
130 
131  return true;
132  };
133  const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
134  auto global_points = [&](const Identifier& id, Amg::Vector3D& left,
135  Amg::Vector3D& center, Amg::Vector3D& right) {
137  l_right{Amg::Vector2D::Zero()};
138  const MuonGM::MuonChannelDesign* design = nullptr;
139  if (mm_roe)
140  design = mm_roe->getDesign(id);
141  else if (st_roe)
142  design = st_roe->getDesign(id);
143  const int chan = id_helper.channel(id);
144  design->leftEdge(chan, l_left);
145  design->center(chan, l_cen);
146  design->rightEdge(chan, l_right);
147 
148  roe->surface(id).localToGlobal(l_left, Amg::Vector3D::Zero(), left);
149  roe->surface(id).localToGlobal(l_cen, Amg::Vector3D::Zero(), center);
150  roe->surface(id).localToGlobal(l_right, Amg::Vector3D::Zero(), right);
151  };
152 
153  const int n_strips =
154  (is_mm ? mm_roe->numberOfStrips(id) : st_roe->numberOfStrips(id));
155  for (int strip = design->numberOfMissingBottomStrips() + 1;
156  strip <= n_strips; strip += 1) {
157  {
159  if (design->leftEdge(strip, locPos) && !fill_graphs(locPos, strip))
160  ATH_MSG_DEBUG("left edge -- channel " << m_idHelperSvc->toString(id)
161  << " does not have strip "
162  << strip << "... Why?");
163  }
164  {
166  if (design->center(strip, locPos) && !fill_graphs(locPos, strip))
167  ATH_MSG_DEBUG("center -- channel " << m_idHelperSvc->toString(id)
168  << " does not have strip " << strip
169  << "... Why?");
170  }
171  {
173  if (design->rightEdge(strip, locPos) && !fill_graphs(locPos, strip))
174  ATH_MSG_DEBUG("right edge -- channel " << m_idHelperSvc->toString(id)
175  << " does not have strip "
176  << strip << "... Why?");
177  }
178  }
179  auto uv_intersects = [&]() {
181  if (design->hasStereoAngle() || m_idHelperSvc->issTgc(id))
182  return StatusCode::SUCCESS;
183  const int gap = id_helper.gasGap(id);
184  const int ml = id_helper.multilayer(id);
185  if ((ml == 1 && gap == 2) || (ml == 2 && gap == 4))
186  return StatusCode::SUCCESS;
187 
188  for (int strip = design->numberOfMissingBottomStrips() + 1;
189  strip <= n_strips; strip += 1) {
190  const int u_gap = ml == 1 ? 3 : 1;
191  const int v_gap = ml == 1 ? 4 : 2;
192  const Identifier x_id = id_helper.channelID(id, ml, gap, strip);
193  const Identifier u_id = id_helper.channelID(id, ml, u_gap, strip);
194  const Identifier v_id = id_helper.channelID(id, ml, v_gap, strip);
196  u_center{Amg::Vector3D::Zero()}, v_center{Amg::Vector3D::Zero()};
198  u_left{Amg::Vector3D::Zero()}, v_left{Amg::Vector3D::Zero()};
200  u_right{Amg::Vector3D::Zero()}, v_right{Amg::Vector3D::Zero()};
201 
202  global_points(x_id, x_left, x_center, x_right);
203  global_points(u_id, u_left, u_center, u_right);
204  global_points(v_id, v_left, v_center, v_right);
205 
206  const Amg::Vector3D x_dir = (x_right - x_left).unit();
207  const Amg::Vector3D v_dir = (v_left - v_right).unit();
208  const Amg::Vector3D u_dir = (u_left - u_right).unit();
209 
210  std::optional<double> uv_isect =
211  Amg::intersect<3>(v_center, v_dir, u_center, u_dir);
212 
213  if (!uv_isect) {
214  ATH_MSG_ERROR("Failed to intersect the uv strips for identifiers "
215  << std::endl
216  << " *** " << m_idHelperSvc->toString(u_id) << " "
217  << to_string(u_dir) << std::endl
218  << " *** " << m_idHelperSvc->toString(v_id) << " "
219  << to_string(v_dir));
220  return StatusCode::FAILURE;
221  }
222  const Amg::Vector3D uv_ipoint = u_center + (*uv_isect) * u_dir;
223  const Amg::Vector2D cen_diff = (uv_ipoint - x_center).block<2, 1>(0, 0);
224  if (cen_diff.dot(cen_diff) > std::numeric_limits<float>::epsilon()) {
225  ATH_MSG_ERROR("Expect that the uv strips "
226  << std::endl
227  << " *** " << m_idHelperSvc->toString(u_id) << " "
228  << to_string(u_dir) << std::endl
229  << " *** " << m_idHelperSvc->toString(v_id) << " "
230  << to_string(v_dir)
231  << " intersect at the center of the corresponding x "
232  "strip. But they don't. "
233  << std::endl
234  << to_string(uv_ipoint) << std::endl
235  << " vs." << std::endl
236  << to_string(x_center));
237  }
238  ATH_MSG_DEBUG("Intersection of uv is in " << to_string(uv_ipoint) << " "
239  << to_string(x_center));
240 
241  std::optional<double> ux_isect =
242  Amg::intersect<3>(u_center, u_dir, x_center, x_dir);
243  if (!ux_isect) {
244  ATH_MSG_ERROR("Failed to intersect the ux strips for identifiers "
245  << std::endl
246  << " *** " << m_idHelperSvc->toString(v_id) << " "
247  << to_string(u_dir) << std::endl
248  << " *** " << m_idHelperSvc->toString(x_id) << " "
249  << to_string(x_dir));
250  return StatusCode::FAILURE;
251  }
252  ATH_MSG_DEBUG("Intersection of xu is in "
253  << to_string(x_center + (*ux_isect) * x_dir) << " "
254  << to_string(x_center));
255 
256  std::optional<double> vx_isect =
257  Amg::intersect<3>(v_center, v_dir, x_center, x_dir);
258  if (!ux_isect) {
259  ATH_MSG_ERROR("Failed to intersect the vx strips for identifiers "
260  << std::endl
261  << " *** " << m_idHelperSvc->toString(v_id) << " "
262  << to_string(v_dir) << std::endl
263  << " *** " << m_idHelperSvc->toString(x_id) << " "
264  << to_string(x_dir));
265  return StatusCode::FAILURE;
266  }
267  ATH_MSG_DEBUG("Intersection of vu is in "
268  << to_string(x_center + (*vx_isect) * x_dir) << " "
269  << to_string(x_center));
270  }
271  return StatusCode::SUCCESS;
272  };
273  if (false)
274  ATH_CHECK(uv_intersects());
275 
276  std::unique_ptr<TH1>& surface_histo = m_nswActiveAreas[signed_lay];
277  if (!surface_histo) {
278  ATH_MSG_WARNING("No surface histo has been made for "
279  << m_idHelperSvc->toString(id) << " " << signed_lay);
280  continue;
281  }
282  const Amg::Vector3D& surf_cent = roe->center(id);
283  double d = std::max(std::max(design->xSize(), design->maxYSize()),
284  design->minYSize());
285  for (double x = surf_cent.x() - d; x <= surf_cent.x() + d; x += 1) {
286  for (double y = surf_cent.y() - d; y <= surf_cent.y() + d; y += 1) {
287  const Amg::Vector3D glob_pos{x, y, surf_cent.z()};
289  if (!roe->surface(id).globalToLocal(glob_pos, glob_pos, lpos))
290  continue;
291  if ((is_mm && mm_roe->insideActiveBounds(id, lpos, 10., 10.)) ||
292  (!is_mm && st_roe->surface(id).insideBounds(lpos, 10., 10.))
293 
294  ) {
295  surface_histo->Fill(x, y);
296  }
297  }
298  }
299  }
300  m_alg_run = true;
301  return StatusCode::SUCCESS;
302 }
304  const MuonGM::MuonDetectorManager* detMgr{nullptr};
305  ATH_CHECK(detStore()->retrieve(detMgr));
306  const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
307  for (const std::string station : {"MML", "MMS"}) {
308  for (int phi = id_helper.stationPhiMin();
309  phi <= id_helper.stationPhiMax(); ++phi) {
310  for (int eta = -2; eta <= 2; ++eta) {
311  if (eta == 0) {
312  continue;
313  }
314  bool is_valid{false};
315 
316  const Identifier station_id = id_helper.elementID(station, eta, phi, is_valid);
317  if (!is_valid) {
318  continue;
319  }
320  for (int ml = id_helper.multilayerMin();
321  ml <= id_helper.multilayerMax(); ++ml) {
322  const Identifier module_id = id_helper.multilayerID(station_id, ml);
323  for (int i_layer = 1; i_layer <= 4; ++i_layer) {
324  const Identifier id =
325  id_helper.channelID(module_id, ml, i_layer, 10);
326  m_nswPads[id] = std::make_unique<TGraph>();
328  int signed_layer = layerId(id);
329  if (!m_nswLayers[signed_layer]) {
330  m_nswLayers[signed_layer] = std::make_unique<TGraph>();
331  }
332  if (!m_nswActiveAreas[signed_layer]) {
333  m_nswActiveAreas[signed_layer] = std::make_unique<TH2D>(
334  std::to_string(m_nswActiveAreas.size()).c_str(),
335  "ActiveNSW;x [mm]; y [mm]", 1000, -5001, 5001., 1000,
336  -5001., 5001.);
337  }
338  }
339  }
340  }
341  }
342  }
343  return StatusCode::SUCCESS;
344 }
346  int eta = m_idHelperSvc->stationEta(id);
347  if (m_idHelperSvc->issTgc(id)) {
348  const sTgcIdHelper& id_helper = m_idHelperSvc->stgcIdHelper();
349  int ml = id_helper.multilayer(id);
350  int lay = id_helper.gasGap(id);
351  int type = id_helper.channelType(id);
352  return (8 * (type == sTgcIdHelper::sTgcChannelTypes::Strip) + 4 * (ml - 1) +
353  (lay - 1)) *
354  (eta > 0 ? 1 : -1);
355  }
356  if (m_idHelperSvc->isMM(id)) {
357  const MmIdHelper& id_helper = m_idHelperSvc->mmIdHelper();
358  int ml = id_helper.multilayer(id);
359  int lay = id_helper.gasGap(id);
360  return (16 + 4 * (ml - 1) + (lay - 1)) * (eta > 0 ? 1 : -1);
361  }
362  return -666;
363 }
365  const MuonGM::MuonDetectorManager* detMgr{nullptr};
366  ATH_CHECK(detStore()->retrieve(detMgr));
367  const sTgcIdHelper& id_helper = m_idHelperSvc->stgcIdHelper();
368  for (const std::string station : {"STS", "STL"}) {
369  for (int eta = id_helper.stationEtaMin(); eta <= id_helper.stationEtaMax();
370  ++eta) {
371  if (eta == 0)
372  continue;
373  for (int phi = id_helper.stationPhiMin();
374  phi <= id_helper.stationPhiMax(); ++phi) {
375  for (int ml = id_helper.multilayerMin();
376  ml <= id_helper.multilayerMax(); ++ml) {
377  bool is_valid{false};
378  Identifier station_id =
379  id_helper.elementID(station, eta, phi, is_valid);
380  if (!is_valid)
381  continue;
382  const Identifier module_id = id_helper.multilayerID(station_id, ml);
383  if (!detMgr->getsTgcReadoutElement(module_id))
384  continue;
385  for (int lay = 1; lay <= 4; ++lay) {
386  const Identifier strip_id = id_helper.channelID(
387  module_id, ml, lay, sTgcIdHelper::sTgcChannelTypes::Strip, 10);
388  const Identifier wire_id = id_helper.channelID(
389  module_id, ml, lay, sTgcIdHelper::sTgcChannelTypes::Wire, 10);
390  for (const Identifier& id : {strip_id, wire_id}) {
391  m_nswPads[id] = std::make_unique<TGraph>();
392  int signed_layer = layerId(id);
393  if (!m_nswLayers[signed_layer]) {
394  m_nswLayers[signed_layer] = std::make_unique<TGraph>();
395  }
396  if (!m_nswActiveAreas[signed_layer]) {
397  m_nswActiveAreas[signed_layer] = std::make_unique<TH2D>(
398  std::to_string(m_nswActiveAreas.size()).c_str(),
399  "ActiveNSW;x [mm]; y [mm]", 1000, -5001, 5001., 1000,
400  -5001., 5001.);
401  }
402  }
403  }
404  }
405  }
406  }
407  }
408  return StatusCode::SUCCESS;
409 }
410 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MuonGM::NSWGeoPlottingAlg::m_outFile
Gaudi::Property< std::string > m_outFile
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:38
MuonGM::NSWGeoPlottingAlg::initMicroMega
StatusCode initMicroMega()
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:303
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
sTgcIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1017
MmIdHelper::stationPhiMin
static int stationPhiMin()
Definition: MmIdHelper.cxx:807
MuonGM::NSWGeoPlottingAlg::finalize
StatusCode finalize() override
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:32
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
MuonGM::MuonChannelDesign::xSize
double xSize() const
Definition: MuonChannelDesign.h:473
MuonGM::MMReadoutElement::insideActiveBounds
bool insideActiveBounds(const Identifier &id, const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const
boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width
Definition: MMReadoutElement.h:252
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MmIdHelper::stationPhiMax
static int stationPhiMax()
Definition: MmIdHelper.cxx:809
MuonGM::sTgcReadoutElement::numberOfStrips
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:408
Surface.h
sTgcReadoutElement.h
sTgcIdHelper::stationPhiMin
static int stationPhiMin()
Definition: sTgcIdHelper.cxx:1034
MuonGM::MuonChannelDesign::channelNumber
int channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers. Returns -1 if out of range
Definition: MuonChannelDesign.h:198
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
sTgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
Definition: sTgcIdHelper.cxx:886
hist_file_dump.d
d
Definition: hist_file_dump.py:142
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonGM::MMReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MMReadoutElement.h:190
MuonGM::sTgcReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:279
sTgcIdHelper::multilayerMin
static int multilayerMin()
Definition: sTgcIdHelper.cxx:1038
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
AthHistogramming::graph
TGraph * graph(const std::string &graphName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered TGraphs.
Definition: AthHistogramming.cxx:492
x
#define x
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
MuonGM::MuonChannelDesign::hasStereoAngle
double hasStereoAngle() const
returns whether the stereo angle is non-zero
Definition: MuonChannelDesign.h:78
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
ReadCondHandle.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
MmIdHelper::multilayer
int multilayer(const Identifier &id) const
Definition: MmIdHelper.cxx:796
Trk::PlaneSurface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside() method of the Bounds.
MuonGM::MuonChannelDesign::minYSize
double minYSize() const
Definition: MuonChannelDesign.h:475
MmIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: MmIdHelper.cxx:277
MMReadoutElement.h
sTgcIdHelper::stationEtaMin
static int stationEtaMin()
Definition: sTgcIdHelper.cxx:1030
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonGM::NSWGeoPlottingAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:32
sTgcIdHelper::stationPhiMax
static int stationPhiMax()
Definition: sTgcIdHelper.cxx:1036
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
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
NSWGeoPlottingAlg.h
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
sTgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: sTgcIdHelper.cxx:1020
MmIdHelper::multilayerMax
static int multilayerMax()
Definition: MmIdHelper.cxx:813
Trk::TrkDetElementBase::surface
virtual const Surface & surface() const =0
Return surface associated with this detector element.
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonGM::NSWGeoPlottingAlg::m_alg_run
bool m_alg_run
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:45
MuonGM::NSWGeoPlottingAlg::execute
StatusCode execute() override
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:85
sTgcIdHelper::stationEtaMax
static int stationEtaMax()
Definition: sTgcIdHelper.cxx:1032
MuonEfficiencyCorrectionsCfg.out_file
out_file
Definition: MuonEfficiencyCorrectionsCfg.py:69
MuonGM::NSWGeoPlottingAlg::m_nswPads
std::map< Identifier, std::unique_ptr< TGraph > > m_nswPads
Map containing each PCB of the NSW seperately.
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:40
beamspotman.dir
string dir
Definition: beamspotman.py:621
MuonIdHelper::stationNameString
const std::string & stationNameString(const int &index) const
Definition: MuonIdHelper.cxx:858
MuonGM::MuonChannelDesign::center
bool center(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the center on the strip.
Definition: MuonChannelDesign.h:479
MmIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: MmIdHelper.cxx:706
sTgcIdHelper::multilayerMax
static int multilayerMax()
Definition: sTgcIdHelper.cxx:1040
MuonGM::MMReadoutElement::numberOfStrips
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer
Definition: MMReadoutElement.h:286
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
MuonGM::NSWGeoPlottingAlg::m_nswActiveAreas
std::map< int, std::unique_ptr< TH1 > > m_nswActiveAreas
Map showing the active areas of the NSW to show the passivation.
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:44
sTgcIdHelper
Definition: sTgcIdHelper.h:55
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonDetectorManager.h
python.PyAthena.v
v
Definition: PyAthena.py:154
sTgcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: sTgcIdHelper.cxx:856
MuonGM::MuonChannelDesign::rightEdge
bool rightEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the right edge of the strip.
Definition: MuonChannelDesign.h:493
MuonGM::MuonChannelDesign
Definition: MuonChannelDesign.h:24
MmIdHelper::channel
int channel(const Identifier &id) const override
Definition: MmIdHelper.cxx:800
y
#define y
MmIdHelper
Definition: MmIdHelper.h:54
MmIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: MmIdHelper.cxx:798
Trk::Surface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
MuonGM::MuonChannelDesign::maxYSize
double maxYSize() const
Definition: MuonChannelDesign.h:474
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:51
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
sTgcIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: sTgcIdHelper.cxx:297
MuonGM::MuonChannelDesign::numberOfMissingBottomStrips
int numberOfMissingBottomStrips() const
Returns the number of missing bottom strips.
Definition: MuonChannelDesign.h:472
MuonGM::NSWGeoPlottingAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:36
MuonGM::NSWGeoPlottingAlg::m_nswLayers
std::map< int, std::unique_ptr< TGraph > > m_nswLayers
Map showing the edges of the 16 layers of the NSW.
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.h:42
RotatedTrapezoidBounds.h
MuonGM::NSWGeoPlottingAlg::layerId
int layerId(const Identifier &id) const
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:345
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
sTgcIdHelper::channelType
int channelType(const Identifier &id) const
Definition: sTgcIdHelper.cxx:1022
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
MmIdHelper::multilayerMin
static int multilayerMin()
Definition: MmIdHelper.cxx:811
MuonGM::NSWGeoPlottingAlg::initSTgcs
StatusCode initSTgcs()
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:364
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:121
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGM::MuonChannelDesign::leftEdge
bool leftEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the left edge of the strip.
Definition: MuonChannelDesign.h:486
MuonGM::NSWGeoPlottingAlg::initialize
StatusCode initialize() override
Definition: MuonDetDescr/MuonGeoModelTest/src/NSWGeoPlottingAlg.cxx:78
Identifier
Definition: IdentifierFieldParser.cxx:14