4#ifndef XAODMUONPREPDATA_CHAMBERVIEWER_H
5#define XAODMUONPREPDATA_CHAMBERVIEWER_H
12#include "Acts/Utilities/PointerTraits.hpp"
41 template <
typename ObjType>
concept identifyConcept =
requires (
const ObjType theObj) {
46 theObj.identifierHash();
55 enum class Mode: std::uint8_t{
62 template<ChamberViewConcepts::ContainerConcept HitObjContainer>
83 const ViewMode mode = ViewMode::DetElement)
113 throw std::domain_error(std::format(
"Invalid index given {:}. size: {:}, requested:{:} ",
129 return meas->identifierHash() != currentHash;
135 return idHash(meas->identify()) != currentHash;
152 return idHash(meas->identify()) == detId;
155 return idHash(meas->identify()) != detId;
165 return meas->identifierHash() ==
idHash;
168 return meas->identifierHash() != idHash;
178 return !selector(meas);
194 return !selector(meas);
CONT::reference reference
This is a "hash" representation of an Identifier.
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const Muon::IMuonIdHelperSvc * m_idHelperSvc
ChamberViewer(const HitObjContainer &container, const Muon::IMuonIdHelperSvc *idHelperSvc, const ViewMode mode=ViewMode::DetElement)
Standard constructor.
IdentifierHash idHash(const Identifier &id) const
Returns the IdentifierHash from an Identifier.
ChamberViewer(const HitObjContainer &container)
Standard constructor.
typename const_iterator::reference const_ref
ChamberViewer(ChamberViewer &&other)=default
Standard move constructor.
bool next(std::function< bool(const_ref)> selector)
typename Acts::RemovePointer_t< value_type > element_type
const_iterator end() const noexcept
End iterator of the current chamber view.
bool loadView(const IdentifierHash &idHash)
Loads the view matching the parsed IdentifierHash.
const_ref at(const std::size_t idx) const
Returns the i-the measurement from the current chamber.
std::size_t size() const noexcept
Returns how many hits are in the current chamber.
ChamberView::Mode ViewMode
bool loadView(const Identifier &chamberId)
Loads the view matching the parsed identifier.
bool loadView(std::function< bool(const_ref)> selector)
Loads the view range based on a generic selector function.
ChamberViewer & operator=(const ChamberViewer &other)=delete
Delete the copy assignment operator.
bool next()
Loads the hits from the next chamber.
typename HitObjContainer::const_iterator const_iterator
const_iterator begin() const noexcept
Begin iterator of the current chamber view.
typename HitObjContainer::value_type value_type
ChamberViewer(const ChamberViewer &other)=delete
Delete the copy constructor.
ChamberViewer & operator=(ChamberViewer &&other)=default
Standard move operator.
const HitObjContainer & m_container
Define the concept that the object needs to have an IdentifierHash method.
Define the concept that the object needs to have an Identifier method.
Under the assumption that all measurements in an uncalibrated measurement container are sorted by the...
Mode
Switch setting the view mode if the chamber viewer is initialized with the IdHelperSvc.
@ Chamber
View ends if the moduleHash changes.
@ DetElement
View ends if the detElementHash changes.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.