Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <XAODToInDetClusterConversion.h>
|
| XAODToInDetClusterConversion (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &ctx) const override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
const PixelID * | m_pixelID {} |
|
const SCT_ID * | m_stripID {} |
|
const HGTD_ID * | m_hgtdID {} |
|
ToolHandle< ISiLorentzAngleTool > | m_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool/SCTLorentzAngleTool", "Tool to retrieve Lorentz angle of SCT"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "ITkPixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"} |
|
SG::ReadHandleKey< xAOD::PixelClusterContainer > | m_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::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for Strip"} |
|
SG::ReadHandleKey< xAOD::StripClusterContainer > | m_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::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > | m_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"} |
|
SG::ReadHandleKey< xAOD::HGTDClusterContainer > | m_inputHgtdClusterContainerKey {this, "InputHGTDClustersName", "HGTD_Clusters", "name of the input xAOD hgtd cluster container"} |
|
SG::WriteHandleKey<::HGTD_ClusterContainer > | m_outputHgtdClusterContainerKey {this, "OutputHGTDClustersName", "HGTD_Clusters", "name of the output InDet hgtd cluster container"} |
|
Gaudi::Property< bool > | m_processPixel {this, "ProcessPixel", false} |
|
Gaudi::Property< bool > | m_processStrip {this, "ProcessStrip", false} |
|
Gaudi::Property< bool > | m_processHgtd {this, "ProcessHgtd", false} |
|
| XAODToInDetClusterConversion ()=delete |
|
| XAODToInDetClusterConversion (const XAODToInDetClusterConversion &)=delete |
|
XAODToInDetClusterConversion & | operator= (const XAODToInDetClusterConversion &)=delete |
|
StatusCode | convertPixelClusters (const EventContext &ctx) const |
|
StatusCode | convertStripClusters (const EventContext &ctx) const |
|
StatusCode | convertHgtdClusters (const EventContext &ctx) const |
|
◆ StoreGateSvc_t
◆ XAODToInDetClusterConversion() [1/3]
InDet::XAODToInDetClusterConversion::XAODToInDetClusterConversion |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ XAODToInDetClusterConversion() [2/3]
InDet::XAODToInDetClusterConversion::XAODToInDetClusterConversion |
( |
| ) |
|
|
delete |
◆ XAODToInDetClusterConversion() [3/3]
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ convertHgtdClusters()
StatusCode InDet::XAODToInDetClusterConversion::convertHgtdClusters |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 212 of file XAODToInDetClusterConversion.cxx.
216 if (not hgtdDetEleHandle.isValid() or hgtdElements==
nullptr) {
218 return StatusCode::FAILURE;
230 hgtdAccessor ( *inputHgtdClusters,
232 hgtdElements->size());
234 const auto& allIdHashes = hgtdAccessor.allIdentifiers();
235 for (
const auto& hashId : allIdHashes) {
236 const auto *element = hgtdElements->getDetectorElement(hashId);
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);
245 for (
const auto& this_range : hgtdAccessor.rangesForIdentifierDirect(hashId)) {
246 for (
auto start = this_range.first;
start != this_range.second; ++
start) {
251 cluster->setHashAndIndex(hashId, collection->
size());
265 return StatusCode::SUCCESS;
◆ convertPixelClusters()
StatusCode InDet::XAODToInDetClusterConversion::convertPixelClusters |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 79 of file XAODToInDetClusterConversion.cxx.
83 if (not pixelDetEleHandle.isValid() or pixElements==
nullptr) {
85 return StatusCode::FAILURE;
103 pixelAccessor ( *inputPixelClusters,
105 pixElements->size());
107 const auto& allIdHashes = pixelAccessor.allIdentifiers();
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);
118 for (
const auto& this_range : pixelAccessor.rangesForIdentifierDirect(hashId)) {
119 for (
auto start = this_range.first;
start != this_range.second; ++
start) {
124 cluster->setHashAndIndex(hashId, collection->size());
127 collection->push_back(cluster);
131 InDet::PixelClusterContainer::IDC_WriteHandle lock = outputPixelClusterContainer->getWriteHandle(hashId);
132 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
138 return StatusCode::SUCCESS;
◆ convertStripClusters()
StatusCode InDet::XAODToInDetClusterConversion::convertStripClusters |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 141 of file XAODToInDetClusterConversion.cxx.
145 if (not stripDetEleHandle.isValid() or stripElements==
nullptr) {
147 return StatusCode::FAILURE;
165 stripAccessor ( *inputStripClusters,
167 stripElements->size());
171 const auto& allIdHashes = stripAccessor.allIdentifiers();
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;
185 std::unique_ptr<InDet::SCT_ClusterCollection> collection = std::make_unique<InDet::SCT_ClusterCollection>(hashId);
189 for (
const auto& this_range : stripAccessor.rangesForIdentifierDirect(hashId)) {
190 for (
auto start = this_range.first;
start != this_range.second; ++
start) {
195 cluster->setHashAndIndex(hashId, collection->size());
198 collection->push_back( cluster );
202 InDet::SCT_ClusterContainer::IDC_WriteHandle lock = outputStripClusterContainer->getWriteHandle(hashId);
203 ATH_CHECK(lock.addOrDelete( std::move(collection) ));
209 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode InDet::XAODToInDetClusterConversion::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ extraDeps_update_handler()
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()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ initialize()
StatusCode InDet::XAODToInDetClusterConversion::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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()
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ operator=()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
◆ sysExecute()
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.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
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 InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_HGTDDetEleCollKey
◆ m_hgtdID
const HGTD_ID* InDet::XAODToInDetClusterConversion::m_hgtdID {} |
|
private |
◆ m_inputHgtdClusterContainerKey
◆ m_inputPixelClusterContainerKey
◆ m_inputStripClusterContainerKey
◆ m_lorentzAngleTool
◆ m_outputHgtdClusterContainerKey
◆ m_outputPixelClusterContainerKey
◆ m_outputStripClusterContainerKey
◆ m_pixelClusterContainerLinkKey
◆ m_pixelDetEleCollKey
◆ m_pixelID
const PixelID* InDet::XAODToInDetClusterConversion::m_pixelID {} |
|
private |
◆ m_processHgtd
Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processHgtd {this, "ProcessHgtd", false} |
|
private |
◆ m_processPixel
Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processPixel {this, "ProcessPixel", false} |
|
private |
◆ m_processStrip
Gaudi::Property<bool> InDet::XAODToInDetClusterConversion::m_processStrip {this, "ProcessStrip", false} |
|
private |
◆ m_stripClusterContainerLinkKey
◆ m_stripDetEleCollKey
◆ m_stripID
const SCT_ID* InDet::XAODToInDetClusterConversion::m_stripID {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const PixelID * m_pixelID
StatusCode convertStripClusters(const EventContext &ctx) const
const_pointer_type cptr()
Dereference the pointer.
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterContainerKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
StatusCode symLink(const WriteHandleKey< U > &key)
Make an explicit link.
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
StatusCode convertXaodToInDetCluster(const xAOD::PixelCluster &xaodCluster, const InDetDD::SiDetectorElement &element, const PixelID &pixelID, InDet::PixelCluster *&indetCluster)
const std::string & key() const
Return the StoreGate ID for the referenced object.
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
StatusCode convertHgtdClusters(const EventContext &ctx) const
SG::WriteHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerLinkKey
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Gaudi::Property< bool > m_processStrip
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClusterContainerKey
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
StatusCode convertPixelClusters(const EventContext &ctx) const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
size_type wafer_hash_max(void) const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
size_type wafer_hash_max(void) const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
size_type wafer_hash_max(void) const
Gaudi::Property< bool > m_processHgtd
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey
StatusCode addOrDelete(std::unique_ptr< T > ptr)
Gaudi::Property< bool > m_processPixel
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::HGTDClusterContainer > m_inputHgtdClusterContainerKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
SG::WriteHandleKey< InDet::SiClusterContainer > m_stripClusterContainerLinkKey
virtual StatusCode sysInitialize() override
Override sysInitialize.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
SG::WriteHandleKey<::HGTD_ClusterContainer > m_outputHgtdClusterContainerKey
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>