ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonRecEvent
MuonChamberT0s
MuonChamberT0s
ChamberT0s.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONCHAMBERT0S_CHAMBERT0S_H
6
#define MUONCHAMBERT0S_CHAMBERT0S_H
7
8
#include "Identifier/Identifier.h"
9
#include "
AthenaKernel/CLASS_DEF.h
"
10
#include <algorithm>
11
#include <vector>
12
#include <utility>
//for std::pair
13
14
namespace
Muon
{
19
class
ChamberT0s
{
20
public
:
22
static
constexpr
float
ChamberUnknown
= -99999.9;
23
24
ChamberT0s
() =
default
;
25
26
ChamberT0s
(
const
std::vector< std::pair < Identifier, float > >& t0s );
27
ChamberT0s
( std::vector< std::pair < Identifier, float > >&& t0s ) ;
28
29
31
bool
haveChamber
(
const
Identifier
&
id
)
const
;
32
43
float
getT0
(
const
Identifier
&
id
)
const
;
44
48
const
std::vector< std::pair < Identifier, float > >&
getAllT0s
()
const
;
49
50
private
:
51
std::vector< std::pair < Identifier, float > >
m_t0s
;
52
};
53
54
inline
bool
ChamberT0s::haveChamber
(
const
Identifier
&
id
)
const
{
55
auto
it = std::ranges::find(
m_t0s
,
id
, &std::pair<Identifier, float>::first);
56
return
(it!=
m_t0s
.end());
57
}
58
59
inline
float
ChamberT0s::getT0
(
const
Identifier
&
id
)
const
{
60
auto
it = std::ranges::find(
m_t0s
,
id
, &std::pair<Identifier, float>::first);
61
if
(it==
m_t0s
.end())
return
ChamberUnknown
;
// No such chamber known.
62
return
(it->second);
63
}
64
65
inline
const
std::vector< std::pair < Identifier, float > >&
ChamberT0s::getAllT0s
()
const
{
66
return
m_t0s
;
67
}
68
69
}
70
71
CLASS_DEF
(
Muon::ChamberT0s
, 42363316 , 1 )
72
73
#endif
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
Muon::ChamberT0s
Stores links between chambers and the reconstructed T0.
Definition
ChamberT0s.h:19
Muon::ChamberT0s::m_t0s
std::vector< std::pair< Identifier, float > > m_t0s
Definition
ChamberT0s.h:51
Muon::ChamberT0s::haveChamber
bool haveChamber(const Identifier &id) const
Returns true if we have the T0 for this chamber?
Definition
ChamberT0s.h:54
Muon::ChamberT0s::ChamberUnknown
static constexpr float ChamberUnknown
Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s.
Definition
ChamberT0s.h:22
Muon::ChamberT0s::getAllT0s
const std::vector< std::pair< Identifier, float > > & getAllT0s() const
Returns entire list of T0s.
Definition
ChamberT0s.h:65
Muon::ChamberT0s::getT0
float getT0(const Identifier &id) const
Returns the T0 for this chamber (or ChamberT0s::ChamberUnknown if the chamber is not in list).
Definition
ChamberT0s.h:59
Muon::ChamberT0s::ChamberT0s
ChamberT0s()=default
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