ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloCalibTools
src
L1CaloLArTowerEnergy.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
#include "
TrigT1CaloCalibTools/L1CaloLArTowerEnergy.h
"
6
#include "
LArRecConditions/LArBadChannelCont.h
"
7
#include "
StoreGate/ReadCondHandle.h
"
8
9
namespace
LVL1
{
10
11
L1CaloLArTowerEnergy::L1CaloLArTowerEnergy
(
const
std::string&
name
) :
12
asg
::
AsgTool
(
name
),
13
m_lvl1Helper
(nullptr),
14
m_caloMgr
(nullptr),
15
m_LArOnlineHelper
(nullptr)
16
{
17
}
18
19
StatusCode
L1CaloLArTowerEnergy::initialize
() {
20
21
ATH_MSG_INFO
(
"Initialize LVL1::L1CaloLArTowerEnergy"
);
22
23
ATH_CHECK
(
detStore
()->retrieve(
m_caloMgr
) );
24
ATH_CHECK
(
detStore
()->retrieve(
m_LArOnlineHelper
,
"LArOnlineID"
) );
25
26
//Use the CaloIdManager to get a pointer to an instance of the CaloLVL1_ID helper
27
m_lvl1Helper
=
m_caloMgr
->getLVL1_ID();
28
if
(!
m_lvl1Helper
) {
29
ATH_MSG_ERROR
(
"Cannot access CaloLVL1_ID helper."
);
30
return
StatusCode::FAILURE;
31
}
32
33
ATH_CHECK
(
m_badFebMasker
.retrieve());
34
35
//Retrieve cabling & tt services
36
ATH_CHECK
(
m_ttService
.retrieve() );
37
ATH_CHECK
(
m_cablingKey
.initialize() );
38
39
return
StatusCode::SUCCESS;
40
}
41
42
43
double
L1CaloLArTowerEnergy::IDeta
(
const
Identifier
& TTid)
const
{
44
int
region =
m_lvl1Helper
->region(TTid);
45
int
ieta =
m_lvl1Helper
->eta(TTid);
46
int
sign
=
m_lvl1Helper
->pos_neg_z(TTid);
47
48
double
gran[4] = {0.1, 0.2, 0.1, 0.425};
49
double
offset[4] = {0., 2.5, 3.1, 3.2};
50
double
eta
;
51
52
if
(region>=0 && region<=3) {
53
eta
=
sign
* ( ( (ieta+0.5) * gran[region] ) + offset[region] );
54
}
55
else
{
56
eta
= 0.;
57
}
58
return
eta
;
59
}
60
61
62
bool
L1CaloLArTowerEnergy::hasMissingFEB
(
const
Identifier
& TTid)
const
63
{
64
SG::ReadCondHandle<LArOnOffIdMapping>
cabling (
m_cablingKey
);
65
return
hasMissingFEB
(**cabling, TTid);
66
}
67
bool
L1CaloLArTowerEnergy::hasMissingFEB
(
const
LArOnOffIdMapping
& cabling,
68
const
Identifier
& TTid)
const
69
{
70
bool
result =
false
;
71
72
std::vector<Identifier> TT_cells_vec =
m_ttService
->createCellIDvecTT(TTid) ;
73
74
if
(TT_cells_vec.size()!=0)
75
{
76
std::vector<Identifier>::const_iterator it = TT_cells_vec.begin();
77
std::vector<Identifier>::const_iterator it_e = TT_cells_vec.end();
78
79
for
(; it!=it_e; ++it)
80
{
81
HWIdentifier
chid = cabling.createSignalChannelID(*it);
82
HWIdentifier
febId =
m_LArOnlineHelper
->feb_Id(chid);
83
LArBadFeb
febstatus =
m_badFebMasker
->febStatus(febId);
84
bool
deadReadout = febstatus.
deadReadout
();
85
bool
desactivatedInOKS = febstatus.
deactivatedInOKS
();
86
87
if
(deadReadout || desactivatedInOKS) result =
true
;
88
}
89
}
90
else
{
91
ATH_MSG_ERROR
(
"Cannot retreive feb status for trigger Tower "
<< TTid );
92
}
93
94
return
result;
95
}
96
}
// end of namespace
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:30
L1CaloLArTowerEnergy.h
LArBadChannelCont.h
ReadCondHandle.h
sign
int sign(int a)
Definition
TRT_StrawNeighbourSvc.h:108
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
HWIdentifier
Definition
HWIdentifier.h:13
LArBadFeb
Definition
LArBadFeb.h:10
LArBadFeb::deactivatedInOKS
bool deactivatedInOKS() const
Deactivated in OKS.
Definition
LArBadFeb.h:39
LArBadFeb::deadReadout
bool deadReadout() const
FEB is not sending readout data, but the L1 trigger path is working.
Definition
LArBadFeb.h:33
LArOnOffIdMapping
Definition
LArOnOffIdMapping.h:20
LVL1::L1CaloLArTowerEnergy::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
Definition
L1CaloLArTowerEnergy.h:63
LVL1::L1CaloLArTowerEnergy::IDeta
virtual double IDeta(const Identifier &TTid) const override
Definition
L1CaloLArTowerEnergy.cxx:43
LVL1::L1CaloLArTowerEnergy::hasMissingFEB
virtual bool hasMissingFEB(const Identifier &TTid) const override
Declare the interface that the class provides.
Definition
L1CaloLArTowerEnergy.cxx:62
LVL1::L1CaloLArTowerEnergy::m_ttService
ToolHandle< CaloTriggerTowerService > m_ttService
Definition
L1CaloLArTowerEnergy.h:68
LVL1::L1CaloLArTowerEnergy::m_caloMgr
const CaloIdManager * m_caloMgr
Definition
L1CaloLArTowerEnergy.h:64
LVL1::L1CaloLArTowerEnergy::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition
L1CaloLArTowerEnergy.h:73
LVL1::L1CaloLArTowerEnergy::L1CaloLArTowerEnergy
L1CaloLArTowerEnergy(const std::string &name)
Create a proper constructor for Athena.
Definition
L1CaloLArTowerEnergy.cxx:11
LVL1::L1CaloLArTowerEnergy::m_badFebMasker
ToolHandle< ILArBadFebMasker > m_badFebMasker
Definition
L1CaloLArTowerEnergy.h:70
LVL1::L1CaloLArTowerEnergy::m_LArOnlineHelper
const LArOnlineID * m_LArOnlineHelper
Definition
L1CaloLArTowerEnergy.h:65
LVL1::L1CaloLArTowerEnergy::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
L1CaloLArTowerEnergy.cxx:19
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
Identifier
Definition
IdentifierFieldParser.cxx:14
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
asg
Definition
DataHandleTestTool.h:28
TrigConf::name
Definition
HLTChainList.h:35
Generated on
for ATLAS Offline Software by
1.17.0