Loading [MathJax]/jax/output/SVG/config.js
 |
ATLAS Offline Software
|
#include <MmRdoToPrepDataToolMT.h>
Definition at line 22 of file MmRdoToPrepDataToolMT.h.
◆ MmRdoToPrepDataToolMT()
Muon::MmRdoToPrepDataToolMT::MmRdoToPrepDataToolMT |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MmRdoToPrepDataToolMT()
virtual Muon::MmRdoToPrepDataToolMT::~MmRdoToPrepDataToolMT |
( |
| ) |
|
|
virtualdefault |
◆ decode() [1/2]
StatusCode Muon::MmRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< IdentifierHash > & |
idVect |
|
) |
| const |
|
overridevirtual |
Decode method - declared in Muon::IMuonRdoToPrepDataTool.
Definition at line 267 of file MmRdoToPrepDataToolMT.cxx.
271 ATH_MSG_DEBUG(
"Size of the RDO container to be decoded: " << idVect.size());
275 if (!mmPrepDataContainer) {
276 return StatusCode::FAILURE;
283 ATH_CHECK(outputContainer.record(std::make_unique<xAOD::MMClusterContainer>(),
284 std::make_unique<xAOD::MMClusterAuxContainer>()));
290 return StatusCode::SUCCESS;
◆ decode() [2/2]
StatusCode Muon::MmRdoToPrepDataToolMT::decode |
( |
const EventContext & |
ctx, |
|
|
const std::vector< uint32_t > & |
robIds |
|
) |
| const |
|
overridevirtual |
◆ getRdoContainer()
◆ initialize()
StatusCode Muon::MmRdoToPrepDataToolMT::initialize |
( |
| ) |
|
|
overridevirtual |
◆ processCollection()
reconstruct the clusters
Definition at line 43 of file MmRdoToPrepDataToolMT.cxx.
48 ATH_MSG_DEBUG(
" ***************** Start of process MM Collection");
53 const IdentifierHash
hash = rdoColl->identifierHash();
56 if (!idsToDecode.empty() and
std::find(idsToDecode.begin(), idsToDecode.end(),
57 hash) == idsToDecode.end()) {
59 return StatusCode::SUCCESS;
66 ATH_MSG_DEBUG(
"In processCollection: collection already contained in the MM PrepData container");
67 return StatusCode::SUCCESS;
74 if (lock.OnlineAndPresentInAnotherView()) {
75 ATH_MSG_DEBUG(
"In processCollection: collection already available in the MM PrepData container (via cache)");
76 return StatusCode::SUCCESS;
78 auto prdColl = std::make_unique<MMPrepDataCollection>(
hash);
83 if (id_helper.
get_id(
hash, moduleId, &context) != 0) {
87 prdColl->setIdentifier(moduleId);
92 if (!MuonDetMgr.isValid()) {
93 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
94 return StatusCode::FAILURE;
97 std::vector<MMPrepData> MMprds;
99 for (
const MM_RawData* rdo : *rdoColl) {
106 std::vector<Identifier> rdoList;
109 rdoList.push_back(prdId);
131 if (calibStrip.
charge < 0) {
132 if (!hitNegativeCharge || msgLvl(
MSG::DEBUG)) {
133 ATH_MSG_WARNING(
"One MM RDO or more, such as one with pdo = "<< rdo->charge()
134 <<
" counts, corresponds to a negative charge ("<< calibStrip.
charge <<
"). Skipping these RDOs");
135 hitNegativeCharge =
true;
150 ATH_MSG_DEBUG(
" MM detector surface direction phi "<< gdir.phi() <<
" global radius hit " << globalPos.perp()
151 <<
" phi pos " << globalPos.phi() <<
" global z "<< globalPos.z());
157 localPos.x() += calibStrip.
dx;
161 auto mpd = std::make_unique<MMPrepData>(prdId,
hash,
162 std::move(localPos), std::move(rdoList), std::move(
cov),
167 prdColl->push_back(std::move(mpd));
173 MMPrepData mpd(prdId,
hash, std::move(localPos), std::move(rdoList),
178 mpd.setHashAndIndex(
hash, 0);
180 MMprds.push_back(std::move(mpd));
185 std::vector<std::unique_ptr<MMPrepData>>
clusters;
190 for (std::unique_ptr<MMPrepData>& prdN :
clusters) {
191 prdN->setHashAndIndex(prdColl->identifyHash(), prdColl->size());
192 prdColl->push_back(std::move(prdN));
198 std::vector<const MMPrepData*> sortMe{prdColl->begin(), prdColl->end()};
199 std::ranges::sort(sortMe, IdentifierByDetElSorter{
m_idHelperSvc.get()});
200 for (
const MMPrepData* prd : sortMe) {
202 cluster->setIdentifier(prd->identify().get_compact());
209 cluster->setCharge(prd->charge());
210 cluster->setDriftDist(prd->driftDist());
211 cluster->setAngle(prd->angle());
212 cluster->setChiSqProb(prd->chisqProb());
213 cluster->setAuthor(prd->author());
214 cluster->setQuality(prd->quality());
215 cluster->setStripNumbers(prd->stripNumbers());
216 cluster->setStripTimes(prd->stripTimes());
217 cluster->setStripCharges(prd->stripCharges());
218 cluster->setStripDriftDist(prd->stripDriftDist());
219 cluster->setStripDriftErrors(prd->stripDriftErrors());
223 ATH_CHECK(lock.addOrDelete(std::move(prdColl)));
226 return StatusCode::SUCCESS;
◆ processRDOContainer()
Definition at line 241 of file MmRdoToPrepDataToolMT.cxx.
251 for (
const MM_RawDataCollection* rdoColl : *rdoContainer) {
253 if (rdoColl->empty()){
256 ATH_MSG_DEBUG(
"New RDO collection with " << rdoColl->size() <<
"MM Hits");
260 "processCsm returns a bad StatusCode - keep going for new data "
261 "collections in this event");
◆ provideEmptyContainer()
StatusCode Muon::MmRdoToPrepDataToolMT::provideEmptyContainer |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
Definition at line 298 of file MmRdoToPrepDataToolMT.cxx.
301 ATH_CHECK(writeHandle.record(std::make_unique<xAOD::MMClusterContainer>(),
302 std::make_unique<xAOD::MMClusterAuxContainer>()));
306 : StatusCode::FAILURE;
◆ setupMM_PrepDataContainer()
Definition at line 310 of file MmRdoToPrepDataToolMT.cxx.
316 handle.record(std::make_unique<MMPrepDataContainer>(
319 if (
status.isFailure() || !handle.isValid()) {
321 "Could not record container of MicroMega PrepData Container at "
333 if (
status.isFailure() || !handle.isValid()) {
335 "Could not record container of MM PrepData Container using cache "
◆ setupxAODPrepDataContainer()
◆ m_calibTool
ToolHandle<INSWCalibTool> Muon::MmRdoToPrepDataToolMT::m_calibTool {this, "NSWCalibTool", ""} |
|
protected |
◆ m_clusterBuilderTool
Initial value:{
this, "ClusterBuilderTool",
"Muon::SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool"}
Definition at line 79 of file MmRdoToPrepDataToolMT.h.
◆ m_idHelperSvc
Initial value:{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 64 of file MmRdoToPrepDataToolMT.h.
◆ m_merge
Gaudi::Property<bool> Muon::MmRdoToPrepDataToolMT::m_merge {this, "MergePrds", true} |
|
protected |
◆ m_muDetMgrKey
Initial value:{
this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 60 of file MmRdoToPrepDataToolMT.h.
◆ m_readKey
◆ m_singleStripChargeCut
Gaudi::Property<float> Muon::MmRdoToPrepDataToolMT::m_singleStripChargeCut |
|
protected |
◆ m_updateKey
Initial value:{
this, "PrdCacheKey", "",
"Optional external cache for the MM PRD container"}
This is the key for the cache for the MM PRD containers, can be empty.
Definition at line 74 of file MmRdoToPrepDataToolMT.h.
◆ m_writeKey
Initial value:{
this, "OutputCollection", "MM_Measurements"}
MdtPrepRawData containers.
Definition at line 68 of file MmRdoToPrepDataToolMT.h.
◆ m_xAODKey
Initial value:{
this, "xAODKey", "",
"If empty, do not produce xAOD, otherwise this is the key of the output "
"xAOD MDT PRD container"}
Definition at line 89 of file MmRdoToPrepDataToolMT.h.
The documentation for this class was generated from the following files:
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position – local or global If the strip number is outside the range of valid strips,...
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
friend class IDC_WriteHandle
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
std::string find(const std::string &s)
return a remapped string
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
Eigen::Matrix< double, 2, 1 > Vector2D
MuonPrepDataContainerT< MMPrepData > MMPrepDataContainer
const Amg::Vector3D & center() const
Returns the center position of the Surface.
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
int multilayer(const Identifier &id) const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
represents the three-dimensional global direction with respect to a planar surface frame.
typename ContainerIdTraits< CI >::xAODObjectRangeType xAODContainer
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
#define ATH_MSG_WARNING(x)
IdContext module_context() const
id for module
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Eigen::Matrix< float, N, N > MeasMatrix
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...