ATLAS Offline Software
Loading...
Searching...
No Matches
SegmTrack Class Reference

#include <SegmTrack.h>

Collaboration diagram for SegmTrack:

Public Member Functions

 SegmTrack ()
 SegmTrack (const Muon::MuonSegment *pSegm0, const Muon::MuonSegment *pSegm1, const Muon::MuonSegment *pSegm2, const Muon::MuonSegment *pSegm3)
 SegmTrack (const Muon::MuonSegment *p[4])
 SegmTrack (const SegmTrack &p)
SegmTrackoperator= (const SegmTrack &p)
const Muon::MuonSegmentoperator[] (int j) const
const Muon::MuonSegmentat (int j) const
int Side () const

Private Member Functions

void SetSide ()

Private Attributes

int m_AC
const Muon::MuonSegmentm_Segments [4]

Detailed Description

Definition at line 22 of file SegmTrack.h.

Constructor & Destructor Documentation

◆ SegmTrack() [1/4]

SegmTrack::SegmTrack ( )
inline

Definition at line 25 of file SegmTrack.h.

25 {
26 m_Segments[0] = 0;
27 m_Segments[1] = 0;
28 m_Segments[2] = 0;
29 m_Segments[3] = 0;
30 m_AC=-1;
31 }
const Muon::MuonSegment * m_Segments[4]
Definition SegmTrack.h:89

◆ SegmTrack() [2/4]

SegmTrack::SegmTrack ( const Muon::MuonSegment * pSegm0,
const Muon::MuonSegment * pSegm1,
const Muon::MuonSegment * pSegm2,
const Muon::MuonSegment * pSegm3 )
inline

Definition at line 34 of file SegmTrack.h.

34 {
35 m_Segments[0] = pSegm0;
36 m_Segments[1] = pSegm1;
37 m_Segments[2] = pSegm2;
38 m_Segments[3] = pSegm3;
39 SetSide();
40 }
void SetSide()
Definition SegmTrack.h:100

◆ SegmTrack() [3/4]

SegmTrack::SegmTrack ( const Muon::MuonSegment * p[4])
inline

Definition at line 43 of file SegmTrack.h.

43 {
44 m_Segments[0] = p[0];
45 m_Segments[1] = p[1];
46 m_Segments[2] = p[2];
47 m_Segments[3] = p[3];
48 SetSide();
49 }

◆ SegmTrack() [4/4]

SegmTrack::SegmTrack ( const SegmTrack & p)
inline

Definition at line 53 of file SegmTrack.h.

53 {
54 m_Segments[0] = p.at(0);
55 m_Segments[1] = p.at(1);
56 m_Segments[2] = p.at(2);
57 m_Segments[3] = p.at(3);
58 m_AC = p.Side();
59 }

Member Function Documentation

◆ at()

const Muon::MuonSegment * SegmTrack::at ( int j) const
inline

Definition at line 75 of file SegmTrack.h.

75 {
76 if(j>3||j<0)return 0;
77 return m_Segments[j];
78 }

◆ operator=()

SegmTrack & SegmTrack::operator= ( const SegmTrack & p)
inline

Definition at line 61 of file SegmTrack.h.

61 {
62 m_Segments[0] = p.at(0);
63 m_Segments[1] = p.at(1);
64 m_Segments[2] = p.at(2);
65 m_Segments[3] = p.at(3);
66 m_AC = p.Side();
67 return *this;
68 }

◆ operator[]()

const Muon::MuonSegment * SegmTrack::operator[] ( int j) const
inline

Definition at line 71 of file SegmTrack.h.

71 {
72 return at(j);
73 }
const Muon::MuonSegment * at(int j) const
Definition SegmTrack.h:75

◆ SetSide()

void SegmTrack::SetSide ( )
inlineprivate

Definition at line 100 of file SegmTrack.h.

100 {
101 int AC=-1;
102 // Loop over segments/stations, ignore empty pointers
103 for(int jMDT=0;jMDT<4;jMDT++){
104 if(m_Segments[jMDT]==0)continue;
105 // Get Side from segment
106 int tempAC = (m_Segments[jMDT]->globalPosition().eta()<0);
107 if(AC==-1){// If first segment
108 AC = tempAC;
109 }
110 else if(AC!=tempAC){
111 // If two segments give different side values in the same track
112 std::cout<<"ERROR: SegmTrack: Segments are on different sides"<<std::endl;
113 AC=-1;
114 break;
115 }
116 }
117 m_AC=AC;
118}
Scalar eta() const
pseudorapidity method

◆ Side()

int SegmTrack::Side ( ) const
inline

Definition at line 80 of file SegmTrack.h.

80 {
81 return m_AC;
82 }

Member Data Documentation

◆ m_AC

int SegmTrack::m_AC
private

Definition at line 88 of file SegmTrack.h.

◆ m_Segments

const Muon::MuonSegment* SegmTrack::m_Segments[4]
private

Definition at line 89 of file SegmTrack.h.


The documentation for this class was generated from the following file: