10#include "Acts/Utilities/Helpers.hpp"
14 constexpr std::uint16_t translateBC(
const std::uint16_t bc) {
37 return StatusCode::SUCCESS;
40 const std::vector<IdentifierHash>& idVect)
const {
45 ATH_CHECK(writeHandle.
record(std::make_unique<xAOD::TgcStripContainer>(),
46 std::make_unique<xAOD::TgcStripAuxContainer>()));
50 if (!idVect.empty() && !Acts::rangeContainsValue(idVect, coll->identifierHash())) {
56 const std::size_t nPrdBefore = writeHandle->size();
57 for (
const TgcDigit* digit : *coll) {
60 std::find_if(writeHandle->begin() + nPrdBefore, writeHandle->end(), [digit](
const xAOD::TgcStrip* prd) {
61 return prd->identify() == digit->identify();
63 const std::uint16_t
bcTag = translateBC(digit->bcTag());
67 if (sameHitOtherBC != writeHandle->end()) {
72 xAOD::TgcStrip* newStrip = writeHandle->push_back(std::make_unique<xAOD::TgcStrip>());
88 locPos[0] = measPos[1];
90 locCov(0,0) = Acts::square(radDesign.stripPitch(newStrip->
channelNumber())) / 12.;
92 locPos[0] = measPos[0];
94 locCov(0,0) = Acts::square(wireDesign.stripPitch() *
100 <<
" with covariance "<<locCov(0,0));
104 ATH_MSG_DEBUG(
"Recorded in total "<<writeHandle->size()<<
" measurements.");
105 return StatusCode::SUCCESS;
108 const std::vector<uint32_t>& )
const {
110 return StatusCode::FAILURE;
114 ATH_CHECK(writeHandle.
record(std::make_unique<xAOD::TgcStripContainer>(),
115 std::make_unique<xAOD::TgcStripAuxContainer>()));
116 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
unsigned bcTag(unsigned bcBitMap)
DataModel_detail::iterator< DataVector > iterator
IdentifierHash identHash() const
Returns the hash of the readout element which is identical to the detector element hash provided by t...
const StripLayerPtr & sensorLayout(const IdentifierHash &hash) const
Returns the pointer to the strip layer associated with the gas gap.
const RadialStripDesign & stripLayout(const IdentifierHash &layHash) const
Returns access to the strip design of the given gasGap [1-3] If the gap does not have strips an excep...
const WireGroupDesign & wireGangLayout(const IdentifierHash &layHash) const
Returns access to the wire group design of the given gasGap [1-3] If the gap does not have a wires an...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Use IdentifiableContainer with TgcDigitCollection.
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
bool measuresPhi(const Identifier &id) const override
const Identifier & identify() const
Returns the Athena identifier of the measurement.
void setReadoutElement(const MuonGMR4::TgcReadoutElement *readoutEle)
set the pointer to the TgcReadoutElement
std::uint16_t channelNumber() const
Strip or wire group number of the Tgc strip measurement.
void setChannelNumber(std::uint16_t chan)
Set the strip or wire group number of the measurement.
void setMeasuresPhi(std::uint8_t measPhi)
Set the measures phi flag of the measurement to true /false.
void setGasGap(uint8_t gapNum)
Set the gas gap number of the measurement [1-N].
IdentifierHash measurementHash() const override final
Returns the hash of the measurement channel.
IdentifierHash layerHash() const override final
Returns the hash of the associated layer (Needed for surface retrieval).
std::uint8_t bcBitMap() const
Returns the bcBitMap of this PRD bit2 for Previous BC, bit1 for Current BC, bit0 for Next BC.
void setBcBitMap(std::uint8_t bitMap)
Set the bunch crossing-id map.
std::uint8_t measuresPhi() const override final
Does the object belong to an eta or a phi measurement (si /no).
void setMeasurement(const DetectorIDHashType idHash, MeasVector< N > locPos, MeasMatrix< N > locCov)
Sets IdentifierHash, local position and local covariance of the measurement.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Eigen::Matrix< float, N, N > MeasMatrix
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.