ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1TGC
src
TGCBIS78CoincidenceMap.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include <fstream>
7
#include <sstream>
8
#include <string>
9
10
#include "
TrigT1TGC/TGCBIS78CoincidenceMap.h
"
11
#include "
TrigT1TGC/BIS78TrigOut.h
"
12
#include "
TrigT1TGC/TGCDatabaseManager.h
"
13
#include "
PathResolver/PathResolver.h
"
14
15
#include "
TrigT1TGC/TGCArguments.h
"
16
17
namespace
LVL1TGC
{
18
19
TGCBIS78CoincidenceMap::TGCBIS78CoincidenceMap
(
LVL1TGCTrigger::TGCArguments
* tgcargs,
const
std::string& version)
20
:
AthMessaging
(
"TGCBIS78CoincidenceMap"
),
21
m_verName
(version),
22
m_tgcArgs
(tgcargs)
23
{
24
setLevel
(
tgcArgs
()->MSGLEVEL());
25
26
if
(!
tgcArgs
()->USE_BIS78()){
return
;}
27
28
// initialize map
29
for
(
size_t
sec=0; sec <
kNEndcapTrigSector
; sec++){
30
for
(
size_t
ssc=0; ssc <
kNMaxSSC
; ssc++){
31
for
(
size_t
pos=0; pos <
kNRoiInSSC
; pos++){
32
m_flagROI
[pos][ssc][sec] = 1;
33
}
34
}
35
}
36
37
for
(
size_t
dr=0; dr!=
N_DETA
; dr++) {
38
for
(
size_t
dphi=0; dphi!=
N_DPHI
; dphi++) {
39
m_CW
[dr][dphi].resize(
kNumberOfEndcapRoI
);
40
std::fill(
m_CW
[dr][dphi].begin(),
m_CW
[dr][dphi].end(), 0);
41
}
42
}
43
44
//---------Read out CW data---------
45
if
(!this->
readMap
()) {
46
// BIS78 trigger flag is set to false when the map reading failed.
47
tgcArgs
()->
set_USE_BIS78
(
false
);
48
ATH_MSG_INFO
(
"NOT using BIS78"
);
49
}
else
{
50
ATH_MSG_INFO
(
"TGC BIS78 CW version of "
<<
m_verName
<<
" is selected"
);
51
}
52
}
53
54
55
//TGC-BIS78 Eta-Phi Coincidence
56
int
TGCBIS78CoincidenceMap::TGCBIS78_pt
(
const
BIS78TrigOut
*bis78Out,
int
/*roi*/
)
const
57
{
58
std::vector<uint8_t> bis78Eta_vec=bis78Out->
getBIS78eta
();
59
std::vector<uint8_t> bis78Phi_vec=bis78Out->
getBIS78phi
();
60
std::vector<uint8_t> bis78Deta_vec=bis78Out->
getBIS78Deta
();
61
std::vector<uint8_t> bis78Dphi_vec=bis78Out->
getBIS78Dphi
();
62
std::vector<uint8_t> bis78flag3over3eta_vec=bis78Out->
getBIS78flag3over3eta
();
63
std::vector<uint8_t> bis78flag3over3phi_vec=bis78Out->
getBIS78flag3over3phi
();
64
65
int
pt=0;
66
// temporal algorithm
67
for
(
unsigned
int
bis78hit_id=0; bis78hit_id!=bis78Eta_vec.size(); bis78hit_id++){
68
// calculate dR, dPhi bin # from eta/phiIndex?
69
// for now, if there is a hit at BIS78, it returns true always
70
pt=1;
71
}
72
73
return
pt;
74
}
75
76
int
TGCBIS78CoincidenceMap::getFlagROI
(
const
unsigned
int
roi,
77
const
unsigned
int
ssc,
78
const
unsigned
int
sec,
79
const
unsigned
int
side)
const
80
{
81
if
(side !=
TGCSide::ASIDE
)
return
0;
// BIS78 only in A side
82
83
if
(roi >=
kNRoiInSSC
)
return
-1;
84
if
(ssc >=
kNMaxSSC
)
return
0;
85
if
(sec >=
kNEndcapTrigSector
)
return
-1;
86
87
// which inner LUT will be implemented
88
return
m_flagROI
[roi][ssc][sec];
89
}
90
91
bool
TGCBIS78CoincidenceMap::readMap
()
92
{
93
// no LUT available for TGC-BIS78 coincidence
94
// just return true for now
95
96
return
true
;
97
}
98
99
}
// end of namespace
ATH_MSG_INFO
#define ATH_MSG_INFO(x,...)
Definition
AthMsgStreamMacros.h:45
BIS78TrigOut.h
PathResolver.h
TGCArguments.h
TGCBIS78CoincidenceMap.h
TGCDatabaseManager.h
AthMessaging::setLevel
void setLevel(MSG::Level lvl)
Change the current logging level.
Definition
AthMessaging.cxx:28
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
LVL1TGCTrigger::TGCArguments
Definition
TGCArguments.h:12
LVL1TGCTrigger::TGCArguments::set_USE_BIS78
void set_USE_BIS78(bool v)
Definition
TGCArguments.cxx:38
LVL1TGC::BIS78TrigOut
Definition
BIS78TrigOut.h:16
LVL1TGC::BIS78TrigOut::getBIS78Deta
const std::vector< uint8_t > & getBIS78Deta() const
Definition
BIS78TrigOut.h:64
LVL1TGC::BIS78TrigOut::getBIS78phi
const std::vector< uint8_t > & getBIS78phi() const
Definition
BIS78TrigOut.h:63
LVL1TGC::BIS78TrigOut::getBIS78flag3over3phi
const std::vector< uint8_t > & getBIS78flag3over3phi() const
Definition
BIS78TrigOut.h:67
LVL1TGC::BIS78TrigOut::getBIS78Dphi
const std::vector< uint8_t > & getBIS78Dphi() const
Definition
BIS78TrigOut.h:65
LVL1TGC::BIS78TrigOut::getBIS78eta
const std::vector< uint8_t > & getBIS78eta() const
Definition
BIS78TrigOut.h:62
LVL1TGC::BIS78TrigOut::getBIS78flag3over3eta
const std::vector< uint8_t > & getBIS78flag3over3eta() const
Definition
BIS78TrigOut.h:66
LVL1TGC::TGCBIS78CoincidenceMap::getFlagROI
int getFlagROI(const unsigned int roi, const unsigned int ssc, const unsigned int sec, const unsigned int side) const
Definition
TGCBIS78CoincidenceMap.cxx:76
LVL1TGC::TGCBIS78CoincidenceMap::m_flagROI
int m_flagROI[kNRoiInSSC][kNMaxSSC][kNEndcapTrigSector]
Definition
TGCBIS78CoincidenceMap.h:49
LVL1TGC::TGCBIS78CoincidenceMap::N_DPHI
static constexpr unsigned int N_DPHI
Definition
TGCBIS78CoincidenceMap.h:44
LVL1TGC::TGCBIS78CoincidenceMap::m_verName
std::string m_verName
Definition
TGCBIS78CoincidenceMap.h:52
LVL1TGC::TGCBIS78CoincidenceMap::tgcArgs
LVL1TGCTrigger::TGCArguments * tgcArgs()
Definition
TGCBIS78CoincidenceMap.h:36
LVL1TGC::TGCBIS78CoincidenceMap::m_tgcArgs
LVL1TGCTrigger::TGCArguments * m_tgcArgs
Definition
TGCBIS78CoincidenceMap.h:54
LVL1TGC::TGCBIS78CoincidenceMap::TGCBIS78_pt
int TGCBIS78_pt(const BIS78TrigOut *bis78Out, int) const
Definition
TGCBIS78CoincidenceMap.cxx:56
LVL1TGC::TGCBIS78CoincidenceMap::readMap
bool readMap()
Definition
TGCBIS78CoincidenceMap.cxx:91
LVL1TGC::TGCBIS78CoincidenceMap::m_CW
std::vector< short int > m_CW[N_DETA][N_DPHI]
Definition
TGCBIS78CoincidenceMap.h:47
LVL1TGC::TGCBIS78CoincidenceMap::TGCBIS78CoincidenceMap
TGCBIS78CoincidenceMap()=delete
LVL1TGC::TGCBIS78CoincidenceMap::N_DETA
static constexpr unsigned int N_DETA
Definition
TGCBIS78CoincidenceMap.h:43
LVL1TGC
Definition
BigWheelCoincidenceLUT.cxx:20
LVL1TGC::kNEndcapTrigSector
static constexpr unsigned int kNEndcapTrigSector
The number of endcap trigger sectors per side.
Definition
TGCNumbering.h:23
LVL1TGC::kNumberOfEndcapRoI
static constexpr unsigned int kNumberOfEndcapRoI
The number of ROIs in a endcap trigger sector.
Definition
TGCNumbering.h:32
LVL1TGC::ASIDE
@ ASIDE
Definition
TGCNumbering.h:14
LVL1TGC::kNMaxSSC
static constexpr unsigned int kNMaxSSC
The maximim number of SubSector-Clusters (SSC) (i.e.
Definition
TGCNumbering.h:26
LVL1TGC::kNRoiInSSC
static constexpr unsigned int kNRoiInSSC
The default number of ROIs in SSC.
Definition
TGCNumbering.h:29
Generated on
for ATLAS Offline Software by
1.17.0