ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonRecEvent
MuonSegment
MuonSegment
MuonSegmentCombination.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// MdtSegment.h, (c) ATLAS Detector software
8
9
#ifndef MUONSEGMENT_MUONSEGMENTCOMBINATION_H
10
#define MUONSEGMENT_MUONSEGMENTCOMBINATION_H
11
12
namespace
Trk
{
13
class
Segment
;
14
}
15
16
#include <vector>
17
#include <memory>
18
#include "
MuonSegment/MuonSegment.h
"
19
20
namespace
Muon
{
21
30
class
MuonSegmentCombination
{
31
public
:
32
typedef
std::vector< std::unique_ptr<MuonSegment> >
SegmentVec
;
33
typedef
std::vector< std::unique_ptr<SegmentVec> >
SegmentVecVec
;
34
public
:
36
MuonSegmentCombination
();
37
39
~MuonSegmentCombination
();
40
42
MuonSegmentCombination
(
const
MuonSegmentCombination
& );
43
45
MuonSegmentCombination
&
operator=
(
const
MuonSegmentCombination
& );
46
53
bool
addSegments
( std::unique_ptr<SegmentVec> );
54
56
unsigned
int
numberOfStations
()
const
;
57
59
SegmentVec
*
stationSegments
(
unsigned
int
index
)
const
;
60
62
unsigned
int
numberOfAmbiguities
()
const
;
63
64
void
setNGoodCscLayers
(
int
nEta,
int
nPhi){
m_nGood
[0]=nPhi;
m_nGood
[1]=nEta;}
65
66
int
getNGoodCscLayers
(
int
isEta)
const
;
//isEta=0 means phi
67
68
bool
use2LayerSegments
(
int
isEta)
const
;
//isEta=0 means phi
69
70
bool
useStripsInSegment
(
int
isEta)
const
;
//isEta=0 means phi
71
72
private
:
74
void
clear
();
75
77
void
copy
(
const
MuonSegmentCombination
& segc );
78
79
SegmentVecVec
m_segmentsPerStation
;
80
81
//if the station is a CSC station, this tells us how many good eta and phi layers it has
82
int
m_nGood
[2]{};
83
};
84
85
//if there are only 2 good layers for eta or phi those segments may be 2-layer segments
86
inline
bool
MuonSegmentCombination::use2LayerSegments
(
int
isEta)
const
87
{
88
return
m_nGood
[isEta]==2;
89
}
90
91
//if there are fewer than 2 good layers for eta or phi we don't try to use eta or phi to build segments
92
inline
bool
MuonSegmentCombination::useStripsInSegment
(
int
isEta)
const
93
{
94
return
m_nGood
[isEta]>1;
95
}
96
97
inline
int
MuonSegmentCombination::getNGoodCscLayers
(
int
isEta)
const
98
{
99
return
m_nGood
[isEta];
100
}
101
102
inline
bool
MuonSegmentCombination::addSegments
( std::unique_ptr<SegmentVec> segs )
103
{
104
m_segmentsPerStation
.push_back( std::move(segs) );
105
return
true
;
106
}
107
108
inline
unsigned
int
MuonSegmentCombination::numberOfStations
()
const
109
{
110
return
m_segmentsPerStation
.size();
111
}
112
113
inline
MuonSegmentCombination::SegmentVec
*
114
MuonSegmentCombination::stationSegments
(
unsigned
int
index
)
const
115
{
116
if
(
index
<
numberOfStations
() )
return
m_segmentsPerStation
[
index
].get();
117
return
0;
118
}
119
120
inline
unsigned
int
MuonSegmentCombination::numberOfAmbiguities
()
const
121
{
122
unsigned
int
solutions(1);
123
SegmentVecVec::const_iterator it =
m_segmentsPerStation
.begin();
124
SegmentVecVec::const_iterator it_end =
m_segmentsPerStation
.end();
125
for
( ; it!=it_end; ++it ) solutions *= (*it)->size();
126
return
solutions;
127
}
128
129
}
130
131
#endif
MuonSegment.h
Muon::MuonSegmentCombination
Class to hold a set of MuonSegments belonging together.
Definition
MuonSegmentCombination.h:30
Muon::MuonSegmentCombination::getNGoodCscLayers
int getNGoodCscLayers(int isEta) const
Definition
MuonSegmentCombination.h:97
Muon::MuonSegmentCombination::MuonSegmentCombination
MuonSegmentCombination()
Default constructor.
Definition
MuonSegmentCombination.cxx:10
Muon::MuonSegmentCombination::SegmentVec
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Definition
MuonSegmentCombination.h:32
Muon::MuonSegmentCombination::SegmentVecVec
std::vector< std::unique_ptr< SegmentVec > > SegmentVecVec
Definition
MuonSegmentCombination.h:33
Muon::MuonSegmentCombination::stationSegments
SegmentVec * stationSegments(unsigned int index) const
Access to segments in a given station.
Definition
MuonSegmentCombination.h:114
Muon::MuonSegmentCombination::use2LayerSegments
bool use2LayerSegments(int isEta) const
Definition
MuonSegmentCombination.h:86
Muon::MuonSegmentCombination::numberOfAmbiguities
unsigned int numberOfAmbiguities() const
Number of ambiguities.
Definition
MuonSegmentCombination.h:120
Muon::MuonSegmentCombination::setNGoodCscLayers
void setNGoodCscLayers(int nEta, int nPhi)
Definition
MuonSegmentCombination.h:64
Muon::MuonSegmentCombination::m_segmentsPerStation
SegmentVecVec m_segmentsPerStation
Definition
MuonSegmentCombination.h:79
Muon::MuonSegmentCombination::clear
void clear()
clear data
Definition
MuonSegmentCombination.cxx:48
Muon::MuonSegmentCombination::copy
void copy(const MuonSegmentCombination &segc)
copy data
Definition
MuonSegmentCombination.cxx:34
Muon::MuonSegmentCombination::addSegments
bool addSegments(std::unique_ptr< SegmentVec >)
Add a set of Segments for a give station.
Definition
MuonSegmentCombination.h:102
Muon::MuonSegmentCombination::useStripsInSegment
bool useStripsInSegment(int isEta) const
Definition
MuonSegmentCombination.h:92
Muon::MuonSegmentCombination::operator=
MuonSegmentCombination & operator=(const MuonSegmentCombination &)
assigment operator
Definition
MuonSegmentCombination.cxx:25
Muon::MuonSegmentCombination::m_nGood
int m_nGood[2]
Definition
MuonSegmentCombination.h:82
Muon::MuonSegmentCombination::numberOfStations
unsigned int numberOfStations() const
Number of stations with segment.
Definition
MuonSegmentCombination.h:108
Muon::MuonSegmentCombination::~MuonSegmentCombination
~MuonSegmentCombination()
Destructor.
Definition
MuonSegmentCombination.cxx:15
Trk::Segment
Base class for all TrackSegment implementations, extends the common MeasurementBase.
Definition
Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:56
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0