ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCablings
MuonCablingData
MuonCablingData
MdtTdcMap.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONMDT_CABLING_MDTAMTMAP_H
6
#define MUONMDT_CABLING_MDTAMTMAP_H
7
18
19
#include <stdint.h>
20
21
#include <array>
22
23
#include "GaudiKernel/MsgStream.h"
24
#include "
MuonCablingData/MdtCablingData.h
"
25
#include "
MuonCablingData/MdtMezzanineCard.h
"
26
27
class
MdtIdHelper
;
28
class
MdtTdcMap
{
29
public
:
30
static
constexpr
uint8_t
NOTSET
=
MdtMezzanineCard::NOTSET
;
31
using
MezzCardPtr
=
MdtMezzanineCard::MezzCardPtr
;
36
MdtTdcMap
(
const
MezzCardPtr
mezType,
const
MdtCablingData
& cabling_data);
37
39
~MdtTdcMap
() =
default
;
40
42
bool
offlineId
(
MdtCablingData
& cabling_data, MsgStream& log)
const
;
44
bool
onlineId
(
MdtCablingData
& cabling_data, MsgStream& log)
const
;
45
47
uint8_t
mezzanineType
()
const
{
return
m_mezzCard
->id(); }
48
50
uint8_t
moduleId
()
const
{
return
m_statId
.tdcId; }
52
uint8_t
mrod
()
const
{
return
m_statId
.mrod; }
54
uint8_t
csm
()
const
{
return
m_statId
.csm; }
55
57
const
MdtCablingOffData
&
offId
()
const
{
return
m_statId
; }
59
const
MdtCablingOnData
&
onlineId
()
const
{
return
m_statId
; }
61
int
multiLayer
()
const
{
return
m_statId
.multilayer; }
62
/* get the station Name */
63
int
stationName
()
const
{
return
m_statId
.stationIndex; }
64
/* get the station Eta */
65
int
stationEta
()
const
{
return
m_statId
.eta; }
66
/* get the station Phi */
67
int
stationPhi
()
const
{
return
m_statId
.phi; }
68
69
/* get the zero channels */
70
uint8_t
tdcZero
()
const
{
return
m_statId
.channelId; }
71
/* tube zero */
72
uint8_t
tubeZero
()
const
{
return
m_statId
.tube; }
73
74
uint8_t
maxTube
()
const
{
return
m_maxTube
; }
75
uint8_t
minTube
()
const
{
return
m_minTube
; }
76
77
private
:
79
MdtCablingData
m_statId
{};
80
MezzCardPtr
m_mezzCard
{
nullptr
};
81
82
int8_t
m_minTube
{24};
83
int8_t
m_maxTube
{-24};
84
};
85
88
struct
MdtTdcOffSorter
{
89
MdtTdcOffSorter
() =
default
;
90
MdtTdcOffSorter
(
const
MdtTdcMap
* ptr) :
m_ptr
{ptr} {}
91
const
MdtTdcMap
*
operator->
()
const
{
return
m_ptr
; }
92
bool
operator!
()
const
{
return
!
m_ptr
; }
93
operator
bool()
const
{
return
m_ptr
; }
94
95
private
:
96
const
MdtTdcMap
*
m_ptr
{
nullptr
};
97
};
98
100
struct
MdtTdcOnlSorter
{
101
MdtTdcOnlSorter
() =
default
;
102
MdtTdcOnlSorter
(
const
MdtTdcMap
* ptr) :
m_ptr
{ptr} {}
103
const
MdtTdcMap
*
operator->
()
const
{
return
m_ptr
; }
104
bool
operator!
()
const
{
return
!
m_ptr
; }
105
operator
bool()
const
{
return
m_ptr
; }
106
107
private
:
108
const
MdtTdcMap
*
m_ptr
{
nullptr
};
109
};
110
111
115
inline
bool
operator<
(
const
MdtTdcOffSorter
&
a
,
const
MdtCablingData
& b) {
116
return
a
->maxTube() < b.tube;
117
}
118
inline
bool
operator<
(
const
MdtCablingData
&
a
,
const
MdtTdcOffSorter
& b) {
119
return
a
.tube < b->minTube();
120
}
121
122
inline
bool
operator<
(
const
MdtTdcOffSorter
&
a
,
const
MdtTdcOffSorter
& b) {
123
return
a
->minTube() < b->minTube();
124
}
125
126
inline
bool
operator<
(
const
MdtTdcOnlSorter
&
a
,
const
MdtTdcOnlSorter
& b) {
127
return
a
->moduleId() < b->moduleId();
128
}
129
inline
bool
operator<
(
const
MdtTdcOnlSorter
&
a
,
const
MdtCablingData
& b) {
130
return
a
->moduleId() < b.tdcId;
131
}
132
inline
bool
operator<
(
const
MdtCablingData
&
a
,
const
MdtTdcOnlSorter
& b) {
133
return
a
.tdcId < b->moduleId();
134
}
135
136
#endif
// MUONMDT_CABLING_MDTAMTMAP_H
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
MdtCablingData.h
MdtMezzanineCard.h
operator<
bool operator<(const MdtTdcOffSorter &a, const MdtCablingData &b)
Operators used for navigation later.
Definition
MdtTdcMap.h:115
MdtIdHelper
Definition
MdtIdHelper.h:61
MdtMezzanineCard::NOTSET
static constexpr uint8_t NOTSET
Definition
MdtMezzanineCard.h:37
MdtMezzanineCard::MezzCardPtr
std::shared_ptr< const MdtMezzanineCard > MezzCardPtr
Definition
MdtMezzanineCard.h:39
MdtTdcMap
Definition
MdtTdcMap.h:28
MdtTdcMap::stationName
int stationName() const
Definition
MdtTdcMap.h:63
MdtTdcMap::m_mezzCard
MezzCardPtr m_mezzCard
Definition
MdtTdcMap.h:80
MdtTdcMap::m_maxTube
int8_t m_maxTube
Definition
MdtTdcMap.h:83
MdtTdcMap::offlineId
bool offlineId(MdtCablingData &cabling_data, MsgStream &log) const
retrieve the full information
Definition
MdtTdcMap.cxx:24
MdtTdcMap::moduleId
uint8_t moduleId() const
return the tdc id
Definition
MdtTdcMap.h:50
MdtTdcMap::csm
uint8_t csm() const
return the csm of the associated tdc
Definition
MdtTdcMap.h:54
MdtTdcMap::offId
const MdtCablingOffData & offId() const
get the offline identifier
Definition
MdtTdcMap.h:57
MdtTdcMap::m_statId
MdtCablingData m_statId
tube corresponding to each tdc channel
Definition
MdtTdcMap.h:79
MdtTdcMap::mrod
uint8_t mrod() const
return the mrod associated to the tdc
Definition
MdtTdcMap.h:52
MdtTdcMap::~MdtTdcMap
~MdtTdcMap()=default
destructor
MdtTdcMap::MezzCardPtr
MdtMezzanineCard::MezzCardPtr MezzCardPtr
Definition
MdtTdcMap.h:31
MdtTdcMap::m_minTube
int8_t m_minTube
Definition
MdtTdcMap.h:82
MdtTdcMap::mezzanineType
uint8_t mezzanineType() const
get the mezzanine type
Definition
MdtTdcMap.h:47
MdtTdcMap::multiLayer
int multiLayer() const
get the multilayer (independent of the channel)
Definition
MdtTdcMap.h:61
MdtTdcMap::maxTube
uint8_t maxTube() const
Definition
MdtTdcMap.h:74
MdtTdcMap::minTube
uint8_t minTube() const
Definition
MdtTdcMap.h:75
MdtTdcMap::stationEta
int stationEta() const
Definition
MdtTdcMap.h:65
MdtTdcMap::MdtTdcMap
MdtTdcMap(const MezzCardPtr mezType, const MdtCablingData &cabling_data)
constructor
Definition
MdtTdcMap.cxx:10
MdtTdcMap::tubeZero
uint8_t tubeZero() const
Definition
MdtTdcMap.h:72
MdtTdcMap::NOTSET
static constexpr uint8_t NOTSET
Definition
MdtTdcMap.h:30
MdtTdcMap::tdcZero
uint8_t tdcZero() const
Definition
MdtTdcMap.h:70
MdtTdcMap::stationPhi
int stationPhi() const
Definition
MdtTdcMap.h:67
MdtTdcMap::onlineId
const MdtCablingOnData & onlineId() const
get the online identiifer
Definition
MdtTdcMap.h:59
MdtCablingData
Definition
MdtCablingData.h:84
MdtCablingOffData
Split the offline part of the cabling apart to use it later for sorting.
Definition
MdtCablingData.h:16
MdtCablingOnData
Definition
MdtCablingData.h:51
MdtTdcOffSorter
Helper struct to search through the std::set if a conversion from offline -> online is needed.
Definition
MdtTdcMap.h:88
MdtTdcOffSorter::MdtTdcOffSorter
MdtTdcOffSorter()=default
MdtTdcOffSorter::MdtTdcOffSorter
MdtTdcOffSorter(const MdtTdcMap *ptr)
Definition
MdtTdcMap.h:90
MdtTdcOffSorter::operator->
const MdtTdcMap * operator->() const
Definition
MdtTdcMap.h:91
MdtTdcOffSorter::m_ptr
const MdtTdcMap * m_ptr
Definition
MdtTdcMap.h:96
MdtTdcOffSorter::operator!
bool operator!() const
Definition
MdtTdcMap.h:92
MdtTdcOnlSorter
Helper struct to search through the std::set if a conversion from online -> offline is needed.
Definition
MdtTdcMap.h:100
MdtTdcOnlSorter::operator->
const MdtTdcMap * operator->() const
Definition
MdtTdcMap.h:103
MdtTdcOnlSorter::MdtTdcOnlSorter
MdtTdcOnlSorter()=default
MdtTdcOnlSorter::m_ptr
const MdtTdcMap * m_ptr
Definition
MdtTdcMap.h:108
MdtTdcOnlSorter::operator!
bool operator!() const
Definition
MdtTdcMap.h:104
MdtTdcOnlSorter::MdtTdcOnlSorter
MdtTdcOnlSorter(const MdtTdcMap *ptr)
Definition
MdtTdcMap.h:102
Generated on
for ATLAS Offline Software by
1.17.0