Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Muon::MuonSegmentCombination Class Reference

#include <MuonSegmentCombination.h>

Collaboration diagram for Muon::MuonSegmentCombination:

Public Types

typedef std::vector< std::unique_ptr< MuonSegment > > SegmentVec
 
typedef std::vector< std::unique_ptr< SegmentVec > > SegmentVecVec
 

Public Member Functions

 MuonSegmentCombination ()
 Default constructor. More...
 
 ~MuonSegmentCombination ()
 Destructor. More...
 
 MuonSegmentCombination (const MuonSegmentCombination &)
 Copy constructor. More...
 
MuonSegmentCombinationoperator= (const MuonSegmentCombination &)
 assigment operator More...
 
bool addSegments (std::unique_ptr< SegmentVec >)
 Add a set of Segments for a give station. More...
 
unsigned int numberOfStations () const
 Number of stations with segment. More...
 
SegmentVecstationSegments (unsigned int index) const
 Access to segments in a given station. More...
 
unsigned int numberOfAmbiguities () const
 Number of ambiguities. More...
 
void setNGoodCscLayers (int nEta, int nPhi)
 
int getNGoodCscLayers (int isEta) const
 
bool use2LayerSegments (int isEta) const
 
bool useStripsInSegment (int isEta) const
 

Private Member Functions

void clear ()
 clear data More...
 
void copy (const MuonSegmentCombination &segc)
 copy data More...
 

Private Attributes

SegmentVecVec m_segmentsPerStation
 
int m_nGood [2] {}
 

Detailed Description

Class to hold a set of MuonSegments belonging together. The MuonSegments are stored per chamber, making it easier to keep track of possible ambiguities per station.

Author
niels.nosp@m..van.nosp@m..eldi.nosp@m.k@ce.nosp@m.rn.ch

Definition at line 30 of file MuonSegmentCombination.h.

Member Typedef Documentation

◆ SegmentVec

typedef std::vector< std::unique_ptr<MuonSegment> > Muon::MuonSegmentCombination::SegmentVec

Definition at line 32 of file MuonSegmentCombination.h.

◆ SegmentVecVec

typedef std::vector< std::unique_ptr<SegmentVec> > Muon::MuonSegmentCombination::SegmentVecVec

Definition at line 33 of file MuonSegmentCombination.h.

Constructor & Destructor Documentation

◆ MuonSegmentCombination() [1/2]

Muon::MuonSegmentCombination::MuonSegmentCombination ( )

Default constructor.

Definition at line 10 of file MuonSegmentCombination.cxx.

11  {
12  m_nGood[0]=4; m_nGood[1]=4;
13  }

◆ ~MuonSegmentCombination()

Muon::MuonSegmentCombination::~MuonSegmentCombination ( )

Destructor.

Definition at line 15 of file MuonSegmentCombination.cxx.

16  {
17  clear();
18  }

◆ MuonSegmentCombination() [2/2]

Muon::MuonSegmentCombination::MuonSegmentCombination ( const MuonSegmentCombination segc)

Copy constructor.

Definition at line 20 of file MuonSegmentCombination.cxx.

21  {
22  copy( segc );
23  }

Member Function Documentation

◆ addSegments()

bool Muon::MuonSegmentCombination::addSegments ( std::unique_ptr< SegmentVec segs)
inline

Add a set of Segments for a give station.

For now no sorting but this could be changed so the segments are stored with increasing radius. Also no check is performed whether there are already segments for the given station. This is up to the user.

Definition at line 102 of file MuonSegmentCombination.h.

103  {
104  m_segmentsPerStation.push_back( std::move(segs) );
105  return true;
106  }

◆ clear()

void Muon::MuonSegmentCombination::clear ( )
private

clear data

Definition at line 48 of file MuonSegmentCombination.cxx.

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  }

◆ copy()

void Muon::MuonSegmentCombination::copy ( const MuonSegmentCombination segc)
private

copy data

Definition at line 34 of file MuonSegmentCombination.cxx.

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  }

◆ getNGoodCscLayers()

int Muon::MuonSegmentCombination::getNGoodCscLayers ( int  isEta) const
inline

Definition at line 97 of file MuonSegmentCombination.h.

98  {
99  return m_nGood[isEta];
100  }

◆ numberOfAmbiguities()

unsigned int Muon::MuonSegmentCombination::numberOfAmbiguities ( ) const
inline

Number of ambiguities.

Definition at line 120 of file MuonSegmentCombination.h.

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  }

◆ numberOfStations()

unsigned int Muon::MuonSegmentCombination::numberOfStations ( ) const
inline

Number of stations with segment.

Definition at line 108 of file MuonSegmentCombination.h.

109  {
110  return m_segmentsPerStation.size();
111  }

◆ operator=()

MuonSegmentCombination & Muon::MuonSegmentCombination::operator= ( const MuonSegmentCombination segc)

assigment operator

Definition at line 25 of file MuonSegmentCombination.cxx.

26  {
27  if( this != &segc ){
28  clear();
29  copy( segc );
30  }
31  return *this;
32  }

◆ setNGoodCscLayers()

void Muon::MuonSegmentCombination::setNGoodCscLayers ( int  nEta,
int  nPhi 
)
inline

Definition at line 64 of file MuonSegmentCombination.h.

64 {m_nGood[0]=nPhi; m_nGood[1]=nEta;}

◆ stationSegments()

MuonSegmentCombination::SegmentVec * Muon::MuonSegmentCombination::stationSegments ( unsigned int  index) const
inline

Access to segments in a given station.

Definition at line 114 of file MuonSegmentCombination.h.

115  {
116  if( index < numberOfStations() ) return m_segmentsPerStation[index].get();
117  return 0;
118  }

◆ use2LayerSegments()

bool Muon::MuonSegmentCombination::use2LayerSegments ( int  isEta) const
inline

Definition at line 86 of file MuonSegmentCombination.h.

87  {
88  return m_nGood[isEta]==2;
89  }

◆ useStripsInSegment()

bool Muon::MuonSegmentCombination::useStripsInSegment ( int  isEta) const
inline

Definition at line 92 of file MuonSegmentCombination.h.

93  {
94  return m_nGood[isEta]>1;
95  }

Member Data Documentation

◆ m_nGood

int Muon::MuonSegmentCombination::m_nGood[2] {}
private

Definition at line 82 of file MuonSegmentCombination.h.

◆ m_segmentsPerStation

SegmentVecVec Muon::MuonSegmentCombination::m_segmentsPerStation
private

Definition at line 79 of file MuonSegmentCombination.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
index
Definition: index.py:1
skel.it
it
Definition: skel.GENtoEVGEN.py:407
Muon::MuonSegmentCombination::copy
void copy(const MuonSegmentCombination &segc)
copy data
Definition: MuonSegmentCombination.cxx:34
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
Muon::MuonSegmentCombination::m_nGood
int m_nGood[2]
Definition: MuonSegmentCombination.h:82
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::MuonSegmentCombination::m_segmentsPerStation
SegmentVecVec m_segmentsPerStation
Definition: MuonSegmentCombination.h:79
DeMoScan.index
string index
Definition: DeMoScan.py:364
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
TrigVSI::AlgConsts::nEta
constexpr int nEta
Default bin number of eta for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:26
Muon::MuonSegmentCombination::numberOfStations
unsigned int numberOfStations() const
Number of stations with segment.
Definition: MuonSegmentCombination.h:108