CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTChambThSegm Class Reference

#include <DTChambThSegm.h>

Inheritance diagram for DTChambThSegm:
DTTrigData

Public Member Functions

DTChamberId ChamberId () const override
 Identifier of the associated chamber. More...
 
void clear ()
 Clear. More...
 
int code (const int i) const
 Return the code for a given set of 7 BTI. More...
 
 DTChambThSegm (const DTChambThSegm &seg)
 Constructor. More...
 
 DTChambThSegm (DTChamberId, int, int *, int *)
 Constructor. More...
 
DTChambThSegmoperator= (const DTChambThSegm &seg)
 Assignment operator. More...
 
int position (const int i) const
 Return the position for a given set of 7 BTI. More...
 
void print () const override
 Print. More...
 
int quality (const int i) const
 Return the quality for a given set of 7 BTI. More...
 
int step () const
 Return step number. More...
 
 ~DTChambThSegm () override
 Destructor. More...
 
- Public Member Functions inherited from DTTrigData
 DTTrigData ()
 Constructor. More...
 
int sector () const
 Return sector number. More...
 
int station () const
 Return station number. More...
 
int wheel () const
 Return wheel number. More...
 
virtual ~DTTrigData ()
 Destructor. More...
 

Private Attributes

DTChamberId m_chamberid
 parent chamber More...
 
myint8 m_outPos [7]
 output code More...
 
myint8 m_outQual [7]
 
int m_step
 step number More...
 

Detailed Description

Muon Chamber Trigger Theta candidate

Author
C. Grandi

Definition at line 39 of file DTChambThSegm.h.

Constructor & Destructor Documentation

◆ DTChambThSegm() [1/2]

DTChambThSegm::DTChambThSegm ( DTChamberId  chamberid,
int  step,
int *  pos,
int *  qual 
)

Constructor.

Definition at line 34 of file DTChambThSegm.cc.

35  : m_chamberid(chamberid), m_step(step) {
36  for (int i = 0; i < 7; i++) {
37  m_outPos[i] = pos[i];
38  m_outQual[i] = qual[i];
39  }
40 }

References mps_fire::i, m_outPos, and m_outQual.

◆ DTChambThSegm() [2/2]

DTChambThSegm::DTChambThSegm ( const DTChambThSegm seg)

Constructor.

Definition at line 42 of file DTChambThSegm.cc.

42  : m_chamberid(seg.m_chamberid), m_step(seg.m_step) {
43  for (int i = 0; i < 7; i++) {
44  m_outPos[i] = seg.m_outPos[i];
45  m_outQual[i] = seg.m_outQual[i];
46  }
47 }

References mps_fire::i, m_outPos, and m_outQual.

◆ ~DTChambThSegm()

DTChambThSegm::~DTChambThSegm ( )
override

Destructor.

Definition at line 52 of file DTChambThSegm.cc.

52 {}

Member Function Documentation

◆ ChamberId()

DTChamberId DTChambThSegm::ChamberId ( ) const
inlineoverridevirtual

Identifier of the associated chamber.

Implements DTTrigData.

Definition at line 60 of file DTChambThSegm.h.

60 { return m_chamberid; }

References m_chamberid.

Referenced by DTSectCollThSegm::ChamberId(), and DTSectCollThCand::CoarseSync().

◆ clear()

void DTChambThSegm::clear ( )

Clear.

◆ code()

int DTChambThSegm::code ( const int  i) const

Return the code for a given set of 7 BTI.

Definition at line 70 of file DTChambThSegm.cc.

70  {
71  if (i < 0 || i >= 7) {
72  std::cout << "DTChambThSegm::code : index out of range: " << i;
73  std::cout << "0 returned!" << std::endl;
74  return 0;
75  }
76  return (int)(m_outPos[i] + m_outQual[i]);
77 }

References gather_cfg::cout, mps_fire::i, m_outPos, and m_outQual.

Referenced by DTSectCollThSegm::code().

◆ operator=()

DTChambThSegm & DTChambThSegm::operator= ( const DTChambThSegm seg)

Assignment operator.

Definition at line 58 of file DTChambThSegm.cc.

58  {
59  if (this != &seg) {
61  m_step = seg.m_step;
62  for (int i = 0; i < 7; i++) {
63  m_outPos[i] = seg.m_outPos[i];
64  m_outQual[i] = seg.m_outQual[i];
65  }
66  }
67  return *this;
68 }

References mps_fire::i, m_chamberid, m_outPos, m_outQual, and m_step.

◆ position()

int DTChambThSegm::position ( const int  i) const

Return the position for a given set of 7 BTI.

Definition at line 79 of file DTChambThSegm.cc.

79  {
80  if (i < 0 || i >= 7) {
81  std::cout << "DTChambThSegm::position : index out of range: " << i;
82  std::cout << "0 returned!" << std::endl;
83  return 0;
84  }
85  return (int)m_outPos[i];
86 }

References gather_cfg::cout, mps_fire::i, and m_outPos.

Referenced by DTSectColl::addTSTheta(), and DTSectCollThSegm::position().

◆ print()

void DTChambThSegm::print ( void  ) const
overridevirtual

Print.

Implements DTTrigData.

Definition at line 97 of file DTChambThSegm.cc.

97  {
98  std::cout << "TP at step " << step() << ", in wheel " << wheel();
99  std::cout << ", station " << station() << ", sector " << sector();
100  std::cout << " : " << std::endl;
101  std::cout << " output codes : ";
102  int i = 0;
103  for (i = 0; i < 7; i++) {
104  std::cout << (int)(m_outPos[i] + m_outQual[i]) << " ";
105  }
106  std::cout << "\n";
107 }

References gather_cfg::cout, mps_fire::i, createfilelist::int, m_outPos, m_outQual, DTTrigData::sector(), DTTrigData::station(), step(), and DTTrigData::wheel().

Referenced by DTSectCollThCand::print().

◆ quality()

int DTChambThSegm::quality ( const int  i) const

Return the quality for a given set of 7 BTI.

Definition at line 88 of file DTChambThSegm.cc.

88  {
89  if (i < 0 || i >= 7) {
90  std::cout << "DTChambThSegm::quality : index out of range: " << i;
91  std::cout << "0 returned!" << std::endl;
92  return 0;
93  }
94  return (int)m_outQual[i];
95 }

References gather_cfg::cout, mps_fire::i, and m_outQual.

Referenced by DTSectCollThSegm::quality().

◆ step()

int DTChambThSegm::step ( ) const
inline

Return step number.

Definition at line 57 of file DTChambThSegm.h.

57 { return m_step; }

References m_step.

Referenced by print(), and DTSectCollThCand::print().

Member Data Documentation

◆ m_chamberid

DTChamberId DTChambThSegm::m_chamberid
private

parent chamber

Definition at line 76 of file DTChambThSegm.h.

Referenced by ChamberId(), and operator=().

◆ m_outPos

myint8 DTChambThSegm::m_outPos[7]
private

output code

Definition at line 82 of file DTChambThSegm.h.

Referenced by code(), DTChambThSegm(), operator=(), position(), and print().

◆ m_outQual

myint8 DTChambThSegm::m_outQual[7]
private

Definition at line 83 of file DTChambThSegm.h.

Referenced by code(), DTChambThSegm(), operator=(), print(), and quality().

◆ m_step

int DTChambThSegm::m_step
private

step number

Definition at line 79 of file DTChambThSegm.h.

Referenced by operator=(), and step().

mps_fire.i
i
Definition: mps_fire.py:355
step
step
Definition: StallMonitor.cc:94
DTTrigData::sector
int sector() const
Return sector number.
Definition: DTTrigData.h:53
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
DTChambThSegm::step
int step() const
Return step number.
Definition: DTChambThSegm.h:57
DTTrigData::station
int station() const
Return station number.
Definition: DTTrigData.h:50
DTChambThSegm::m_outQual
myint8 m_outQual[7]
Definition: DTChambThSegm.h:83
DTChambThSegm::m_outPos
myint8 m_outPos[7]
output code
Definition: DTChambThSegm.h:82
createfilelist.int
int
Definition: createfilelist.py:10
DTChambThSegm::m_chamberid
DTChamberId m_chamberid
parent chamber
Definition: DTChambThSegm.h:76
DTTrigData::wheel
int wheel() const
Return wheel number.
Definition: DTTrigData.h:47
DTChambThSegm::m_step
int m_step
step number
Definition: DTChambThSegm.h:79