ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArRawUtils
src
LArRawDetSelector.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 "
AtlasDetDescr/AtlasDetectorID.h
"
6
7
#include "
LArRawUtils/LArRawDetSelector.h
"
8
9
#include "GaudiKernel/Bootstrap.h"
10
#include "GaudiKernel/ISvcLocator.h"
11
#include "GaudiKernel/MsgStream.h"
12
#include "GaudiKernel/IMessageSvc.h"
13
#include "
AthenaKernel/errorcheck.h
"
14
#include "
StoreGate/StoreGateSvc.h
"
15
16
LArRawDetSelector::LArRawDetSelector
(
const
LArRawChannelContainer
* )
17
:
m_onlineID
(nullptr),
18
m_caloCellID
(nullptr),
19
m_em
(false),
20
m_hec
(false),
21
m_fcal
(false)
22
{
23
SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore"
)};
24
25
detStore->retrieve(
m_onlineID
).orThrow(
26
"Faild to get LArOnlineID helper"
);
27
28
detStore->retrieve(
m_caloCellID
).orThrow(
29
"Faild to get LArOnlineID helper"
);
30
}
31
32
void
LArRawDetSelector::setDet
(
const
Identifier
&
id
){
33
34
m_em
=
m_caloCellID
->is_lar_em(
id
) ;
35
m_hec
=
m_caloCellID
->is_lar_hec(
id
) ;
36
m_fcal
=
m_caloCellID
->is_lar_fcal(
id
) ;
37
38
}
39
40
void
LArRawDetSelector::setDet
(
const
HWIdentifier
& chid ){
41
42
m_em
=
m_onlineID
->isEMBchannel(chid) ||
m_onlineID
->isEMECchannel(chid);
43
m_hec
=
m_onlineID
->isHECchannel(chid);
44
m_fcal
=
m_onlineID
->isFCALchannel(chid);
45
46
}
47
48
49
50
bool
LArRawDetSelector::select
(
const
LArRawChannel
*
rc
){
51
52
const
HWIdentifier
chid=
rc
->identify();
53
54
if
(
m_em
&& (
m_onlineID
->isEMBchannel(chid) ||
m_onlineID
->isEMECchannel(chid)))
return
true
;
55
56
if
(
m_hec
&&
m_onlineID
->isHECchannel(chid))
return
true
;
57
58
if
(
m_fcal
&&
m_onlineID
->isFCALchannel(chid))
return
true
;
59
60
return
false
;
61
}
62
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
errorcheck.h
Helpers for checking error return status codes and reporting errors.
rc
static Double_t rc
Definition
LArPhysWaveHECTool.cxx:37
LArRawDetSelector.h
StoreGateSvc.h
HWIdentifier
Definition
HWIdentifier.h:13
LArRawChannelContainer
Container for LArRawChannel (IDC using LArRawChannelCollection).
Definition
LArRawChannelContainer.h:26
LArRawChannel
Liquid Argon ROD output object base class.
Definition
LArRawChannel.h:40
LArRawDetSelector::m_caloCellID
const CaloCell_ID * m_caloCellID
Definition
LArRawDetSelector.h:36
LArRawDetSelector::m_em
bool m_em
Definition
LArRawDetSelector.h:37
LArRawDetSelector::LArRawDetSelector
LArRawDetSelector(const LArRawChannelContainer *c=NULL)
Definition
LArRawDetSelector.cxx:16
LArRawDetSelector::setDet
void setDet(const Identifier &id)
Definition
LArRawDetSelector.cxx:32
LArRawDetSelector::m_hec
bool m_hec
Definition
LArRawDetSelector.h:38
LArRawDetSelector::m_onlineID
const LArOnlineID * m_onlineID
Definition
LArRawDetSelector.h:35
LArRawDetSelector::m_fcal
bool m_fcal
Definition
LArRawDetSelector.h:39
LArRawDetSelector::select
virtual bool select(const LArRawChannel *rawchan)
Definition
LArRawDetSelector.cxx:50
Identifier
Definition
IdentifierFieldParser.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0