 |
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef XAODMUONPREPDATA_CHAMBERVIEWER_H
5 #define XAODMUONPREPDATA_CHAMBERVIEWER_H
13 #include "Acts/Utilities/PointerTraits.hpp"
35 namespace ChamberViewConcepts{
42 theObj.identifierHash();
45 (identifyConcept<typename Acts::RemovePointer_t<typename HitObjContainer::value_type>> ||
46 identifierHashConcept<typename Acts::RemovePointer_t<typename HitObjContainer::value_type>>);
49 namespace ChamberView {
58 template<ChamberViewConcepts::ContainerConcept HitObjContainer>
71 requires(ChamberViewConcepts::identifierHashConcept<element_type>):
80 requires(ChamberViewConcepts::identifyConcept<element_type>):
109 throw std::domain_error(
std::format(
"Invalid index given {:}. size: {:}, requested:{:} ",
121 if constexpr (ChamberViewConcepts::identifierHashConcept<element_type>) {
125 return meas->identifierHash() != currentHash;
131 return idHash(meas->identify()) != currentHash;
144 requires(ChamberViewConcepts::identifyConcept<element_type>) {
148 return idHash(meas->identify()) == detId;
151 return idHash(meas->identify()) != detId;
159 requires(ChamberViewConcepts::identifierHashConcept<element_type>) {
161 return meas->identifierHash() ==
idHash;
164 return meas->identifierHash() != idHash;
174 return !selector(meas);
190 return !selector(meas);
std::size_t size() const noexcept
Returns how many hits are in the current chamber.
bool next() noexcept
Loads the hits from the next chamber.
const_iterator end() const noexcept
End iterator of the current chamber view.
const_iterator begin() const noexcept
Begin iterator of the current chamber view.
requires requires()
This specialization is used for classes deriving from DataObject.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
ChamberViewer(const HitObjContainer &container) noexcept requires(ChamberViewConcepts
Standard constructor.
virtual IdentifierHash moduleHash(const Identifier &id) const =0
Returns the module hash associated to an Identifier.
bool const RAWDATA *ch2 const
const Muon::IMuonIdHelperSvc * m_idHelperSvc
concept identifierHashConcept
Define the concept that the object needs to have an IdentifierHash method
typename HitObjContainer::const_iterator const_iterator
ChamberViewer(const ChamberViewer &other)=delete
Delete the copy constructor.
@ Chamber
View ends if the moduleHash changes.
ChamberViewer(ChamberViewer &&other)=default
Standard move constructor.
Mode
Switch setting the view mode if the chamber viewer is initialized with the IdHelperSvc.
@ DetElement
View ends if the detElementHash changes.
bool loadView(const IdentifierHash &idHash) requires(ChamberViewConcepts
Loads the view matching the parsed IdentifierHash.
typename const_iterator::reference const_ref
ChamberViewer(const HitObjContainer &container, const Muon::IMuonIdHelperSvc *idHelperSvc, const ViewMode mode=ViewMode::DetElement) noexcept requires(ChamberViewConcepts
Standard constructor.
ChamberViewer & operator=(const ChamberViewer &other)=delete
Delete the copy assignment operator.
IdentifierHash idHash(const Identifier &id) const
Returns the IdentifierHash from an Identifier.
typename Acts::RemovePointer_t< value_type > element_type
bool next(std::function< bool(const_ref)> selector)
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const_ref at(const std::size_t idx) const
Returns the i-the measurement from the current chamber.
bool loadView(std::function< bool(const_ref)> selector)
Loads the view range based on a generic selector function.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
ChamberViewer & operator=(ChamberViewer &&other)=default
Standard move operator.
const HitObjContainer & m_container
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
bool loadView(const Identifier &chamberId) requires(ChamberViewConcepts
Loads the view matching the parsed identifier.
concept identifyConcept
Define the concept that the object needs to have an Identifier method
virtual IdentifierHash detElementHash(const Identifier &id) const =0
Returns the detector element hash associated to an Identifier.