ATLAS Offline Software
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 
6 #include "TrkSegment/Segment.h"
7 
8 namespace Muon {
9 
11  {
12  m_nGood[0]=4; m_nGood[1]=4;
13  }
14 
16  {
17  clear();
18  }
19 
21  {
22  copy( segc );
23  }
24 
26  {
27  if( this != &segc ){
28  clear();
29  copy( segc );
30  }
31  return *this;
32  }
33 
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 
49  {
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 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::MuonSegmentCombination
Definition: MuonSegmentCombination.h:30
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MuonSegmentCombination::stationSegments
SegmentVec * stationSegments(unsigned int index) const
Access to segments in a given station.
Definition: MuonSegmentCombination.h:114
Muon::MuonSegmentCombination::copy
void copy(const MuonSegmentCombination &segc)
copy data
Definition: MuonSegmentCombination.cxx:34
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
MuonSegmentCombination.h
Muon::MuonSegmentCombination::m_nGood
int m_nGood[2]
Definition: MuonSegmentCombination.h:82
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::MuonSegmentCombination::~MuonSegmentCombination
~MuonSegmentCombination()
Destructor.
Definition: MuonSegmentCombination.cxx:15
Muon::MuonSegmentCombination::m_segmentsPerStation
SegmentVecVec m_segmentsPerStation
Definition: MuonSegmentCombination.h:79
Muon::MuonSegmentCombination::operator=
MuonSegmentCombination & operator=(const MuonSegmentCombination &)
assigment operator
Definition: MuonSegmentCombination.cxx:25
Muon::MuonSegmentCombination::clear
void clear()
clear data
Definition: MuonSegmentCombination.cxx:48
Muon::MuonSegmentCombination::SegmentVec
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Definition: MuonSegmentCombination.h:32
Muon::MuonSegmentCombination::MuonSegmentCombination
MuonSegmentCombination()
Default constructor.
Definition: MuonSegmentCombination.cxx:10
Muon::MuonSegmentCombination::numberOfStations
unsigned int numberOfStations() const
Number of stations with segment.
Definition: MuonSegmentCombination.h:108
Muon::MuonSegmentCombination::getNGoodCscLayers
int getNGoodCscLayers(int isEta) const
Definition: MuonSegmentCombination.h:97
Segment.h