ATLAS Offline Software
InnerDetector
InDetDigitization
SiDigitization
src
SiChargedDiodeCollection.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// sichargeddiodecollection.cxx
7
// Implementation file for class SiChargedDiodeCollection
9
// (c) ATLAS Detector software
11
// Version 3.0 09/07/2001 David Calvet
12
// 04-03-03 Revisited version. Davide Costanzo
14
// header file
15
#include "
SiDigitization/SiChargedDiodeCollection.h
"
16
// member classes
17
#include "
SiDigitization/SiHelper.h
"
18
#include "
ReadoutGeometryBase/DetectorDesign.h
"
19
#include "
ReadoutGeometryBase/SiReadoutCellId.h
"
20
#include "
ReadoutGeometryBase/SiCellId.h
"
21
#include "GaudiKernel/MsgStream.h"
22
#include "
AthenaKernel/getMessageSvc.h
"
23
24
using namespace
InDetDD
;
25
26
27
28
SiChargedDiodeCollection::SiChargedDiodeCollection
( ) :
29
m_chargedDiodes(),
30
m_sielement()
31
{
32
}
33
34
SiChargedDiodeCollection::SiChargedDiodeCollection
(
const
InDetDD::SolidStateDetectorElementBase
* sielement ) :
35
m_chargedDiodes(),
36
m_sielement(sielement)
37
{
38
}
39
40
41
SiChargedDiodeCollection::~SiChargedDiodeCollection
()
42
=
default
;
43
44
// Clean up the collection
45
void
SiChargedDiodeCollection::clear
() {
46
m_sielement
=
nullptr
;
47
m_chargedDiodes
.erase(
m_chargedDiodes
.begin(),
m_chargedDiodes
.end() );
48
m_orderedChargedDiodes
.clear();
49
}
50
51
52
53
bool
SiChargedDiodeCollection::AlreadyHit
(
const
InDetDD::SiCellId
& siId) {
54
return
m_chargedDiodes
.find(siId) !=
m_chargedDiodes
.end();
55
}
56
57
bool
SiChargedDiodeCollection::AlreadyHit
(
const
Identifier
&
id
) {
58
59
const
SiCellId
cellId =
m_sielement
->
cellIdFromIdentifier
(
id
);
60
return
AlreadyHit
(cellId);
61
}
62
63
SiChargedDiode
*
SiChargedDiodeCollection::find
(
const
InDetDD::SiCellId
& siId) {
64
// get the compact Id to access the map
65
SiChargedDiodeIterator
theEl =
m_chargedDiodes
.find(siId);
66
// if the diode exists return a pointer to it:
67
if
(theEl ==
m_chargedDiodes
.end() )
return
nullptr
;
68
else
return
&( (*theEl).second);
69
}
70
71
SiChargedDiode
*
SiChargedDiodeCollection::find
(
Identifier
siId) {
72
73
// Get the key for the map lookup
74
const
SiCellId
cellId =
m_sielement
->
cellIdFromIdentifier
(siId);
75
return
find
(cellId);
76
}
77
78
void
SiChargedDiodeCollection::order
()
79
{
80
for
(
auto
&
p
:
m_chargedDiodes
) {
81
m_orderedChargedDiodes
.insert (&
p
.second);
82
}
83
}
SiHelper.h
SiChargedDiode
Definition:
SiChargedDiode.h:30
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
InDetDD::SolidStateDetectorElementBase
Definition:
SolidStateDetectorElementBase.h:132
SiChargedDiodeCollection::SiChargedDiodeCollection
SiChargedDiodeCollection()
Definition:
SiChargedDiodeCollection.cxx:28
SiChargedDiodeIterator
SiChargedDiodeMap::iterator SiChargedDiodeIterator
Definition:
SiChargedDiodeCollection.h:70
SiChargedDiodeCollection::find
SiChargedDiode * find(const InDetDD::SiCellId &siId)
Definition:
SiChargedDiodeCollection.cxx:63
SiReadoutCellId.h
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
SiChargedDiodeCollection::~SiChargedDiodeCollection
~SiChargedDiodeCollection()
SiChargedDiodeCollection::clear
void clear()
Definition:
SiChargedDiodeCollection.cxx:45
SiChargedDiodeCollection::m_chargedDiodes
SiChargedDiodeMap m_chargedDiodes
Definition:
SiChargedDiodeCollection.h:197
SiChargedDiodeCollection::m_sielement
const InDetDD::SolidStateDetectorElementBase * m_sielement
Definition:
SiChargedDiodeCollection.h:199
DetectorDesign.h
InDetDD::SiCellId
Definition:
SiCellId.h:29
InDetDD
Message Stream Member.
Definition:
FakeTrackBuilder.h:8
SiChargedDiodeCollection::m_orderedChargedDiodes
SiChargedDiodeOrderedSet m_orderedChargedDiodes
Definition:
SiChargedDiodeCollection.h:198
SiCellId.h
InDetDD::SolidStateDetectorElementBase::cellIdFromIdentifier
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const =0
SiCellId from Identifier.
SiChargedDiodeCollection::AlreadyHit
bool AlreadyHit(const InDetDD::SiCellId &siId)
Definition:
SiChargedDiodeCollection.cxx:53
SiChargedDiodeCollection.h
SiChargedDiodeCollection::order
void order()
Definition:
SiChargedDiodeCollection.cxx:78
Identifier
Definition:
IdentifierFieldParser.cxx:14
Generated on Sun Dec 22 2024 21:18:06 for ATLAS Offline Software by
1.8.18