ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRecTools
InDetAssociationTools
InDetAssociationTools
InDetPRD_Provider.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// InDetPRD_Provider.h, (c) ATLAS Detector software
8
9
#ifndef INDET_INDETASSOCIATIONTOOLS_INDETPRDPROVIDER_H
10
#define INDET_INDETASSOCIATIONTOOLS_INDETPRDPROVIDER_H 1
11
12
// Gaudi
13
#include "
AthenaBaseComps/AthAlgTool.h
"
14
#include "GaudiKernel/ToolHandle.h"
15
// InDet includes; these are needed (cannot be fwd declared) for template type deduction
16
#include "
InDetPrepRawData/PixelClusterContainer.h
"
17
#include "
InDetPrepRawData/SCT_ClusterContainer.h
"
18
#include "
InDetPrepRawData/TRT_DriftCircleContainer.h
"
19
// Trk includes
20
#include "
TrkToolInterfaces/IPRD_Provider.h
"
21
#include "
TrkPrepRawData/PrepRawDataContainer.h
"
22
#include "
TrkPrepRawData/PrepRawDataCollection.h
"
23
24
#include "
InDetReadoutGeometry/SiDetectorElementCollection.h
"
25
26
#include "
StoreGate/ReadHandleKey.h
"
27
#include "
StoreGate/ReadCondHandleKey.h
"
28
29
class
AtlasDetectorID
;
30
class
PixelID
;
31
class
SCT_ID
;
32
class
TRT_ID
;
33
class
Identifier
;
34
class
IdentifierHash
;
35
namespace
InDet
{
36
44
45
class
InDetPRD_Provider
:
public
AthAlgTool
,
virtual
public
Trk::IPRD_Provider
{
46
47
public
:
48
//** Constructor with parameters */
49
InDetPRD_Provider
(
const
std::string& t,
const
std::string& n,
const
IInterface* p );
50
52
StatusCode
initialize
();
53
55
StatusCode
finalize
();
56
58
const
Trk::PrepRawData
*
prdFromIdentifier
(
const
Identifier
& ide,
size_t
& ndof )
const
;
59
60
private
:
62
template
<
class
PrdT >
const
Trk::PrepRawData
*
prdFromIdentifierContainer
(
63
const
Trk::PrepRawDataContainer
<
Trk::PrepRawDataCollection< PrdT >
>& cont,
64
const
Identifier
& ideh,
const
IdentifierHash
& ideHash )
const
65
{
66
// find the collection
67
const
Trk::PrepRawDataCollection< PrdT >
* prdCollection = cont.indexFindPtr(ideHash);
68
if
( prdCollection ==
nullptr
){
69
ATH_MSG_VERBOSE
(
"PRD Collection to IdentifierHash could not be found. Return 0."
);
70
return
0;
71
}
72
// search for the PRD in the collection --- do a loop, can be done better with std::find probably
73
const
PrdT* prd = 0;
74
// iterate through the collections
75
typename
Trk::PrepRawDataCollection< PrdT >::const_iterator
prdIter = prdCollection->
begin
();
76
typename
Trk::PrepRawDataCollection< PrdT >::const_iterator
prdIterE = prdCollection->
end
();
77
for
( ; prdIter != prdIterE; ++prdIter ){
78
if
( (*prdIter)->identify() == ideh ){
79
prd = (*prdIter);
80
break
;
81
}
82
}
83
// return what you have
84
return
prd;
85
}
86
87
const
AtlasDetectorID
*
m_idHelper
;
88
89
const
PixelID
*
m_pixIdHelper
;
90
SG::ReadHandleKey<PixelClusterContainer>
m_pixClusterContainerKey
91
{
this
,
"PixelClusterContainer"
,
""
};
92
// For P->T converter of Pixel Clusters
93
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_pixelDetEleCollKey
{
this
,
"PixelDetEleCollKey"
,
"PixelDetectorElementCollection"
,
"Key of SiDetectorElementCollection for Pixel"
};
94
95
const
SCT_ID
*
m_sctIdHelper
;
96
SG::ReadHandleKey<SCT_ClusterContainer>
m_sctClusterContainerKey
97
{
this
,
"SCT_ClusterContainer"
,
""
};
98
// For P->T converter of SCT_Clusters
99
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_SCTDetEleCollKey
{
this
,
"SCTDetEleCollKey"
,
"SCT_DetectorElementCollection"
,
"Key of SiDetectorElementCollection for SCT"
};
100
101
const
TRT_ID
*
m_trtIdHelper
;
102
SG::ReadHandleKey<TRT_DriftCircleContainer>
m_trtDriftCircleContainerKey
103
{
this
,
"TRT_DriftCircleContainer"
,
""
};
104
105
};
106
107
108
}
// end of namespace
109
110
#endif
// INDET_INDETASSOCIATIONTOOLS_INDETPRDPROVIDER_H
AthAlgTool.h
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
IPRD_Provider.h
PixelClusterContainer.h
PrepRawDataCollection.h
PrepRawDataContainer.h
ReadCondHandleKey.h
SCT_ClusterContainer.h
SiDetectorElementCollection.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TRT_DriftCircleContainer.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition
AtlasDetectorID.h:53
DataVector< PrepRawDataT >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
InDet::InDetPRD_Provider::m_pixClusterContainerKey
SG::ReadHandleKey< PixelClusterContainer > m_pixClusterContainerKey
Definition
InDetPRD_Provider.h:91
InDet::InDetPRD_Provider::finalize
StatusCode finalize()
finalize
Definition
InDetPRD_Provider.cxx:62
InDet::InDetPRD_Provider::prdFromIdentifier
const Trk::PrepRawData * prdFromIdentifier(const Identifier &ide, size_t &ndof) const
return the Prd given the Identifier - make a HashId out of the Id and return the associated PRD
Definition
InDetPRD_Provider.cxx:69
InDet::InDetPRD_Provider::m_sctClusterContainerKey
SG::ReadHandleKey< SCT_ClusterContainer > m_sctClusterContainerKey
Definition
InDetPRD_Provider.h:97
InDet::InDetPRD_Provider::InDetPRD_Provider
InDetPRD_Provider(const std::string &t, const std::string &n, const IInterface *p)
Definition
InDetPRD_Provider.cxx:26
InDet::InDetPRD_Provider::initialize
StatusCode initialize()
Athena algtool's Hooks.
Definition
InDetPRD_Provider.cxx:37
InDet::InDetPRD_Provider::m_trtIdHelper
const TRT_ID * m_trtIdHelper
Definition
InDetPRD_Provider.h:101
InDet::InDetPRD_Provider::m_trtDriftCircleContainerKey
SG::ReadHandleKey< TRT_DriftCircleContainer > m_trtDriftCircleContainerKey
Definition
InDetPRD_Provider.h:103
InDet::InDetPRD_Provider::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition
InDetPRD_Provider.h:99
InDet::InDetPRD_Provider::prdFromIdentifierContainer
const Trk::PrepRawData * prdFromIdentifierContainer(const Trk::PrepRawDataContainer< Trk::PrepRawDataCollection< PrdT > > &cont, const Identifier &ideh, const IdentifierHash &ideHash) const
templated method since used for Pixel/SCT/TRT
Definition
InDetPRD_Provider.h:62
InDet::InDetPRD_Provider::m_sctIdHelper
const SCT_ID * m_sctIdHelper
Definition
InDetPRD_Provider.h:95
InDet::InDetPRD_Provider::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition
InDetPRD_Provider.h:93
InDet::InDetPRD_Provider::m_pixIdHelper
const PixelID * m_pixIdHelper
Helper to detect type of sub-detector from PRD->identify().
Definition
InDetPRD_Provider.h:89
InDet::InDetPRD_Provider::m_idHelper
const AtlasDetectorID * m_idHelper
Definition
InDetPRD_Provider.h:87
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SCT_ID
This is an Identifier helper class for the SCT subdetector.
Definition
SCT_ID.h:68
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
TRT_ID
This is an Identifier helper class for the TRT subdetector.
Definition
TRT_ID.h:84
Trk::IPRD_Provider
Simple interface that takes an identifier and find the associated PRD from an Identifyable container.
Definition
IPRD_Provider.h:33
Trk::PrepRawDataCollection
Definition
PrepRawDataCollection.h:36
Trk::PrepRawDataContainer
Definition
PrepRawDataContainer.h:26
Trk::PrepRawData
Definition
PrepRawData.h:62
Identifier
Definition
IdentifierFieldParser.cxx:14
InDet
Primary Vertex Finder.
Definition
VP1ErrorUtils.h:36
Generated on
for ATLAS Offline Software by
1.17.0