ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LVL1MUONIF::Lvl1MuForwardSectorLogicData Class Reference

Class representing data from a forward SL board. More...

#include <Lvl1MuForwardSectorLogicData.h>

Inheritance diagram for LVL1MUONIF::Lvl1MuForwardSectorLogicData:
Collaboration diagram for LVL1MUONIF::Lvl1MuForwardSectorLogicData:

Public Types

typedef unsigned int SectorLogicWord
 

Public Member Functions

 Lvl1MuForwardSectorLogicData ()
 
 ~Lvl1MuForwardSectorLogicData ()
 
Lvl1MuForwardSectorLogicDataoperator= (const Lvl1MuSectorLogicData &right)
 
SectorLogicWord getWordFormat () const
 Get data in 32 bit word format. More...
 
const Lvl1MuSectorLogicDataconvertFromWordFormat (const SectorLogicWord &)
 Convert SectorLogicData from 32 bit word data. More...
 
bool is2candidatesInSector () const
 
int bcid () const
 
void bcid (int value)
 
int roi (size_t id) const
 
void roi (size_t id, int value)
 
int ovl (size_t id) const
 
void ovl (size_t id, int value)
 
int pt (size_t id) const
 
void pt (size_t id, int value)
 
int charge (size_t id) const
 
void charge (size_t id, int value)
 
bool is2candidates (size_t id) const
 
void set2candidatesInSector ()
 
void clear2candidatesInSector ()
 
void set2candidates (size_t id)
 
void clear2candidates (size_t id)
 
void clear ()
 
int getSystemId () const
 

Protected Member Functions

virtual void printOut (std::ostream &out) const
 print out data More...
 

Protected Attributes

bool m_2candidatesInSector
 
int m_roi [2]
 
int m_ovl [2]
 
int m_pt [2]
 
bool m_2candidates [2]
 
int m_bcid
 
int m_charge [2]
 
int m_id_system
 

Detailed Description

Class representing data from a forward SL board.

   This class representds the data coming from a single
   TGC forward SL board to the MuCTPI.
See also
LVL1MUONIF::Lvl1MuSectorLogicData
Revision
187728
Date
2009-05-27 18:18:06 +0200 (Wed, 27 May 2009)

Definition at line 27 of file Lvl1MuForwardSectorLogicData.h.

Member Typedef Documentation

◆ SectorLogicWord

Definition at line 44 of file Lvl1MuSectorLogicData.h.

Constructor & Destructor Documentation

◆ Lvl1MuForwardSectorLogicData()

LVL1MUONIF::Lvl1MuForwardSectorLogicData::Lvl1MuForwardSectorLogicData ( )

Definition at line 11 of file Lvl1MuForwardSectorLogicData.cxx.

13  m_id_system = 2;
14  }

◆ ~Lvl1MuForwardSectorLogicData()

LVL1MUONIF::Lvl1MuForwardSectorLogicData::~Lvl1MuForwardSectorLogicData ( )
inline

Definition at line 31 of file Lvl1MuForwardSectorLogicData.h.

31 {}

Member Function Documentation

◆ bcid() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::bcid ( ) const
inlineinherited

Definition at line 47 of file Lvl1MuSectorLogicData.h.

47 { return m_bcid; }

◆ bcid() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::bcid ( int  value)
inlineinherited

Definition at line 56 of file Lvl1MuSectorLogicData.h.

56 { m_bcid = value; }

◆ charge() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::charge ( size_t  id) const
inlineinherited

Definition at line 51 of file Lvl1MuSectorLogicData.h.

51 { return m_charge[ id ]; }

◆ charge() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::charge ( size_t  id,
int  value 
)
inlineinherited

Definition at line 60 of file Lvl1MuSectorLogicData.h.

60 { m_charge[ id ] = value; }

◆ clear()

void LVL1MUONIF::Lvl1MuSectorLogicData::clear ( )
inherited

Definition at line 80 of file Lvl1MuSectorLogicData.cxx.

80  {
81  m_2candidatesInSector = false;
82  m_bcid = 0;
83  for ( size_t i = 0; i < 2; ++i ) {
84  m_roi[ i ] = -1;
85  m_ovl[ i ] = -1;
86  m_pt[ i ] = -1;
87  m_charge[ i ] = -1;
88  m_2candidates[ i ] = false;
89  }
90  }

◆ clear2candidates()

void LVL1MUONIF::Lvl1MuSectorLogicData::clear2candidates ( size_t  id)
inlineinherited

Definition at line 62 of file Lvl1MuSectorLogicData.h.

62 { m_2candidates[ id ] = false; }

◆ clear2candidatesInSector()

void LVL1MUONIF::Lvl1MuSectorLogicData::clear2candidatesInSector ( )
inlineinherited

Definition at line 55 of file Lvl1MuSectorLogicData.h.

55 { m_2candidatesInSector = false;}

◆ convertFromWordFormat()

const Lvl1MuSectorLogicData & LVL1MUONIF::Lvl1MuForwardSectorLogicData::convertFromWordFormat ( const SectorLogicWord value)
virtual

Convert SectorLogicData from 32 bit word data.

Implements LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 81 of file Lvl1MuForwardSectorLogicData.cxx.

81  {
82 
83  unsigned int val;
84  // Bit 0
85  if ( value & 0x0001 ) {
87  } else {
89  }
90  // Bit 1-9
91  val = ( value >> 1 ) & 0x003F;
92  if ( val == 0x003F ) {
93  roi( 0, -1 );
94  ovl( 0, -1 );
95  } else {
96  roi( 0, val );
97  ovl( 0, -1 );
98  }
99  // Bit 10-18
100  val = ( value >> 10 ) & 0x003F;
101  if ( val == 0x003F ) {
102  roi( 1, -1 );
103  ovl( 1, -1 );
104  } else {
105  roi( 1, val );
106  ovl( 1, -1 );
107  }
108  // bit 19-21
109  val = ( value >> 19 ) & 0x0007;
110  if ( val == 0x0007 ) {
111  pt( 0, -1 );
112  } else {
113  pt( 0, val );
114  }
115  // bit 22-24
116  val = ( value >> 22 ) & 0x0007;
117  if ( val == 0x0007 ) {
118  pt( 1, -1 );
119  } else {
120  pt( 1, val );
121  }
122  // bit 25
123  clear2candidates( 0 );
124  // bit 26
125  clear2candidates( 1 );
126  // bit 27-29
127  val = ( value >> 27 ) & 0x0007;
128  bcid( val );
129  // bit 30
130  val = ( value >> 30 ) & 0x0001;
131  if ( val != 0 ) charge( 0, + 1 );
132  // bit 31
133  val = ( value >> 31 ) & 0x0001;
134  if ( val != 0 ) charge( 1, + 1 );
135 
136  return *this;
137  }

◆ getSystemId()

int LVL1MUONIF::Lvl1MuSectorLogicData::getSystemId ( ) const
inlineinherited

Definition at line 73 of file Lvl1MuSectorLogicData.h.

73 { return m_id_system; }

◆ getWordFormat()

Lvl1MuSectorLogicData::SectorLogicWord LVL1MUONIF::Lvl1MuForwardSectorLogicData::getWordFormat ( ) const
virtual

Get data in 32 bit word format.

Implements LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 32 of file Lvl1MuForwardSectorLogicData.cxx.

32  {
33 
34  unsigned int val = 0;
35  // Bit 0
36  if ( is2candidatesInSector() ) {
37  val = 1;
38  }
39  // Bit 1-6
40  if ( roi( 0 ) < 0 ) {
41  val |= 0x007E;
42  } else {
43  val |= ( roi( 0 ) & 0x03F ) << 1;
44  }
45  // Bit 7-9
46  val |= 0x0380;
47  // Bit 10-15
48  if ( roi( 1 ) < 0 ) {
49  val |= 0x00FC00;
50  } else {
51  val |= ( roi( 1 ) & 0x003F ) << 10;
52  }
53  // Bit 16-18
54  val |= 0x070000;
55  // bit 19-21
56  if ( pt( 0 ) < 0 ) {
57  val |= 0x0380000;
58  } else {
59  val |= ( pt( 0 ) & 0x0007 ) << 19;
60  }
61  // bit 22-24
62  if ( pt( 1 ) < 0 ) {
63  val |= 0x01C00000;
64  } else {
65  val |= ( pt( 1 ) & 0x0007 ) << 22;
66  }
67  // bit 25
68  val |= 0x02000000;
69  // bit 26
70  val |= 0x04000000;
71  // bit 27-29
72  val |= ( bcid() & 0x07 ) << 27;
73  // bit 30
74  if ( charge( 0 ) > 0 ) val |= 0x040000000;
75  // bit 31
76  if ( charge( 1 ) > 0 ) val |= 0x040000000;
77 
78  return val;
79  }

◆ is2candidates()

bool LVL1MUONIF::Lvl1MuSectorLogicData::is2candidates ( size_t  id) const
inlineinherited

Definition at line 52 of file Lvl1MuSectorLogicData.h.

52 { return m_2candidates[ id ]; }

◆ is2candidatesInSector()

bool LVL1MUONIF::Lvl1MuSectorLogicData::is2candidatesInSector ( ) const
inlineinherited

Definition at line 46 of file Lvl1MuSectorLogicData.h.

46 { return m_2candidatesInSector; }

◆ operator=()

Lvl1MuForwardSectorLogicData & LVL1MUONIF::Lvl1MuForwardSectorLogicData::operator= ( const Lvl1MuSectorLogicData right)

Definition at line 16 of file Lvl1MuForwardSectorLogicData.cxx.

16  {
17  if ( ( right.getSystemId() == m_id_system ) &&
18  ( this != &right ) ) {
19  m_bcid = right.bcid();
20  m_2candidatesInSector = right.is2candidatesInSector();
21  for ( size_t i = 0; i < 2; ++i ) {
22  m_roi[ i ] = right.roi( i );
23  m_ovl[ i ] = right.ovl( i );
24  m_pt[ i ] = right.pt( i );
25  m_charge[ i ] = right.charge( i );
26  m_2candidates[ i ] = right.is2candidates( i );
27  }
28  }
29  return *this;
30  }

◆ ovl() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::ovl ( size_t  id) const
inlineinherited

Definition at line 49 of file Lvl1MuSectorLogicData.h.

49 { return m_ovl[ id ]; }

◆ ovl() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::ovl ( size_t  id,
int  value 
)
inlineinherited

Definition at line 58 of file Lvl1MuSectorLogicData.h.

58 { m_ovl[ id ] = value; }

◆ printOut()

void LVL1MUONIF::Lvl1MuForwardSectorLogicData::printOut ( std::ostream &  out) const
protectedvirtual

print out data

Reimplemented from LVL1MUONIF::Lvl1MuSectorLogicData.

Definition at line 139 of file Lvl1MuForwardSectorLogicData.cxx.

139  {
140 
141  out << "Bit 0 " << " >2candidates in a sector ";
142  out << std::setw( 8 ) << m_2candidatesInSector << std::endl;
143 
144  out << "Bit 1-6 " << " ROI<1> ";
145  if ( m_roi[ 0 ] == -1 ) {
146  out << std::setw( 8 ) << "NA" << std::endl;
147  } else {
148  out << std::setw( 8 ) << m_roi[ 0 ] << std::endl;
149  }
150  out << "Bit 7-9 " << " NA " << std::endl;
151  out << "Bit 10-15 " << " ROI<2> ";
152  if ( m_roi[ 1 ] == -1 ) {
153  out << std::setw( 8 ) << "NA" << std::endl;
154  } else {
155  out << std::setw( 8 ) << m_roi[ 1 ] << std::endl;
156  }
157  out << "Bit 16-18 " << " NA " << std::endl;
158 
159  out << "Bit 19-21 " << " Pt1 ";
160  if ( m_pt[ 0 ] == -1 ) {
161  out << std::setw( 8 ) << "No Hit" << std::endl;
162  } else {
163  out << std::setw( 8 ) << m_pt[ 0 ] << std::endl;
164  }
165  out << "Bit 22-24 " << " Pt2 ";
166  if ( m_pt[ 1 ] == -1 ) {
167  out << std::setw( 8 ) << "No Hit" << std::endl;
168  } else {
169  out << std::setw( 8 ) << m_pt[ 1 ] << std::endl;
170  }
171 
172  out << "Bit 25-26 " << " NA " << std::endl;
173  out << "Bit 27-29 " << " BCID ";
174  out << std::setw( 8 ) << m_bcid << std::endl;
175  out << "Bit 30 " << " charge in ROI1 ";
176  out << std::setw( 8 ) << m_charge[ 0 ] << std::endl;
177  out << "Bit 31 " << " charge in ROI2 ";
178  out << std::setw( 8 ) << m_charge[ 1 ] << std::endl;
179 
180  }

◆ pt() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::pt ( size_t  id) const
inlineinherited

Definition at line 50 of file Lvl1MuSectorLogicData.h.

50 { return m_pt[ id ]; }

◆ pt() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::pt ( size_t  id,
int  value 
)
inlineinherited

Definition at line 59 of file Lvl1MuSectorLogicData.h.

59 { m_pt[ id ] = value; }

◆ roi() [1/2]

int LVL1MUONIF::Lvl1MuSectorLogicData::roi ( size_t  id) const
inlineinherited

Definition at line 48 of file Lvl1MuSectorLogicData.h.

48 { return m_roi[ id ]; }

◆ roi() [2/2]

void LVL1MUONIF::Lvl1MuSectorLogicData::roi ( size_t  id,
int  value 
)
inlineinherited

Definition at line 57 of file Lvl1MuSectorLogicData.h.

57 { m_roi[ id ] = value; }

◆ set2candidates()

void LVL1MUONIF::Lvl1MuSectorLogicData::set2candidates ( size_t  id)
inlineinherited

Definition at line 61 of file Lvl1MuSectorLogicData.h.

61 { m_2candidates[ id ] = true; }

◆ set2candidatesInSector()

void LVL1MUONIF::Lvl1MuSectorLogicData::set2candidatesInSector ( )
inlineinherited

Definition at line 54 of file Lvl1MuSectorLogicData.h.

54 { m_2candidatesInSector = true; }

Member Data Documentation

◆ m_2candidates

bool LVL1MUONIF::Lvl1MuSectorLogicData::m_2candidates[2]
protectedinherited

Definition at line 83 of file Lvl1MuSectorLogicData.h.

◆ m_2candidatesInSector

bool LVL1MUONIF::Lvl1MuSectorLogicData::m_2candidatesInSector
protectedinherited

Definition at line 79 of file Lvl1MuSectorLogicData.h.

◆ m_bcid

int LVL1MUONIF::Lvl1MuSectorLogicData::m_bcid
protectedinherited

Definition at line 84 of file Lvl1MuSectorLogicData.h.

◆ m_charge

int LVL1MUONIF::Lvl1MuSectorLogicData::m_charge[2]
protectedinherited

Definition at line 85 of file Lvl1MuSectorLogicData.h.

◆ m_id_system

int LVL1MUONIF::Lvl1MuSectorLogicData::m_id_system
protectedinherited

Definition at line 86 of file Lvl1MuSectorLogicData.h.

◆ m_ovl

int LVL1MUONIF::Lvl1MuSectorLogicData::m_ovl[2]
protectedinherited

Definition at line 81 of file Lvl1MuSectorLogicData.h.

◆ m_pt

int LVL1MUONIF::Lvl1MuSectorLogicData::m_pt[2]
protectedinherited

Definition at line 82 of file Lvl1MuSectorLogicData.h.

◆ m_roi

int LVL1MUONIF::Lvl1MuSectorLogicData::m_roi[2]
protectedinherited

Definition at line 80 of file Lvl1MuSectorLogicData.h.


The documentation for this class was generated from the following files:
LVL1MUONIF::Lvl1MuSectorLogicData::pt
int pt(size_t id) const
Definition: Lvl1MuSectorLogicData.h:50
LVL1MUONIF::Lvl1MuSectorLogicData::m_2candidatesInSector
bool m_2candidatesInSector
Definition: Lvl1MuSectorLogicData.h:79
LVL1MUONIF::Lvl1MuSectorLogicData::bcid
int bcid() const
Definition: Lvl1MuSectorLogicData.h:47
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
LVL1MUONIF::Lvl1MuSectorLogicData::m_2candidates
bool m_2candidates[2]
Definition: Lvl1MuSectorLogicData.h:83
athena.value
value
Definition: athena.py:124
LVL1MUONIF::Lvl1MuSectorLogicData::m_charge
int m_charge[2]
Definition: Lvl1MuSectorLogicData.h:85
LVL1MUONIF::Lvl1MuSectorLogicData::clear2candidates
void clear2candidates(size_t id)
Definition: Lvl1MuSectorLogicData.h:62
LVL1MUONIF::Lvl1MuSectorLogicData::m_ovl
int m_ovl[2]
Definition: Lvl1MuSectorLogicData.h:81
LVL1MUONIF::Lvl1MuSectorLogicData::clear2candidatesInSector
void clear2candidatesInSector()
Definition: Lvl1MuSectorLogicData.h:55
LVL1MUONIF::Lvl1MuSectorLogicData::m_pt
int m_pt[2]
Definition: Lvl1MuSectorLogicData.h:82
LVL1MUONIF::Lvl1MuSectorLogicData::Lvl1MuSectorLogicData
Lvl1MuSectorLogicData()
Definition: Lvl1MuSectorLogicData.cxx:13
LVL1MUONIF::Lvl1MuSectorLogicData::ovl
int ovl(size_t id) const
Definition: Lvl1MuSectorLogicData.h:49
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1MUONIF::Lvl1MuSectorLogicData::m_id_system
int m_id_system
Definition: Lvl1MuSectorLogicData.h:86
LVL1MUONIF::Lvl1MuSectorLogicData::roi
int roi(size_t id) const
Definition: Lvl1MuSectorLogicData.h:48
LVL1MUONIF::Lvl1MuSectorLogicData::m_roi
int m_roi[2]
Definition: Lvl1MuSectorLogicData.h:80
LVL1MUONIF::Lvl1MuSectorLogicData::set2candidatesInSector
void set2candidatesInSector()
Definition: Lvl1MuSectorLogicData.h:54
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
LVL1MUONIF::Lvl1MuSectorLogicData::charge
int charge(size_t id) const
Definition: Lvl1MuSectorLogicData.h:51
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
LVL1MUONIF::Lvl1MuSectorLogicData::is2candidatesInSector
bool is2candidatesInSector() const
Definition: Lvl1MuSectorLogicData.h:46
LVL1MUONIF::Lvl1MuSectorLogicData::m_bcid
int m_bcid
Definition: Lvl1MuSectorLogicData.h:84