|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "Identifier/Identifier.h"
29 using namespace InDet;
59 return StatusCode::SUCCESS;
82 return StatusCode::SUCCESS;
88 if (not pixelDetEleHandle.
isValid() or pixElements==
nullptr) {
90 return StatusCode::FAILURE;
94 ATH_CHECK( outputPixelClusterContainer.
record (std::make_unique<xAOD::PixelClusterContainer>(),
95 std::make_unique<xAOD::PixelClusterAuxContainer>()) );
101 for (
const auto *
const clusterCollection : *inputPixelClusterContainer) {
102 if (!clusterCollection)
continue;
103 for(
const auto *
const theCluster : *clusterCollection) {
104 Identifier clusterId = theCluster->identify();
107 if ( element==
nullptr ) {
108 ATH_MSG_FATAL(
"Invalid pixel detector element for cluster identifier " << clusterId );
109 return StatusCode::FAILURE;
113 outputPixelClusterContainer->
push_back(pixelCl);
118 pixelLinkAcc( *pixelCl ) = pixelLink;
122 ATH_MSG_DEBUG(
"xAOD::PixelClusterContainer with size: " << outputPixelClusterContainer->
size());
123 return StatusCode::SUCCESS;
129 if (not stripDetEleHandle.
isValid() or stripElements==
nullptr) {
131 return StatusCode::FAILURE;
135 ATH_CHECK( outputStripClusterContainer.
record (std::make_unique<xAOD::StripClusterContainer>(),
136 std::make_unique<xAOD::StripClusterAuxContainer>()) );
142 for (
const auto *
const clusterCollection : *inputStripClusterContainer) {
143 if (!clusterCollection)
continue;
144 for(
const auto *
const theCluster : *clusterCollection) {
145 Identifier clusterId = theCluster->identify();
148 if ( element==
nullptr ) {
149 ATH_MSG_FATAL(
"Invalid strip detector element for cluster with identifier " << clusterId );
150 return StatusCode::FAILURE;
155 outputStripClusterContainer->
push_back(stripCl);
160 stripLinkAcc( *stripCl ) = stripLink;
164 ATH_MSG_DEBUG(
"xAOD::StripClusterContainer with size: " << outputStripClusterContainer->
size());
166 return StatusCode::SUCCESS;
172 if (not hgtdDetEleHandle.
isValid() or hgtdElements==
nullptr) {
174 return StatusCode::FAILURE;
178 ATH_CHECK( outputHgtdClusterContainer.
record (std::make_unique<xAOD::HGTDClusterContainer>(),
179 std::make_unique<xAOD::HGTDClusterAuxContainer>()) );
186 for (
const auto *
const clusterCollection : *inputHgtdClusterContainer) {
187 if (!clusterCollection)
continue;
188 for(
const auto *
const theCluster : *clusterCollection) {
189 Identifier clusterId = theCluster->identify();
192 if ( element==
nullptr ) {
193 ATH_MSG_FATAL(
"Invalid strip detector element for cluster with identifier " << clusterId );
194 return StatusCode::FAILURE;
198 outputHgtdClusterContainer->
push_back(hgtdCl);
203 hgtdLinkAcc( *hgtdCl ) = hgtdLink;
207 ATH_MSG_DEBUG(
"xAOD::HGTDClusterContainer with size: " << outputHgtdClusterContainer->
size());
208 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
StatusCode convertInDetToXaodCluster(const InDet::PixelCluster &indetCluster, const InDetDD::SiDetectorElement &element, xAOD::PixelCluster &xaodCluster)
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
SG::ReadHandleKey< InDet::PixelClusterContainer > m_inputPixelClusterContainerKey
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Helper class to provide type-safe access to aux data.
StatusCode convertHgtdClusters(const EventContext &ctx) const
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
SG::WriteHandleKey< xAOD::HGTDClusterContainer > m_outputHgtdClusterContainerKey
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_outputPixelClusterContainerKey
StatusCode convertStripClusters(const EventContext &ctx) const
StatusCode convertPixelClusters(const EventContext &ctx) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Identifier wafer_id(int endcap, int layer, int phi_module, int eta_module) const
For a single crystal.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Handle class for recording to StoreGate.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Gaudi::Property< bool > m_processStrip
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
::StatusCode StatusCode
StatusCode definition for legacy code.
InDetToXAODClusterConversion()=delete
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
SG::ReadHandleKey<::HGTD_ClusterContainer > m_inputHgtdClusterContainerKey
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
const PixelID * m_pixelID
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
An STL vector of pointers that by default owns its pointed-to elements.
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Gaudi::Property< bool > m_processHgtd
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_inputStripClusterContainerKey
Handle class for reading from StoreGate.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
virtual StatusCode initialize() override
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash) const
size_type size() const noexcept
Returns the number of elements in the collection.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
SG::WriteHandleKey< xAOD::StripClusterContainer > m_outputStripClusterContainerKey
Gaudi::Property< bool > m_processPixel