ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonIdHelpers
MuonIdHelpers
IdentifierByDetElSorter.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONIDHELPERS_IDENTIFIERBYDETELSORTER_H
5
#define MUONIDHELPERS_IDENTIFIERBYDETELSORTER_H
6
7
#include <
MuonIdHelpers/IMuonIdHelperSvc.h
>
8
12
namespace
Muon
{
14
template
<
typename
T>
concept
hasIdentifyConcept
=
requires
(
const
T theObj){
15
theObj.identify();
16
};
17
class
IdentifierByDetElSorter
{
18
public
:
19
IdentifierByDetElSorter
(
const
Muon::IMuonIdHelperSvc
* idHelperSvc):
20
m_idHelperSvc
{idHelperSvc}{}
21
22
bool
operator()
(
const
Identifier
&
a
,
const
Identifier
& b)
const
{
23
const
Identifier
detA =
m_idHelperSvc
->detElId(
a
);
24
const
Identifier
detB =
m_idHelperSvc
->detElId(b);
25
if
(detA != detB){
26
return
detA < detB;
27
}
28
return
a
< b;
29
}
30
template
<
typename
T>
31
bool
operator ()
(
const
T*
a
,
const
T* b)
const
requires
hasIdentifyConcept<T>
{
32
return
(*
this
)(
a
->identify(), b->identify());
33
}
34
35
template
<
typename
T>
36
bool
operator ()
(
const
T&
a
,
const
T&b)
const
requires
hasIdentifyConcept<T>
{
37
return
(*
this
)(
a
.identify(), b.identify());
38
}
39
40
private
:
41
const
Muon::IMuonIdHelperSvc
*
m_idHelperSvc
{};
42
43
};
44
}
45
46
#endif
47
IMuonIdHelperSvc.h
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition
IMuonIdHelperSvc.h:27
Muon::IdentifierByDetElSorter::m_idHelperSvc
const Muon::IMuonIdHelperSvc * m_idHelperSvc
Definition
IdentifierByDetElSorter.h:41
Muon::IdentifierByDetElSorter::IdentifierByDetElSorter
IdentifierByDetElSorter(const Muon::IMuonIdHelperSvc *idHelperSvc)
Definition
IdentifierByDetElSorter.h:19
Muon::IdentifierByDetElSorter::operator()
bool operator()(const Identifier &a, const Identifier &b) const
Definition
IdentifierByDetElSorter.h:22
Muon::hasIdentifyConcept
Define the concept that the object needs to have an Identifier method.
Definition
IdentifierByDetElSorter.h:14
Identifier
Definition
IdentifierFieldParser.cxx:14
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
Generated on
for ATLAS Offline Software by
1.17.0