|
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))
27 return StatusCode::SUCCESS;
40 if (measToTruthHandle.
isValid()) {
41 measToTruth = &*measToTruthHandle;
50 ATH_CHECK(xaod.
record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),
51 std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>()));
70 auto gpos = prd->globalPosition();
73 auto locpos = prd->localPosition<2>();
77 auto localCov = prd->localCovariance<2>();
78 if(localCov.size() == 1){
80 }
else if(localCov.size() == 4){
90 if (prd->index() >= (*measToTruth).size()) {
91 ATH_MSG_ERROR(
"PRD index "<< prd->index()<<
" not present in the measurement to truth vector with size "<<(*measToTruth).size());
94 auto tps = (*measToTruth)[prd->index()];
97 std::vector<unsigned int> tp_indices;
98 std::vector<unsigned int> tp_barcodes;
100 tp_indices.push_back(
tp->index());
101 tp_barcodes.push_back(
tp->barcode());
105 AUXDATA(xprd,std::vector<unsigned int>, truth_index) = tp_indices;
106 AUXDATA(xprd,std::vector<unsigned int>, truth_barcode) = tp_barcodes;
115 return StatusCode::SUCCESS;
120 return StatusCode::SUCCESS;
virtual StatusCode finalize() override
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
value_type get_compact() const
Get the compact id.
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_clustercontainer_key
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
bool is_valid() const
Check if id is in a valid state.
PixelClusterTruthDecorator(const std::string &name, ISvcLocator *pSvcLocator)
An algorithm that can be simultaneously executed in multiple threads.
Class describing a TrackMeasurementValidation.
void setLocalPosition(float localX, float localY)
Sets the local position.
#define AUXDATA(OBJ, TYP, NAME)
::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.
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
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.
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...
virtual StatusCode initialize() override
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadHandleKey< MeasurementToTruthParticleAssociation > m_associationMap_key