L1Trigger
GlobalMuonTrigger
src
L1MuGMTMIAUPhiPro2LUT.cc
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
3
// Class: L1MuGMTMIAUPhiPro2LUT
4
//
5
//
6
//
7
// Author :
8
// H. Sakulin HEPHY Vienna
9
//
10
// Migrated to CMSSW:
11
// I. Mikulec
12
//
13
//--------------------------------------------------
14
15
//-----------------------
16
// This Class's Header --
17
//-----------------------
18
#include "
L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro2LUT.h
"
19
20
//---------------
21
// C++ Headers --
22
//---------------
23
24
//-------------------------------
25
// Collaborating Class Headers --
26
//-------------------------------
27
#include "
L1Trigger/GlobalMuonTrigger/src/L1MuGMTConfig.h
"
28
29
//-------------------
30
// InitParameters --
31
//-------------------
32
33
void
L1MuGMTMIAUPhiPro2LUT::InitParameters
() {
m_IsolationCellSizePhi
=
L1MuGMTConfig::getIsolationCellSizePhi
(); }
34
35
//--------------------------------------------------------------------------------
36
// Phi Projection LUT 2: Set phi-select-bits based on start calo region(5bit), offset(3bit),
37
// ===================== fine-grain offset(1bit) and charge(1 bit)
38
//
39
// The 18 phi-select bits select which calo regions have to be checked for MIP
40
// and Quiet information. For MIP by default only one region is checked while for
41
// the Quiet bits multiple regions can be ckecked based on IsolationCellSizePhi.
42
// If IsolationCellSizePhi is even, then the fine-grain offset decides in which
43
// direction from the central region to check additional regions.
44
//
45
//--------------------------------------------------------------------------------
46
47
unsigned
L1MuGMTMIAUPhiPro2LUT::TheLookupFunction
(
48
int
idx
,
unsigned
cphi_start,
unsigned
cphi_fine,
unsigned
cphi_ofs,
unsigned
charge
)
const
{
49
// idx is MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC
50
// INPUTS: cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1)
51
// OUTPUTS: phi_sel(18)
52
53
// this LUT generates the 18 phi-select bits for the 18 Calo regions
54
if
(cphi_start > 17)
55
return
0;
56
57
int
isISO = (
idx
/ 2) % 2;
58
59
int
offset
= (
int
(cphi_ofs) - 1) * ((
charge
== 0) ? 1 : -1);
60
61
int
center_region = (18 +
int
(cphi_start) +
offset
) % 18;
62
63
// for MIP bit assignment, only one region is selected
64
unsigned
phi_select_word = 1 << center_region;
65
66
// for ISOlation bit assignment, multiple regions can be selected according to the IsolationCellSize
67
if
(isISO) {
68
int
imin = center_region - (
m_IsolationCellSizePhi
- 1) / 2;
69
int
imax = center_region + (
m_IsolationCellSizePhi
- 1) / 2;
70
71
// for even number of isolation cells check the fine grain info
72
if
(
m_IsolationCellSizePhi
% 2 == 0) {
73
if
(cphi_fine == 1)
74
imax++;
75
else
76
imin--;
77
}
78
79
for
(
int
i
= imin;
i
<= imax;
i
++)
80
phi_select_word |= 1 << ((
i
+ 18) % 18);
81
}
82
83
return
phi_select_word;
84
}
mps_fire.i
i
Definition:
mps_fire.py:428
L1MuGMTMIAUPhiPro2LUT.h
L1MuGMTMIAUPhiPro2LUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
The lookup function - here the functionality of the LUT is implemented.
Definition:
L1MuGMTMIAUPhiPro2LUT.cc:47
heavyIonCSV_trainingSettings.idx
idx
Definition:
heavyIonCSV_trainingSettings.py:5
L1MuGMTConfig::getIsolationCellSizePhi
static int getIsolationCellSizePhi()
Definition:
L1MuGMTConfig.h:125
L1MuGMTConfig.h
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition:
ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTMIAUPhiPro2LUT::m_IsolationCellSizePhi
int m_IsolationCellSizePhi
Private data members (LUT parameters);.
Definition:
L1MuGMTMIAUPhiPro2LUT.h:92
createfilelist.int
int
Definition:
createfilelist.py:10
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:82
L1MuGMTMIAUPhiPro2LUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition:
L1MuGMTMIAUPhiPro2LUT.cc:33
Generated for CMSSW Reference Manual by
1.8.16