ATLAS Offline Software
SpacePointMakerAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #include "SpacePointMakerAlg.h"
5 
6 #include "StoreGate/ReadHandle.h"
9 #include <thread>
10 
11 namespace {
12  inline std::vector<std::shared_ptr<unsigned>> matchCountVec(unsigned int n) {
13  std::vector<std::shared_ptr<unsigned>> out{};
14  out.reserve(n);
15  for (unsigned int p = 0; p < n ;++p) {
16  out.emplace_back(std::make_shared<unsigned>(0));
17  }
18  return out;
19  }
20 }
21 
22 namespace MuonR4 {
24  if (techIdx != other.techIdx) {
25  return static_cast<int>(techIdx) < static_cast<int>(other.techIdx);
26  }
27  if (stIdx != other.stIdx) {
28  return static_cast<int>(stIdx) < static_cast<int>(other.stIdx);
29  }
30  return eta < other.eta;
31 }
33  return measEta + measPhi + measEtaPhi;
34 }
36  m_idHelperSvc{idHelperSvc}{}
37 
38 void SpacePointMakerAlg::SpacePointStatistics::addToStat(const std::vector<SpacePoint>& spacePoints){
39  std::lock_guard guard{m_mutex};
40  for (const SpacePoint& sp : spacePoints){
41  FieldKey key{};
42  key.stIdx = m_idHelperSvc->stationIndex(sp.identify());
43  key.techIdx = m_idHelperSvc->technologyIndex(sp.identify());
44  key.eta = m_idHelperSvc->stationEta(sp.identify());
45  StatField & stats = m_map[key];
46  if (sp.measuresEta() && sp.measuresPhi()) {
47  ++stats.measEtaPhi;
48  } else {
49  stats.measEta += sp.measuresEta();
50  stats.measPhi += sp.measuresPhi();
51  }
52  }
53 }
55  using KeyVal = std::pair<FieldKey, StatField>;
56  std::vector<KeyVal> sortedstats{};
57  sortedstats.reserve(m_map.size());
59  for (const auto & [key, stats] : m_map){
60  sortedstats.emplace_back(std::make_pair(key, stats));
61  }
62  std::stable_sort(sortedstats.begin(), sortedstats.end(), [](const KeyVal& a, const KeyVal&b) {
63  return a.second.allHits() > b.second.allHits();
64  });
65  msg<<MSG::ALWAYS<<"###########################################################################"<<endmsg;
66  for (const auto & [key, stats] : sortedstats) {
69  <<" "<<std::abs(key.eta)<<(key.eta < 0 ? "A" : "C")
70  <<" "<<std::setw(8)<<stats.measEtaPhi
71  <<" "<<std::setw(8)<<stats.measEta
72  <<" "<<std::setw(8)<<stats.measPhi<<endmsg;
73  }
74  msg<<MSG::ALWAYS<<"###########################################################################"<<endmsg;
75 
76 }
77 
78 
79 SpacePointMakerAlg::SpacePointMakerAlg(const std::string& name, ISvcLocator* pSvcLocator):
80  AthReentrantAlgorithm{name, pSvcLocator}{}
81 
82 
84  if (m_statCounter) {
85  m_statCounter->dumpStatisics(msgStream());
86  }
87  return StatusCode::SUCCESS;
88 }
91  ATH_CHECK(m_mdtKey.initialize(!m_mdtKey.empty()));
92  ATH_CHECK(m_rpcKey.initialize(!m_rpcKey.empty()));
93  ATH_CHECK(m_tgcKey.initialize(!m_tgcKey.empty()));
94  ATH_CHECK(m_mmKey.initialize(!m_mmKey.empty()));
95  ATH_CHECK(m_stgcKey.initialize(!m_stgcKey.empty()));
96  ATH_CHECK(m_idHelperSvc.retrieve());
98  if (m_doStat) m_statCounter = std::make_unique<SpacePointStatistics>(m_idHelperSvc.get());
99  return StatusCode::SUCCESS;
100 }
101 
102 template <>
103  bool SpacePointMakerAlg::passOccupancy2D(const std::vector<const xAOD::TgcStrip*>& etaHits,
104  const std::vector<const xAOD::TgcStrip*>& phiHits) const {
105  if (etaHits.empty() || phiHits.empty()) {
106  return false;
107  }
108  const MuonGMR4::TgcReadoutElement* re = etaHits[0]->readoutElement();
109  ATH_MSG_VERBOSE("Collected "<<etaHits.size()<<"/"<<phiHits.size()<<" hits in "<<m_idHelperSvc->toStringGasGap(etaHits[0]->identify()));
110  return ((1.*etaHits.size()) / ((1.*re->numChannels(etaHits[0]->measurementHash())))) < m_maxOccTgcEta &&
111  ((1.*phiHits.size()) / ((1.*re->numChannels(phiHits[0]->measurementHash())))) < m_maxOccTgcPhi;
112  }
113 template <>
114  bool SpacePointMakerAlg::passOccupancy2D(const std::vector<const xAOD::RpcMeasurement*>& etaHits,
115  const std::vector<const xAOD::RpcMeasurement*>& phiHits) const {
116  if (etaHits.empty() || phiHits.empty()) {
117  return false;
118  }
119  const MuonGMR4::RpcReadoutElement* re = etaHits[0]->readoutElement();
120  ATH_MSG_VERBOSE("Collected "<<etaHits.size()<<"/"<<phiHits.size()<<" hits in "<<m_idHelperSvc->toStringGasGap(etaHits[0]->identify()));
121  return ((1.*etaHits.size()) / (1.*re->nEtaStrips())) < m_maxOccRpcEta &&
122  ((1.*phiHits.size()) / (1.*re->nPhiStrips())) < m_maxOccRpcPhi;
123  }
124 
125 template <>
126  bool SpacePointMakerAlg::passOccupancy2D(const std::vector<const xAOD::sTgcMeasurement*>& etaHits,
127  const std::vector<const xAOD::sTgcMeasurement*>& phiHits) const {
128  if (etaHits.empty() || phiHits.empty()) {
129  return false;
130  }
131  const MuonGMR4::sTgcReadoutElement* re = etaHits[0]->readoutElement();
132  return ((1.*etaHits.size()) / (1.*re->numStrips(etaHits[0]->gasGap()))) < m_maxOccStgcEta &&
133  ((1.*phiHits.size()) / (1.*re->numWireGroups(phiHits[0]->gasGap()))) < m_maxOccStgcPhi;
134  }
135 
136 template <class ContType>
140  if (key.empty()) {
141  ATH_MSG_DEBUG("Key "<<typeid(ContType).name()<<" not set. Do not fill anything");
142  return StatusCode::SUCCESS;
143  }
144  SG::ReadHandle readHandle{key, ctx};
145  ATH_CHECK(readHandle.isPresent());
146  if (readHandle->empty()){
147  ATH_MSG_DEBUG("nothing to do");
148  return StatusCode::SUCCESS;
149  }
150  SG::ReadHandle gctx{m_geoCtxKey, ctx};
151  ATH_CHECK(gctx.isPresent());
152 
153  using PrdType = typename ContType::const_value_type;
154  using PrdVec = std::vector<PrdType>;
155  xAOD::ChamberViewer viewer{*readHandle};
156  do {
157 
158  SpacePointsPerChamber& pointsInChamb = fillContainer[viewer.at(0)->readoutElement()->msSector()];
159  ATH_MSG_DEBUG("Fill space points for chamber "<<m_idHelperSvc->toStringDetEl(viewer.at(0)->identify()));
160  if constexpr( std::is_same_v<ContType, xAOD::MdtDriftCircleContainer> ||
161  std::is_same_v<ContType, xAOD::MMClusterContainer>) {
162 
163  pointsInChamb.etaHits.reserve(pointsInChamb.etaHits.capacity() + viewer.size());
164  for (const PrdType prd: viewer) {
165  ATH_MSG_VERBOSE("Create space point from "<<m_idHelperSvc->toString(prd->identify())
166  <<", hash: "<<prd->identifierHash());
167  pointsInChamb.etaHits.emplace_back(*gctx, prd, nullptr);
168  }
169  } else {
171  using EtaPhiHits = std::array<PrdVec, 2>;
172  std::vector<EtaPhiHits> hitsPerGasGap{};
173  for (const PrdType prd : viewer) {
174  ATH_MSG_VERBOSE("Create space point from "<<m_idHelperSvc->toString(prd->identify())<<", hash: "<<prd->identifierHash());
175 
176  unsigned int gapIdx = prd->gasGap() -1;
177  if constexpr (std::is_same_v<ContType, xAOD::RpcMeasurementContainer>) {
178  gapIdx = prd->readoutElement()->createHash(0, prd->gasGap(), prd->doubletPhi(), false);
179  }
180 
181  bool measPhi{false};
182  if constexpr(std::is_same_v<ContType, xAOD::sTgcMeasContainer>) {
184  if (prd->channelType() == sTgcIdHelper::sTgcChannelTypes::Pad) {
185  pointsInChamb.etaHits.emplace_back(*gctx, prd, nullptr);
186  continue;
187  }
189  measPhi = prd->channelType() == sTgcIdHelper::sTgcChannelTypes::Wire;
190  } else {
192  measPhi = prd->measuresPhi();
193  }
194 
195  if (hitsPerGasGap.size() <= gapIdx) {
196  hitsPerGasGap.resize(gapIdx + 1);
197  }
199  PrdVec& toPush = hitsPerGasGap[gapIdx][measPhi];
200  if (toPush.capacity() == toPush.size()) {
201  toPush.reserve(toPush.size() + m_capacityBucket);
202  }
203  toPush.push_back(prd);
204  }
206  for (auto& [etaHits, phiHits] : hitsPerGasGap) {
207  if (!passOccupancy2D(etaHits, phiHits)) {
208  ATH_MSG_VERBOSE("Occupancy cut not passed "<<etaHits.size()<<", "<<phiHits.size());
209  pointsInChamb.etaHits.reserve(pointsInChamb.etaHits.size() + etaHits.size());
210  pointsInChamb.phiHits.reserve(pointsInChamb.phiHits.size() + phiHits.size());
211  for (const PrdType etaPrd : etaHits) {
212  pointsInChamb.etaHits.emplace_back(*gctx, etaPrd);
213  ATH_MSG_VERBOSE("Add new eta hit "<<m_idHelperSvc->toString(pointsInChamb.etaHits.back().identify())
214  <<" "<<Amg::toString(pointsInChamb.etaHits.back().positionInChamber()));
215 
216  }
217  for (const PrdType phiPrd : phiHits) {
218  pointsInChamb.phiHits.emplace_back(*gctx, phiPrd);
219  ATH_MSG_VERBOSE("Add new phi hit "<<m_idHelperSvc->toString(pointsInChamb.phiHits.back().identify())
220  <<" "<<Amg::toString(pointsInChamb.phiHits.back().positionInChamber()));
221  }
222  continue;
223  }
224  std::vector<std::shared_ptr<unsigned>> etaCounts{matchCountVec(etaHits.size())},
225  phiCounts{matchCountVec(phiHits.size())};
226  pointsInChamb.etaHits.reserve(etaHits.size()*phiHits.size());
228  for (unsigned int etaP = 0; etaP < etaHits.size(); ++etaP) {
230  for (unsigned int phiP = 0; phiP < phiHits.size(); ++ phiP) {
233  if (!(etaHits[etaP]->bcBitMap() & phiHits[phiP]->bcBitMap())){
234  continue;
235  }
236  }
237  SpacePoint& spacePoint{pointsInChamb.etaHits.emplace_back(*gctx, etaHits[etaP], phiHits[phiP])};
238  ATH_MSG_VERBOSE("Create new spacepoint from "<<m_idHelperSvc->toString(etaHits[etaP]->identify())
239  <<" & "<<m_idHelperSvc->toString(phiHits[phiP]->identify())<<" at "<<Amg::toString(spacePoint.positionInChamber()));
240  spacePoint.setInstanceCounts(etaCounts[etaP], phiCounts[phiP]);
241  }
242  if (!(*etaCounts[etaP])) {
243  pointsInChamb.etaHits.emplace_back(*gctx, etaHits[etaP]);
244  continue;
245  }
246  }
249  for (unsigned int phiP = 0; phiP < phiHits.size(); ++ phiP){
250  if (!(*phiCounts[phiP])) {
251  pointsInChamb.phiHits.emplace_back(*gctx, phiHits[phiP]);
252  }
253  }
254  }
255  }
256  } while (viewer.next());
257  return StatusCode::SUCCESS;
258 }
259 
260 
261 StatusCode SpacePointMakerAlg::execute(const EventContext& ctx) const {
262  PreSortedSpacePointMap preSortedContainer{};
263  ATH_CHECK(loadContainerAndSort(ctx, m_mdtKey, preSortedContainer));
264  ATH_CHECK(loadContainerAndSort(ctx, m_rpcKey, preSortedContainer));
265  ATH_CHECK(loadContainerAndSort(ctx, m_tgcKey, preSortedContainer));
266  ATH_CHECK(loadContainerAndSort(ctx, m_mmKey, preSortedContainer));
267  ATH_CHECK(loadContainerAndSort(ctx, m_stgcKey, preSortedContainer));
268  std::unique_ptr<SpacePointContainer> outContainer = std::make_unique<SpacePointContainer>();
269 
270  for (auto &[chamber, hitsPerChamber] : preSortedContainer){
271  ATH_MSG_VERBOSE("Fill space points for chamber "<<chamber);
272  distributePointsAndStore(ctx, std::move(hitsPerChamber), *outContainer);
273  }
275  ATH_CHECK(writeHandle.record(std::move(outContainer)));
276  return StatusCode::SUCCESS;
277 }
278 
279 void SpacePointMakerAlg::distributePointsAndStore(const EventContext& ctx,
280  SpacePointsPerChamber&& hitsPerChamber,
281  SpacePointContainer& finalContainer) const {
282  SpacePointBucketVec splittedHits{};
283  splittedHits.emplace_back();
284  if (m_statCounter){
285  m_statCounter->addToStat(hitsPerChamber.etaHits);
286  m_statCounter->addToStat(hitsPerChamber.phiHits);
287 
288  }
289  distributePointsAndStore(ctx, std::move(hitsPerChamber.etaHits), splittedHits);
290  distributePointsAndStore(ctx, std::move(hitsPerChamber.phiHits), splittedHits);
291 
292  for (SpacePointBucket& bucket : splittedHits) {
293  if (bucket.size() > 1)
294  finalContainer.push_back(std::make_unique<SpacePointBucket>(std::move(bucket)));
295  }
296 
297 }
298 void SpacePointMakerAlg::distributePointsAndStore(const EventContext& ctx,
299  std::vector<SpacePoint>&& spacePoints,
300  SpacePointBucketVec& splittedHits) const {
301 
302  if (spacePoints.empty()) return;
303 
304  const bool defineBuckets = splittedHits[0].empty();
305  const bool hasEtaMeas{spacePoints[0].measuresEta()};
306 
307  auto pointPos = [hasEtaMeas, defineBuckets] (const SpacePoint& p) {
308  return hasEtaMeas || !defineBuckets ? p.positionInChamber().y() : p.positionInChamber().x();
309  };
311 
312  auto channelDir = [hasEtaMeas, defineBuckets, &gctx](const SpacePoint & p) {
313  const Amg::Vector3D d = xAOD::channelDirInChamber(*gctx, p.primaryMeasurement());
314  return std::abs(hasEtaMeas || !defineBuckets ? d.y() : d.z());
315  };
316 
317  std::sort(spacePoints.begin(), spacePoints.end(),
318  [&pointPos] (const SpacePoint& a, const SpacePoint& b) {
319  return pointPos(a) < pointPos(b);
320  });
321 
322 
323  double lastPoint = pointPos(spacePoints[0]);
324 
325  auto newBucket = [this, &lastPoint, &splittedHits, &pointPos, &channelDir] (const double currPos) {
326  splittedHits.emplace_back();
327  splittedHits.back().setBucketId(splittedHits.size() -1);
328  SpacePointBucket& overlap{splittedHits[splittedHits.size() - 2]};
329  SpacePointBucket& newContainer{splittedHits[splittedHits.size() - 1]};
330 
331  for (const std::shared_ptr<SpacePoint>& pointInBucket : overlap) {
332  const double overlapPos = pointPos(*pointInBucket) + pointInBucket->uncertainty()[1] * channelDir(*pointInBucket);
333  if (std::abs(overlapPos - currPos) < m_spacePointOverlap) {
334  newContainer.push_back(pointInBucket);
335  }
336  }
337  lastPoint = newContainer.empty() ? currPos : pointPos(**newContainer.begin());
338  overlap.setCoveredRange(pointPos(**overlap.begin()), pointPos(**overlap.rbegin()));
339  overlap.populateChamberLocations();
340  };
341 
342  for (SpacePoint& toSort : spacePoints) {
343  const double currPoint = pointPos(toSort);
345  if (!defineBuckets) {
346  std::shared_ptr<SpacePoint> madePoint = std::make_shared<SpacePoint>(std::move(toSort));
347  for (SpacePointBucket& bucket : splittedHits) {
348  const double measDir = channelDir(toSort);
349  const double posMin = currPoint - toSort.uncertainty()[1] * measDir;
350  const double posMax = currPoint + toSort.uncertainty()[1] * measDir;
351 
352  if (posMax >= bucket.coveredMin() && bucket.coveredMax() >= posMin) {
353  bucket.push_back(madePoint);
354  }
355  }
356  continue;
357  }
359  if (currPoint - lastPoint > m_maxBucketLength || (!splittedHits.empty() && !splittedHits.back().empty() && currPoint - pointPos(*splittedHits.back().back()) > m_spacePointWindow )) {
360  newBucket(currPoint);
361  }
362  std::shared_ptr<SpacePoint> spacePoint = std::make_shared<SpacePoint>(std::move(toSort));
363  splittedHits.back().emplace_back(spacePoint);
364  if (splittedHits.size() > 1) {
365  SpacePointBucket& overlap{splittedHits[splittedHits.size() - 2]};
366  const double overlapPos = currPoint - spacePoint->uncertainty()[1] * channelDir(*spacePoint);
367  if (overlapPos - overlap.coveredMax() < m_spacePointOverlap) {
368  overlap.push_back(spacePoint);
369  }
370  }
371  }
372  if (defineBuckets){
373  SpacePointBucket& lastBucket{splittedHits[splittedHits.size() - 1]};
374  newBucket(pointPos(*lastBucket.back()));
376  splittedHits.pop_back();
377  }
378 
379 }
380 
381 }
MuonR4::SpacePointMakerAlg::PreSortedSpacePointMap
std::unordered_map< const MuonGMR4::SpectrometerSector *, SpacePointsPerChamber > PreSortedSpacePointMap
Container abrivation of the presorted space point container per MuonChambers.
Definition: SpacePointMakerAlg.h:93
MuonR4::SpacePointMakerAlg::SpacePointStatistics::FieldKey::operator<
bool operator<(const FieldKey &other) const
Definition: SpacePointMakerAlg.cxx:23
MuonR4::SpacePointMakerAlg::m_stgcKey
SG::ReadHandleKey< xAOD::sTgcMeasContainer > m_stgcKey
Definition: SpacePointMakerAlg.h:155
MuonR4::SpacePointMakerAlg::SpacePointStatistics::addToStat
void addToStat(const std::vector< SpacePoint > &spacePoints)
Adds the vector of space points to the overall statistics.
Definition: SpacePointMakerAlg.cxx:38
MuonR4::SpacePointBucket
: The muon space point bucket represents a collection of points that will bre processed together in t...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:21
calibdata.chamber
chamber
Definition: calibdata.py:32
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
hist_file_dump.d
d
Definition: hist_file_dump.py:137
MuonR4::SpacePointMakerAlg::initialize
StatusCode initialize() override
Definition: SpacePointMakerAlg.cxx:89
MuonR4::SpacePointMakerAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: SpacePointMakerAlg.cxx:261
MuonR4::SpacePointMakerAlg::m_maxOccStgcPhi
Gaudi::Property< double > m_maxOccStgcPhi
Definition: SpacePointMakerAlg.h:192
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
MuonR4::SpacePointMakerAlg::SpacePointStatistics::m_idHelperSvc
const Muon::IMuonIdHelperSvc * m_idHelperSvc
Definition: SpacePointMakerAlg.h:78
MuonR4::SpacePointMakerAlg::SpacePointsPerChamber::etaHits
std::vector< SpacePoint > etaHits
Vector of all hits that contain an eta measurement including the ones which are combined with phi mea...
Definition: SpacePointMakerAlg.h:88
athena.value
value
Definition: athena.py:124
MuonR4::SpacePointMakerAlg::m_rpcKey
SG::ReadHandleKey< xAOD::RpcMeasurementContainer > m_rpcKey
Definition: SpacePointMakerAlg.h:146
MuonR4::SpacePointMakerAlg::SpacePointStatistics::StatField::allHits
unsigned int allHits() const
Helper method returning the sum of the three space point type counts.
Definition: SpacePointMakerAlg.cxx:32
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
trigbs_dumpHLTContentInBS.stats
stats
Definition: trigbs_dumpHLTContentInBS.py:91
xAOD::channelDirInChamber
Amg::Vector3D channelDirInChamber(const ActsGeometryContext &gctx, const UncalibratedMeasurement *meas)
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:118
MuonGMR4::RpcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/RpcReadoutElement.h:17
MuonR4::SpacePointMakerAlg::m_mmKey
SG::ReadHandleKey< xAOD::MMClusterContainer > m_mmKey
Definition: SpacePointMakerAlg.h:152
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonR4::SpacePointMakerAlg::distributePointsAndStore
void distributePointsAndStore(const EventContext &ctx, SpacePointsPerChamber &&hitsPerChamber, SpacePointContainer &finalContainer) const
Distribute the premade spacepoints per chamber into their individual SpacePoint buckets.
Definition: SpacePointMakerAlg.cxx:279
xAOD::ChamberViewer
Definition: ChamberViewer.h:65
WriteHandle.h
Handle class for recording to StoreGate.
MuonR4::SpacePointMakerAlg::SpacePointBucketVec
std::vector< SpacePointBucket > SpacePointBucketVec
Abrivation of a MuonSapcePoint bucket vector.
Definition: SpacePointMakerAlg.h:111
MuonR4::SpacePointMakerAlg::SpacePointsPerChamber
: Helper struct to collect the space point per muon chamber, which are later sorted into the space po...
Definition: SpacePointMakerAlg.h:85
MuonR4::SpacePointMakerAlg::m_tgcKey
SG::ReadHandleKey< xAOD::TgcStripContainer > m_tgcKey
Definition: SpacePointMakerAlg.h:149
MuonR4::SpacePointMakerAlg::m_writeKey
SG::WriteHandleKey< SpacePointContainer > m_writeKey
Definition: SpacePointMakerAlg.h:162
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonR4::SpacePointMakerAlg::m_maxOccStgcEta
Gaudi::Property< double > m_maxOccStgcEta
Definition: SpacePointMakerAlg.h:190
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
TrigConf::MSGTC::ALWAYS
@ ALWAYS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:29
beamspotman.n
n
Definition: beamspotman.py:731
MuonR4::SpacePointMakerAlg::SpacePointStatistics::StatField
Helper struct to count the space-points in each detector category.
Definition: SpacePointMakerAlg.h:57
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonR4::SpacePointMakerAlg::SpacePointsPerChamber::phiHits
std::vector< SpacePoint > phiHits
Vector of all space points that are built from single phi hits.
Definition: SpacePointMakerAlg.h:90
MuonR4::SpacePointMakerAlg::m_maxOccTgcEta
Gaudi::Property< double > m_maxOccTgcEta
Definition: SpacePointMakerAlg.h:185
MuonR4::SpacePointMakerAlg::SpacePointStatistics::dumpStatisics
void dumpStatisics(MsgStream &msg) const
Print the statistics table of the built space points per category into the log-file / console.
Definition: SpacePointMakerAlg.cxx:54
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MuonR4::SpacePointMakerAlg::m_maxOccTgcPhi
Gaudi::Property< double > m_maxOccTgcPhi
Definition: SpacePointMakerAlg.h:187
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:18
MuonR4::SpacePointMakerAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: SpacePointMakerAlg.h:160
NSWL1::PadTriggerAdapter::fillContainer
StatusCode fillContainer(const std::unique_ptr< Muon::NSW_PadTriggerDataContainer > &out, const std::vector< std::unique_ptr< NSWL1::PadTrigger >> &triggers, const uint32_t l1id)
Definition: PadTriggerAdapter.cxx:17
MuonR4::SpacePointMakerAlg::SpacePointStatistics::FieldKey::techIdx
TechIdx_t techIdx
Definition: SpacePointMakerAlg.h:73
MuonR4::SpacePointMakerAlg::SpacePointStatistics::FieldKey::stIdx
StIdx_t stIdx
Definition: SpacePointMakerAlg.h:72
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonR4::SpacePointMakerAlg::loadContainerAndSort
StatusCode loadContainerAndSort(const EventContext &ctx, const SG::ReadHandleKey< ContType > &key, PreSortedSpacePointMap &fillContainer) const
Retrieve an uncalibrated measurement container <ContType> and fill the hits into the presorted space ...
Definition: SpacePointMakerAlg.cxx:137
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ChamberViewer.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGMR4::sTgcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h:20
MuonR4::SpacePointMakerAlg::m_mdtKey
SG::ReadHandleKey< xAOD::MdtDriftCircleContainer > m_mdtKey
Definition: SpacePointMakerAlg.h:143
MuonR4
This header ties the generic definitions in this package.
Definition: HoughEventData.h:16
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonR4::SpacePointMakerAlg::passOccupancy2D
bool passOccupancy2D(const std::vector< const PrdType * > &etaHits, const std::vector< const PrdType * > &phiHits) const
: Check whether the occupancy cuts of hits in a gasGap are surpassed.
MuonR4::SpacePointMakerAlg::m_maxBucketLength
Gaudi::Property< double > m_maxBucketLength
Definition: SpacePointMakerAlg.h:167
MuonR4::SpacePointMakerAlg::m_spacePointWindow
Gaudi::Property< double > m_spacePointWindow
Definition: SpacePointMakerAlg.h:164
MuonR4::SpacePointMakerAlg::SpacePointStatistics::SpacePointStatistics
SpacePointStatistics(const Muon::IMuonIdHelperSvc *idHelperSvc)
Standard constructor.
Definition: SpacePointMakerAlg.cxx:35
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
re
const boost::regex re(r_e)
MuonR4::SpacePointMakerAlg::finalize
StatusCode finalize() override
Definition: SpacePointMakerAlg.cxx:83
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
Muon::MuonStationIndex::stName
static const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:141
MuonR4::SpacePointMakerAlg::m_doStat
Gaudi::Property< bool > m_doStat
Definition: SpacePointMakerAlg.h:174
MuonR4::SpacePointMakerAlg::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: SpacePointMakerAlg.h:158
MuonR4::SpacePointMakerAlg::m_maxOccRpcEta
Gaudi::Property< double > m_maxOccRpcEta
Definition: SpacePointMakerAlg.h:180
ReadHandle.h
Handle class for reading from StoreGate.
SpacePointMakerAlg.h
MuonR4::SpacePointMakerAlg::SpacePointStatistics::FieldKey::eta
int eta
Definition: SpacePointMakerAlg.h:74
MuonR4::SpacePointMakerAlg::SpacePointMakerAlg
SpacePointMakerAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SpacePointMakerAlg.cxx:79
MuonR4::SpacePointMakerAlg::m_capacityBucket
Gaudi::Property< unsigned int > m_capacityBucket
Definition: SpacePointMakerAlg.h:177
MuonGMR4::TgcReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/TgcReadoutElement.h:19
MuonR4::SpacePointMakerAlg::SpacePointStatistics::FieldKey
Helper struct to define the counting categories.
Definition: SpacePointMakerAlg.h:69
MuonR4::SpacePointMakerAlg::m_spacePointOverlap
Gaudi::Property< double > m_spacePointOverlap
Definition: SpacePointMakerAlg.h:170
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonR4::SpacePointMakerAlg::m_maxOccRpcPhi
Gaudi::Property< double > m_maxOccRpcPhi
Definition: SpacePointMakerAlg.h:182
Muon::MuonStationIndex::technologyName
static const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:209