ATLAS Offline Software
Pad.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigT1RPChardware_Pad_H
6 #define TrigT1RPChardware_Pad_H
7 
9 
10 class Pad {
11 public:
12  Pad(int run, int event, CMAword debug, ubit16 subsys, ubit16 sect, ubit16 padad, ubit16 lowhig, bool oldSimulation, int NOBXS);
13  // ubit16 padInput[2][2][2][NOBXS][2]);
14  ~Pad();
15  void reset();
17  void setProjectionLogic(ubit16 prologic);
18  void load(ubit16 lowhig, ubit16 etaphi, ubit16 CMadd, ubit16 BX, ubit16 thres, ubit16 overl);
19  void execute();
20  void display(int flag);
21  //
22  // readout method
23  //
24  int get_PADID();
26  ubit16 getRoI(ubit16 bunch);
27  ubit16 getPTCoding(ubit16 bunch);
28  ubit16 getOPL(ubit16 bunch);
33  bool isOldSimulation(); // M.C. 3/3/2010
34  void setOldSimulation(bool value);
35 
36  // M.Corradi Jan 9, 2015
37  void setFeetOn(bool feet) { m_feet_on = feet; };
38  void setFeetThresholds(unsigned short int ith, unsigned short int th) { m_feet_thresholds[ith] = th; };
39 
40 private:
41  int m_run;
42  int m_event;
43  bool m_oldSimulation; // M.C. 3/3/2010
44  bool m_feet_on;
45  unsigned short int m_feet_thresholds[3];
46 
47  //
48  // pad parameters
49  //
50  // Load the "Hit in Outer Plane" flag
51  //
52  ubit16 m_nBunMax; // Maximum number of Bunch crossings to be cons.
53  ubit16 m_thHitOuterPlane; // gives the address from 1 to 3 of the
54  // threshold used for Outer Plane Confirmation
55  // 0 = no hit In Outer Plane required
56  //
57  // store this information in hitInOuterPlane
58  //
59  ubit16 m_hitInOuterPlane[3]; // hitInOuterPlane[i] i=0,1,2 threshold address
60  // = 0 => no Outer Plane coincidence required
61  // > 0 => Outer Plane coincidence required
62  //
63  // pad attributes: subsystem, sector, padadd, low/high-pt;
64  //
65  ubit16 m_subsystem; // subsystem 0,1
66  ubit16 m_sector; // sector address
67  ubit16 m_padadd; // pad address
68  ubit16 m_lowhigh; // lowhigh_pt type, 0=low; 1=high
69  //
71 
72  // in the data and with the new cabling (m_oldSimulation==false)
73  // the local RoI definition is
74  // roi = phi_id*2+eta_id
75  // and does not correspond to a simple geometrical order
76  //
77  // the drawing below reports the old roi numbering convention
78  // which is consistent with the simulation with RPCcablingSim (m_oldSimulation==true)
79  //
80  // RoI numbering
81  //
82  // CM0 CM1
83  // | | |
84  // | | |
85  // | ROI 1 | ROI 3 | CM1
86  // | | |
87  // +---------------+------------------
88  // | | | ^ phi
89  // | ROI 0 | ROI 2 | CM0 |
90  // | | | |
91  // | | | |
92  // ==================== SECTOR GEOMETRICAL AXIS =====================> eta
93  // | | | |
94  // | | | |
95  // | ROI 0 | ROI 2 | CM0 |
96  // | | | |
97  // +---------------+------------------ V phi
98  // | | |
99  // | ROI 1 | ROI 3 | CM1
100  // | | |
101  // | | |
102  // CM0 CM1
103  //
104  // padIn[i][j][k][l][m]
105  // ^ ^ ^ ^ ^
106  // | | | | |
107  // | | | | --- 0=threshold; 1=overlap
108  // | | | ------ bunch-crossing identifier (in NOBXS bunches range)
109  // | | --------- matrix local address (0,1)
110  // | ------------ eta-phi matrix: 0=eta; 1=phi.
111  // --------------- low-pt=0, high-pt=1;
112  //
113  ubit16 m_padIn[2][2][2][8][2]; //assumes max NOBXS=8
114  //
115  // PAD LOGIC STEP n. 2
116  //
117  // padStep2[i][j][k]
118  // ^ ^ ^
119  // | | |
120  // | | ----- results summary data as follows:
121  // | | j= 0,1 highest threshold satisfied by CM with local
122  // | | address "j"
123  // | | j= 2 highest satisfied threshold by pad logic
124  // | | j= 3 CM local address with highest threshold
125  // | | j= 4 number of CMs with any threshold satisfied
126  // | | j= 5 overlap flag
127  // | | j= 6 hit in outer plane
128  // | | j= 7 Roi ambiguity
129  // | |
130  // | ----- eta-phi
131  // -------- bunch-crossing identifier (in NOBXS bunches range)
132  //
133  //
134  ubit16 m_padStep2[8][2][8]; //m_padStep2[NOBXS][2][8], assumes NOBXS=8 at most
135  //
136  // PAD LOGIC OUTPUT
137  //
138  // padOut[i][j]
139  // ^ ^
140  // | |
141  // | ---- pad logic output:
142  // | j=0 RoI address in the pad region
143  // | j=1 pT coding (three low-pT thresh. + three high-pt thresh.)
144  // | 1,2,3 increasing low-pt thresholds
145  // | 4,5,6 increasing hig-pt thresholds
146  // | j=2 OPL (hit in outer plane)
147  // | j=3 Overlap phi flag to be solved by MUCTPI
148  // | j=4 Overlap eta flag to be solved by Sector Logic
149  // | j=5 RoI Ambiguity
150  // | j=6 BCID counter
151  // |
152  // ------- bunch-crossing identifier (in NOBXS bunches range)
153  //
154  //
155  //
156  ubit16 m_padOut[8][7]; //assumes NOBXS=8 at most
157  //
158  void threshold();
159  void overlap();
160  void makeOut();
161  void makeOutEta();
162  void makeOutPhi();
163  void makeOutEtaAndPhi();
164  void makeOutEtaOrPhi();
165  void makeFeet();
166 
167 }; // end-of-class Pad
168 #endif
Pad::m_nBunMax
ubit16 m_nBunMax
Definition: Pad.h:52
Pad::load
void load(ubit16 lowhig, ubit16 etaphi, ubit16 CMadd, ubit16 BX, ubit16 thres, ubit16 overl)
Definition: Pad.cxx:121
Pad::getOverlapEta
ubit16 getOverlapEta(ubit16 bunch)
Definition: Pad.cxx:440
Pad::isOldSimulation
bool isOldSimulation()
Definition: Pad.cxx:470
Pad::m_run
int m_run
Definition: Pad.h:38
Pad::m_oldSimulation
bool m_oldSimulation
Definition: Pad.h:43
Pad::~Pad
~Pad()
Definition: Pad.cxx:59
Pad::m_projectionLogic
ubit16 m_projectionLogic
Definition: Pad.h:70
Pad::setDefaultConfiguration
void setDefaultConfiguration()
Definition: Pad.cxx:93
athena.value
value
Definition: athena.py:122
Pad::m_lowhigh
ubit16 m_lowhigh
Definition: Pad.h:68
Pad::makeOutPhi
void makeOutPhi()
Definition: Pad.cxx:240
Pad::makeOut
void makeOut()
Definition: Pad.cxx:209
Pad::threshold
void threshold()
Definition: Pad.cxx:153
Pad::makeOutEtaOrPhi
void makeOutEtaOrPhi()
Definition: Pad.cxx:284
Pad::getPTCoding
ubit16 getPTCoding(ubit16 bunch)
Definition: Pad.cxx:410
Pad::m_hitInOuterPlane
ubit16 m_hitInOuterPlane[3]
Definition: Pad.h:59
Pad::m_feet_on
bool m_feet_on
Definition: Pad.h:44
python.TriggerHandler.th
th
Definition: TriggerHandler.py:296
Pad::display
void display(int flag)
Definition: Pad.cxx:307
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
Pad::getRoIAmbiguity
ubit16 getRoIAmbiguity(ubit16 bunch)
Definition: Pad.cxx:450
Pad::makeOutEtaAndPhi
void makeOutEtaAndPhi()
Definition: Pad.cxx:259
Pad::m_padIn
ubit16 m_padIn[2][2][2][8][2]
Definition: Pad.h:113
Lvl1Def.h
Pad::m_thHitOuterPlane
ubit16 m_thHitOuterPlane
Definition: Pad.h:53
master.flag
bool flag
Definition: master.py:29
Pad::getOverlapPhi
ubit16 getOverlapPhi(ubit16 bunch)
Definition: Pad.cxx:430
run
Definition: run.py:1
Pad::setOldSimulation
void setOldSimulation(bool value)
Definition: Pad.cxx:473
Pad::getBCIDCounter
ubit16 getBCIDCounter(ubit16 bunch)
Definition: Pad.cxx:460
Pad::m_subsystem
ubit16 m_subsystem
Definition: Pad.h:65
Pad::m_event
int m_event
Definition: Pad.h:42
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
Pad::setFeetThresholds
void setFeetThresholds(unsigned short int ith, unsigned short int th)
Definition: Pad.h:38
Pad::m_padadd
ubit16 m_padadd
Definition: Pad.h:67
Pad::execute
void execute()
Definition: Pad.cxx:141
CMAword
uint32_t CMAword
Definition: Lvl1Def.h:17
Pad::get_PADID
int get_PADID()
Definition: Pad.cxx:396
Pad::reset
void reset()
Definition: Pad.cxx:64
Pad::Pad
Pad(int run, int event, CMAword debug, ubit16 subsys, ubit16 sect, ubit16 padad, ubit16 lowhig, bool oldSimulation, int NOBXS)
Definition: Pad.cxx:16
Pad::m_feet_thresholds
unsigned short int m_feet_thresholds[3]
Definition: Pad.h:45
Pad::padDebug
CMAword padDebug
Definition: Pad.h:25
Pad
Definition: Pad.h:10
Pad::setProjectionLogic
void setProjectionLogic(ubit16 prologic)
Definition: Pad.cxx:112
Pad::m_sector
ubit16 m_sector
Definition: Pad.h:66
Pad::m_padOut
ubit16 m_padOut[8][7]
Definition: Pad.h:156
ubit16
unsigned short int ubit16
Definition: RpcByteStreamEncoder.h:20
Pad::overlap
void overlap()
Definition: Pad.cxx:194
Pad::makeFeet
void makeFeet()
Definition: Pad.cxx:300
Pad::m_padStep2
ubit16 m_padStep2[8][2][8]
Definition: Pad.h:134
Pad::makeOutEta
void makeOutEta()
Definition: Pad.cxx:221
Pad::setFeetOn
void setFeetOn(bool feet)
Definition: Pad.h:37
Pad::getRoI
ubit16 getRoI(ubit16 bunch)
Definition: Pad.cxx:400
Pad::getOPL
ubit16 getOPL(ubit16 bunch)
Definition: Pad.cxx:420