ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonRecEvent
MuonSegment
src
MuonSegmentCombination.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonSegment/MuonSegmentCombination.h
"
6
#include "
TrkSegment/Segment.h
"
7
8
namespace
Muon
{
9
10
MuonSegmentCombination::MuonSegmentCombination
()
11
{
12
m_nGood
[0]=4;
m_nGood
[1]=4;
13
}
14
15
MuonSegmentCombination::~MuonSegmentCombination
()
16
{
17
clear
();
18
}
19
20
MuonSegmentCombination::MuonSegmentCombination
(
const
MuonSegmentCombination
& segc )
21
{
22
copy
( segc );
23
}
24
25
MuonSegmentCombination
&
MuonSegmentCombination::operator=
(
const
MuonSegmentCombination
& segc )
26
{
27
if
(
this
!= &segc ){
28
clear
();
29
copy
( segc );
30
}
31
return
*
this
;
32
}
33
34
void
MuonSegmentCombination::copy
(
const
MuonSegmentCombination
& segc )
35
{
36
m_nGood
[0]=segc.
getNGoodCscLayers
(0);
37
m_nGood
[1]=segc.
getNGoodCscLayers
(1);
38
unsigned
int
nst( segc.
numberOfStations
() );
39
for
(
unsigned
int
i=0;i<nst;++i ){
40
SegmentVec::const_iterator vit = segc.
stationSegments
( i )->begin();
41
SegmentVec::const_iterator vit_end = segc.
stationSegments
( i )->end();
42
std::unique_ptr<SegmentVec> newsegs(
new
SegmentVec
());
43
for
( ; vit!=vit_end; ++vit ) newsegs->push_back( std::unique_ptr<MuonSegment>((*vit)->clone()) );
44
m_segmentsPerStation
.push_back(std::move(newsegs));
45
}
46
}
47
48
void
MuonSegmentCombination::clear
()
49
{
50
SegmentVecVec::iterator it =
m_segmentsPerStation
.begin();
51
SegmentVecVec::iterator it_end =
m_segmentsPerStation
.end();
52
53
for
( ; it!=it_end; ++it ){
54
SegmentVec::iterator vit = (*it)->begin();
55
SegmentVec::iterator vit_end = (*it)->end();
56
for
( ; vit!=vit_end; ++vit ) (*vit).reset();
57
(*it)->clear();
58
(*it).reset();
59
}
60
m_segmentsPerStation
.clear();
61
}
62
63
}
MuonSegmentCombination.h
Segment.h
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::stationSegments
SegmentVec * stationSegments(unsigned int index) const
Access to segments in a given station.
Definition
MuonSegmentCombination.h:114
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::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
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