 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "Identifier/Identifier.h"
30 using namespace InDet;
61 return StatusCode::SUCCESS;
84 return StatusCode::SUCCESS;
90 if (not pixelDetEleHandle.
isValid() or pixElements==
nullptr) {
92 return StatusCode::FAILURE;
97 std::make_unique<xAOD::PixelClusterAuxContainer>()) );
104 size_t nclusters = 0;
105 for (
const auto *
const clusterCollection : *inputPixelClusterContainer) {
106 if (!clusterCollection)
continue;
107 nclusters += clusterCollection->size();
110 outputPixelClusterContainer->
push_new (nclusters, [&
pool](){
return pool.nextElementPtr();});
113 for (
const auto *
const clusterCollection : *inputPixelClusterContainer) {
114 if (!clusterCollection)
continue;
115 for(
const auto *
const theCluster : *clusterCollection) {
116 Identifier clusterId = theCluster->identify();
119 if ( element==
nullptr ) {
120 ATH_MSG_FATAL(
"Invalid pixel detector element for cluster identifier " << clusterId );
121 return StatusCode::FAILURE;
129 pixelLinkAcc( *pixelCl ) = pixelLink;
132 if (icluster != outputPixelClusterContainer->
size()) {
133 ATH_MSG_ERROR(
"xAOD::PixelClusterContainer miscount; " << icluster <<
" versus " << outputPixelClusterContainer->
size());
134 return StatusCode::FAILURE;
137 ATH_MSG_DEBUG(
"xAOD::PixelClusterContainer with size: " << outputPixelClusterContainer->
size());
138 return StatusCode::SUCCESS;
144 if (not stripDetEleHandle.
isValid() or stripElements==
nullptr) {
146 return StatusCode::FAILURE;
151 std::make_unique<xAOD::StripClusterAuxContainer>()) );
156 size_t nclusters = 0;
157 for (
const auto *
const clusterCollection : *inputStripClusterContainer) {
158 if (!clusterCollection)
continue;
159 nclusters += clusterCollection->size();
162 outputStripClusterContainer->
push_new (nclusters, [&
pool](){
return pool.nextElementPtr();});
166 for (
const auto *
const clusterCollection : *inputStripClusterContainer) {
167 if (!clusterCollection)
continue;
168 for(
const auto *
const theCluster : *clusterCollection) {
169 Identifier clusterId = theCluster->identify();
172 if ( element==
nullptr ) {
173 ATH_MSG_FATAL(
"Invalid strip detector element for cluster with identifier " << clusterId );
174 return StatusCode::FAILURE;
183 stripLinkAcc( *stripCl ) = stripLink;
186 if (icluster != outputStripClusterContainer->
size()) {
187 ATH_MSG_ERROR(
"xAOD::StripClusterContainer miscount; " << icluster <<
" versus " << outputStripClusterContainer->
size());
188 return StatusCode::FAILURE;
191 ATH_MSG_DEBUG(
"xAOD::StripClusterContainer with size: " << outputStripClusterContainer->
size());
193 return StatusCode::SUCCESS;
199 if (not hgtdDetEleHandle.
isValid() or hgtdElements==
nullptr) {
201 return StatusCode::FAILURE;
205 ATH_CHECK( outputHgtdClusterContainer.
record (std::make_unique<xAOD::HGTDClusterContainer>(),
206 std::make_unique<xAOD::HGTDClusterAuxContainer>()) );
213 for (
const auto *
const clusterCollection : *inputHgtdClusterContainer) {
214 if (!clusterCollection)
continue;
215 for(
const auto *
const theCluster : *clusterCollection) {
216 Identifier clusterId = theCluster->identify();
219 if ( element==
nullptr ) {
220 ATH_MSG_FATAL(
"Invalid strip detector element for cluster with identifier " << clusterId );
221 return StatusCode::FAILURE;
225 outputHgtdClusterContainer->
push_back(hgtdCl);
230 hgtdLinkAcc( *hgtdCl ) = hgtdLink;
234 ATH_MSG_DEBUG(
"xAOD::HGTDClusterContainer with size: " << outputHgtdClusterContainer->
size());
235 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
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
SG::WriteHandleKey< xAOD::HGTDClusterContainer > m_outputHgtdClusterContainerKey
@ ALWAYS_TRACK_INDICES
Always track indices, regardless of the setting of the ownership policy.
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.
size_type push_new(size_type n, F alloc)
Create and add a number of new elements to the end of the container.
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.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Gaudi::Property< bool > m_processStrip
::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.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Gaudi::Property< bool > m_processHgtd
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_inputStripClusterContainerKey
const T * at(size_type n) const
Access an element, as an rvalue.
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 HGTD_DetectorElementCollection &coll)
size_type size() const noexcept
Returns the number of elements in the collection.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Gaudi::Property< bool > m_isITk
SG::WriteHandleKey< xAOD::StripClusterContainer > m_outputStripClusterContainerKey
Gaudi::Property< bool > m_processPixel