ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::XAODToInDetClusterConversion Class Reference

#include <XAODToInDetClusterConversion.h>

Inheritance diagram for InDet::XAODToInDetClusterConversion:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode convertPixelClusters (const EventContext &ctx) const
StatusCode convertStripClusters (const EventContext &ctx) const
StatusCode convertHgtdClusters (const EventContext &ctx) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const PixelIDm_pixelID {}
const SCT_IDm_stripID {}
const HGTD_IDm_hgtdID {}
ToolHandle< ISiLorentzAngleToolm_lorentzAngleTool {this, "LorentzAngleTool", "", "Tool to retrieve Lorentz angle of SCT"}
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
SG::ReadHandleKey< xAOD::PixelClusterContainerm_inputPixelClusterContainerKey {this, "InputPixelClustersName", "ITkPixelClusters", "name of the input xAOD pixel cluster container"}
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey {this, "OutputPixelClustersName", "ITkPixelClusters", "name of the output InDet pixel cluster container"}
SG::WriteHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerLinkKey {this, "PixelClustersLinkName", "ITkPixelClusters"}
SG::WriteHandleKey< std::vector< unsigned int > > m_pixelClusterOffSetKey {this, "PixelClusterOffSetKey", "ITkPixelClustersOffsets"}
SG::WriteDecorHandleKey< xAOD::PixelClusterContainerm_pixelClusterLinkKey {this, "PixelClusterLinkKey", m_inputPixelClusterContainerKey, "pixelClusterLink", "Decoration to link Trk object to xAOD" }
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"}
SG::ReadHandleKey< xAOD::StripClusterContainerm_inputStripClusterContainerKey {this, "InputStripClustersName", "ITkStripClusters", "name of the input xAOD strip cluster container"}
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey {this, "OutputStripClustersName", "ITkStripClusters", "name of the output InDet pixel cluster container"}
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey {this, "StripClustersLinkName", "ITkStripClusters"}
SG::WriteHandleKey< std::vector< unsigned int > > m_stripClusterOffSetKey {this, "StripClusterOffSetKey", "ITkStripClustersOffsets"}
SG::WriteDecorHandleKey< xAOD::StripClusterContainerm_stripClusterLinkKey {this, "StripClusterLinkKey", m_inputStripClusterContainerKey, "sctClusterLink", "Decoration to link Trk object to xAOD" }
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollectionm_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"}
SG::ReadHandleKey< xAOD::HGTDClusterContainerm_inputHgtdClusterContainerKey {this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"}
SG::WriteHandleKey<::HGTD_ClusterContainerm_outputHgtdClusterContainerKey {this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"}
SG::WriteDecorHandleKey< xAOD::HGTDClusterContainerm_hgdtClusterLinkKey {this, "HgtdClusterLinkKey", m_inputHgtdClusterContainerKey, "hgtdClusterLink", "Decoration to link Trk object to xAOD" }
Gaudi::Property< bool > m_processPixel {this, "ProcessPixel", false}
Gaudi::Property< bool > m_processStrip {this, "ProcessStrip", false}
Gaudi::Property< bool > m_processHgtd {this, "ProcessHgtd", false}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 36 of file XAODToInDetClusterConversion.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ convertHgtdClusters()

StatusCode InDet::XAODToInDetClusterConversion::convertHgtdClusters ( const EventContext & ctx) const
private

Definition at line 236 of file XAODToInDetClusterConversion.cxx.

236 {
237 const InDetDD::HGTD_DetectorElementCollection *hgtdElements{};
238 ATH_CHECK(SG::get(hgtdElements,m_HGTDDetEleCollKey, ctx));
239
240 const xAOD::HGTDClusterContainer *inputHgtdClusters{};
241 ATH_CHECK(SG::get(inputHgtdClusters, m_inputHgtdClusterContainerKey, ctx));
242
244 SG::WriteDecorHandle<xAOD::HGTDClusterContainer, Link_t> dec_link{m_hgdtClusterLinkKey,ctx};
245
246 SG::WriteHandle outputHgtdClusterContainer{m_outputHgtdClusterContainerKey, ctx};
247 ATH_CHECK( outputHgtdClusterContainer.record (std::make_unique<::HGTD_ClusterContainer>(m_hgtdID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
248 ATH_MSG_DEBUG( "Container '" << m_outputHgtdClusterContainerKey.key() << "' initialised" );
249
250 ContainerAccessor<xAOD::HGTDCluster, IdentifierHash, 1>
251 hgtdAccessor ( *inputHgtdClusters,
252 [] (const xAOD::HGTDCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
253 hgtdElements->size());
254
255 const auto& allIdHashes = hgtdAccessor.allIdentifiers();
256 for (const auto& hashId : allIdHashes) {
257 const auto *element = InDetDD::HGTDDetEl::getDetectorElement(hashId,*hgtdElements);
258 if ( element == nullptr ) {
259 ATH_MSG_FATAL( "Invalid hgtd detector element for hash " << hashId);
260 return StatusCode::FAILURE;
261 }
262
263 std::unique_ptr<::HGTD_ClusterCollection> collection = std::make_unique<::HGTD_ClusterCollection>(hashId);
264
265 // Get the detector element and range for the idHash
266 for (const auto& this_range : hgtdAccessor.rangesForIdentifierDirect(hashId)) {
267 for (auto start = this_range.first; start != this_range.second; ++start) {
268 const xAOD::HGTDCluster* in_cluster = *start;
269
270 auto cluster = TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element);
271 cluster->setHashAndIndex(hashId, collection->size());
272
273 // Add to Collection
274 collection->push_back(cluster.get());
275 dec_link(*in_cluster) = Link_t{cluster.release(), *collection};
276 }
277 }
278
279 ::HGTD_ClusterContainer::IDC_WriteHandle lock = outputHgtdClusterContainer->getWriteHandle(hashId);
280 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
281
282 } // loop on hashIds
283
284 ATH_CHECK( outputHgtdClusterContainer.setConst() );
285
286 return StatusCode::SUCCESS;
287 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_FATAL(x,...)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
ElementLink< xAOD::TruthParticleContainer > Link_t
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_inputHgtdClusterContainerKey
SG::WriteDecorHandleKey< xAOD::HGTDClusterContainer > m_hgdtClusterLinkKey
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
SG::WriteHandleKey<::HGTD_ClusterContainer > m_outputHgtdClusterContainerKey
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash, const HGTD_DetectorElementCollection &coll)
DataVector< HGTD_DetectorElement > HGTD_DetectorElementCollection
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
std::unique_ptr< InDet::PixelCluster > convertXaodToInDetCluster(const xAOD::PixelCluster &xaodCluster, const InDetDD::SiDetectorElement &element, const InDetDD::PixelModuleDesign &design, const PixelID &pixelID)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
HGTDClusterContainer_v1 HGTDClusterContainer
Define the version of the HGTD cluster container.
HGTDCluster_v1 HGTDCluster
Define the version of the pixel cluster class.
Definition HGTDCluster.h:13

◆ convertPixelClusters()

StatusCode InDet::XAODToInDetClusterConversion::convertPixelClusters ( const EventContext & ctx) const
private

Definition at line 83 of file XAODToInDetClusterConversion.cxx.

83 {
84 const InDetDD::SiDetectorElementCollection* pixElements{};
85 ATH_CHECK(SG::get(pixElements, m_pixelDetEleCollKey, ctx));
86
87 const xAOD::PixelClusterContainer *inputPixelClusters{};
88 ATH_CHECK(SG::get(inputPixelClusters, m_inputPixelClusterContainerKey, ctx));
89
91 SG::WriteDecorHandle<xAOD::PixelClusterContainer, Link_t> dec_link{m_pixelClusterLinkKey,ctx};
92 SG::WriteHandle outputPixelClusterContainer{m_outputPixelClusterContainerKey, ctx};
93 ATH_CHECK( outputPixelClusterContainer.record (std::make_unique<InDet::PixelClusterContainer>(m_pixelID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
94 ATH_MSG_DEBUG( "Container '" << m_outputPixelClusterContainerKey.key() << "' initialised" );
95
96 ATH_CHECK( outputPixelClusterContainer.symLink( m_pixelClusterContainerLinkKey ) );
97
98
99 // Conversion
100 // Access to the cluster from a given detector element is possible
101 // via the ContainerAccessor.
102 ContainerAccessor<xAOD::PixelCluster, IdentifierHash, 1>
103 pixelAccessor ( *inputPixelClusters,
104 [] (const xAOD::PixelCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
105 pixElements->size());
106
107 const auto& allIdHashes = pixelAccessor.allIdentifiers();
108 for (const auto& hashId : allIdHashes) {
109 const InDetDD::SiDetectorElement *element = pixElements->getDetectorElement(hashId);
110 if ( element == nullptr ) {
111 ATH_MSG_FATAL( "Invalid pixel detector element for hash " << hashId);
112 return StatusCode::FAILURE;
113 }
114
115 // The readout design is a property of the detector element, so resolve it once
116 // here rather than for every cluster on the element.
117 const InDetDD::PixelModuleDesign* design = TrackingUtilities::pixelModuleDesign(*element);
118 if ( design == nullptr ) {
119 ATH_MSG_FATAL( "Invalid pixel module design for hash " << hashId);
120 return StatusCode::FAILURE;
121 }
122
123 std::unique_ptr<InDet::PixelClusterCollection> collection = std::make_unique<InDet::PixelClusterCollection>(hashId);
124
125 // Get the detector element and range for the idHash
126 for (const auto& this_range : pixelAccessor.rangesForIdentifierDirect(hashId)) {
127 for (auto start = this_range.first; start != this_range.second; ++start) {
128 const xAOD::PixelCluster* in_cluster = *start;
129 auto cluster = TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, *design, *m_pixelID);
130 if (!cluster) continue;
131 cluster->setHashAndIndex(hashId, collection->size());
132
133 // Add to Collection
134 collection->push_back(cluster.get());
135 dec_link(*in_cluster) = Link_t{cluster.release(), *collection};
136 }
137 }
138
139 InDet::PixelClusterContainer::IDC_WriteHandle lock = outputPixelClusterContainer->getWriteHandle(hashId);
140 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
141
142 } // loop on hashIds
143
144 auto offsets = std::make_unique<std::vector<unsigned int>>(m_pixelID->wafer_hash_max(), 0);
145 unsigned int counter(0);
146 for (const auto coll : *outputPixelClusterContainer) {
147 (*offsets)[coll->identifyHash()] = counter;
148 counter += coll->size();
149 }
150 SG::WriteHandle offSetHandle{m_pixelClusterOffSetKey ,ctx};
151 ATH_CHECK(offSetHandle.record(std::move(offsets)));
152
153 return StatusCode::SUCCESS;
154 }
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
SG::WriteHandleKey< std::vector< unsigned int > > m_pixelClusterOffSetKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClusterContainerKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerLinkKey
SG::WriteDecorHandleKey< xAOD::PixelClusterContainer > m_pixelClusterLinkKey
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
const InDetDD::PixelModuleDesign * pixelModuleDesign(const InDetDD::SiDetectorElement &element)
Resolve the readout design of a pixel/strip detector element.
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.

◆ convertStripClusters()

StatusCode InDet::XAODToInDetClusterConversion::convertStripClusters ( const EventContext & ctx) const
private

Definition at line 156 of file XAODToInDetClusterConversion.cxx.

156 {
157 const InDetDD::SiDetectorElementCollection* stripElements{};
158 ATH_CHECK(SG::get(stripElements, m_stripDetEleCollKey, ctx));
159 const xAOD::StripClusterContainer *inputStripClusters{};
160 ATH_CHECK(SG::get(inputStripClusters, m_inputStripClusterContainerKey, ctx));
161
163 SG::WriteDecorHandle<xAOD::StripClusterContainer, Link_t> dec_link{m_stripClusterLinkKey,ctx};
164
165 SG::WriteHandle outputStripClusterContainer{m_outputStripClusterContainerKey, ctx};
166 ATH_CHECK( outputStripClusterContainer.record (std::make_unique<InDet::SCT_ClusterContainer>(m_stripID->wafer_hash_max(), EventContainers::Mode::OfflineFast)) );
167 ATH_MSG_DEBUG( "Container '" << m_outputStripClusterContainerKey.key() << "' initialised" );
168
169 ATH_CHECK( outputStripClusterContainer.symLink( m_stripClusterContainerLinkKey ) );
170
171 // Conversion
172 // Access to the cluster from a given detector element is possible
173 // via the ContainerAccessor.
174 ContainerAccessor<xAOD::StripCluster, IdentifierHash, 1>
175 stripAccessor ( *inputStripClusters,
176 [] (const xAOD::StripCluster& cl) -> IdentifierHash { return cl.identifierHash(); },
177 stripElements->size());
178
179
180
181 const auto& allIdHashes = stripAccessor.allIdentifiers();
182 for (const auto& hashId : allIdHashes) {
183 const InDetDD::SiDetectorElement *element = stripElements->getDetectorElement(hashId);
184 if ( element == nullptr ) {
185 ATH_MSG_FATAL( "Invalid strip detector element for hash " << hashId);
186 return StatusCode::FAILURE;
187 }
188
189 bool isBarrel = element->isBarrel();
190 double shift = not isBarrel ? m_lorentzAngleTool->getLorentzShift(hashId, ctx) : 0.;
191
192 // The readout design is a property of the detector element, so resolve it once
193 // here rather than for every cluster on the element.
194 const InDetDD::SCT_ModuleSideDesign* design = TrackingUtilities::stripModuleSideDesign(*element);
195 if ( design == nullptr ) {
196 ATH_MSG_FATAL( "Invalid strip module design for hash " << hashId);
197 return StatusCode::FAILURE;
198 }
199
200 std::unique_ptr<InDet::SCT_ClusterCollection> collection = std::make_unique<InDet::SCT_ClusterCollection>(hashId);
201
202
203 // Get the detector element and range for the idHash
204 for (const auto& this_range : stripAccessor.rangesForIdentifierDirect(hashId)) {
205 for (auto start = this_range.first; start != this_range.second; ++start) {
206 const xAOD::StripCluster* in_cluster = *start;
207
208 auto cluster = TrackingUtilities::convertXaodToInDetCluster(*in_cluster, *element, *design, *m_stripID, shift);
209 if (!cluster) continue;
210 cluster->setHashAndIndex(hashId, collection->size());
211
212
213 // Add to Collection
214 collection->push_back( cluster.get() );
215 dec_link(*in_cluster) = Link_t{cluster.release(), *collection};
216 }
217 }
218
219 InDet::SCT_ClusterContainer::IDC_WriteHandle lock = outputStripClusterContainer->getWriteHandle(hashId);
220 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
221
222 }
223
224 auto offsets = std::make_unique<std::vector<unsigned int>>(m_stripID->wafer_hash_max(), 0);
225 unsigned int counter(0);
226 for (const auto coll : *outputStripClusterContainer) {
227 (*offsets)[coll->identifyHash()] = counter;
228 counter += coll->size();
229 }
230 SG::WriteHandle offSetHandle{m_stripClusterOffSetKey ,ctx};
231 ATH_CHECK(offSetHandle.record(std::move(offsets)));
232
233 return StatusCode::SUCCESS;
234 }
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
SG::WriteHandleKey< std::vector< unsigned int > > m_stripClusterOffSetKey
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey
SG::WriteDecorHandleKey< xAOD::StripClusterContainer > m_stripClusterLinkKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterContainerKey
virtual void shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the container.
const InDetDD::SCT_ModuleSideDesign * stripModuleSideDesign(const InDetDD::SiDetectorElement &element)
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode InDet::XAODToInDetClusterConversion::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 62 of file XAODToInDetClusterConversion.cxx.

63 {
64 ATH_MSG_DEBUG( "Executing " << name() << " ... ");
65 if (m_processPixel) {
66 ATH_MSG_DEBUG("Converting Pixel Clusters: xAOD -> InDet");
68 }
69
70 if (m_processStrip) {
71 ATH_MSG_DEBUG("Converting Strip Clusters: xAOD -> InDet");
73 }
74
75 if (m_processHgtd) {
76 ATH_MSG_DEBUG("Converting HGTD Clusters: xAOD -> InDet");
78 }
79
80 return StatusCode::SUCCESS;
81 }
StatusCode convertHgtdClusters(const EventContext &ctx) const
StatusCode convertPixelClusters(const EventContext &ctx) const
StatusCode convertStripClusters(const EventContext &ctx) const

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode InDet::XAODToInDetClusterConversion::initialize ( )
overridevirtual

Definition at line 23 of file XAODToInDetClusterConversion.cxx.

23 {
24 ATH_MSG_INFO( "Initializing " << name() << " ... " );
25
26 // Pixel Clusters
28 if (m_processPixel) {
29 ATH_CHECK( detStore()->retrieve(m_pixelID,"PixelID") );
30 }
36
37 // Strip Clusters
39 if (m_processStrip) {
40 ATH_CHECK( detStore()->retrieve(m_stripID, "SCT_ID") );
41 }
47
48 ATH_CHECK( m_lorentzAngleTool.retrieve(EnableTool{not m_lorentzAngleTool.empty()}) );
49
50 // Hgtd Clusters
52 if (m_processHgtd) {
53 ATH_CHECK( detStore()->retrieve(m_hgtdID, "HGTD_ID") );
54 }
58
59 return StatusCode::SUCCESS;
60 }
#define ATH_MSG_INFO(x,...)
const ServiceHandle< StoreGateSvc > & detStore() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_hgdtClusterLinkKey

SG::WriteDecorHandleKey<xAOD::HGTDClusterContainer> InDet::XAODToInDetClusterConversion::m_hgdtClusterLinkKey {this, "HgtdClusterLinkKey", m_inputHgtdClusterContainerKey, "hgtdClusterLink", "Decoration to link Trk object to xAOD" }
private

Definition at line 79 of file XAODToInDetClusterConversion.h.

79{this, "HgtdClusterLinkKey", m_inputHgtdClusterContainerKey, "hgtdClusterLink", "Decoration to link Trk object to xAOD" };

◆ m_HGTDDetEleCollKey

SG::ReadCondHandleKey<InDetDD::HGTD_DetectorElementCollection> InDet::XAODToInDetClusterConversion::m_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"}
private

Definition at line 75 of file XAODToInDetClusterConversion.h.

75{this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"};

◆ m_hgtdID

const HGTD_ID* InDet::XAODToInDetClusterConversion::m_hgtdID {}
private

Definition at line 54 of file XAODToInDetClusterConversion.h.

54{};

◆ m_inputHgtdClusterContainerKey

SG::ReadHandleKey<xAOD::HGTDClusterContainer> InDet::XAODToInDetClusterConversion::m_inputHgtdClusterContainerKey {this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"}
private

Definition at line 76 of file XAODToInDetClusterConversion.h.

76{this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"};

◆ m_inputPixelClusterContainerKey

SG::ReadHandleKey<xAOD::PixelClusterContainer> InDet::XAODToInDetClusterConversion::m_inputPixelClusterContainerKey {this, "InputPixelClustersName", "ITkPixelClusters", "name of the input xAOD pixel cluster container"}
private

Definition at line 59 of file XAODToInDetClusterConversion.h.

59{this, "InputPixelClustersName", "ITkPixelClusters", "name of the input xAOD pixel cluster container"};

◆ m_inputStripClusterContainerKey

SG::ReadHandleKey<xAOD::StripClusterContainer> InDet::XAODToInDetClusterConversion::m_inputStripClusterContainerKey {this, "InputStripClustersName", "ITkStripClusters", "name of the input xAOD strip cluster container"}
private

Definition at line 68 of file XAODToInDetClusterConversion.h.

68{this, "InputStripClustersName", "ITkStripClusters", "name of the input xAOD strip cluster container"};

◆ m_lorentzAngleTool

ToolHandle<ISiLorentzAngleTool> InDet::XAODToInDetClusterConversion::m_lorentzAngleTool {this, "LorentzAngleTool", "", "Tool to retrieve Lorentz angle of SCT"}
private

Definition at line 56 of file XAODToInDetClusterConversion.h.

56{this, "LorentzAngleTool", "", "Tool to retrieve Lorentz angle of SCT"};

◆ m_outputHgtdClusterContainerKey

SG::WriteHandleKey<::HGTD_ClusterContainer> InDet::XAODToInDetClusterConversion::m_outputHgtdClusterContainerKey {this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"}
private

Definition at line 78 of file XAODToInDetClusterConversion.h.

78{this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"};

◆ m_outputPixelClusterContainerKey

SG::WriteHandleKey<InDet::PixelClusterContainer> InDet::XAODToInDetClusterConversion::m_outputPixelClusterContainerKey {this, "OutputPixelClustersName", "ITkPixelClusters", "name of the output InDet pixel cluster container"}
private

Definition at line 61 of file XAODToInDetClusterConversion.h.

61{this, "OutputPixelClustersName", "ITkPixelClusters", "name of the output InDet pixel cluster container"};

◆ m_outputStripClusterContainerKey

SG::WriteHandleKey<InDet::SCT_ClusterContainer> InDet::XAODToInDetClusterConversion::m_outputStripClusterContainerKey {this, "OutputStripClustersName", "ITkStripClusters", "name of the output InDet pixel cluster container"}
private

Definition at line 70 of file XAODToInDetClusterConversion.h.

70{this, "OutputStripClustersName", "ITkStripClusters", "name of the output InDet pixel cluster container"};

◆ m_pixelClusterContainerLinkKey

SG::WriteHandleKey< InDet::SiClusterContainer > InDet::XAODToInDetClusterConversion::m_pixelClusterContainerLinkKey {this, "PixelClustersLinkName", "ITkPixelClusters"}
private

Definition at line 62 of file XAODToInDetClusterConversion.h.

62{this, "PixelClustersLinkName", "ITkPixelClusters"};

◆ m_pixelClusterLinkKey

SG::WriteDecorHandleKey<xAOD::PixelClusterContainer> InDet::XAODToInDetClusterConversion::m_pixelClusterLinkKey {this, "PixelClusterLinkKey", m_inputPixelClusterContainerKey, "pixelClusterLink", "Decoration to link Trk object to xAOD" }
private

Definition at line 65 of file XAODToInDetClusterConversion.h.

65{this, "PixelClusterLinkKey", m_inputPixelClusterContainerKey, "pixelClusterLink", "Decoration to link Trk object to xAOD" };

◆ m_pixelClusterOffSetKey

SG::WriteHandleKey<std::vector<unsigned int> > InDet::XAODToInDetClusterConversion::m_pixelClusterOffSetKey {this, "PixelClusterOffSetKey", "ITkPixelClustersOffsets"}
private

Definition at line 63 of file XAODToInDetClusterConversion.h.

63{this, "PixelClusterOffSetKey", "ITkPixelClustersOffsets"};

◆ m_pixelDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> InDet::XAODToInDetClusterConversion::m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
private

Definition at line 58 of file XAODToInDetClusterConversion.h.

58{this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};

◆ m_pixelID

const PixelID* InDet::XAODToInDetClusterConversion::m_pixelID {}
private

Definition at line 52 of file XAODToInDetClusterConversion.h.

52{};

◆ m_processHgtd

Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processHgtd {this, "ProcessHgtd", false}
private

Definition at line 83 of file XAODToInDetClusterConversion.h.

83{this, "ProcessHgtd", false};

◆ m_processPixel

Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processPixel {this, "ProcessPixel", false}
private

Definition at line 81 of file XAODToInDetClusterConversion.h.

81{this, "ProcessPixel", false};

◆ m_processStrip

Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processStrip {this, "ProcessStrip", false}
private

Definition at line 82 of file XAODToInDetClusterConversion.h.

82{this, "ProcessStrip", false};

◆ m_stripClusterContainerLinkKey

SG::WriteHandleKey< InDet::SiClusterContainer > InDet::XAODToInDetClusterConversion::m_stripClusterContainerLinkKey {this, "StripClustersLinkName", "ITkStripClusters"}
private

Definition at line 71 of file XAODToInDetClusterConversion.h.

71{this, "StripClustersLinkName", "ITkStripClusters"};

◆ m_stripClusterLinkKey

SG::WriteDecorHandleKey<xAOD::StripClusterContainer> InDet::XAODToInDetClusterConversion::m_stripClusterLinkKey {this, "StripClusterLinkKey", m_inputStripClusterContainerKey, "sctClusterLink", "Decoration to link Trk object to xAOD" }
private

Definition at line 73 of file XAODToInDetClusterConversion.h.

73{this, "StripClusterLinkKey", m_inputStripClusterContainerKey, "sctClusterLink", "Decoration to link Trk object to xAOD" };

◆ m_stripClusterOffSetKey

SG::WriteHandleKey<std::vector<unsigned int> > InDet::XAODToInDetClusterConversion::m_stripClusterOffSetKey {this, "StripClusterOffSetKey", "ITkStripClustersOffsets"}
private

Definition at line 72 of file XAODToInDetClusterConversion.h.

72{this, "StripClusterOffSetKey", "ITkStripClustersOffsets"};

◆ m_stripDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> InDet::XAODToInDetClusterConversion::m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"}
private

Definition at line 67 of file XAODToInDetClusterConversion.h.

67{this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"};

◆ m_stripID

const SCT_ID* InDet::XAODToInDetClusterConversion::m_stripID {}
private

Definition at line 53 of file XAODToInDetClusterConversion.h.

53{};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: