ATLAS Offline Software
MuonSpacePointContainer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONSPACEPOINT_MUONSPACEPOINTCONTAINER_H
6 #define MUONSPACEPOINT_MUONSPACEPOINTCONTAINER_H
7 
10 #include "GaudiKernel/SystemOfUnits.h"
12 #include <vector>
13 namespace MuonR4{
22  public std::vector<std::shared_ptr<MuonSpacePoint>> {
23  public:
25  MuonSpacePointBucket() = default;
27  void setCoveredRange(double min, double max){
28  m_min = min;
29  m_max = max;
30  }
32  double coveredMin() const { return m_min; }
34  double coveredMax() const { return m_max; }
37  return empty() ? nullptr : front()->muonChamber();
38  }
42  void setBucketId(unsigned int id) {
43  m_bucketId = id;
44  }
46  unsigned int bucketId() const { return m_bucketId; }
47  bool operator<(const MuonSpacePointBucket& other) const {
49  static const ChamberSorter sorter{};
50  int chambCompare = -sorter(muonChamber(), other.muonChamber()) +
51  sorter(other.muonChamber(), muonChamber());
52  if (chambCompare) return chambCompare < 0;
53  return bucketId() < other.bucketId();
54  }
55  private:
56  unsigned int m_bucketId{0};
57  double m_min{-20. *Gaudi::Units::m};
58  double m_max{20. * Gaudi::Units::m};
59  };
60 
62 }
63 #include "AthenaKernel/CLASS_DEF.h"
65 
66 #endif
MuonR4::MuonSpacePointBucket::m_bucketId
unsigned int m_bucketId
Definition: MuonSpacePointContainer.h:56
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
max
#define max(a, b)
Definition: cfImp.cxx:41
postInclude.sorter
sorter
Definition: postInclude.SortInput.py:23
MuonGMR4::MuonChamber
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonChamber.h:42
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
MuonSpacePoint.h
MuonR4::MuonSpacePointBucket::muonChamber
const MuonGMR4::MuonChamber * muonChamber() const
returns th associated muonChamber
Definition: MuonSpacePointContainer.h:36
MuonR4::MuonSpacePointBucket::operator<
bool operator<(const MuonSpacePointBucket &other) const
Definition: MuonSpacePointContainer.h:47
MuonR4::MuonSpacePointBucket
: The muon space point bucket represents a collection of points that will bre processed together in t...
Definition: MuonSpacePointContainer.h:22
MuonR4::MuonSpacePointBucket::setBucketId
void setBucketId(unsigned int id)
sets the Identifier of the MuonSpacePointBucket in context of the associated muonChamber
Definition: MuonSpacePointContainer.h:42
CLASS_DEF
CLASS_DEF(MuonR4::MuonSpacePointContainer, 1177013528, 1)
MuonDetectorManager.h
MuonR4::MuonSpacePointBucket::MuonSpacePointBucket
MuonSpacePointBucket()=default
Standard constructor.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
MuonR4::MuonSpacePointBucket::setCoveredRange
void setCoveredRange(double min, double max)
set the range in the precision plane covered by the bucket
Definition: MuonSpacePointContainer.h:27
min
#define min(a, b)
Definition: cfImp.cxx:40
MuonR4::MuonSpacePointBucket::bucketId
unsigned int bucketId() const
Returns the Identifier in the context of the MuonChamber.
Definition: MuonSpacePointContainer.h:46
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
MuonR4::MuonSpacePointBucket::m_max
double m_max
Definition: MuonSpacePointContainer.h:58
MuonR4::MuonSpacePointBucket::m_min
double m_min
Definition: MuonSpacePointContainer.h:57
MuonR4
The CsvMuonSimHitDumper reads a Simulation Hit container for muons and dumps information to csv files...
Definition: MuonSpacePoint.h:11
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonR4::MuonSpacePointBucket::coveredMin
double coveredMin() const
lower interval value covered by the bucket
Definition: MuonSpacePointContainer.h:32
CLASS_DEF.h
macros to associate a CLID to a type
MuonGMR4::MuonDetectorManager::ChamberSorter
Helper struct to ensur that the sorting of the MuonChambers remains constants across the jobs.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:100
MuonR4::MuonSpacePointBucket::coveredMax
double coveredMax() const
upper interval value covered by the bucket
Definition: MuonSpacePointContainer.h:34