21 ISvcLocator *pSvcLocator)
54 return StatusCode::SUCCESS;
76 return StatusCode::SUCCESS;
83 if (not pixelDetEleHandle.
isValid() or pixElements==
nullptr) {
85 return StatusCode::FAILURE;
103 pixelAccessor ( *inputPixelClusters,
105 pixElements->
size());
108 for (
const auto& hashId : allIdHashes) {
110 if ( element ==
nullptr ) {
111 ATH_MSG_FATAL(
"Invalid pixel detector element for hash " << hashId);
112 return StatusCode::FAILURE;
115 std::unique_ptr<InDet::PixelClusterCollection> collection = std::make_unique<InDet::PixelClusterCollection>(hashId);
119 for (
auto start = this_range.first; start != this_range.second; ++start) {
127 collection->push_back(cluster);
131 InDet::PixelClusterContainer::IDC_WriteHandle
lock = outputPixelClusterContainer->getWriteHandle(hashId);
138 return StatusCode::SUCCESS;
145 if (not stripDetEleHandle.
isValid() or stripElements==
nullptr) {
147 return StatusCode::FAILURE;
165 stripAccessor ( *inputStripClusters,
167 stripElements->
size());
172 for (
const auto& hashId : allIdHashes) {
174 if ( element ==
nullptr ) {
175 ATH_MSG_FATAL(
"Invalid strip detector element for hash " << hashId);
176 return StatusCode::FAILURE;
179 bool isBarrel = element->
isBarrel();
181 double shift = not isBarrel
185 std::unique_ptr<InDet::SCT_ClusterCollection> collection = std::make_unique<InDet::SCT_ClusterCollection>(hashId);
190 for (
auto start = this_range.first; start != this_range.second; ++start) {
198 collection->push_back( cluster );
202 InDet::SCT_ClusterContainer::IDC_WriteHandle
lock = outputStripClusterContainer->getWriteHandle(hashId);
209 return StatusCode::SUCCESS;
216 if (not hgtdDetEleHandle.
isValid() or hgtdElements==
nullptr) {
218 return StatusCode::FAILURE;
230 hgtdAccessor ( *inputHgtdClusters,
232 hgtdElements->
size());
235 for (
const auto& hashId : allIdHashes) {
237 if ( element ==
nullptr ) {
238 ATH_MSG_FATAL(
"Invalid hgtd detector element for hash " << hashId);
239 return StatusCode::FAILURE;
242 std::unique_ptr<::HGTD_ClusterCollection> collection = std::make_unique<::HGTD_ClusterCollection>(hashId);
246 for (
auto start = this_range.first; start != this_range.second; ++start) {
254 collection->push_back(cluster);
265 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
Class implementing how to access a container.
const boost::container::small_vector< Range, inline_size > rangesForIdentifierDirect(const identifier_t &identifier) const
Function to return the list of ranges corresponding to a given identifier.
std::vector< identifier_t > allIdentifiers() const
Function to return all available identifier (i.e. keys in the map).
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_inputHgtdClusterContainerKey
const PixelID * m_pixelID
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey
virtual StatusCode initialize() override
StatusCode convertHgtdClusters(const EventContext &ctx) const
Gaudi::Property< bool > m_processHgtd
XAODToInDetClusterConversion()=delete
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClusterContainerKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey
StatusCode convertPixelClusters(const EventContext &ctx) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< bool > m_processStrip
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerLinkKey
Gaudi::Property< bool > m_processPixel
SG::WriteHandleKey<::HGTD_ClusterContainer > m_outputHgtdClusterContainerKey
StatusCode convertStripClusters(const EventContext &ctx) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterContainerKey
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash, const HGTD_DetectorElementCollection &coll)
DataVector< HGTD_DetectorElement > HGTD_DetectorElementCollection
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
StatusCode convertXaodToInDetCluster(const xAOD::PixelCluster &xaodCluster, const InDetDD::SiDetectorElement &element, const PixelID &pixelID, InDet::PixelCluster *&indetCluster)
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
HGTDClusterContainer_v1 HGTDClusterContainer
Define the version of the HGTD cluster container.
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.