4#ifndef MUONSPACEPOINTFORMATION_MUONSPACEPOINTMAKERALG_H
5#define MUONSPACEPOINTFORMATION_MUONSPACEPOINTMAKERALG_H
29 using AthReentrantAlgorithm::AthReentrantAlgorithm;
33 StatusCode
execute(
const EventContext& ctx)
const override;
50 void addToStat(
const std::vector<SpacePoint>& spacePoints);
105 template <
class ContType>
116 template <
class PrdType>
118 const std::vector<const PrdType*>& phiHits)
const;
120 template <
class PrdType>
123 const std::vector<const PrdType*>& prdsToFill,
124 std::vector<SpacePoint>& outColl)
const;
154 const double firstSpPos,
165 "Key to the uncalibrated Drift circle measurements"};
168 "Key to the uncalibrated 1D rpc hits"};
171 "Key to the uncalibrated 1D tgc hits"};
174 "Key to the uncalibrated 1D Mm hits"};
186 "Maximal distance between consecutive hits in a bucket"};
189 "Maximal size of a space point bucket"};
192 "Hits that are within <spacePointOverlap> of the bucket margin. "
193 "Are copied to the next bucket"};
195 Gaudi::Property<bool>
m_doStat{
this,
"doStats",
false,
196 "If enabled the algorithm keeps track how many hits have been made" };
202 "Maximum occpancy of Rpc eta hits in a gasGap"};
204 "Maximum occpancy of Rpc phi hits in a gasGap"};
207 "Maximum occpancy of Tgc eta hits in a gasGap"};
209 "Maximum occpancy of Tgc phi hits in a gasGap"};
212 "Maximum occpancy of sTgc eta hits in a gasGap"};
214 "Maximum occpancy of sTgc phi hits in a gasGap"};
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
std::map< FieldKey, StatField > StatMap_t
SpacePointStatistics(const Muon::IMuonIdHelperSvc *idHelperSvc)
Standard constructor.
const Muon::IMuonIdHelperSvc * m_idHelperSvc
void addToStat(const std::vector< SpacePoint > &spacePoints)
Adds the vector of space points to the overall statistics.
void dumpStatisics(MsgStream &msg) const
Print the statistics table of the built space points per category into the log-file / console.
Gaudi::Property< double > m_maxOccRpcEta
std::unique_ptr< SpacePointStatistics > m_statCounter ATLAS_THREAD_SAFE
Gaudi::Property< double > m_maxOccTgcEta
Gaudi::Property< double > m_maxOccTgcPhi
Gaudi::Property< double > m_maxOccStgcPhi
Gaudi::Property< double > m_spacePointWindow
Gaudi::Property< bool > m_doStat
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::ReadHandleKey< xAOD::TgcStripContainer > m_tgcKey
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.
void newBucket(const SpacePoint &refSp, SpacePointBucketVec &sortedPoints) const
Closes the current processed bucket and creates a new one.
void distributePhiPoints(std::vector< SpacePoint > &&spacePoints, SpacePointBucketVec &splittedContainer) const
Distributs the vector phi space points into the buckets.
Gaudi::Property< double > m_maxOccRpcPhi
void fillUncombinedSpacePoints(const ActsTrk::GeometryContext &gctx, const Amg::Transform3D §orTrans, const std::vector< const PrdType * > &prdsToFill, std::vector< SpacePoint > &outColl) const
Fills all space points that are beloni.
Gaudi::Property< double > m_maxBucketLength
SG::ReadHandleKey< xAOD::MMClusterContainer > m_mmKey
bool splitBucket(const SpacePoint &spacePoint, const double firstSpPos, const SpacePointBucketVec &sortedPoints) const
Returns whether the space point is beyond the bucket boundary.
Gaudi::Property< double > m_maxOccStgcEta
std::vector< SpacePointBucket > SpacePointBucketVec
Abrivation of a MuonSapcePoint bucket vector.
SG::WriteHandleKey< SpacePointContainer > m_writeKey
~SpacePointMakerAlg()=default
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 ...
SG::ReadHandleKey< xAOD::RpcMeasurementContainer > m_rpcKey
Gaudi::Property< double > m_spacePointOverlap
StatusCode execute(const EventContext &ctx) const override
void distributePrimaryPoints(std::vector< SpacePoint > &&spacePoints, SpacePointBucketVec &splittedContainer) const
Distributes the vector of primary eta or eta + phi space points and fills them into the buckets.
StatusCode initialize() override
SG::ReadHandleKey< xAOD::sTgcMeasContainer > m_stgcKey
void distributePointsAndStore(SpacePointsPerChamber &&hitsPerChamber, SpacePointContainer &finalContainer) const
Distribute the premade spacepoints per chamber into their individual SpacePoint buckets.
StatusCode finalize() override
std::unordered_map< const MuonGMR4::SpectrometerSector *, SpacePointsPerChamber > PreSortedSpacePointMap
Container abrivation of the presorted space point container per MuonChambers.
Gaudi::Property< unsigned > m_capacityBucket
SG::ReadHandleKey< xAOD::MdtDriftCircleContainer > m_mdtKey
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Eigen::Affine3d Transform3D
This header ties the generic definitions in this package.
DataVector< SpacePointBucket > SpacePointContainer
Abrivation of the space point container type.
StIndex
enum to classify the different station layers in the muon spectrometer
TechnologyIndex
enum to classify the different layers in the muon spectrometer
Helper struct to define the counting categories.
bool operator<(const FieldKey &other) const
################################################################ SpacePointStatistics ###############...
Muon::MuonStationIndex::StIndex StIdx_t
Muon::MuonStationIndex::TechnologyIndex TechIdx_t
Helper struct to count the space-points in each detector category.
unsigned measEtaPhi
Number of space points measuring eta & phi.
unsigned measEta
Number of space points measuring eta only.
unsigned measPhi
Number of space points measuring phi only.
unsigned allHits() const
Helper method returning the sum of the three space point type counts.
: Helper struct to collect the space point per muon chamber, which are later sorted into the space po...
std::vector< SpacePoint > etaHits
Vector of all hits that contain an eta measurement including the ones which are combined with phi mea...
std::vector< SpacePoint > phiHits
Vector of all space points that are built from single phi hits.