|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #define AUXDATA(OBJ, TYP, NAME) \
9 static const SG::AuxElement::Accessor<TYP> acc_##NAME (#NAME); acc_##NAME(*(OBJ))
16 ISvcLocator *pSvcLocator) :
30 return StatusCode::SUCCESS;
39 return StatusCode::FAILURE;
47 if (measToTruthHandle.
isValid()) {
48 measToTruth = &*measToTruthHandle;
57 ATH_CHECK(xaod.
record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),
58 std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>()));
78 auto gpos = prd->globalPosition();
81 auto locpos = prd->localPosition<1>();
86 auto localCov = prd->localCovariance<1>();
88 if(localCov.size() == 1){
90 }
else if(localCov.size() == 4){
100 if (prd->index() >= (*measToTruth).size()) {
101 ATH_MSG_ERROR(
"PRD index "<< prd->index()<<
" not present in the measurement to truth vector with size "<<(*measToTruth).size());
105 auto tps = (*measToTruth)[prd->index()];
108 std::vector<unsigned int> tp_indices;
109 std::vector<unsigned int> tp_barcodes;
110 for (
auto tp : tps) {
111 tp_indices.push_back(
tp->index());
112 tp_barcodes.push_back(
tp->barcode());
116 AUXDATA(xprd,std::vector<unsigned int>, truth_index) = tp_indices;
117 AUXDATA(xprd,std::vector<unsigned int>, truth_barcode) = tp_barcodes;
125 return StatusCode::SUCCESS;
131 return StatusCode::SUCCESS;
SG::ReadHandleKey< xAOD::StripClusterContainer > m_clustercontainer_key
#define AUXDATA(OBJ, TYP, NAME)
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
StripClusterTruthDecorator(const std::string &name, ISvcLocator *pSvcLocator)
value_type get_compact() const
Get the compact id.
bool is_valid() const
Check if id is in a valid state.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_associationMap_key
Class describing a TrackMeasurementValidation.
void setLocalPosition(float localX, float localY)
Sets the local position.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode execute(const EventContext &ctx) const override
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.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
void setGlobalPosition(float globalX, float globalY, float globalZ)
Sets the global position.
void setLocalPositionError(float localXError, float localYError, float localXYCorrelation)
Sets the local position error.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual StatusCode finalize() override
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
size_type size() const noexcept
Returns the number of elements in the collection.
virtual StatusCode initialize() override
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key