Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
#include <StripClusterTruthDecoratorAlg.h>
|
| StripClusterTruthDecoratorAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~StripClusterTruthDecoratorAlg ()=default |
|
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 |
|
|
SG::ReadHandleKey< xAOD::StripClusterContainer > | m_clustercontainer_key {this,"ClusterContainer", "", "Input Strip Cluster container"} |
|
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > | m_associationMap_key {this,"AssociationMapOut", "", "Association map between measurements and truth particles"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_stripDetEleCollKey {this, "StripDetectorElements", "ITkStripDetectorElementCollection"} |
|
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > | m_write_xaod_key {this,"MeasurementContainer","", "Output Strip Validation Clusters"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_truth_indices {this, "MeasurementTruthIndices", "truth_index"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_truth_barcodes {this, "MeasurementTruthBarcode", "truth_barcode"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_detectorElementID {this, "MeasurementDetectorElementID", "detectorElementID"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_waferID {this, "MeasurementWaferID", "waferID"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_bec {this, "MeasurementBEC", "bec"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_layer {this, "MeasurementLayer", "layer"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_sizePhi {this, "MeasurementSizePhi", "sizePhi"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_sizeZ {this, "MeasurementSizeZ", "sizeZ"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_SiWidth {this, "MeasurementSiWidth", "SiWidth"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_eta_module {this, "MeasurementEtaModule", "eta_module"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_phi_module {this, "MeasurementPhiModule", "phi_module"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_omegax {this, "MeasurementOmegaX", "omegax"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_omegay {this, "MeasurementOmegaY", "omegay"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_LorentzShift {this, "MeasurementLorentzShift", "LorentzShift"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_centroid_xphi {this, "MeasurementCentroidXphi", "centroid_xphi"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_centroid_xeta {this, "MeasurementCentroidXeta", "centroid_xeta"} |
|
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > | m_measurement_side {this, "MeasurementSide", "side"} |
|
Gaudi::Property< bool > | m_useTruthInfo {this, "UseTruthInfo", true} |
|
const SCT_ID * | m_stripHelper {nullptr} |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
◆ StoreGateSvc_t
◆ StripClusterTruthDecoratorAlg()
ActsTrk::StripClusterTruthDecoratorAlg::StripClusterTruthDecoratorAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~StripClusterTruthDecoratorAlg()
virtual ActsTrk::StripClusterTruthDecoratorAlg::~StripClusterTruthDecoratorAlg |
( |
| ) |
|
|
virtualdefault |
◆ 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.
◆ 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 ActsTrk::StripClusterTruthDecoratorAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 71 of file StripClusterTruthDecoratorAlg.cxx.
85 measToTruth = measToTruthHandle.
ptr();
91 ATH_CHECK(xaod.
record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),
92 std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>()));
112 std::vector<xAOD::TrackMeasurementValidation*>
toAdd(stripClusters->
size(),
nullptr);
113 for (std::size_t
i(0);
i<
toAdd.size(); ++
i) {
119 for (std::size_t
i(0);
i<stripClusters->
size(); ++
i) {
128 ATH_MSG_FATAL(
"Invalid strip detector element for hash " << hashId );
129 return StatusCode::FAILURE;
132 const std::vector<Identifier> rdoList =
cluster->rdoList();
133 std::vector< std::uint64_t > rdoIdentifierList;
134 rdoIdentifierList.reserve(rdoList.size());
135 for(
const Identifier& hitIdentifier : rdoList ){
136 rdoIdentifierList.push_back( hitIdentifier.get_compact() );
144 auto gpos =
cluster->globalPosition();
148 auto locpos =
cluster->localPosition<1>();
151 auto localCov =
cluster->localCovariance<1>();
155 decor_detectorElementID(*measurement) = hashId;
156 decor_waferID(*measurement) = waferId.
get_compact();
159 decor_sizePhi(*measurement) =
cluster->channelsInPhi();
160 decor_sizeZ(*measurement) = 0;
161 decor_SiWidth(*measurement) =
cluster->channelsInPhi();
164 decor_omegax(*measurement) = 0;
165 decor_omegay(*measurement) = 0;
166 decor_LorentzShift(*measurement) = 0;
167 decor_centroid_xphi(*measurement) = 0;
168 decor_centroid_xeta(*measurement) = 0;
178 for (std::size_t
i(0);
i<stripClusters->
size(); ++
i) {
182 if (
cluster->index() >= measToTruth->size()) {
183 ATH_MSG_ERROR(
"PRD index "<<
cluster->index() <<
" not present in the measurement to truth vector with size " << measToTruth->size());
184 return StatusCode::FAILURE;
187 auto tps = measToTruth->at(
cluster->index());
189 std::vector<unsigned int> tp_indices;
190 std::vector<unsigned int> tp_barcodes;
191 for (
auto tp : tps) {
192 tp_indices.push_back(
tp->index());
196 decor_truth_indices(*measurement) = std::move(tp_indices);
197 decor_truth_barcode(*measurement) = std::move(tp_barcodes);
201 ATH_MSG_DEBUG(
" recorded StripPrepData objects: size " << measurements->
size() );
202 return StatusCode::SUCCESS;
◆ 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 ActsTrk::StripClusterTruthDecoratorAlg::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()
◆ 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_associationMap_key
◆ m_clustercontainer_key
◆ 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_measurement_bec
◆ m_measurement_centroid_xeta
◆ m_measurement_centroid_xphi
◆ m_measurement_detectorElementID
◆ m_measurement_eta_module
◆ m_measurement_layer
◆ m_measurement_LorentzShift
◆ m_measurement_omegax
◆ m_measurement_omegay
◆ m_measurement_phi_module
◆ m_measurement_side
◆ m_measurement_SiWidth
◆ m_measurement_sizePhi
◆ m_measurement_sizeZ
◆ m_measurement_truth_barcodes
◆ m_measurement_truth_indices
◆ m_measurement_waferID
◆ m_stripDetEleCollKey
◆ m_stripHelper
const SCT_ID* ActsTrk::StripClusterTruthDecoratorAlg::m_stripHelper {nullptr} |
|
private |
◆ m_useTruthInfo
Gaudi::Property<bool> ActsTrk::StripClusterTruthDecoratorAlg::m_useTruthInfo {this, "UseTruthInfo", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_write_xaod_key
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xeta
long unsigned int DetectorIdentType
const SCT_ID * m_stripHelper
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_layer
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_SiWidth
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
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)
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
value_type get_compact() const
Get the compact id.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_LorentzShift
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_indices
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
void setRdoIdentifierList(const std::vector< uint64_t > &rdoIdentifierList)
Sets the list of RDO identifiers.
int phi_module(const Identifier &id) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegax
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_side
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_associationMap_key
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::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Class describing a TrackMeasurementValidation.
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
void setLocalPosition(float localX, float localY)
Sets the local position.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizePhi
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_waferID
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
Handle class for adding a decoration to an object.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_omegay
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_detectorElementID
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
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.
void setIdentifier(uint64_t identifier)
Sets the identifier.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_phi_module
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
void setGlobalPosition(float globalX, float globalY, float globalZ)
Sets the global position.
unsigned int DetectorIDHashType
@ detector ID element hash
void setLocalPositionError(float localXError, float localYError, float localXYCorrelation)
Sets the local position error.
int layer_disk(const Identifier &id) const
StatusCode initialize(bool used=true)
const_pointer_type ptr()
Dereference the pointer.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
int eta_module(const Identifier &id) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
int side(const Identifier &id) const
SG::ReadHandleKey< xAOD::StripClusterContainer > m_clustercontainer_key
const T * at(size_type n) const
Access an element, as an rvalue.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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>
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
const_pointer_type cptr()
Gaudi::Property< bool > m_useTruthInfo