ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SectorL Class Reference

#include <SectorL.h>

Inheritance diagram for SectorL:
Collaboration diagram for SectorL:

Public Member Functions

 SectorL (int run, int event, CMAword debug, ubit16 subsys, ubit16 sect, uint NOBXS)
 
 ~SectorL ()
 
void load (ubit16 padAdd, ubit16 BX, ubit16 RoIAdd, ubit16 pT, ubit16 OPL, ubit16 overlapPhi, ubit16 overlapEta, ubit16 RoiAmbiguity, ubit16 BCIDcounter)
 
void execute ()
 
ubit16 numberOfBunches ()
 
ubit16 sectorAddress ()
 
CMAword output (ubit16 i)
 
CMAword outputToMuCTPI ()
 
ObjectType tag () const
 
std::string name () const
 
virtual void Print (std::ostream &, bool) const
 

Private Member Functions

void storePT (ubit16 i, ubit16 j, ubit16 k)
 

Private Attributes

int m_run
 array lengths were dependant on NOBXS were updated to assume this is at most 8 More...
 
int m_event
 
ubit16 m_nBunMax
 
ubit16 m_subsystem
 
ubit16 m_sector
 
ubit16 m_maxNumPads
 
ubit16 m_numOfPads [8]
 
ubit16 m_padData
 
ubit16 m_sectorInput [8][10][8]
 
ubit16 m_numberOfRoIs [8]
 
ubit16 m_sectorOut [8][10]
 
ubit16 m_pTArray [8][2][2]
 
CMAword m_sectorOutput [8]
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 11 of file SectorL.h.

Constructor & Destructor Documentation

◆ SectorL()

SectorL::SectorL ( int  run,
int  event,
CMAword  debug,
ubit16  subsys,
ubit16  sect,
uint  NOBXS 
)

Definition at line 18 of file SectorL.cxx.

18  : BaseObject(Hardware, "SectorLogic") {
19  ubit16 i, j, k;
20  m_padData = 7;
21  m_maxNumPads = 10;
22  m_nBunMax = NOBXS;
23 
24  for (i = 0; i < m_nBunMax; i++) { m_numOfPads[i] = 0; }
25 
26  m_run = run;
27  m_event = event;
28  m_subsystem = subsys;
29  m_sector = sect;
30 
31  for (i = 0; i < m_nBunMax; i++) {
32  m_numberOfRoIs[i] = 0;
33  m_sectorOutput[i] = 0;
34  for (k = 0; k < 10; k++) { m_sectorOut[i][k] = 0; }
35  for (k = 0; k < 2; k++) {
36  m_pTArray[i][k][0] = 0;
37  m_pTArray[i][k][1] = 0;
38  } // end-of-for(k
39  for (j = 0; j < m_maxNumPads; j++) {
40  for (k = 0; k < m_padData; k++) { m_sectorInput[i][j][k] = 0; } // end-of-for(k
41  }
42  }
43 } // end-of-SectorL::SectorL

◆ ~SectorL()

SectorL::~SectorL ( )

Definition at line 45 of file SectorL.cxx.

45 {} // end-of-SectorL::~SectorL

Member Function Documentation

◆ execute()

void SectorL::execute ( )

Definition at line 64 of file SectorL.cxx.

64  {
65  //
66  // temporary code to fill at least partially the output
67  // buffer of the sector logic
68  //
69  ubit16 i, j, k;
70  for (i = 0; i < m_nBunMax; i++) {
71  for (j = 0; j < m_numOfPads[i]; j++) {
72  if (m_sectorInput[i][j][2]) m_numberOfRoIs[i]++;
73  // if(m_sectorInput[i][j][2]) {
74  // cout<<" Bunch "<<i<<" PadInd "<<j<<" PT "<<m_sectorInput[i][j][2]
75  // <<endl;
76  // }//end-of-if(m_sectorInput[i][j][2]
77  for (k = 0; k < 2; k++) {
78  if (m_sectorInput[i][j][2] > m_pTArray[i][k][0]) {
79  storePT(i, j, k);
80  break;
81  } // end-of-if(m_sector
82  } // end-of-for(k
83  } // end-of-for(j
84  } // end-of-for(i
85  //
86  // for(i=0; i<m_nBunMax; i++) {
87  // cout<<" pTArray[0] pT= "<<m_pTArray[i][0][0]
88  // <<" padInd= "<<m_pTArray[i][0][1]<<endl
89  // <<" pTArray[1] pT= "<<m_pTArray[i][1][0]
90  // <<" padInd= "<<m_pTArray[i][1][1]<<endl
91  // <<" number of RoIs= "<<m_numberOfRoIs[i]<<endl;
92  //}
93  //
94  // now fill the output buffer
95  //
96  for (i = 0; i < m_nBunMax; i++) {
97  // TEMP: use m_sectorOut[i][8] and [9] to store OVL1 and OVL2
98 
99  m_sectorOut[i][8] = 0;
100  m_sectorOut[i][9] = 0;
101 
102  if (m_numberOfRoIs[i] > 2) m_sectorOut[i][0] = 1;
103  if (m_numberOfRoIs[i]) {
104  ubit16 padInd = m_pTArray[i][0][1];
105  m_sectorOut[i][1] = 4 * m_sectorInput[i][padInd][0] + m_sectorInput[i][padInd][1] + 1;
106  m_sectorOut[i][3] = m_sectorInput[i][padInd][2];
107  m_sectorOut[i][8] = m_sectorInput[i][padInd][4] + 2 * m_sectorInput[i][padInd][5];
108 
109  if (m_numberOfRoIs[i] > 1) {
110  ubit16 padInd = m_pTArray[i][1][1];
111  m_sectorOut[i][2] = 4 * m_sectorInput[i][padInd][0] + m_sectorInput[i][padInd][1] + 1;
112  m_sectorOut[i][4] = m_sectorInput[i][padInd][2];
113  m_sectorOut[i][9] = m_sectorInput[i][padInd][4] + 2 * m_sectorInput[i][padInd][5];
114 
115  } // end-of-if(m_numberOfRoIs[i]>1)
116  } // end-of-if(m_numberOfRoIs[i])
117  m_sectorOut[i][5] = 0; //>1 Candidate ROI1
118  m_sectorOut[i][6] = 0; //>1 Candidate ROI2
119  m_sectorOut[i][7] = 0; // BCID
120  // m_sectorOut[i][8] = 0;//candidate1 sign
121  // m_sectorOut[i][9] = 0;//candidate2 sign
122  if (!m_sectorOut[i][3]) m_sectorOut[i][3] = 7;
123  if (!m_sectorOut[i][4]) m_sectorOut[i][4] = 7;
124 
125  // cout<<" Bunch ID "<<i<<endl
126  // <<" >2 Candidates in a sector "<<m_sectorOut[i][0]<<endl
127  // <<" ROI 1 "<<m_sectorOut[i][1]<<endl
128  // <<" ROI 2 "<<m_sectorOut[i][2]<<endl
129  // <<" PT1 "<<m_sectorOut[i][3]<<endl
130  // <<" PT2 "<<m_sectorOut[i][4]<<endl
131  // <<" >1 Candidate ROI1 "<<m_sectorOut[i][5]<<endl
132  // <<" >1 Candidate ROI2 "<<m_sectorOut[i][6]<<endl
133  // <<" BCID counter "<<m_sectorOut[i][7]<<endl
134  // <<" Candidate1 sign "<<m_sectorOut[i][8]<<endl
135  // <<" Candidate2 sign "<<m_sectorOut[i][9]<<endl;
136  //
137  // now fille the Sector Logic Output word
138  //
139  m_sectorOutput[i] = m_sectorOut[i][0];
140  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][1] << 1); // ROI1
141  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][2] << 10); // ROI2
142  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][3] << 19); // PT1
143  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][4] << 22); // PT2
144  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][5] << 25); // more than 1 _1
145  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][6] << 26); // more than 1 _2
146  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][7] << 27); // BX
147  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][8] << 8); // OVL1
148  m_sectorOutput[i] = m_sectorOutput[i] | (m_sectorOut[i][9] << 17); // OVL2
149  }
150 } // end-of-SectorL::execute

◆ load()

void SectorL::load ( ubit16  padAdd,
ubit16  BX,
ubit16  RoIAdd,
ubit16  pT,
ubit16  OPL,
ubit16  overlapPhi,
ubit16  overlapEta,
ubit16  RoiAmbiguity,
ubit16  BCIDcounter 
)

Definition at line 47 of file SectorL.cxx.

48  {
49  if (padAdd < 10 && RoIAdd < 4 && pT < 7 && OPL < 2 && overlapPhi < 2 && overlapEta < 2 && RoIAmbiguity < 2) {
50  m_sectorInput[BX][m_numOfPads[BX]][0] = padAdd;
51  m_sectorInput[BX][m_numOfPads[BX]][1] = RoIAdd;
52  m_sectorInput[BX][m_numOfPads[BX]][2] = pT;
53  m_sectorInput[BX][m_numOfPads[BX]][3] = OPL;
54  m_sectorInput[BX][m_numOfPads[BX]][4] = overlapPhi;
55  m_sectorInput[BX][m_numOfPads[BX]][5] = overlapEta;
56  m_sectorInput[BX][m_numOfPads[BX]][6] = RoIAmbiguity;
57  m_sectorInput[BX][m_numOfPads[BX]][7] = BCIDcounter;
58  m_numOfPads[BX]++;
59  } else {
60  throw std::out_of_range("problems loading Pad Output Data");
61  }
62 } // end-of-SectorL::load

◆ name()

std::string BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ numberOfBunches()

ubit16 SectorL::numberOfBunches ( )
inline

Definition at line 18 of file SectorL.h.

18 { return m_nBunMax; };

◆ output()

CMAword SectorL::output ( ubit16  i)

Definition at line 164 of file SectorL.cxx.

164  {
165  if (i < m_nBunMax) {
166  return m_sectorOutput[i];
167  } else {
168  return 0xffffffff;
169  }
170 }

◆ outputToMuCTPI()

CMAword SectorL::outputToMuCTPI ( )
inline

Definition at line 21 of file SectorL.h.

21 { return output(m_nBunMax / 2); };

◆ Print()

virtual void BaseObject::Print ( std::ostream &  ,
bool   
) const
inlinevirtualinherited

◆ sectorAddress()

ubit16 SectorL::sectorAddress ( )
inline

Definition at line 19 of file SectorL.h.

19 { return m_sector; };

◆ storePT()

void SectorL::storePT ( ubit16  i,
ubit16  j,
ubit16  k 
)
private

Definition at line 152 of file SectorL.cxx.

152  {
153  if (!modeInd) {
154  m_pTArray[bunch][1][0] = m_pTArray[bunch][0][0]; // copy pT
155  m_pTArray[bunch][1][1] = m_pTArray[bunch][0][1]; // copy padAdd
156  m_pTArray[bunch][0][0] = m_sectorInput[bunch][padInd][2];
157  m_pTArray[bunch][0][1] = padInd;
158  } else {
159  m_pTArray[bunch][1][0] = m_sectorInput[bunch][padInd][2];
160  m_pTArray[bunch][1][1] = padInd;
161  }
162 }

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

Member Data Documentation

◆ m_event

int SectorL::m_event
private

Definition at line 26 of file SectorL.h.

◆ m_maxNumPads

ubit16 SectorL::m_maxNumPads
private

Definition at line 30 of file SectorL.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_nBunMax

ubit16 SectorL::m_nBunMax
private

Definition at line 27 of file SectorL.h.

◆ m_numberOfRoIs

ubit16 SectorL::m_numberOfRoIs[8]
private

Definition at line 34 of file SectorL.h.

◆ m_numOfPads

ubit16 SectorL::m_numOfPads[8]
private

Definition at line 31 of file SectorL.h.

◆ m_padData

ubit16 SectorL::m_padData
private

Definition at line 32 of file SectorL.h.

◆ m_pTArray

ubit16 SectorL::m_pTArray[8][2][2]
private

Definition at line 36 of file SectorL.h.

◆ m_run

int SectorL::m_run
private

array lengths were dependant on NOBXS were updated to assume this is at most 8

Definition at line 25 of file SectorL.h.

◆ m_sector

ubit16 SectorL::m_sector
private

Definition at line 29 of file SectorL.h.

◆ m_sectorInput

ubit16 SectorL::m_sectorInput[8][10][8]
private

Definition at line 33 of file SectorL.h.

◆ m_sectorOut

ubit16 SectorL::m_sectorOut[8][10]
private

Definition at line 35 of file SectorL.h.

◆ m_sectorOutput

CMAword SectorL::m_sectorOutput[8]
private

Definition at line 37 of file SectorL.h.

◆ m_subsystem

ubit16 SectorL::m_subsystem
private

Definition at line 28 of file SectorL.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.


The documentation for this class was generated from the following files:
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
SectorL::m_run
int m_run
array lengths were dependant on NOBXS were updated to assume this is at most 8
Definition: SectorL.h:21
SectorL::output
CMAword output(ubit16 i)
Definition: SectorL.cxx:164
SectorL::m_pTArray
ubit16 m_pTArray[8][2][2]
Definition: SectorL.h:36
SectorL::m_padData
ubit16 m_padData
Definition: SectorL.h:32
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
SectorL::m_sectorOutput
CMAword m_sectorOutput[8]
Definition: SectorL.h:37
SectorL::m_subsystem
ubit16 m_subsystem
Definition: SectorL.h:28
SectorL::m_sectorInput
ubit16 m_sectorInput[8][10][8]
Definition: SectorL.h:33
SectorL::m_sector
ubit16 m_sector
Definition: SectorL.h:29
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:92
SectorL::m_numOfPads
ubit16 m_numOfPads[8]
Definition: SectorL.h:31
SectorL::m_nBunMax
ubit16 m_nBunMax
Definition: SectorL.h:27
Hardware
@ Hardware
Definition: BaseObject.h:11
SectorL::storePT
void storePT(ubit16 i, ubit16 j, ubit16 k)
Definition: SectorL.cxx:152
SectorL::m_maxNumPads
ubit16 m_maxNumPads
Definition: SectorL.h:30
BaseObject::BaseObject
BaseObject(ObjectType, const std::string &)
Definition: BaseObject.cxx:7
SectorL::m_numberOfRoIs
ubit16 m_numberOfRoIs[8]
Definition: SectorL.h:34
SectorL::m_event
int m_event
Definition: SectorL.h:26
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
SectorL::m_sectorOut
ubit16 m_sectorOut[8][10]
Definition: SectorL.h:35
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
fitman.k
k
Definition: fitman.py:528