ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Muon::MdtRdoToPrepDataToolMT Class Reference

#include <MdtRdoToPrepDataToolMT.h>

Inheritance diagram for Muon::MdtRdoToPrepDataToolMT:
Collaboration diagram for Muon::MdtRdoToPrepDataToolMT:

Classes

struct  ConvCache
 Helper struct to parse the event data around the tool. More...
 

Public Member Functions

 MdtRdoToPrepDataToolMT (const std::string &, const std::string &, const IInterface *)
 
virtual ~MdtRdoToPrepDataToolMT ()=default
 default destructor More...
 
virtual StatusCode initialize () override
 standard Athena-Algorithm method More...
 
virtual StatusCode decode (const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
 Decode method - declared in Muon::IMuonRdoToPrepDataTool. More...
 
virtual StatusCode provideEmptyContainer (const EventContext &ctx) const override
 
virtual StatusCode decode (const EventContext &ctx, const std::vector< uint32_t > &robIds) const override
 

Protected Member Functions

void printPrepDataImpl (const Muon::MdtPrepDataContainer *mdtPrepDataContainer) const
 
Muon::MdtDriftCircleStatus getMdtTwinPosition (const MdtDigit &prompt_digit, const MdtDigit &twin_digit, double &radius, double &errRadius, double &zTwin, double &errZTwin, bool &twinIsPrompt) const
 method to get the twin tube 2nd coordinate More...
 
StatusCode processCsm (const EventContext &ctx, ConvCache &mdtPrepDataContainer, const MdtCsm *rdoColl) const
 
StatusCode processCsmTwin (const EventContext &ctx, ConvCache &mdtPrepDataContainer, const MdtCsm *rdoColll) const
 
std::unique_ptr< MdtPrepDatacreatePrepData (const MdtCalibInput &calibInput, const MdtCalibOutput &calibOutput, ConvCache &cache) const
 Creates the PRD object. More...
 
ConvCache setupMdtPrepDataContainer (const EventContext &ctx) const
 Creates the prep data container to be written. More...
 
const MdtCsmContainergetRdoContainer (const EventContext &ctx) const
 Loads the input RDO container from StoreGate. More...
 
void processPRDHashes (const EventContext &ctx, ConvCache &mdtPrepDataContainer, const std::vector< IdentifierHash > &chamberHashInRobs) const
 
bool handlePRDHash (const EventContext &ctx, ConvCache &mdtPrepDataContainer, IdentifierHash rdoHash) const
 
void initDeadChannels (const MuonGM::MdtReadoutElement *mydetEl)
 

Protected Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< IMdtCalibrationToolm_calibrationTool {this, "CalibrationTool", "MdtCalibrationTool"}
 MDT calibration service. More...
 
Gaudi::Property< bool > m_useNewGeo
 
const MuonGMR4::MuonDetectorManagerm_detMgrR4 {nullptr}
 
SG::ReadHandleKey< ActsGeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "Stored alignment"}
 
SG::WriteHandleKey< Muon::MdtPrepDataContainerm_mdtPrepDataContainerKey {this, "OutputCollection", "MDT_DriftCircles"}
 MdtPrepRawData containers. More...
 
SG::ReadHandleKey< MdtCsmContainerm_rdoContainerKey {this, "RDOContainer", "MDTCSM"}
 
Gaudi::Property< int > m_adcCut
 member variables for algorithm properties: More...
 
Gaudi::Property< bool > m_calibratePrepData {this, "CalibratePrepData", true}
 toggle on/off calibration of MdtPrepData More...
 
Gaudi::Property< bool > m_decodeData {this, "DecodeData", true}
 toggle on/off the decoding of MDT RDO into MdtPrepData More...
 
bool m_sortPrepData = false
 Toggle on/off the sorting of the MdtPrepData. More...
 
ToolHandle< Muon::IMDT_RDO_Decoderm_mdtDecoder {this, "Decoder", "Muon::MdtRDO_Decoder/MdtRDO_Decoder"}
 
bool m_BMGpresent {false}
 
int m_BMGid {-1}
 
Gaudi::Property< bool > m_useTwin {this, "UseTwin", true}
 
Gaudi::Property< bool > m_discardSecondaryHitTwin {this, "DiscardSecondaryHitTwin", false}
 
SG::ReadCondHandleKey< TwinTubeMapm_twinTubeKey {this, "TwinTubeKey", "MdtTwinTubeMap"}
 
std::unordered_set< Identifierm_DeadChannels {}
 
SG::ReadCondHandleKey< MuonMDT_CablingMapm_readKey {this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"}
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_muDetMgrKey
 
SG::UpdateHandleKey< MdtPrepDataCollection_Cachem_prdContainerCacheKey
 This is the key for the cache for the MDT PRD containers, can be empty. More...
 
SG::WriteHandleKey< xAOD::MdtDriftCircleContainerm_xAODKey {this, "xAODKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"}
 
SG::WriteHandleKey< xAOD::MdtTwinDriftCircleContainerm_xAODTwinKey {this, "xAODTwinKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"}
 

Detailed Description

Tool to produce MDT PRDs

Definition at line 40 of file MdtRdoToPrepDataToolMT.h.

Constructor & Destructor Documentation

◆ MdtRdoToPrepDataToolMT()

Muon::MdtRdoToPrepDataToolMT::MdtRdoToPrepDataToolMT ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 144 of file MdtRdoToPrepDataToolMT.cxx.

144  :
145  base_class(t, n, p) {}

◆ ~MdtRdoToPrepDataToolMT()

virtual Muon::MdtRdoToPrepDataToolMT::~MdtRdoToPrepDataToolMT ( )
virtualdefault

default destructor

Member Function Documentation

◆ createPrepData()

std::unique_ptr< MdtPrepData > Muon::MdtRdoToPrepDataToolMT::createPrepData ( const MdtCalibInput calibInput,
const MdtCalibOutput calibOutput,
ConvCache cache 
) const
protected

Creates the PRD object.

Test by how much do we break frozen Tier0

Definition at line 290 of file MdtRdoToPrepDataToolMT.cxx.

292  {
293  if (calibInput.adc() < m_adcCut ||
295  ATH_MSG_VERBOSE("Do not create calib hit for "<<m_idHelperSvc->toString(calibInput.identify())
296  <<", adc: "<<calibInput.adc()<<" vs. "<<m_adcCut<<", calibration bailed out "
297  <<(calibOutput.status() == MdtDriftCircleStatus::MdtStatusUnDefined? "si": "no"));
298  return nullptr;
299  }
300  const MuonGM::MdtReadoutElement* descriptor = calibInput.legacyDescriptor();
301  if (!descriptor) {
302  if (!cache.legacyDetMgr) {
303  return nullptr;
304  }
305  descriptor = cache.legacyDetMgr->getMdtReadoutElement(calibInput.identify());
306  }
307  ATH_MSG_VERBOSE("Calibrated prepdata "<<m_idHelperSvc->toString(calibInput.identify())
308  <<std::endl<<calibInput<<std::endl<<calibOutput);
309 
311  Amg::MatrixX cov(1, 1);
312  if (calibOutput.status() == MdtDriftCircleStatus::MdtStatusDriftTime){
314  const float r = calibOutput.driftRadius();
315  const float sigR = calibOutput.driftRadiusUncert();
316  driftRadius[0] = r;
317  (cov)(0, 0) = sigR * sigR;
318  } else (cov)(0, 0) = std::pow(descriptor->innerTubeRadius(), 2);
319 
320  return std::make_unique<MdtPrepData>(calibInput.identify(),
321  std::move(driftRadius),
322  std::move(cov),
323  descriptor,
324  calibInput.tdc(),
325  calibInput.adc(),
326  calibOutput.status());
327  }

◆ decode() [1/2]

StatusCode Muon::MdtRdoToPrepDataToolMT::decode ( const EventContext &  ctx,
const std::vector< IdentifierHash > &  idVect 
) const
overridevirtual

Decode method - declared in Muon::IMuonRdoToPrepDataTool.

Construct the hashes from the existing RDOs

Definition at line 256 of file MdtRdoToPrepDataToolMT.cxx.

257  {
258 
259  ATH_MSG_DEBUG("decodeMdtRDO for " << idVect.size() << " offline collections called");
260 
261  // setup output container
262  ConvCache mdtPrepDataContainer = setupMdtPrepDataContainer(ctx);
263  if (!mdtPrepDataContainer.isValid) {
264  return StatusCode::FAILURE;
265  }
266 
267 
268  if (!m_decodeData) {
269  ATH_MSG_DEBUG("Stored empty container. Decoding MDT RDO into MDT PrepRawData is switched off");
270  return StatusCode::SUCCESS;
271  }
272  // seeded or unseeded decoding
273  if (!idVect.empty()) {
274  processPRDHashes(ctx, mdtPrepDataContainer, idVect);
275  } else {
277  std::vector<IdentifierHash> rdoHashes{};
278  const MdtCsmContainer* rdoContainer = getRdoContainer(ctx);
279  if (!rdoContainer || rdoContainer->empty()) return StatusCode::SUCCESS;
280  rdoHashes.reserve(rdoContainer->size());
281  for (const MdtCsm* csm : *rdoContainer) rdoHashes.push_back(csm->identifyHash());
282 
283  processPRDHashes(ctx, mdtPrepDataContainer, rdoHashes);
284  }
285  ATH_CHECK(mdtPrepDataContainer.finalize(msgStream()));
286 
287  return StatusCode::SUCCESS;
288  }

◆ decode() [2/2]

StatusCode Muon::MdtRdoToPrepDataToolMT::decode ( const EventContext &  ctx,
const std::vector< uint32_t > &  robIds 
) const
overridevirtual

Definition at line 204 of file MdtRdoToPrepDataToolMT.cxx.

204  {
206  const MuonMDT_CablingMap* readCdo{*readHandle};
207  if (!readCdo) {
208  ATH_MSG_ERROR("nullptr to the read conditions object");
209  return StatusCode::FAILURE;
210  }
211  return decode(ctx, readCdo->getMultiLayerHashVec(robIds, msgStream()));
212  }

◆ getMdtTwinPosition()

Muon::MdtDriftCircleStatus Muon::MdtRdoToPrepDataToolMT::getMdtTwinPosition ( const MdtDigit prompt_digit,
const MdtDigit twin_digit,
double &  radius,
double &  errRadius,
double &  zTwin,
double &  errZTwin,
bool &  twinIsPrompt 
) const
protected

method to get the twin tube 2nd coordinate

◆ getRdoContainer()

const MdtCsmContainer * Muon::MdtRdoToPrepDataToolMT::getRdoContainer ( const EventContext &  ctx) const
protected

Loads the input RDO container from StoreGate.

Definition at line 214 of file MdtRdoToPrepDataToolMT.cxx.

214  {
215  SG::ReadHandle rdoContainerHandle{m_rdoContainerKey, ctx};
216  if (rdoContainerHandle.isValid()) {
217  ATH_MSG_DEBUG("MdtgetRdoContainer success");
218  return rdoContainerHandle.cptr();
219  }
220  ATH_MSG_WARNING("Retrieval of Mdt RDO container failed !");
221  return nullptr;
222  }

◆ handlePRDHash()

bool Muon::MdtRdoToPrepDataToolMT::handlePRDHash ( const EventContext &  ctx,
ConvCache mdtPrepDataContainer,
IdentifierHash  rdoHash 
) const
protected

Definition at line 235 of file MdtRdoToPrepDataToolMT.cxx.

237  {
238  const MdtCsmContainer* rdoContainer{getRdoContainer(ctx)};
239 
240  if (rdoContainer->empty()) {
241  ATH_MSG_DEBUG("The container is empty");
242  return true;
243  }
244  const MdtCsm* rdoColl = rdoContainer->indexFindPtr(rdoHash);
245  if (!rdoColl) {
246  ATH_MSG_DEBUG("The rdo container does not have the hash " << rdoHash);
247  return true;
248  }
249  if (processCsm(ctx, mdtPrepDataContainer, rdoColl).isFailure()) {
250  ATH_MSG_WARNING("processCsm failed for RDO id " << m_idHelperSvc->toString(rdoColl->identify()));
251  return false;
252  }
253  return true;
254  }

◆ initDeadChannels()

void Muon::MdtRdoToPrepDataToolMT::initDeadChannels ( const MuonGM::MdtReadoutElement mydetEl)
protected

Definition at line 528 of file MdtRdoToPrepDataToolMT.cxx.

528  {
529  PVConstLink cv = mydetEl->getMaterialGeom(); // it is "Multilayer"
530  int nGrandchildren = cv->getNChildVols();
531  if (nGrandchildren <= 0) return;
532 
533  std::vector<int> tubes;
534  geoGetIds([&](int id) { tubes.push_back(id); }, &*cv);
535  std::sort(tubes.begin(), tubes.end());
536 
537  const Identifier detElId = mydetEl->identify();
538  const int ml = mydetEl->getMultilayer();
539  std::vector<int>::iterator it = tubes.begin();
540  for (int layer = 1; layer <= mydetEl->getNLayers(); layer++) {
541  for (int tube = 1; tube <= mydetEl->getNtubesperlayer(); tube++) {
542  int want_id = layer * maxNTubesPerLayer + tube;
543  if (it != tubes.end() && *it == want_id) {
544  ++it;
545  } else {
546  it = std::lower_bound(tubes.begin(), tubes.end(), want_id);
547  if (it != tubes.end() && *it == want_id) {
548  ++it;
549  } else {
550  Identifier deadTubeId = m_idHelperSvc->mdtIdHelper().channelID(detElId, ml, layer, tube);
551  m_DeadChannels.insert(deadTubeId);
552  ATH_MSG_VERBOSE("adding dead tube "<<m_idHelperSvc->toString(deadTubeId));
553  }
554  }
555  }
556  }
557 
558  }

◆ initialize()

StatusCode Muon::MdtRdoToPrepDataToolMT::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 147 of file MdtRdoToPrepDataToolMT.cxx.

147  {
148  ATH_CHECK(m_calibrationTool.retrieve());
149  ATH_MSG_VERBOSE("MdtCalibrationTool retrieved with pointer = " << m_calibrationTool);
150  ATH_CHECK(m_prdContainerCacheKey.initialize(!m_prdContainerCacheKey.key().empty()));
151  ATH_CHECK(m_idHelperSvc.retrieve());
152  // Retrieve the RDO decoder
153  ATH_CHECK(m_mdtDecoder.retrieve());
154 
155  ATH_CHECK(m_twinTubeKey.initialize(m_useTwin));
156 
157  m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG");
158  m_BMGpresent = m_BMGid != -1;
159  if (m_useNewGeo) {
161  }
162  if (m_BMGpresent && !m_useNewGeo) {
163  const MuonGM::MuonDetectorManager* muDetMgr = nullptr;
164  ATH_CHECK(detStore()->retrieve(muDetMgr));
165 
166  ATH_MSG_INFO("Processing configuration for layouts with BMG chambers.");
167 
168  for (int phi = 6; phi < 8; phi++) { // phi sectors
169  for (int eta = 1; eta < 4; eta++) { // eta sectors
170  for (int side = -1; side < 2; side += 2) { // side
171  if (!muDetMgr->getMuonStation("BMG", side * eta, phi)) continue;
172  for (int roe = 1; roe <= (muDetMgr->getMuonStation("BMG", side * eta, phi))->nMuonReadoutElements();
173  roe++) { // iterate on readout elemets
174  const MdtReadoutElement* mdtRE = dynamic_cast<const MdtReadoutElement*>(
175  (muDetMgr->getMuonStation("BMG", side * eta, phi))->getMuonReadoutElement(roe)); // has to be an MDT
176  if (mdtRE) initDeadChannels(mdtRE);
177  }
178  }
179  }
180  }
181  } else if (m_useNewGeo) {
182  std::vector<const MuonGMR4::MdtReadoutElement*> mdtRE = m_detMgrR4->getAllMdtReadoutElements();
183  for (const MuonGMR4::MdtReadoutElement* re : mdtRE) {
184  if (re->stationName() != m_BMGid) {
185  continue;
186  }
187  for (const IdentifierHash& dead : re->getParameters().removedTubes) {
188  m_DeadChannels.insert(re->measurementId(dead));
189  }
190  }
191  }
192 
193  // check if initializing of DataHandle objects success
195  ATH_CHECK(m_mdtPrepDataContainerKey.initialize());
198  ATH_CHECK(m_xAODKey.initialize(!m_xAODKey.empty()));
199  ATH_CHECK(m_xAODTwinKey.initialize(!m_xAODTwinKey.empty()));
201  return StatusCode::SUCCESS;
202  }

◆ printPrepDataImpl()

void Muon::MdtRdoToPrepDataToolMT::printPrepDataImpl ( const Muon::MdtPrepDataContainer mdtPrepDataContainer) const
protected

◆ processCsm()

StatusCode Muon::MdtRdoToPrepDataToolMT::processCsm ( const EventContext &  ctx,
ConvCache mdtPrepDataContainer,
const MdtCsm rdoColl 
) const
protected

MDT hit context

Definition at line 329 of file MdtRdoToPrepDataToolMT.cxx.

329  {
330  const MdtIdHelper& id_helper = m_idHelperSvc->mdtIdHelper();
331  // first handle the case of twin tubes
332  if (m_useTwin) {
333  if (cache.twinTubeMap->isTwinTubeLayer(rdoColl->identify())) {
334  return processCsmTwin(ctx, cache, rdoColl);
335  }
336  }
337 
338  ATH_MSG_DEBUG(" ***************** Start of processCsm");
339 
341  const Identifier elementId = id_helper.parentID(rdoColl->identify());
342 
343  uint16_t subdetId = rdoColl->SubDetId();
344  uint16_t mrodId = rdoColl->MrodId();
345  uint16_t csmId = rdoColl->CsmId();
346  ATH_MSG_VERBOSE("Identifier = " << m_idHelperSvc->toString(elementId) << " subdetId/ mrodId/ csmId = " << subdetId << " / "
347  << mrodId << " / " << csmId);
348 
349  // for each Csm, loop over AmtHit, converter AmtHit to digit
350  // retrieve/create digit collection, and insert digit into collection
351  int mc = 0;
352  for (const MdtAmtHit* amtHit : *rdoColl) {
353  mc++;
354 
355  // FIXME: Still use the digit class.
356  ATH_MSG_VERBOSE("Amt Hit n. " << mc << " tdcId = " << amtHit->tdcId());
357  std::unique_ptr<MdtDigit> newDigit{m_mdtDecoder->getDigit(ctx, *amtHit, subdetId, mrodId, csmId)};
358  if (!newDigit) {
359  ATH_MSG_WARNING("Found issue MDT RDO decoder for subdetId/mrodId/csmId "
360  << subdetId << "/" << mrodId << "/" << csmId << " amtHit channelId/tdcId =" << amtHit->channelId() << "/"
361  << amtHit->tdcId());
362  continue;
363  }
364  // Do something with it
365  Identifier channelId = newDigit->identify();
366  if (newDigit->isMasked() || m_DeadChannels.count(channelId)) {
367  continue;
368  }
369  // Retrieve the proper PRD container. Note that there are cases where one CSM is either split into 2 chambers (BEE / BIS78
370  // legacy) or 2 CSMs are split into one chamber
371  MdtPrepDataCollection* driftCircleColl = cache.createCollection(channelId);
372  if (!driftCircleColl) {
373  ATH_MSG_DEBUG("Corresponding multi layer " << m_idHelperSvc->toString(channelId) << " is already decoded.");
374  continue;
375  }
376 
377  // check if the module ID of this channel is different from the CSM one
378  // If it's the first case, create the additional collection
379 
380  ATH_MSG_VERBOSE("got digit with id ext / hash " << m_idHelperSvc->toString(channelId) << " / "
381  << driftCircleColl->identifyHash());
382 
383  // Rescale ADC/TDC of chambers using HPTDC digitization chip
384  // Must create a new digit from the old one, because MdtDigit has no methods to set ADC/TDC
385  if (m_idHelperSvc->hasHPTDC(channelId)) {
386  newDigit->setAdc(newDigit->adc() / 4);
387  newDigit->setTdc(newDigit->tdc() / 4);
388  }
389  const MdtCalibInput calibIn = m_useNewGeo ? MdtCalibInput{*newDigit, *m_detMgrR4, *cache.gctx}:
390  MdtCalibInput{*newDigit, *cache.legacyDetMgr};
391  const MdtCalibOutput calibResult{m_calibrationTool->calibrate(ctx, calibIn, false)};
392 
393  std::unique_ptr<MdtPrepData> newPrepData = createPrepData(calibIn, calibResult, cache);
394  if (newPrepData) {
395  newPrepData->setHashAndIndex(driftCircleColl->identifyHash(), driftCircleColl->size());
396  driftCircleColl->push_back(std::move(newPrepData));
397  }
398  }
399  return StatusCode::SUCCESS;
400  }

◆ processCsmTwin()

StatusCode Muon::MdtRdoToPrepDataToolMT::processCsmTwin ( const EventContext &  ctx,
ConvCache mdtPrepDataContainer,
const MdtCsm rdoColll 
) const
protected

MDT hit context

Create new PrepData

check for the twin tube id

Definition at line 401 of file MdtRdoToPrepDataToolMT.cxx.

401  {
402  const MdtIdHelper& id_helper = m_idHelperSvc->mdtIdHelper();
403  ATH_MSG_DEBUG(" ***************** Start of processCsmTwin");
404  ATH_MSG_DEBUG(" Number of AmtHit in this Csm " << rdoColl->size());
406  Identifier elementId = id_helper.parentID(rdoColl->identify());
407 
408  uint16_t subdetId = rdoColl->SubDetId();
409  uint16_t mrodId = rdoColl->MrodId();
410  uint16_t csmId = rdoColl->CsmId();
411  ATH_MSG_VERBOSE("Identifier = " << m_idHelperSvc->toString(elementId) << " subdetId/ mrodId/ csmId = " << rdoColl->SubDetId()
412  << " / " << rdoColl->MrodId() << " / " << rdoColl->CsmId());
413 
414  // for each Csm, loop over AmtHit, converter AmtHit to digit
415  // retrieve/create digit collection, and insert digit into collection
416  std::map<Identifier, std::array<std::unique_ptr<MdtDigit>, 2>> mdtDigitColl{};
417 
418  for (const MdtAmtHit* amtHit : *rdoColl) {
419  std::unique_ptr<MdtDigit> newDigit{m_mdtDecoder->getDigit(ctx, *amtHit, subdetId, mrodId, csmId)};
420 
421  if (!newDigit) {
422  ATH_MSG_WARNING("Error in MDT RDO decoder for subdetId/mrodId/csmId "
423  << subdetId << "/" << mrodId << "/" << csmId << " amtHit channelId/tdcId =" << amtHit->channelId() << "/"
424  << amtHit->tdcId());
425  continue;
426  }
427  std::array<std::unique_ptr<MdtDigit>, 2> & moveTo = mdtDigitColl[newDigit->identify()];
428  if (!moveTo[0]) {
429  moveTo[0] = std::move(newDigit);
430  } else if (!moveTo[1] && !m_discardSecondaryHitTwin) {
431  moveTo[1] = std::move(newDigit);
432  } else {
433  ATH_MSG_VERBOSE(" TWIN TUBES: found a tertiary hit in a twin tube in one RdoCollection for "
434  << m_idHelperSvc->toString(newDigit->identify()) << " with adc = " << newDigit->adc()
435  << " tdc = " << newDigit->tdc());
436  }
437  } // end for-loop over rdoColl
438 
439  auto convertTwins = [this, &cache, &ctx](std::unique_ptr<MdtDigit> digit,
440  std::unique_ptr<MdtDigit> digit2) {
441  if (!digit || digit->isMasked() || !cache.legacyDetMgr) {
442  return;
443  }
444 
445  MdtPrepDataCollection* driftCircleColl = cache.createCollection(digit->identify());
446 
447  if (!digit2 || digit2->isMasked()) {
448  ATH_MSG_VERBOSE("Got single digit " << m_idHelperSvc->toString(digit->identify())<<", tdc: "
449  <<digit->tdc()<<", adc: "<<digit->adc()
450  << ", hash: "<< driftCircleColl->identifyHash());
451 
452  const MdtCalibInput mdtCalibIn = m_useNewGeo ? MdtCalibInput{*digit, *m_detMgrR4, *cache.gctx}:
453  MdtCalibInput{*digit, *cache.legacyDetMgr};
454 
455  const MdtCalibOutput mdtCalibOut{m_calibrationTool->calibrate(ctx, mdtCalibIn, false)};
456 
458  std::unique_ptr<MdtPrepData> newPrepData = createPrepData(mdtCalibIn, mdtCalibOut, cache);
459  if (!newPrepData) return;
460 
461  newPrepData->setHashAndIndex(driftCircleColl->identifyHash(), driftCircleColl->size());
462  driftCircleColl->push_back(std::move(newPrepData));
463  return;
464  }
465  ATH_MSG_VERBOSE("Twin digit calibration "<<m_idHelperSvc->toString(digit->identify())
466  <<", tdc: "<<digit->tdc()<<", adc: "<<digit->adc()<<" -- "
467  <<m_idHelperSvc->toString(digit2->identify())
468  <<", tdc: "<<digit2->tdc()<<", adc: "<<digit2->adc());
469  MdtCalibInput mdtCalib1st = m_useNewGeo ? MdtCalibInput{*digit, *m_detMgrR4, *cache.gctx}
470  : MdtCalibInput{*digit, *cache.legacyDetMgr};
471 
472  MdtCalibInput mdtCalib2nd = m_useNewGeo ? MdtCalibInput{*digit2, *m_detMgrR4, *cache.gctx}
473  : MdtCalibInput{*digit2, *cache.legacyDetMgr};
474 
475  updateClosestApproachTwin(mdtCalib1st);
476  updateClosestApproachTwin(mdtCalib2nd);
477 
478  const MdtCalibTwinOutput twinCalib = m_calibrationTool->calibrateTwinTubes(ctx,
479  std::move(mdtCalib1st),
480  std::move(mdtCalib2nd));
481 
482  Amg::Vector2D hitPos{twinCalib.primaryDriftR(), twinCalib.locZ()};
483  Amg::MatrixX cov(2, 2);
484  cov(0, 0) = twinCalib.uncertPrimaryR() * twinCalib.uncertPrimaryR();
485  cov(1, 1) = twinCalib.sigmaZ() * twinCalib.sigmaZ();
486  cov(0, 1) = cov(1, 0) = 0;
487 
488  const MuonGM::MdtReadoutElement* descriptor = cache.legacyDetMgr->getMdtReadoutElement(digit->identify());
489  auto twin_newPrepData = std::make_unique<MdtTwinPrepData>(twinCalib.primaryID(),
490  std::move(hitPos),
491  std::move(cov),
492  descriptor,
493  twinCalib.primaryTdc(),
494  twinCalib.primaryAdc(),
495  twinCalib.twinTdc(),
496  twinCalib.twinAdc(),
497  twinCalib.primaryStatus());
498 
499  ATH_MSG_VERBOSE(" MADE A 2D TWINPREPDATA " << m_idHelperSvc->toString(twinCalib.primaryID()) << " & "
500  << m_idHelperSvc->toString(twinCalib.twinID()) << " "<<twinCalib);
501 
502  ATH_MSG_VERBOSE("global pos center tube " << Amg::toString(twin_newPrepData->globalPosition(), 2) << std::endl
503  <<"local pos center tube w/ TWIN INFO "<<Amg::toString(twinCalib.locZ() * Amg::Vector3D::UnitZ(), 2)<<std::endl
504  <<"global pos w/o TWIN INFO "<<Amg::toString(descriptor->tubePos(twinCalib.primaryID())));
505 
506  twin_newPrepData->setHashAndIndex(driftCircleColl->identifyHash(), driftCircleColl->size());
507  driftCircleColl->push_back(std::move(twin_newPrepData));
508  };
509 
510  // iterate over mdtDigitColl
511  for (auto &[id, digits] : mdtDigitColl) {
512  // get the twin hits from mdtDigitColl
513  const Identifier twinId = cache.twinTubeMap->twinId(id);
515  if (id != twinId) {
516  std::array<std::unique_ptr<MdtDigit>, 2>& twinDigits = mdtDigitColl[twinId];
517  ATH_MSG_VERBOSE("Convert digits: "<<digits[0].get()<<" "<<twinDigits[0].get());
518  convertTwins(std::move(digits[0]), std::move(twinDigits[0]));
519  ATH_MSG_VERBOSE("Convert digits: "<<digits[1].get()<<" "<<twinDigits[1].get());
520  convertTwins(std::move(digits[1]), std::move(twinDigits[1]));
521  } else {
522  convertTwins(std::move(digits[0]), nullptr);
523  convertTwins(std::move(digits[1]), nullptr);
524  }
525  }
526  return StatusCode::SUCCESS;
527  }

◆ processPRDHashes()

void Muon::MdtRdoToPrepDataToolMT::processPRDHashes ( const EventContext &  ctx,
ConvCache mdtPrepDataContainer,
const std::vector< IdentifierHash > &  chamberHashInRobs 
) const
protected

Definition at line 228 of file MdtRdoToPrepDataToolMT.cxx.

229  {
230  for (const IdentifierHash& hash : multiLayerHashInRobs) {
231  if (!handlePRDHash(ctx, mdtPrepDataContainer, hash)) { ATH_MSG_DEBUG("Failed to process hash " << hash); }
232  } // ends loop over chamberhash
233  }

◆ provideEmptyContainer()

StatusCode Muon::MdtRdoToPrepDataToolMT::provideEmptyContainer ( const EventContext &  ctx) const
overridevirtual

Definition at line 224 of file MdtRdoToPrepDataToolMT.cxx.

224  {
225  return setupMdtPrepDataContainer(ctx).isValid ? StatusCode::SUCCESS : StatusCode::FAILURE;
226  }

◆ setupMdtPrepDataContainer()

MdtRdoToPrepDataToolMT::ConvCache Muon::MdtRdoToPrepDataToolMT::setupMdtPrepDataContainer ( const EventContext &  ctx) const
protected

Creates the prep data container to be written.

Retrieve the Geometry context if activated

Retrieve the legacy detector mananger if activated

Definition at line 559 of file MdtRdoToPrepDataToolMT.cxx.

559  {
560 
561  ConvCache cache{m_idHelperSvc.get()};
562 
564  // Caching of PRD container
565  if (m_prdContainerCacheKey.key().empty()) {
566  // without the cache we just record the container
567  StatusCode status = handle.record(std::make_unique<MdtPrepDataContainer>(m_idHelperSvc->mdtIdHelper().module_hash_max()));
568  if (status.isFailure() || !handle.isValid()) {
569  ATH_MSG_FATAL("Could not record container of MDT PrepData Container at " << m_mdtPrepDataContainerKey.key());
570  return cache;
571  }
572  ATH_MSG_VERBOSE("Created container " << m_mdtPrepDataContainerKey.key());
573  cache.legacyPrd = handle.ptr();
574  } else {
575  // use the cache to get the container
577  if (!update.isValid()) {
578  ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
579  return cache;
580  }
581  StatusCode status = handle.record(std::make_unique<MdtPrepDataContainer>(update.ptr()));
582  if (status.isFailure() || !handle.isValid()) {
583  ATH_MSG_FATAL("Could not record container of MDT PrepData Container using cache " << m_prdContainerCacheKey.key() << " - "
584  << m_mdtPrepDataContainerKey.key());
585  return cache;
586  }
587  ATH_MSG_VERBOSE("Created container using cache for " << m_prdContainerCacheKey.key());
588  cache.legacyPrd = handle.ptr();
589  }
590  if (!m_xAODTwinKey.empty()) {
591  SG::WriteHandle writeHandle{m_xAODTwinKey, ctx};
592  if (!writeHandle.recordNonConst(std::make_unique<xAOD::MdtTwinDriftCircleContainer>(),
593  std::make_unique<xAOD::MdtTwinDriftCircleAuxContainer>()).isSuccess() ||
594  !writeHandle.isValid()) {
595  ATH_MSG_FATAL("Failed to write xAOD::MdtPrepDataContainer "<<m_xAODTwinKey.fullKey());
596  return cache;
597  }
598  cache.xAODTwinPrd = writeHandle.ptr();
599  }
600  if (!m_xAODKey.empty()) {
601  SG::WriteHandle writeHandle{m_xAODKey, ctx};
602  if (!writeHandle.recordNonConst(std::make_unique<xAOD::MdtDriftCircleContainer>(),
603  std::make_unique<xAOD::MdtDriftCircleAuxContainer>()).isSuccess() ||
604  !writeHandle.isValid()) {
605  ATH_MSG_FATAL("Failed to write xAOD::MdtPrepDataContainer "<<m_xAODKey.fullKey());
606  return cache;
607  }
608  cache.xAODPrd = writeHandle.ptr();
609  }
611  if (!m_geoCtxKey.empty()) {
612  SG::ReadHandle readHandle{m_geoCtxKey, ctx};
613  if (!readHandle.isPresent()) {
614  ATH_MSG_FATAL("Failed to retrieve the geometry context "<<m_geoCtxKey.fullKey());
615  return cache;
616  }
617  cache.gctx = readHandle.cptr();
618  }
620  if (!m_muDetMgrKey.empty()) {
621  SG::ReadCondHandle detMgrHandle{m_muDetMgrKey, ctx};
622  if (!detMgrHandle.isValid()) {
623  ATH_MSG_FATAL("Failed to retrieve the detector manager from the conditions store "<<m_muDetMgrKey.fullKey());
624  return cache;
625  }
626  cache.legacyDetMgr = detMgrHandle.cptr();
627  }
628  if (m_useTwin) {
629  SG::ReadCondHandle twinTubeHandle{m_twinTubeKey, ctx};
630  if (!twinTubeHandle.isValid()) {
631  ATH_MSG_FATAL("Failed to initialize twin tube map "<<m_twinTubeKey.fullKey());
632  return cache;
633  }
634  cache.twinTubeMap = twinTubeHandle.cptr();
635  }
636  cache.r4DetMgr = m_detMgrR4;
637  // Pass the container from the handle
638  cache.isValid = true;
639  return cache;
640  }

Member Data Documentation

◆ m_adcCut

Gaudi::Property<int> Muon::MdtRdoToPrepDataToolMT::m_adcCut
protected
Initial value:
{this, "AdcCut", 50,
"Minimal cut on the adc to convert it into a prepdata object"}

member variables for algorithm properties:

Definition at line 136 of file MdtRdoToPrepDataToolMT.h.

◆ m_BMGid

int Muon::MdtRdoToPrepDataToolMT::m_BMGid {-1}
protected

Definition at line 145 of file MdtRdoToPrepDataToolMT.h.

◆ m_BMGpresent

bool Muon::MdtRdoToPrepDataToolMT::m_BMGpresent {false}
protected

Definition at line 144 of file MdtRdoToPrepDataToolMT.h.

◆ m_calibratePrepData

Gaudi::Property<bool> Muon::MdtRdoToPrepDataToolMT::m_calibratePrepData {this, "CalibratePrepData", true}
protected

toggle on/off calibration of MdtPrepData

Definition at line 138 of file MdtRdoToPrepDataToolMT.h.

◆ m_calibrationTool

ToolHandle<IMdtCalibrationTool> Muon::MdtRdoToPrepDataToolMT::m_calibrationTool {this, "CalibrationTool", "MdtCalibrationTool"}
protected

MDT calibration service.

Definition at line 119 of file MdtRdoToPrepDataToolMT.h.

◆ m_DeadChannels

std::unordered_set<Identifier> Muon::MdtRdoToPrepDataToolMT::m_DeadChannels {}
protected

Definition at line 154 of file MdtRdoToPrepDataToolMT.h.

◆ m_decodeData

Gaudi::Property<bool> Muon::MdtRdoToPrepDataToolMT::m_decodeData {this, "DecodeData", true}
protected

toggle on/off the decoding of MDT RDO into MdtPrepData

Definition at line 139 of file MdtRdoToPrepDataToolMT.h.

◆ m_detMgrR4

const MuonGMR4::MuonDetectorManager* Muon::MdtRdoToPrepDataToolMT::m_detMgrR4 {nullptr}
protected

Definition at line 125 of file MdtRdoToPrepDataToolMT.h.

◆ m_discardSecondaryHitTwin

Gaudi::Property<bool> Muon::MdtRdoToPrepDataToolMT::m_discardSecondaryHitTwin {this, "DiscardSecondaryHitTwin", false}
protected

Definition at line 149 of file MdtRdoToPrepDataToolMT.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsGeometryContext> Muon::MdtRdoToPrepDataToolMT::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "Stored alignment"}
protected

Definition at line 126 of file MdtRdoToPrepDataToolMT.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::MdtRdoToPrepDataToolMT::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
protected

Definition at line 116 of file MdtRdoToPrepDataToolMT.h.

◆ m_mdtDecoder

ToolHandle<Muon::IMDT_RDO_Decoder> Muon::MdtRdoToPrepDataToolMT::m_mdtDecoder {this, "Decoder", "Muon::MdtRDO_Decoder/MdtRDO_Decoder"}
protected

Definition at line 142 of file MdtRdoToPrepDataToolMT.h.

◆ m_mdtPrepDataContainerKey

SG::WriteHandleKey<Muon::MdtPrepDataContainer> Muon::MdtRdoToPrepDataToolMT::m_mdtPrepDataContainerKey {this, "OutputCollection", "MDT_DriftCircles"}
protected

MdtPrepRawData containers.

Definition at line 130 of file MdtRdoToPrepDataToolMT.h.

◆ m_muDetMgrKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> Muon::MdtRdoToPrepDataToolMT::m_muDetMgrKey
protected
Initial value:
{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

Definition at line 159 of file MdtRdoToPrepDataToolMT.h.

◆ m_prdContainerCacheKey

SG::UpdateHandleKey<MdtPrepDataCollection_Cache> Muon::MdtRdoToPrepDataToolMT::m_prdContainerCacheKey
protected
Initial value:
{this, "MdtPrdContainerCacheKey", "",
"Optional external cache for the MDT PRD container"}

This is the key for the cache for the MDT PRD containers, can be empty.

Definition at line 162 of file MdtRdoToPrepDataToolMT.h.

◆ m_rdoContainerKey

SG::ReadHandleKey<MdtCsmContainer> Muon::MdtRdoToPrepDataToolMT::m_rdoContainerKey {this, "RDOContainer", "MDTCSM"}
protected

Definition at line 132 of file MdtRdoToPrepDataToolMT.h.

◆ m_readKey

SG::ReadCondHandleKey<MuonMDT_CablingMap> Muon::MdtRdoToPrepDataToolMT::m_readKey {this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"}
protected

Definition at line 157 of file MdtRdoToPrepDataToolMT.h.

◆ m_sortPrepData

bool Muon::MdtRdoToPrepDataToolMT::m_sortPrepData = false
protected

Toggle on/off the sorting of the MdtPrepData.

Definition at line 140 of file MdtRdoToPrepDataToolMT.h.

◆ m_twinTubeKey

SG::ReadCondHandleKey<TwinTubeMap> Muon::MdtRdoToPrepDataToolMT::m_twinTubeKey {this, "TwinTubeKey", "MdtTwinTubeMap"}
protected

Definition at line 152 of file MdtRdoToPrepDataToolMT.h.

◆ m_useNewGeo

Gaudi::Property<bool> Muon::MdtRdoToPrepDataToolMT::m_useNewGeo
protected
Initial value:
{this, "UseR4DetMgr", false,
"Switch between the legacy and the new geometry"}

Definition at line 122 of file MdtRdoToPrepDataToolMT.h.

◆ m_useTwin

Gaudi::Property<bool> Muon::MdtRdoToPrepDataToolMT::m_useTwin {this, "UseTwin", true}
protected

Definition at line 148 of file MdtRdoToPrepDataToolMT.h.

◆ m_xAODKey

SG::WriteHandleKey<xAOD::MdtDriftCircleContainer> Muon::MdtRdoToPrepDataToolMT::m_xAODKey {this, "xAODKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"}
protected

Definition at line 166 of file MdtRdoToPrepDataToolMT.h.

◆ m_xAODTwinKey

SG::WriteHandleKey<xAOD::MdtTwinDriftCircleContainer> Muon::MdtRdoToPrepDataToolMT::m_xAODTwinKey {this, "xAODTwinKey", "", "If empty, do not produce xAOD, otherwise this is the key of the output xAOD MDT PRD container"}
protected

Definition at line 167 of file MdtRdoToPrepDataToolMT.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
beamspotman.r
def r
Definition: beamspotman.py:676
MdtCsm::CsmId
uint16_t CsmId() const
Returns the CSM online id (online identifier inside a MROD)
Definition: MdtCsm.h:61
Muon::MdtRdoToPrepDataToolMT::m_useNewGeo
Gaudi::Property< bool > m_useNewGeo
Definition: MdtRdoToPrepDataToolMT.h:122
test_pyathena.eta
eta
Definition: test_pyathena.py:10
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
MdtAmtHit
MDT RDO's : data from a single channel of an AMT Atlas Muon TDC.
Definition: MdtAmtHit.h:20
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
MdtCalibInput
Definition: MdtCalibInput.h:35
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
MdtCalibTwinOutput::twinAdc
int twinAdc() const
Definition: MdtCalibTwinOutput.cxx:37
MdtCalibInput::legacyDescriptor
const MuonGM::MdtReadoutElement * legacyDescriptor() const
Returns the legacy readout element.
Definition: MdtCalibInput.cxx:87
Muon::MdtRdoToPrepDataToolMT::createPrepData
std::unique_ptr< MdtPrepData > createPrepData(const MdtCalibInput &calibInput, const MdtCalibOutput &calibOutput, ConvCache &cache) const
Creates the PRD object.
Definition: MdtRdoToPrepDataToolMT.cxx:290
Muon::MdtRdoToPrepDataToolMT::m_twinTubeKey
SG::ReadCondHandleKey< TwinTubeMap > m_twinTubeKey
Definition: MdtRdoToPrepDataToolMT.h:152
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MdtRdoToPrepDataToolMT::m_rdoContainerKey
SG::ReadHandleKey< MdtCsmContainer > m_rdoContainerKey
Definition: MdtRdoToPrepDataToolMT.h:132
Muon::MdtPrepDataCollection
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
Definition: MuonPrepDataCollection.h:106
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
MdtCsm::identify
Identifier identify() const
Returns the CSM offline identifier (chamber offline id)
Definition: MdtCsm.h:51
IdentifiableContainerMT::size
size_t size() const
Duplicate of fullSize for backwards compatability.
Definition: IdentifiableContainerMT.h:206
MdtCsm::SubDetId
uint16_t SubDetId() const
Returns the sub-detector Id.
Definition: MdtCsm.h:57
MdtCalibTwinOutput::sigmaZ
double sigmaZ() const
Definition: MdtCalibTwinOutput.cxx:49
MdtCalibTwinOutput::twinTdc
int twinTdc() const
Definition: MdtCalibTwinOutput.cxx:38
MdtCsmContainer
This container provides acces to the MDT RDOs.
Definition: MdtCsmContainer.h:22
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
MdtCsm
MDT RDOs : Chamber Service Module, container of AmtHits of a single Mdt chamber.
Definition: MdtCsm.h:19
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
MdtCalibTwinOutput::uncertPrimaryR
double uncertPrimaryR() const
Definition: MdtCalibTwinOutput.cxx:52
Muon::MdtStatusDriftTime
@ MdtStatusDriftTime
The tube produced a vaild measurement.
Definition: MdtDriftCircleStatus.h:34
MdtCalibInput::identify
const Identifier & identify() const
Returns the Identifier of the hit.
Definition: MdtCalibInput.cxx:84
MdtCalibTwinOutput::primaryTdc
int primaryTdc() const
Definition: MdtCalibTwinOutput.cxx:35
Muon::MdtRdoToPrepDataToolMT::m_adcCut
Gaudi::Property< int > m_adcCut
member variables for algorithm properties:
Definition: MdtRdoToPrepDataToolMT.h:136
Muon::MdtRdoToPrepDataToolMT::m_geoCtxKey
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
Definition: MdtRdoToPrepDataToolMT.h:126
Muon::MdtRdoToPrepDataToolMT::processCsm
StatusCode processCsm(const EventContext &ctx, ConvCache &mdtPrepDataContainer, const MdtCsm *rdoColl) const
Definition: MdtRdoToPrepDataToolMT.cxx:329
IdentifiableContainerMT::empty
bool empty() const
return true if container is empty
Definition: IdentifiableContainerMT.h:244
TRT::Hit::side
@ side
Definition: HitInfo.h:83
Muon::MdtRdoToPrepDataToolMT::m_mdtPrepDataContainerKey
SG::WriteHandleKey< Muon::MdtPrepDataContainer > m_mdtPrepDataContainerKey
MdtPrepRawData containers.
Definition: MdtRdoToPrepDataToolMT.h:130
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
Muon::MdtRdoToPrepDataToolMT::decode
virtual StatusCode decode(const EventContext &ctx, const std::vector< IdentifierHash > &idVect) const override
Decode method - declared in Muon::IMuonRdoToPrepDataTool.
Definition: MdtRdoToPrepDataToolMT.cxx:256
MdtCsm::MrodId
uint16_t MrodId() const
Returns the MROD id from the CSM header.
Definition: MdtCsm.h:59
MuonMDT_CablingMap
Definition: MuonMDT_CablingMap.h:28
mc
Definition: mc.PG_single_nu_valid.py:1
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Muon::MdtRdoToPrepDataToolMT::m_detMgrR4
const MuonGMR4::MuonDetectorManager * m_detMgrR4
Definition: MdtRdoToPrepDataToolMT.h:125
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Muon::MdtRdoToPrepDataToolMT::m_useTwin
Gaudi::Property< bool > m_useTwin
Definition: MdtRdoToPrepDataToolMT.h:148
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Muon::MdtRdoToPrepDataToolMT::setupMdtPrepDataContainer
ConvCache setupMdtPrepDataContainer(const EventContext &ctx) const
Creates the prep data container to be written.
Definition: MdtRdoToPrepDataToolMT.cxx:559
Muon::MdtRdoToPrepDataToolMT::processCsmTwin
StatusCode processCsmTwin(const EventContext &ctx, ConvCache &mdtPrepDataContainer, const MdtCsm *rdoColll) const
Definition: MdtRdoToPrepDataToolMT.cxx:401
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
Muon::MdtRdoToPrepDataToolMT::m_BMGpresent
bool m_BMGpresent
Definition: MdtRdoToPrepDataToolMT.h:144
MdtIdHelper
Definition: MdtIdHelper.h:61
Muon::MdtRdoToPrepDataToolMT::m_readKey
SG::ReadCondHandleKey< MuonMDT_CablingMap > m_readKey
Definition: MdtRdoToPrepDataToolMT.h:157
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MdtRdoToPrepDataToolMT::initDeadChannels
void initDeadChannels(const MuonGM::MdtReadoutElement *mydetEl)
Definition: MdtRdoToPrepDataToolMT.cxx:528
MdtCalibTwinOutput::locZ
double locZ() const
Definition: MdtCalibTwinOutput.cxx:48
Muon::MdtRdoToPrepDataToolMT::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtRdoToPrepDataToolMT.h:116
Muon::MdtRdoToPrepDataToolMT::getRdoContainer
const MdtCsmContainer * getRdoContainer(const EventContext &ctx) const
Loads the input RDO container from StoreGate.
Definition: MdtRdoToPrepDataToolMT.cxx:214
MuonGM::MdtReadoutElement::getMultilayer
int getMultilayer() const
Returns the multilayer represented by the readout element.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MdtCalibOutput
Definition: MdtCalibOutput.h:10
MdtCalibOutput::status
MdtDriftCircleStatus status() const
Status of the calibration.
Definition: MdtCalibOutput.cxx:40
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
MdtCalibTwinOutput::twinID
Identifier twinID() const
Definition: MdtCalibTwinOutput.cxx:41
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
MuonGMR4::MdtReadoutElement
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MdtReadoutElement.h:22
Muon::MdtRdoToPrepDataToolMT::m_discardSecondaryHitTwin
Gaudi::Property< bool > m_discardSecondaryHitTwin
Definition: MdtRdoToPrepDataToolMT.h:149
SG::UpdateHandle
Definition: UpdateHandle.h:94
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MdtCalibTwinOutput::primaryStatus
MdtDriftCircleStatus primaryStatus() const
Definition: MdtCalibTwinOutput.cxx:54
Muon::MdtRdoToPrepDataToolMT::handlePRDHash
bool handlePRDHash(const EventContext &ctx, ConvCache &mdtPrepDataContainer, IdentifierHash rdoHash) const
Definition: MdtRdoToPrepDataToolMT.cxx:235
MdtCalibInput::adc
int16_t adc() const
Returns the amount of accumulated charge.
Definition: MdtCalibInput.cxx:86
Muon::MdtRdoToPrepDataToolMT::m_BMGid
int m_BMGid
Definition: MdtRdoToPrepDataToolMT.h:145
MdtCalibOutput::driftRadiusUncert
double driftRadiusUncert() const
Returns the uncertainty on the drift radius.
Definition: MdtCalibOutput.cxx:20
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
MuonGM::MuonDetectorManager::getMuonStation
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:137
geoGetIds
void geoGetIds(FUNCTION f, const GeoGraphNode *node, int depthLimit=1)
Template helper for running the visitor.
Definition: GeoGetIds.h:82
Muon::MdtRdoToPrepDataToolMT::ConvCache::isValid
bool isValid
Flag set to indicate that the complete validation was successful.
Definition: MdtRdoToPrepDataToolMT.h:89
MuonGM::MdtReadoutElement::tubePos
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
MdtCalibTwinOutput
Definition: MdtCalibTwinOutput.h:11
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
re
const boost::regex re(r_e)
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
MdtCalibTwinOutput::primaryAdc
int primaryAdc() const
Definition: MdtCalibTwinOutput.cxx:34
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
Muon::MdtRdoToPrepDataToolMT::m_calibrationTool
ToolHandle< IMdtCalibrationTool > m_calibrationTool
MDT calibration service.
Definition: MdtRdoToPrepDataToolMT.h:119
Muon::MdtRdoToPrepDataToolMT::processPRDHashes
void processPRDHashes(const EventContext &ctx, ConvCache &mdtPrepDataContainer, const std::vector< IdentifierHash > &chamberHashInRobs) const
Definition: MdtRdoToPrepDataToolMT.cxx:228
Muon::MdtStatusUnDefined
@ MdtStatusUnDefined
Undefined.
Definition: MdtDriftCircleStatus.h:43
MdtCalibTwinOutput::primaryDriftR
double primaryDriftR() const
Definition: MdtCalibTwinOutput.cxx:50
MdtCalibTwinOutput::primaryID
Identifier primaryID() const
Definition: MdtCalibTwinOutput.cxx:40
merge.status
status
Definition: merge.py:17
Muon::MdtRdoToPrepDataToolMT::m_decodeData
Gaudi::Property< bool > m_decodeData
toggle on/off the decoding of MDT RDO into MdtPrepData
Definition: MdtRdoToPrepDataToolMT.h:139
Muon::MdtRdoToPrepDataToolMT::m_mdtDecoder
ToolHandle< Muon::IMDT_RDO_Decoder > m_mdtDecoder
Definition: MdtRdoToPrepDataToolMT.h:142
MuonGM::MdtReadoutElement::getNtubesperlayer
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
MdtCalibInput::tdc
int16_t tdc() const
Returns the tdc counts of the hit.
Definition: MdtCalibInput.cxx:85
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
Muon::MdtRdoToPrepDataToolMT::m_muDetMgrKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Definition: MdtRdoToPrepDataToolMT.h:159
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
calibdata.tube
tube
Definition: calibdata.py:31
MdtCalibOutput::driftRadius
double driftRadius() const
Returns the drift radius of the calibrated object.
Definition: MdtCalibOutput.cxx:19
Muon::MdtRdoToPrepDataToolMT::m_prdContainerCacheKey
SG::UpdateHandleKey< MdtPrepDataCollection_Cache > m_prdContainerCacheKey
This is the key for the cache for the MDT PRD containers, can be empty.
Definition: MdtRdoToPrepDataToolMT.h:162
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MdtIdHelper::parentID
Identifier parentID(const Identifier &id) const
get parent id from channel id
Definition: MdtIdHelper.cxx:711
Muon::MdtRdoToPrepDataToolMT::m_xAODTwinKey
SG::WriteHandleKey< xAOD::MdtTwinDriftCircleContainer > m_xAODTwinKey
Definition: MdtRdoToPrepDataToolMT.h:167
Muon::MdtRdoToPrepDataToolMT::m_DeadChannels
std::unordered_set< Identifier > m_DeadChannels
Definition: MdtRdoToPrepDataToolMT.h:154
Muon::MdtRdoToPrepDataToolMT::m_xAODKey
SG::WriteHandleKey< xAOD::MdtDriftCircleContainer > m_xAODKey
Definition: MdtRdoToPrepDataToolMT.h:166
Identifier
Definition: IdentifierFieldParser.cxx:14