4#ifndef XAODMUONPREPDATA_CHAMBERVIEWER_H
5#define XAODMUONPREPDATA_CHAMBERVIEWER_H
13#include "Acts/Utilities/PointerTraits.hpp"
37 template <
typename ObjType>
concept identifyConcept =
requires (
const ObjType theObj) {
42 theObj.identifierHash();
51 enum class Mode: std::uint8_t{
58 template<ChamberViewConcepts::ContainerConcept HitObjContainer>
79 const ViewMode mode = ViewMode::DetElement)
noexcept
109 throw std::domain_error(std::format(
"Invalid index given {:}. size: {:}, requested:{:} ",
125 return meas->identifierHash() != currentHash;
131 return idHash(meas->identify()) != currentHash;
148 return idHash(meas->identify()) == detId;
151 return idHash(meas->identify()) != detId;
161 return meas->identifierHash() ==
idHash;
164 return meas->identifierHash() != idHash;
174 return !selector(meas);
190 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.
bool next() noexcept
Loads the hits from the next chamber.
const Muon::IMuonIdHelperSvc * m_idHelperSvc
IdentifierHash idHash(const Identifier &id) const
Returns the IdentifierHash from an Identifier.
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.
ChamberViewer(const HitObjContainer &container) noexcept
Standard constructor.
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.
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 HitObjContainer &container, const Muon::IMuonIdHelperSvc *idHelperSvc, const ViewMode mode=ViewMode::DetElement) noexcept
Standard constructor.
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.