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  return ((1.*etaHits.size()) / ((1.*re->numChannels(etaHits[0]->measurementHash())))) < m_maxOccTgcEta &&
110  ((1.*phiHits.size()) / ((1.*re->numChannels(phiHits[0]->measurementHash())))) < m_maxOccTgcPhi;
111  }
112 template <>
113  bool SpacePointMakerAlg::passOccupancy2D(const std::vector<const xAOD::RpcMeasurement*>& etaHits,
114  const std::vector<const xAOD::RpcMeasurement*>& phiHits) const {
115  if (etaHits.empty() || phiHits.empty()) {
116  return false;
117  }
118  const MuonGMR4::RpcReadoutElement* re = etaHits[0]->readoutElement();
119  return ((1.*etaHits.size()) / (1.*re->nEtaStrips())) < m_maxOccRpcEta &&
120  ((1.*phiHits.size()) / (1.*re->nPhiStrips())) < m_maxOccRpcPhi;
121  }
122 
123 template <>
124  bool SpacePointMakerAlg::passOccupancy2D(const std::vector<const xAOD::sTgcMeasurement*>& etaHits,
125  const std::vector<const xAOD::sTgcMeasurement*>& phiHits) const {
126  if (etaHits.empty() || phiHits.empty()) {
127  return false;
128  }
129  const MuonGMR4::sTgcReadoutElement* re = etaHits[0]->readoutElement();
130  return ((1.*etaHits.size()) / (1.*re->numStrips(etaHits[0]->gasGap()))) < m_maxOccStgcEta &&
131  ((1.*phiHits.size()) / (1.*re->numWireGroups(phiHits[0]->gasGap()))) < m_maxOccStgcPhi;
132  }
133 
134 template <class ContType>
138  if (key.empty()) {
139  ATH_MSG_DEBUG("Key "<<typeid(ContType).name()<<" not set. Do not fill anything");
140  return StatusCode::SUCCESS;
141  }
142  SG::ReadHandle readHandle{key, ctx};
143  ATH_CHECK(readHandle.isPresent());
144  if (readHandle->empty()){
145  ATH_MSG_DEBUG("nothing to do");
146  return StatusCode::SUCCESS;
147  }
148  SG::ReadHandle gctx{m_geoCtxKey, ctx};
149  ATH_CHECK(gctx.isPresent());
150 
151  using PrdType = typename ContType::const_value_type;
152  using PrdVec = std::vector<PrdType>;
153  xAOD::ChamberViewer viewer{*readHandle};
154  do {
155 
156  SpacePointsPerChamber& pointsInChamb = fillContainer[viewer.at(0)->readoutElement()->getChamber()];
157  ATH_MSG_DEBUG("Fill space points for chamber "<<m_idHelperSvc->toStringDetEl(viewer.at(0)->identify()));
158  if constexpr( std::is_same_v<ContType, xAOD::MdtDriftCircleContainer> ||
159  std::is_same_v<ContType, xAOD::MMClusterContainer>) {
160 
161  pointsInChamb.etaHits.reserve(pointsInChamb.etaHits.capacity() + viewer.size());
162  for (const PrdType prd: viewer) {
163  ATH_MSG_VERBOSE("Create space point from "<<m_idHelperSvc->toString(prd->identify())
164  <<", hash: "<<prd->identifierHash());
165  pointsInChamb.etaHits.emplace_back(*gctx, prd, nullptr);
166  }
167  } else {
169  using EtaPhiHits = std::array<PrdVec, 2>;
170  std::vector<EtaPhiHits> hitsPerGasGap{};
171  for (const PrdType prd : viewer) {
172  ATH_MSG_VERBOSE("Create space point from "<<m_idHelperSvc->toString(prd->identify())<<", hash: "<<prd->identifierHash());
173  unsigned int gapIdx = prd->gasGap() -1;
174  if constexpr (std::is_same_v<ContType, xAOD::RpcMeasurementContainer>) {
175  gapIdx = prd->readoutElement()->createHash(0, prd->gasGap(), prd->doubletPhi(), false);
176  }
177 
178  bool measPhi{false};
179  if constexpr(std::is_same_v<ContType, xAOD::sTgcMeasContainer>) {
181  if (prd->channelType() == sTgcIdHelper::sTgcChannelTypes::Pad) {
182  pointsInChamb.etaHits.emplace_back(*gctx, prd, nullptr);
183  continue;
184  }
186  measPhi = prd->channelType() == sTgcIdHelper::sTgcChannelTypes::Wire;
187  } else {
189  measPhi = prd->measuresPhi();
190  }
191 
192  if (hitsPerGasGap.size() <= gapIdx) {
193  hitsPerGasGap.resize(gapIdx + 1);
194  }
196  PrdVec& toPush = hitsPerGasGap[gapIdx][measPhi];
197  if (toPush.capacity() == toPush.size()) {
198  toPush.reserve(toPush.size() + m_capacityBucket);
199  }
200  toPush.push_back(prd);
201  }
203  for (auto& [etaHits, phiHits] : hitsPerGasGap) {
204  if (!passOccupancy2D(etaHits, phiHits)) {
205  ATH_MSG_VERBOSE("Occupancy cut not passed "<<etaHits.size()<<", "<<phiHits.size());
206  pointsInChamb.etaHits.reserve(pointsInChamb.etaHits.size() + etaHits.size());
207  pointsInChamb.phiHits.reserve(pointsInChamb.phiHits.size() + phiHits.size());
208  for (const PrdType etaPrd : etaHits) {
209  pointsInChamb.etaHits.emplace_back(*gctx, etaPrd);
210  ATH_MSG_VERBOSE("Add new eta hit "<<m_idHelperSvc->toString(pointsInChamb.etaHits.back().identify())
211  <<" "<<Amg::toString(pointsInChamb.etaHits.back().positionInChamber()));
212 
213  }
214  for (const PrdType phiPrd : phiHits) {
215  pointsInChamb.phiHits.emplace_back(*gctx, phiPrd);
216  ATH_MSG_VERBOSE("Add new phi hit "<<m_idHelperSvc->toString(pointsInChamb.phiHits.back().identify())
217  <<" "<<Amg::toString(pointsInChamb.phiHits.back().positionInChamber()));
218  }
219  continue;
220  }
221  std::vector<std::shared_ptr<unsigned>> etaCounts{matchCountVec(etaHits.size())},
222  phiCounts{matchCountVec(phiHits.size())};
223  pointsInChamb.etaHits.reserve(etaHits.size()*phiHits.size());
224 
226  bool hasIsolatedPhi{false};
228  bool hasCombinedSpacePoint{false};
230  for (unsigned int etaP = 0; etaP < etaHits.size(); ++etaP) {
232  for (unsigned int phiP = 0; phiP < phiHits.size(); ++ phiP){
234  if (!phiCounts[phiP]) {
235  hasIsolatedPhi = true;
236  continue;
237  }
240  if (!(etaHits[etaP]->bcBitMap() & phiHits[phiP]->bcBitMap())){
241  continue;
242  }
243  }
244  SpacePoint& spacePoint{pointsInChamb.etaHits.emplace_back(*gctx, etaHits[etaP], phiHits[phiP])};
245  ATH_MSG_VERBOSE("Create new spacepoint from "<<m_idHelperSvc->toString(etaHits[etaP]->identify())
246  <<" & "<<m_idHelperSvc->toString(phiHits[phiP]->identify())<<" at "<<Amg::toString(spacePoint.positionInChamber()));
247  spacePoint.setInstanceCounts(etaCounts[etaP], phiCounts[phiP]);
248  hasCombinedSpacePoint = true;
249  }
250  if (!(*etaCounts[etaP])) {
251  pointsInChamb.etaHits.emplace_back(*gctx, etaHits[etaP]);
252  continue;
253  }
254  }
257  if (!hasCombinedSpacePoint || hasIsolatedPhi) {
258  for (unsigned int phiP = 0; phiP < phiHits.size(); ++ phiP){
259  if (!hasCombinedSpacePoint || !phiCounts[phiP]) {
260  pointsInChamb.phiHits.emplace_back(*gctx, phiHits[phiP]);
261  }
262  }
263  }
264  }
265  }
266  } while (viewer.next());
267  return StatusCode::SUCCESS;
268 }
269 
270 
271 StatusCode SpacePointMakerAlg::execute(const EventContext& ctx) const {
272  PreSortedSpacePointMap preSortedContainer{};
273  ATH_CHECK(loadContainerAndSort(ctx, m_mdtKey, preSortedContainer));
274  ATH_CHECK(loadContainerAndSort(ctx, m_rpcKey, preSortedContainer));
275  ATH_CHECK(loadContainerAndSort(ctx, m_tgcKey, preSortedContainer));
276  ATH_CHECK(loadContainerAndSort(ctx, m_mmKey, preSortedContainer));
277  ATH_CHECK(loadContainerAndSort(ctx, m_stgcKey, preSortedContainer));
278  std::unique_ptr<SpacePointContainer> outContainer = std::make_unique<SpacePointContainer>();
279 
280  for (auto &[chamber, hitsPerChamber] : preSortedContainer){
281  ATH_MSG_VERBOSE("Fill space points for chamber "<<chamber);
282  distributePointsAndStore(ctx, std::move(hitsPerChamber), *outContainer);
283  }
285  ATH_CHECK(writeHandle.record(std::move(outContainer)));
286  return StatusCode::SUCCESS;
287 }
288 
289 void SpacePointMakerAlg::distributePointsAndStore(const EventContext& ctx,
290  SpacePointsPerChamber&& hitsPerChamber,
291  SpacePointContainer& finalContainer) const {
292  SpacePointBucketVec splittedHits{};
293  splittedHits.emplace_back();
294  if (m_statCounter){
295  m_statCounter->addToStat(hitsPerChamber.etaHits);
296  m_statCounter->addToStat(hitsPerChamber.phiHits);
297 
298  }
299  distributePointsAndStore(ctx, std::move(hitsPerChamber.etaHits), splittedHits);
300  distributePointsAndStore(ctx, std::move(hitsPerChamber.phiHits), splittedHits);
301 
302  for (SpacePointBucket& bucket : splittedHits) {
303  if (bucket.size() > 1)
304  finalContainer.push_back(std::make_unique<SpacePointBucket>(std::move(bucket)));
305  }
306 
307 }
308 void SpacePointMakerAlg::distributePointsAndStore(const EventContext& ctx,
309  std::vector<SpacePoint>&& spacePoints,
310  SpacePointBucketVec& splittedHits) const {
311 
312  if (spacePoints.empty()) return;
313 
314  const bool defineBuckets = splittedHits[0].empty();
315  const bool hasEtaMeas{spacePoints[0].measuresEta()};
316 
317  auto pointPos = [hasEtaMeas, defineBuckets] (const SpacePoint& p) {
318  return hasEtaMeas || !defineBuckets ? p.positionInChamber().y() : p.positionInChamber().x();
319  };
321 
322  auto channelDir = [hasEtaMeas, defineBuckets, &gctx](const SpacePoint & p) {
323  const Amg::Vector3D d = xAOD::channelDirInChamber(*gctx, p.primaryMeasurement());
324  return std::abs(hasEtaMeas || !defineBuckets ? d.y() : d.z());
325  };
326 
327  std::sort(spacePoints.begin(), spacePoints.end(),
328  [&pointPos] (const SpacePoint& a, const SpacePoint& b) {
329  return pointPos(a) < pointPos(b);
330  });
331 
332 
333  double lastPoint = pointPos(spacePoints[0]);
334 
335  auto newBucket = [this, &lastPoint, &splittedHits, &pointPos, &channelDir] (const double currPos) {
336  splittedHits.emplace_back();
337  splittedHits.back().setBucketId(splittedHits.size() -1);
338  SpacePointBucket& overlap{splittedHits[splittedHits.size() - 2]};
339  SpacePointBucket& newContainer{splittedHits[splittedHits.size() - 1]};
340 
341  for (const std::shared_ptr<SpacePoint>& pointInBucket : overlap) {
342  const double overlapPos = pointPos(*pointInBucket) + pointInBucket->uncertainty()[1] * channelDir(*pointInBucket);
343  if (std::abs(overlapPos - currPos) < m_spacePointOverlap) {
344  newContainer.push_back(pointInBucket);
345  }
346  }
347  lastPoint = newContainer.empty() ? currPos : pointPos(**newContainer.begin());
348  overlap.setCoveredRange(pointPos(**overlap.begin()), pointPos(**overlap.rbegin()));
349  };
350 
351  for (SpacePoint& toSort : spacePoints) {
352  const double currPoint = pointPos(toSort);
354  if (!defineBuckets) {
355  std::shared_ptr<SpacePoint> madePoint = std::make_shared<SpacePoint>(std::move(toSort));
356  for (SpacePointBucket& bucket : splittedHits) {
357  const double measDir = channelDir(toSort);
358  const double posMin = currPoint - toSort.uncertainty()[1] * measDir;
359  const double posMax = currPoint + toSort.uncertainty()[1] * measDir;
360 
361  if (posMax >= bucket.coveredMin() && bucket.coveredMax() >= posMin) {
362  bucket.push_back(madePoint);
363  }
364  }
365  continue;
366  }
368  if (currPoint - lastPoint > m_spacePointWindow) {
369  newBucket(currPoint);
370  }
371  std::shared_ptr<SpacePoint> spacePoint = std::make_shared<SpacePoint>(std::move(toSort));
372  splittedHits.back().emplace_back(spacePoint);
373  if (splittedHits.size() > 1) {
374  SpacePointBucket& overlap{splittedHits[splittedHits.size() - 2]};
375  const double overlapPos = currPoint - spacePoint->uncertainty()[1] * channelDir(*spacePoint);
376  if (overlapPos - overlap.coveredMax() < m_spacePointOverlap) {
377  overlap.push_back(spacePoint);
378  }
379  }
380  }
381  if (defineBuckets){
382  SpacePointBucket& lastBucket{splittedHits[splittedHits.size() - 1]};
383  newBucket(pointPos(*lastBucket.back()));
385  splittedHits.pop_back();
386  }
387 
388 }
389 
390 }
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:271
MuonR4::SpacePointMakerAlg::m_maxOccStgcPhi
Gaudi::Property< double > m_maxOccStgcPhi
Definition: SpacePointMakerAlg.h:189
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:112
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:289
xAOD::ChamberViewer
Definition: ChamberViewer.h:67
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
MuonR4::SpacePointMakerAlg::m_maxOccStgcEta
Gaudi::Property< double > m_maxOccStgcEta
Definition: SpacePointMakerAlg.h:187
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:182
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:581
MuonR4::SpacePointMakerAlg::m_maxOccTgcPhi
Gaudi::Property< double > m_maxOccTgcPhi
Definition: SpacePointMakerAlg.h:184
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:221
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:135
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_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:26
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:171
MuonR4::SpacePointMakerAlg::PreSortedSpacePointMap
std::unordered_map< const MuonGMR4::MuonChamber *, SpacePointsPerChamber > PreSortedSpacePointMap
Container abrivation of the presorted space point container per MuonChambers.
Definition: SpacePointMakerAlg.h:93
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:177
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:174
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:167
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonR4::SpacePointMakerAlg::m_maxOccRpcPhi
Gaudi::Property< double > m_maxOccRpcPhi
Definition: SpacePointMakerAlg.h:179
Muon::MuonStationIndex::technologyName
static const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:209