Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
11 ISvcLocator *pSvcLocator) :
68 return StatusCode::SUCCESS;
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;
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
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_sizeZ
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_centroid_xphi
virtual StatusCode initialize() override
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_write_xaod_key
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_truth_barcodes
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.
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())
StripClusterTruthDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Class describing a TrackMeasurementValidation.
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_bec
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.
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.
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?
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)
virtual StatusCode execute(const EventContext &ctx) const override
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.
int eta_module(const Identifier &id) const
int side(const Identifier &id) const
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
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.
size_type size() const noexcept
Returns the number of elements in the collection.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
SG::WriteDecorHandleKey< xAOD::TrackMeasurementValidationContainer > m_measurement_eta_module
const_pointer_type cptr()
Gaudi::Property< bool > m_useTruthInfo