ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Muon::MuonChamberHoleRecoveryTool Class Referenceabstract

tool to select tracks More...

#include <MuonChamberHoleRecoveryTool.h>

Inheritance diagram for Muon::MuonChamberHoleRecoveryTool:
Collaboration diagram for Muon::MuonChamberHoleRecoveryTool:

Classes

struct  RecoveryState
 

Public Types

using NewTrackStates = std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > >
 

Public Member Functions

 MuonChamberHoleRecoveryTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~MuonChamberHoleRecoveryTool ()=default
 
StatusCode initialize () override
 
std::unique_ptr< Trk::Trackrecover (const Trk::Track &track, const EventContext &ctx) const override
 returns a new track with holes recovered More...
 
void createHoleTSOSsForClusterChamber (const Identifier &detElId, const EventContext &ctx, const Trk::TrackParameters &pars, std::set< Identifier > &layIds, NewTrackStates &states) const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
virtual void createHoleTSOSsForClusterChamber (const Identifier &detElId, const EventContext &ctx, const Trk::TrackParameters &pars, std::set< Identifier > &layIds, std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > &states) const =0
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 access to tool interface More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

bool getNextMuonMeasurement (RecoveryState &trkRecov, RecoveryState::CopyTarget target) const
 Increments the internal iterator of the RecoveryState until the next muon measurement on track is found Measurements inside the MS volume or any scatterer are copied automatically copied onto the target vector. More...
 
void recoverHitsInChamber (const EventContext &ctx, RecoveryState &trkRecov) const
 Loops over all muon hits in a muon chamber and tries to find missed ones by checking each tracking layer for hits. More...
 
std::set< IdentifierholesInMdtChamber (const EventContext &ctx, const Amg::Vector3D &position, const Amg::Vector3D &direction, const Identifier &chId, const std::set< Identifier > &tubeIds) const
 calculate holes in a given chamber using local straight line extrapolation More...
 
void recoverMdtHits (const EventContext &ctx, const Identifier &chId, const Trk::TrackParameters &pars, NewTrackStates &newStates, std::set< Identifier > &knownLayers) const
 
void recoverClusterHits (const EventContext &ctx, const Identifier &chId, const Trk::TrackParameters &chambPars, NewTrackStates &newStates, std::set< Identifier > &knownLayers) const
 
std::set< IdentifierlayersOnTrkIds (const Trk::Track &track) const
 Returns a set of all layer Identifiers of the associated track hits. More...
 
const Trk::TrkDetElementBasegetDetectorElement (const EventContext &ctx, const Identifier &id) const
 Returns the detector element associated with the muon Identifier. More...
 
std::set< IdentifiergetHoleLayerIds (const Identifier &detElId, const std::set< Identifier > &knownLayers) const
 Returns a set of all layer Identifiers (GasGap + channel orientation) in a muon chamber of type X excluding the ones in the knownLayers set
More...
 
template<class Prd >
NewTrackStates recoverChamberClusters (const EventContext &ctx, const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &prdKey, const Identifier &chambId, const Trk::TrackParameters &parsInChamb, std::set< Identifier > &knownLayers) const
 Attempts to recover all missing hits in a chamber. More...
 
template<class Prd >
std::vector< const Prd * > loadPrepDataHits (const EventContext &ctx, const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &key, const std::set< Identifier > &layerIds) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ServiceHandle< Muon::IMuonEDMHelperSvcm_edmHelperSvc
 
ServiceHandle< Trk::ITrackingVolumesSvcm_trackingVolumesSvc {this, "TrackingVolumesSvc", "TrackingVolumesSvc/TrackingVolumesSvc"}
 
ToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
 
ToolHandle< Trk::IExtrapolatorm_extrapolator {this, "Extrapolator", "Trk::Extrapolator/MuonExtrapolator"}
 
ToolHandle< Muon::IMdtDriftCircleOnTrackCreatorm_mdtRotCreator
 
ToolHandle< Muon::IMuonClusterOnTrackCreatorm_cscRotCreator
 
ToolHandle< Muon::IMuonClusterOnTrackCreatorm_clusRotCreator
 
ToolHandle< Trk::IResidualPullCalculatorm_pullCalculator
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
 
SG::ReadHandleKey< Muon::MdtPrepDataContainerm_key_mdt {this, "MdtPrepDataContainer", "MDT_DriftCircles", "MDT PRDs"}
 
SG::ReadHandleKey< Muon::CscPrepDataContainerm_key_csc {this, "CscPrepDataContainer", "CSC_Clusters", "CSC PRDS"}
 
SG::ReadHandleKey< Muon::TgcPrepDataContainerm_key_tgc {this, "TgcPrepDataContainer", "TGC_Measurements", "TGC PRDs"}
 
SG::ReadHandleKey< Muon::RpcPrepDataContainerm_key_rpc {this, "RpcPrepDataContainer", "RPC_Measurements", "RPC PRDs"}
 
SG::ReadHandleKey< Muon::sTgcPrepDataContainerm_key_stgc {this, "sTgcPrepDataContainer", "STGC_Measurements", "sTGC PRDs"}
 
SG::ReadHandleKey< Muon::MMPrepDataContainerm_key_mm {this, "MMPrepDataContainer", "MM_Measurements", "MM PRDs"}
 
SG::ReadCondHandleKey< Muon::MuonIntersectGeoDatam_chamberGeoKey {this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"}
 
Gaudi::Property< bool > m_addMeasurements {this, "AddMeasurements", true}
 
Gaudi::Property< bool > m_detectBadSort {this, "DetectBadSorting", false}
 
Gaudi::Property< double > m_associationPullCutEta {this, "AssociationPullCutEta", 3}
 
Gaudi::Property< double > m_associationPullCutPhi {this, "AssociationPullCutPhi", 10}
 
Gaudi::Property< double > m_adcCut {this, "AdcCut", 50}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

tool to select tracks

Definition at line 34 of file MuonChamberHoleRecoveryTool.h.

Member Typedef Documentation

◆ NewTrackStates

Definition at line 40 of file MuonChamberHoleRecoveryTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonChamberHoleRecoveryTool()

Muon::MuonChamberHoleRecoveryTool::MuonChamberHoleRecoveryTool ( const std::string &  ty,
const std::string &  na,
const IInterface *  pa 
)

Definition at line 89 of file MuonChamberHoleRecoveryTool.cxx.

89  :
90  AthAlgTool(ty, na, pa) {
91  declareInterface<IMuonHoleRecoveryTool>(this);
92  }

◆ ~MuonChamberHoleRecoveryTool()

virtual Muon::MuonChamberHoleRecoveryTool::~MuonChamberHoleRecoveryTool ( )
virtualdefault

Member Function Documentation

◆ createHoleTSOSsForClusterChamber() [1/2]

void Muon::MuonChamberHoleRecoveryTool::createHoleTSOSsForClusterChamber ( const Identifier detElId,
const EventContext &  ctx,
const Trk::TrackParameters pars,
std::set< Identifier > &  layIds,
NewTrackStates states 
) const
override

Definition at line 342 of file MuonChamberHoleRecoveryTool.cxx.

346  {
347  ATH_MSG_VERBOSE(" performing holes search in chamber " << m_idHelperSvc->toString(detElId));
348  recoverClusterHits(ctx, detElId, pars, states, layIds);
349  }

◆ createHoleTSOSsForClusterChamber() [2/2]

virtual void Muon::IMuonHoleRecoveryTool::createHoleTSOSsForClusterChamber ( const Identifier detElId,
const EventContext &  ctx,
const Trk::TrackParameters pars,
std::set< Identifier > &  layIds,
std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > &  states 
) const
pure virtualinherited

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getDetectorElement()

const Trk::TrkDetElementBase * Muon::MuonChamberHoleRecoveryTool::getDetectorElement ( const EventContext &  ctx,
const Identifier id 
) const
private

Returns the detector element associated with the muon Identifier.

Definition at line 352 of file MuonChamberHoleRecoveryTool.cxx.

353  {
355  const MuonGM::MuonDetectorManager* MuonDetMgr{*DetectorManagerHandle};
356  if (!MuonDetMgr) {
357  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
358  return nullptr;
359  }
360  if (m_idHelperSvc->isMdt(detElId))
361  return MuonDetMgr->getMdtReadoutElement(detElId);
362  else if (m_idHelperSvc->isTgc(detElId))
363  return MuonDetMgr->getTgcReadoutElement(detElId);
364  else if (m_idHelperSvc->isRpc(detElId))
365  return MuonDetMgr->getRpcReadoutElement(detElId);
366  else if (m_idHelperSvc->isCsc(detElId))
367  return MuonDetMgr->getCscReadoutElement(detElId);
368  // New Small Wheel
369  else if (m_idHelperSvc->issTgc(detElId))
370  return MuonDetMgr->getsTgcReadoutElement(detElId);
371  else if (m_idHelperSvc->isMM(detElId))
372  return MuonDetMgr->getMMReadoutElement(detElId);
373  return nullptr;
374  }

◆ getHoleLayerIds()

std::set< Identifier > Muon::MuonChamberHoleRecoveryTool::getHoleLayerIds ( const Identifier detElId,
const std::set< Identifier > &  knownLayers 
) const
private

Returns a set of all layer Identifiers (GasGap + channel orientation) in a muon chamber of type X excluding the ones in the knownLayers set

the second gas gap of the three layer stations does not have a phi measurement

Definition at line 454 of file MuonChamberHoleRecoveryTool.cxx.

455  {
456  std::set<Identifier> holeGaps{};
457  if (m_idHelperSvc->isMdt(detElId)) {
458  const MdtIdHelper& idHelper{m_idHelperSvc->mdtIdHelper()};
459  for (int ml = 1; ml <= idHelper.numberOfMultilayers(detElId); ++ml) {
460  for (int layer = idHelper.tubeLayerMin(detElId);
461  layer <= idHelper.tubeLayerMax(detElId); ++layer) {
462  const Identifier layerId = idHelper.channelID(detElId, ml, layer, 1);
463  if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
464  }
465  }
466  } else if (m_idHelperSvc->isMM(detElId)) {
467  const MmIdHelper& idHelper{m_idHelperSvc->mmIdHelper()};
468  for (int ml : {1 ,2}) {
469  for (int gap = MmIdHelper::gasGapMin(); gap <= MmIdHelper::gasGapMax(); ++gap) {
470  const Identifier layerId = idHelper.channelID(detElId, ml, gap, 1);
471  if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
472  }
473  }
474  } else if (m_idHelperSvc->issTgc(detElId)) {
475  const sTgcIdHelper& idHelper{m_idHelperSvc->stgcIdHelper()};
476  using channelType = sTgcIdHelper::sTgcChannelTypes;
477  for (int ml : {1, 2}) {
478  for (const channelType chType : {channelType::Strip,
479  channelType::Pad,
480  channelType::Wire}){
481  for (int gap = sTgcIdHelper::gasGapMin();
482  gap <= sTgcIdHelper::gasGapMax(); ++gap) {
483  const Identifier layerId = idHelper.channelID(detElId, ml, gap, chType, 1);
484  if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
485  }
486  }
487  }
488  } else if (m_idHelperSvc->isTgc(detElId)) {
489  const TgcIdHelper& idHelper = m_idHelperSvc->tgcIdHelper();
490  const int gapMax{idHelper.gasGapMax(detElId)};
491  for (int gasgap = idHelper.gasGapMin(detElId);
492  gasgap < gapMax; ++gasgap){
493  for (int measPhi: {0,1}) {
495  if (gapMax == 3 && gasgap ==2 && measPhi == 1) continue;
496  const Identifier layerId = idHelper.channelID(detElId, gasgap, measPhi, 1);
497  if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
498  }
499  }
500  } else if (m_idHelperSvc->isRpc(detElId)) {
501  const RpcIdHelper& idHelper = m_idHelperSvc->rpcIdHelper();
502  const int doubZ{idHelper.doubletZ(detElId)};
503  const int gapMax{idHelper.gasGapMax(detElId)};
504  for (int phiGap = idHelper.doubletPhi(detElId);
505  phiGap <= RpcIdHelper::doubletPhiMax(); ++phiGap) {
506  for (int gap = idHelper.gasGapMin(detElId);
507  gap <= gapMax; ++gap) {
508  for (int measPhi: {0, 1}) {
509  const Identifier layerId = idHelper.channelID(detElId, doubZ, phiGap, gap, measPhi, 1);
510  if (!knownLayers.count(layerId)) holeGaps.insert(layerId);
511  }
512  }
513  }
514  } else if (m_idHelperSvc->isCsc(detElId)) {
515  const CscIdHelper& idHelper{m_idHelperSvc->cscIdHelper()};
516  for (int layer = 1; layer <= 4; ++ layer) {
517  for (bool measPhi: {false, true}) {
518  const Identifier layId = idHelper.channelID(detElId, 2, layer, measPhi, 1);
519  if (!knownLayers.count(layId)) holeGaps.insert(layId);
520  }
521  }
522  }
523  return holeGaps;
524  }

◆ getNextMuonMeasurement()

bool Muon::MuonChamberHoleRecoveryTool::getNextMuonMeasurement ( RecoveryState trkRecov,
RecoveryState::CopyTarget  target 
) const
private

Increments the internal iterator of the RecoveryState until the next muon measurement on track is found Measurements inside the MS volume or any scatterer are copied automatically copied onto the target vector.

Copy all track states inside the MS

Scatteres AEOTs, material etc.

Definition at line 119 of file MuonChamberHoleRecoveryTool.cxx.

119  {
120  while(trkRecov.nextState()) {
121  const Trk::TrackParameters* pars = trkRecov.tsos()->trackParameters();
122  ATH_MSG_VERBOSE("Track parameters "<<(*pars));
125  if (msVol.inside(pars->position())) {
126  ATH_MSG_VERBOSE("Tracking parameters are inside the MS");
127  trkRecov.copyState(target);
128  continue;
129  }
130 
131  if (trkRecov.tsos()->type(Trk::TrackStateOnSurface::Hole)) {
132  ATH_MSG_VERBOSE("Skip hole in MS");
133  continue;
134  }
136  const Trk::MeasurementBase* meas = trkRecov.tsos()->measurementOnTrack();
137  if (!meas) {
138  ATH_MSG_VERBOSE("The track state does not have an associated measurement");
139  trkRecov.copyState(target);
140  continue;
141  }
142  trkRecov.tsosId = m_edmHelperSvc->getIdentifier(*meas);
143  // Potentially a pseudo measurement. Anyway keep it
144  if (!trkRecov.tsosId.is_valid() || !m_idHelperSvc->isMuon(trkRecov.tsosId)) {
145  ATH_MSG_VERBOSE("No muon measurement");
146  trkRecov.copyState(target);
147  continue;
148  }
149  return true;
150  }
151  return false;
152  }

◆ holesInMdtChamber()

std::set< Identifier > Muon::MuonChamberHoleRecoveryTool::holesInMdtChamber ( const EventContext &  ctx,
const Amg::Vector3D position,
const Amg::Vector3D direction,
const Identifier chId,
const std::set< Identifier > &  tubeIds 
) const
private

calculate holes in a given chamber using local straight line extrapolation

Parameters
parsTrackParameters in the chamber
chIdIdentifier of the chamber
tubeIdsset containing the Identifier of the hits that should not be counted as holes
Returns
a vector of hole Identifiers

Definition at line 376 of file MuonChamberHoleRecoveryTool.cxx.

377  {
378 
380  if (!interSectSvc.isValid()) {
381  ATH_MSG_ERROR("Failed to retrieve chamber intersection service");
382  throw std::runtime_error("No chamber intersection service");
383  }
384  const MuonGM::MdtReadoutElement* readoutEle = interSectSvc->detMgr()->getMdtReadoutElement(chId);
385 
386  MuonStationIntersect intersect = interSectSvc->tubesCrossedByTrack(chId, position, direction);
387 
388  // clear hole vector
389  std::set<Identifier> holes;
390  for (unsigned int ii = 0; ii < intersect.tubeIntersects().size(); ++ii) {
391  const MuonTubeIntersect& tint = intersect.tubeIntersects()[ii];
392 
393  if (tubeIds.count(tint.tubeId)) { continue; }
394  ATH_MSG_VERBOSE(" intersect " << m_idHelperSvc->toString(tint.tubeId) << " dist wire " << tint.rIntersect
395  << " dist to tube end " << tint.xIntersect);
396 
397  if (std::abs(tint.rIntersect) > readoutEle->innerTubeRadius() || tint.xIntersect > -10.) {
398  ATH_MSG_VERBOSE(" not counted");
399  continue;
400  }
401  // check whether there is a hit in this tube
402  ATH_MSG_VERBOSE(" hole tube");
403  holes.insert(tint.tubeId);
404 
405  }
406  return holes;
407  }

◆ initialize()

StatusCode Muon::MuonChamberHoleRecoveryTool::initialize ( )
override

Definition at line 94 of file MuonChamberHoleRecoveryTool.cxx.

94  {
96  ATH_CHECK(m_edmHelperSvc.retrieve());
97  ATH_CHECK(m_idHelperSvc.retrieve());
98  ATH_CHECK(m_trackingVolumesSvc.retrieve());
99  ATH_CHECK(m_printer.retrieve());
100  ATH_CHECK(m_extrapolator.retrieve());
101  ATH_CHECK(m_mdtRotCreator.retrieve());
102 
103  ATH_CHECK(m_key_csc.initialize(!m_key_csc.empty()));
104  ATH_CHECK(m_key_stgc.initialize(!m_key_stgc.empty()));
105  ATH_CHECK(m_key_mm.initialize(!m_key_mm.empty()));
106 
107  ATH_CHECK(m_key_mdt.initialize(!m_key_mdt.empty()));
108  ATH_CHECK(m_key_tgc.initialize(!m_key_tgc.empty()));
109  ATH_CHECK(m_key_rpc.initialize(!m_key_rpc.empty()));
110 
111  ATH_CHECK(m_cscRotCreator.retrieve(DisableTool{m_key_csc.empty()}));
112 
113  ATH_CHECK(m_clusRotCreator.retrieve());
114  ATH_CHECK(m_pullCalculator.retrieve());
115 
117  return StatusCode::SUCCESS;
118  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& Muon::IMuonHoleRecoveryTool::interfaceID ( )
inlinestaticinherited

access to tool interface

Definition at line 23 of file IMuonHoleRecoveryTool.h.

23  {
24  static const InterfaceID IID_IMuonHoleRecoveryTool("Muon::IMuonHoleRecoveryTool", 1, 0);
25  return IID_IMuonHoleRecoveryTool;
26  }

◆ layersOnTrkIds()

std::set< Identifier > Muon::MuonChamberHoleRecoveryTool::layersOnTrkIds ( const Trk::Track track) const
private

Returns a set of all layer Identifiers of the associated track hits.

Definition at line 154 of file MuonChamberHoleRecoveryTool.cxx.

154  {
155  std::set<Identifier> layerIds{};
156  for (const Trk::TrackStateOnSurface* tsos: *track.trackStateOnSurfaces()){
157  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
158  if (!meas) continue;
159  const Identifier measId = m_edmHelperSvc->getIdentifier(*meas);
160 
161  if (!m_idHelperSvc->isMuon(measId)) continue;
162  layerIds.insert(measId);
163  layerIds.insert(m_idHelperSvc->layerId(measId));
164  // split competing ROTs into constituents
165  const CompetingMuonClustersOnTrack* comp = dynamic_cast<const CompetingMuonClustersOnTrack*>(meas);
166  if (!comp) { continue; }
167 
168  for (const Muon::MuonClusterOnTrack* clust : comp->containedROTs()) {
169  layerIds.insert(m_idHelperSvc->layerId(clust->identify()));
170  }
171  }
172  return layerIds;
173  }

◆ loadPrepDataHits()

template<class Prd >
std::vector< const Prd * > Muon::MuonChamberHoleRecoveryTool::loadPrepDataHits ( const EventContext &  ctx,
const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &  key,
const std::set< Identifier > &  layerIds 
) const
private

Create a subset of Identifiers

Sort the Mdt prepdatas per Identifier as there's the possibily 2 DC can exist for the same channel

Definition at line 408 of file MuonChamberHoleRecoveryTool.cxx.

410  {
411  std::vector<const Prd*> collectedHits{};
412  if (key.empty()) {
413  ATH_MSG_DEBUG("No container configured for "<<typeid(Prd).name());
414  return collectedHits;
415  }
417  if (!prdContainer.isPresent()) {
418  ATH_MSG_FATAL("Failed to load prep data collection "<<key.fullKey());
419  throw std::runtime_error("Invalid prepdata container");
420  }
422  std::set<IdentifierHash> chamberIds{};
423  std::transform(gasGapIds.begin(), gasGapIds.end(),
424  std::inserter(chamberIds, chamberIds.end()),
425  [this](const Identifier& id){
426  return m_idHelperSvc->moduleHash(id);
427  });
428  for (const IdentifierHash& moduleHash : chamberIds) {
429  const MuonPrepDataCollection<Prd>* prdColl = prdContainer->indexFindPtr(moduleHash);
430  if (!prdColl) continue;
431  collectedHits.reserve(collectedHits.size() + prdColl->size());
432  for (const Prd* prd: *prdColl) {
433  bool appendPrd{false};
435  appendPrd = gasGapIds.count(prd->identify());
436  } else {
437  appendPrd = gasGapIds.count(m_idHelperSvc->layerId(prd->identify()));
438  }
439  if (appendPrd) {
440  ATH_MSG_VERBOSE(__func__<<"() - Add prd candidate "<<m_printer->print(*prd));
441  collectedHits.push_back(prd);
442  }
443  }
444  }
448  std::sort(collectedHits.begin(), collectedHits.end(), [](const Prd* a, const Prd* b){
449  return a->identify() < b->identify();
450  });
451  }
452  return collectedHits;
453  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ recover()

std::unique_ptr< Trk::Track > Muon::MuonChamberHoleRecoveryTool::recover ( const Trk::Track track,
const EventContext &  ctx 
) const
overridevirtual

returns a new track with holes recovered

Copy all parameters befor the MS onto the new track state

Start an iterative recovery looping over each chamber

Implements Muon::IMuonHoleRecoveryTool.

Definition at line 175 of file MuonChamberHoleRecoveryTool.cxx.

175  {
176  ATH_MSG_DEBUG(" performing hole search track " << std::endl
177  << m_printer->print(track) << std::endl
178  << m_printer->printMeasurements(track));
179 
180  RecoveryState recovState{track};
181  recovState.layersOnTrk = layersOnTrkIds(track);
182 
186  recoverHitsInChamber(ctx, recovState);
187  std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track.info(), recovState.releaseStates(),
188  track.fitQuality() ? track.fitQuality()->uniqueClone() : nullptr);
189  return newTrack;
190  }

◆ recoverChamberClusters()

template<class Prd >
NewTrackStates Muon::MuonChamberHoleRecoveryTool::recoverChamberClusters ( const EventContext &  ctx,
const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &  prdKey,
const Identifier chambId,
const Trk::TrackParameters parsInChamb,
std::set< Identifier > &  knownLayers 
) const
private

Attempts to recover all missing hits in a chamber.

The hit is out of bounds --> continue

Loop over all prd candidates

The surface cannot be reached. Discard the prd

Compare the pad & local positions

Calculate the pull by hand

For one reason or another, the pads have 1D covariances

Check whether the pull is reasonable

Assign the best pad onto the track

Calculate the track pull

the best clusters are found. Put them onto the track

Next loop over the reamining parameters at surface to create holes

Definition at line 525 of file MuonChamberHoleRecoveryTool.cxx.

529  {
530  NewTrackStates recoveredStates{};
531  const std::set<Identifier> missingLayers = getHoleLayerIds(detElId, knownLayers);
532  std::vector<const Prd*> prdCandidates = loadPrepDataHits(ctx, prdKey, missingLayers);
534  using LayerParsMap = std::map<Identifier, std::unique_ptr<Trk::TrackParameters>>;
535  LayerParsMap parsAtSurfMap{};
536  for (const Identifier& holeId : missingLayers) {
537  const Trk::TrkDetElementBase* detEl = getDetectorElement(ctx, holeId);
538  const Trk::Surface& surf{detEl->surface(holeId)};
539  std::unique_ptr<Trk::TrackParameters> pars = m_extrapolator->extrapolateDirectly(ctx, parsInChamb, surf,
540  Trk::anyDirection, false, Trk::muon);
541  if (!pars) {
542  ATH_MSG_VERBOSE("Surface layer "<<m_idHelperSvc->toStringGasGap(holeId)<<" cannot be reached");
543  continue;
544  }
545  if (!Amg::hasPositiveDiagElems(*pars->covariance())) {
546  ATH_MSG_DEBUG("Uncertainties of extraploation to "<<m_idHelperSvc->toStringGasGap(holeId)<<" blew up");
547  continue;
548  }
549  const Amg::Vector2D locExPos{pars->parameters()[Trk::locX],
550  pars->parameters()[Trk::locY]};
551  bool inbounds{false};
553  inbounds = static_cast<const MuonGM::MMReadoutElement*>(detEl)->insideActiveBounds(holeId, locExPos, 10.,10.);
554  } else {
555  inbounds = surf.insideBounds(locExPos, 10., 10.);
556  }
558  if (!inbounds) {
559  ATH_MSG_VERBOSE("Extrapolation to layer "<<m_idHelperSvc->toStringGasGap(holeId)
560  <<" is outside of the chamber "<<Amg::toString(locExPos, 2));
561  continue;
562  }
563  parsAtSurfMap[holeId] = std::move(pars);
564  }
565  ClusterLayerMap bestClusterInLay;
567  for (const Prd* hit : prdCandidates) {
568  const Identifier layId = m_idHelperSvc->layerId(hit->identify());
570  LayerParsMap::const_iterator pars_itr = parsAtSurfMap.find(layId);
571  if (pars_itr == parsAtSurfMap.end()) {
572  continue;
573  }
574  const std::unique_ptr<Trk::TrackParameters>& parsInLay{pars_itr->second};
575  std::unique_ptr<MuonClusterOnTrack> calibClus{};
577  calibClus.reset(m_cscRotCreator->createRIO_OnTrack(*hit,
578  parsInLay->position(),
579  parsInLay->momentum().unit()));
580  } else {
581  calibClus.reset(m_clusRotCreator->createRIO_OnTrack(*hit,
582  parsInLay->position(),
583  parsInLay->momentum().unit()));
584  }
585  if (!calibClus) continue;
586 
588  const sTgcIdHelper& idHelper{m_idHelperSvc->stgcIdHelper()};
589  if (idHelper.channelType(hit->identify()) == sTgcIdHelper::sTgcChannelTypes::Pad){
591  const Amg::Vector2D locExPos{parsInLay->parameters()[Trk::locX],
592  parsInLay->parameters()[Trk::locY]};
593 
594  const MuonGM::MuonPadDesign* pad = hit->detectorElement()->getPadDesign(hit->identify());
595  const Amg::Vector2D padDist = pad->distanceToPad(locExPos, idHelper.channel(hit->identify()));
596 
598  const double xCov = std::hypot(Amg::error(*parsInLay->covariance(), Trk::locX),
599  Amg::error(hit->localCovariance(), Trk::locX));
601  const double yCov =Amg::error(*parsInLay->covariance(), Trk::locY);
602 
603  const double xPull = padDist.x() / xCov;
604  const double yPull = padDist.y() / yCov;
605 
606  ATH_MSG_VERBOSE(__func__<<"() - check "<<m_printer->print(*calibClus)
607  <<" diff "<<Amg::toString(padDist, 2)
608  <<" covariance: ("<<xCov<<", "<<yCov<<")"
609  <<" pull: ("<<xPull<<","<<yPull<<").");
610 
612  if (xPull > m_associationPullCutEta || yPull > m_associationPullCutPhi) continue;
613  const double pull = std::hypot(xPull, yPull);
614 
616  PullCluster& bestClus = bestClusterInLay[layId];
617  if (bestClus.pull < pull) continue;
618  bestClus.pull = pull;
619  bestClus.clus = std::move(calibClus);
620  bestClus.pars = parsInLay->uniqueClone();
621  continue;
622  }
623  }
624 
626  std::optional<const Trk::ResidualPull> resPull{
627  m_pullCalculator->residualPull(calibClus.get(), parsInLay.get(),
629  if (!resPull || resPull->pull().empty()) {
630  continue;
631  }
632 
633  const double pull = std::abs(resPull->pull().front());
634  const double pullCut = m_idHelperSvc->measuresPhi(layId) ? m_associationPullCutPhi
636  if (pull > pullCut) continue;
637 
638  PullCluster& bestClus = bestClusterInLay[layId];
639  if (bestClus.pull < pull) continue;
640  bestClus.pull = pull;
641  bestClus.clus = std::move(calibClus);
642  bestClus.pars = parsInLay->uniqueClone();
643 
644  }
646  for (auto& [layerId, foundClus]: bestClusterInLay) {
647  ATH_MSG_VERBOSE(__func__<<"() recovered hit " << m_printer->print(*foundClus.clus)<<" pull: "<<foundClus.pull);
648  std::unique_ptr<Trk::TrackStateOnSurface> tsos = MuonTSOSHelper::createMeasTSOS(std::move(foundClus.clus),
649  std::move(foundClus.pars),
651  recoveredStates.emplace_back(std::move(tsos));
652  knownLayers.insert(layerId);
653  parsAtSurfMap[layerId].reset();
654  }
656  for (auto& [layerId, exPars] : parsAtSurfMap) {
657  if (!exPars) continue;
658  ATH_MSG_VERBOSE(__func__<<"() add new hole state "<<m_idHelperSvc->toStringGasGap(layerId));
659  recoveredStates.emplace_back(MuonTSOSHelper::createHoleTSOS(std::move(exPars)));
660  }
661  return recoveredStates;
662  }

◆ recoverClusterHits()

void Muon::MuonChamberHoleRecoveryTool::recoverClusterHits ( const EventContext &  ctx,
const Identifier chId,
const Trk::TrackParameters chambPars,
NewTrackStates newStates,
std::set< Identifier > &  knownLayers 
) const
private

Definition at line 322 of file MuonChamberHoleRecoveryTool.cxx.

325  {
326 
327  NewTrackStates recovered{};
328  if (m_idHelperSvc->isRpc(chambId)) {
329  recovered = recoverChamberClusters(ctx, m_key_rpc, chambId, pars, knownLayers);
330  } else if (m_idHelperSvc->isTgc(chambId)) {
331  recovered = recoverChamberClusters(ctx, m_key_tgc, chambId, pars, knownLayers);
332  } else if (m_idHelperSvc->isCsc(chambId)) {
333  recovered = recoverChamberClusters(ctx, m_key_csc, chambId, pars, knownLayers);
334  } else if (m_idHelperSvc->isMM(chambId)) {
335  recovered = recoverChamberClusters(ctx, m_key_mm, chambId, pars, knownLayers);
336  } else if (m_idHelperSvc->issTgc(chambId)) {
337  recovered = recoverChamberClusters(ctx, m_key_stgc, chambId, pars, knownLayers);
338  }
339  states.insert(states.end(), std::make_move_iterator(recovered.begin()),
340  std::make_move_iterator(recovered.end()));
341  }

◆ recoverHitsInChamber()

void Muon::MuonChamberHoleRecoveryTool::recoverHitsInChamber ( const EventContext &  ctx,
RecoveryState trkRecov 
) const
private

Loops over all muon hits in a muon chamber and tries to find missed ones by checking each tracking layer for hits.

If a new chamber is reached another iteration of the method is called

Collect all hits in a chamber

New chamber added

Definition at line 191 of file MuonChamberHoleRecoveryTool.cxx.

191  {
192  const Muon::MuonStationIndex::ChIndex currStation = m_idHelperSvc->chamberIndex(trkRecov.tsosId);
194  std::set<Identifier> chambInStation{};
195  do {
196  if (currStation != m_idHelperSvc->chamberIndex(trkRecov.tsosId)) {
197  trkRecov.finalizeChamber();
198  recoverHitsInChamber(ctx, trkRecov);
199  return;
200  }
203  if (chambInStation.insert(m_idHelperSvc->chamberId(trkRecov.tsosId)).second) {
204  if (m_idHelperSvc->isMdt(trkRecov.tsosId)) {
205  recoverMdtHits(ctx, trkRecov.tsosId, *trkRecov.tsos()->trackParameters(),
206  trkRecov.chamberStates, trkRecov.layersOnTrk);
207  } else {
208  recoverClusterHits(ctx, trkRecov.tsosId, *trkRecov.tsos()->trackParameters(),
209  trkRecov.chamberStates, trkRecov.layersOnTrk);
210  }
211  }
213  trkRecov.finalizeChamber();
214  }

◆ recoverMdtHits()

void Muon::MuonChamberHoleRecoveryTool::recoverMdtHits ( const EventContext &  ctx,
const Identifier chId,
const Trk::TrackParameters pars,
NewTrackStates newStates,
std::set< Identifier > &  knownLayers 
) const
private

calculate Amg::Vector2D using surf to obtain sign

calculate side

update sign

pointer to resPull

Overwrite the previous drift circle if the pull of this one is better or it's an outlier

Definition at line 215 of file MuonChamberHoleRecoveryTool.cxx.

218  {
219 
220 
221  std::set<Identifier> chHoles = holesInMdtChamber(ctx, pars.position(), pars.momentum().unit(), chId, knownLayers);
222  ATH_MSG_VERBOSE(" chamber " << m_idHelperSvc->toStringChamber(chId) << " has holes " << chHoles.size());
223  if (chHoles.empty()) return;
224 
225  const std::vector<const MdtPrepData*> prdCandidates{loadPrepDataHits<MdtPrepData>(ctx, m_key_mdt, chHoles)};
226  bool addedState{false};
227  for (const MdtPrepData* mdtPrd : prdCandidates) {
228  const Trk::StraightLineSurface& surf{mdtPrd->detectorElement()->surface(mdtPrd->identify())};
229  std::unique_ptr<Trk::TrackParameters> exPars = m_extrapolator->extrapolateDirectly(ctx, pars, surf, Trk::anyDirection, false, Trk::muon);
230  if (!exPars) {
231  ATH_MSG_WARNING("Propagation to "<<m_idHelperSvc->toString(mdtPrd->identify())<<" failed.");
232  continue;
233  }
234 
237  if (!surf.globalToLocal(exPars->position(), exPars->momentum(), locPos)) {
238  ATH_MSG_DEBUG(" failed to calculate drift sign ");
239  continue;
240  }
241  if (!surf.insideBounds(locPos)) {
242  chHoles.erase(mdtPrd->identify());
243  continue;
244  }
245 
246  // calibrate Mdt PRD
247  const Amg::Vector3D momentum = exPars->momentum();
248  std::unique_ptr<MdtDriftCircleOnTrack> mdtROT{m_mdtRotCreator->createRIO_OnTrack(*mdtPrd,
249  exPars->position(),
250  &momentum)};
251  if (!mdtROT) continue;
252 
256  m_mdtRotCreator->updateSign(*mdtROT, side);
257 
259  std::optional<const Trk::ResidualPull> resPull{m_pullCalculator->residualPull(mdtROT.get(),
260  exPars.get(),
262  if (!resPull) { continue; }
263 
264  const double pull = resPull->pull().front();
265  const double radialResidual = std::abs(mdtROT->localParameters()[Trk::locR]) -
266  std::abs(exPars->parameters()[Trk::locR]);
267 
268  unsigned int hitFlag = 1;
269  if (mdtPrd->adc() < m_adcCut || mdtPrd->status() != MdtStatusDriftTime)
270  hitFlag = 3; // noise
271  else if (std::abs(pull) < m_associationPullCutEta)
272  hitFlag = 0; // hit on track
273  else if (radialResidual > 0.)
274  hitFlag = 2; // out of time
275 
276  ATH_MSG_VERBOSE(__func__<<"() - Recover "<<m_printer->print(*mdtROT)<<" pull: "<<pull<<" hitFlag: "<<hitFlag);
277  std::unique_ptr<Trk::TrackStateOnSurface> tsos = MuonTSOSHelper::createMeasTSOS(std::move(mdtROT),
278  std::move(exPars),
279  (hitFlag != 0 || !m_addMeasurements) ?
282 
283  if (!addedState) {
284  newStates.emplace_back(std::move(tsos));
285  addedState = true;
286  } else {
287  const MdtDriftCircleOnTrack* prevDC = static_cast<const MdtDriftCircleOnTrack*>(newStates.back()->measurementOnTrack());
288  if (prevDC->identify() != mdtPrd->identify()) {
289  newStates.emplace_back(std::move(tsos));
290  } else {
291  ATH_MSG_DEBUG("Two hits recorded for the same tube "<<std::endl<<
292  " *** current: "<<m_printer->print(*tsos->measurementOnTrack())<<std::endl<<
293  " *** previous: "<<m_printer->print(*prevDC));
294  std::optional<Trk::ResidualPull> prevPullObj{m_pullCalculator->residualPull(prevDC,
295  tsos->trackParameters(),
297  const double prevPull = prevPullObj->pull().front();
299  if (std::abs(pull) < std::abs(prevPull) ||
301  newStates.back()->type(Trk::TrackStateOnSurface::Outlier))) {
302  newStates.back() = std::move(tsos);
303  }
304 
305  }
306  }
307  chHoles.erase(mdtPrd->identify());
308  knownLayers.insert(mdtPrd->identify());
309  }
310 
311  for (const Identifier& hole : chHoles) {
312  const Trk::Surface& surf{getDetectorElement(ctx, hole)->surface(hole)};
313  std::unique_ptr<Trk::TrackParameters> exPars = m_extrapolator->extrapolateDirectly(ctx, pars, surf, Trk::anyDirection, false, Trk::muon);
314  if (!exPars) {
315  ATH_MSG_WARNING("Propagation to "<<m_idHelperSvc->toString(hole)<<" failed.");
316  continue;
317  }
318  ATH_MSG_VERBOSE(__func__<<"() - Add hole "<<m_idHelperSvc->toString(hole));
319  newStates.emplace_back(MuonTSOSHelper::createHoleTSOS(std::move(exPars)));
320  }
321  }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_adcCut

Gaudi::Property<double> Muon::MuonChamberHoleRecoveryTool::m_adcCut {this, "AdcCut", 50}
private

Definition at line 197 of file MuonChamberHoleRecoveryTool.h.

◆ m_addMeasurements

Gaudi::Property<bool> Muon::MuonChamberHoleRecoveryTool::m_addMeasurements {this, "AddMeasurements", true}
private

Definition at line 192 of file MuonChamberHoleRecoveryTool.h.

◆ m_associationPullCutEta

Gaudi::Property<double> Muon::MuonChamberHoleRecoveryTool::m_associationPullCutEta {this, "AssociationPullCutEta", 3}
private

Definition at line 195 of file MuonChamberHoleRecoveryTool.h.

◆ m_associationPullCutPhi

Gaudi::Property<double> Muon::MuonChamberHoleRecoveryTool::m_associationPullCutPhi {this, "AssociationPullCutPhi", 10}
private

Definition at line 196 of file MuonChamberHoleRecoveryTool.h.

◆ m_chamberGeoKey

SG::ReadCondHandleKey<Muon::MuonIntersectGeoData> Muon::MuonChamberHoleRecoveryTool::m_chamberGeoKey {this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"}
private

Definition at line 190 of file MuonChamberHoleRecoveryTool.h.

◆ m_clusRotCreator

ToolHandle<Muon::IMuonClusterOnTrackCreator> Muon::MuonChamberHoleRecoveryTool::m_clusRotCreator
private
Initial value:
{this, "ClusterRotCreator",
"Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
"IMuonClusterOnTrackCreator for RPC, TGC, NSW hits"}

Definition at line 173 of file MuonChamberHoleRecoveryTool.h.

◆ m_cscRotCreator

ToolHandle<Muon::IMuonClusterOnTrackCreator> Muon::MuonChamberHoleRecoveryTool::m_cscRotCreator
private
Initial value:
{
this, "CscRotCreator", "", "IMuonClusterOnTrackCreator for cscs"}

Definition at line 171 of file MuonChamberHoleRecoveryTool.h.

◆ m_detectBadSort

Gaudi::Property<bool> Muon::MuonChamberHoleRecoveryTool::m_detectBadSort {this, "DetectBadSorting", false}
private

Definition at line 193 of file MuonChamberHoleRecoveryTool.h.

◆ m_DetectorManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> Muon::MuonChamberHoleRecoveryTool::m_DetectorManagerKey
private
Initial value:
{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

Definition at line 179 of file MuonChamberHoleRecoveryTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_edmHelperSvc

ServiceHandle<Muon::IMuonEDMHelperSvc> Muon::MuonChamberHoleRecoveryTool::m_edmHelperSvc
private
Initial value:
{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}

Definition at line 158 of file MuonChamberHoleRecoveryTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> Muon::MuonChamberHoleRecoveryTool::m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/MuonExtrapolator"}
private

Definition at line 167 of file MuonChamberHoleRecoveryTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::MuonChamberHoleRecoveryTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 157 of file MuonChamberHoleRecoveryTool.h.

◆ m_key_csc

SG::ReadHandleKey<Muon::CscPrepDataContainer> Muon::MuonChamberHoleRecoveryTool::m_key_csc {this, "CscPrepDataContainer", "CSC_Clusters", "CSC PRDS"}
private

Definition at line 183 of file MuonChamberHoleRecoveryTool.h.

◆ m_key_mdt

SG::ReadHandleKey<Muon::MdtPrepDataContainer> Muon::MuonChamberHoleRecoveryTool::m_key_mdt {this, "MdtPrepDataContainer", "MDT_DriftCircles", "MDT PRDs"}
private

Definition at line 182 of file MuonChamberHoleRecoveryTool.h.

◆ m_key_mm

SG::ReadHandleKey<Muon::MMPrepDataContainer> Muon::MuonChamberHoleRecoveryTool::m_key_mm {this, "MMPrepDataContainer", "MM_Measurements", "MM PRDs"}
private

Definition at line 187 of file MuonChamberHoleRecoveryTool.h.

◆ m_key_rpc

SG::ReadHandleKey<Muon::RpcPrepDataContainer> Muon::MuonChamberHoleRecoveryTool::m_key_rpc {this, "RpcPrepDataContainer", "RPC_Measurements", "RPC PRDs"}
private

Definition at line 185 of file MuonChamberHoleRecoveryTool.h.

◆ m_key_stgc

SG::ReadHandleKey<Muon::sTgcPrepDataContainer> Muon::MuonChamberHoleRecoveryTool::m_key_stgc {this, "sTgcPrepDataContainer", "STGC_Measurements", "sTGC PRDs"}
private

Definition at line 186 of file MuonChamberHoleRecoveryTool.h.

◆ m_key_tgc

SG::ReadHandleKey<Muon::TgcPrepDataContainer> Muon::MuonChamberHoleRecoveryTool::m_key_tgc {this, "TgcPrepDataContainer", "TGC_Measurements", "TGC PRDs"}
private

Definition at line 184 of file MuonChamberHoleRecoveryTool.h.

◆ m_mdtRotCreator

ToolHandle<Muon::IMdtDriftCircleOnTrackCreator> Muon::MuonChamberHoleRecoveryTool::m_mdtRotCreator
private
Initial value:
{this, "MdtRotCreator",
"Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
"IMdtDriftCircleOnTrackCreator full calibration"}

Definition at line 168 of file MuonChamberHoleRecoveryTool.h.

◆ m_printer

ToolHandle<Muon::MuonEDMPrinterTool> Muon::MuonChamberHoleRecoveryTool::m_printer {this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 166 of file MuonChamberHoleRecoveryTool.h.

◆ m_pullCalculator

ToolHandle<Trk::IResidualPullCalculator> Muon::MuonChamberHoleRecoveryTool::m_pullCalculator
private
Initial value:
{this, "PullCalculator",
"Trk::ResidualPullCalculator/ResidualPullCalculator"}

Definition at line 176 of file MuonChamberHoleRecoveryTool.h.

◆ m_trackingVolumesSvc

ServiceHandle<Trk::ITrackingVolumesSvc> Muon::MuonChamberHoleRecoveryTool::m_trackingVolumesSvc {this, "TrackingVolumesSvc", "TrackingVolumesSvc/TrackingVolumesSvc"}
private

Definition at line 161 of file MuonChamberHoleRecoveryTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
plotting.yearwise_luminosity_vs_mu.comp
comp
Definition: yearwise_luminosity_vs_mu.py:24
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonChamberHoleRecoveryTool::m_key_mm
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_key_mm
Definition: MuonChamberHoleRecoveryTool.h:187
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
MuonGM::MuonPadDesign
Parameters defining the design of the readout sTGC pads.
Definition: MuonPadDesign.h:40
Muon::MuonChamberHoleRecoveryTool::m_key_stgc
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_key_stgc
Definition: MuonChamberHoleRecoveryTool.h:186
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Muon::MuonChamberHoleRecoveryTool::layersOnTrkIds
std::set< Identifier > layersOnTrkIds(const Trk::Track &track) const
Returns a set of all layer Identifiers of the associated track hits.
Definition: MuonChamberHoleRecoveryTool.cxx:154
Amg::hasPositiveDiagElems
bool hasPositiveDiagElems(const AmgSymMatrix(N) &mat)
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above defin...
Definition: EventPrimitivesCovarianceHelpers.h:96
Muon::MuonChamberHoleRecoveryTool::m_addMeasurements
Gaudi::Property< bool > m_addMeasurements
Definition: MuonChamberHoleRecoveryTool.h:192
Muon::MuonChamberHoleRecoveryTool::getNextMuonMeasurement
bool getNextMuonMeasurement(RecoveryState &trkRecov, RecoveryState::CopyTarget target) const
Increments the internal iterator of the RecoveryState until the next muon measurement on track is fou...
Definition: MuonChamberHoleRecoveryTool.cxx:119
Muon::MuonChamberHoleRecoveryTool::recoverChamberClusters
NewTrackStates recoverChamberClusters(const EventContext &ctx, const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &prdKey, const Identifier &chambId, const Trk::TrackParameters &parsInChamb, std::set< Identifier > &knownLayers) const
Attempts to recover all missing hits in a chamber.
Definition: MuonChamberHoleRecoveryTool.cxx:525
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::locX
@ locX
Definition: ParamDefs.h:43
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:44
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Muon::MuonChamberHoleRecoveryTool::loadPrepDataHits
std::vector< const Prd * > loadPrepDataHits(const EventContext &ctx, const SG::ReadHandleKey< MuonPrepDataContainerT< Prd >> &key, const std::set< Identifier > &layerIds) const
Definition: MuonChamberHoleRecoveryTool.cxx:408
sTgcIdHelper::gasGapMax
static int gasGapMax()
Definition: sTgcIdHelper.cxx:1044
TgcIdHelper
Definition: TgcIdHelper.h:50
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Muon::MuonChamberHoleRecoveryTool::m_key_rpc
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_key_rpc
Definition: MuonChamberHoleRecoveryTool.h:185
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Muon::MuonChamberHoleRecoveryTool::m_key_mdt
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_key_mdt
Definition: MuonChamberHoleRecoveryTool.h:182
RpcIdHelper::doubletZ
int doubletZ(const Identifier &id) const
Definition: RpcIdHelper.cxx:1062
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
Muon::MuonTSOSHelper::createHoleTSOS
static std::unique_ptr< Trk::TrackStateOnSurface > createHoleTSOS(std::unique_ptr< Trk::TrackParameters > pars)
create a hole TSOS, takes ownership of the pointers
Definition: MuonTSOSHelper.h:92
Muon::MuonChamberHoleRecoveryTool::m_cscRotCreator
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_cscRotCreator
Definition: MuonChamberHoleRecoveryTool.h:171
sTgcIdHelper::gasGapMin
static int gasGapMin()
Definition: sTgcIdHelper.cxx:1042
Trk::ResidualPull::Unbiased
@ Unbiased
RP with track state that has measurement not included.
Definition: ResidualPull.h:57
Trk::ITrackingVolumesSvc::MuonSpectrometerEntryLayer
@ MuonSpectrometerEntryLayer
Tracking Volume which defines the entrance surfaces of the MS.
Definition: ITrackingVolumesSvc.h:41
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
athena.value
value
Definition: athena.py:122
Muon::MuonChamberHoleRecoveryTool::NewTrackStates
std::vector< std::unique_ptr< const Trk::TrackStateOnSurface > > NewTrackStates
Definition: MuonChamberHoleRecoveryTool.h:40
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
RpcIdHelper::doubletPhiMax
static int doubletPhiMax()
Definition: RpcIdHelper.cxx:1094
Trk::locR
@ locR
Definition: ParamDefs.h:50
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Muon::MuonChamberHoleRecoveryTool::recoverHitsInChamber
void recoverHitsInChamber(const EventContext &ctx, RecoveryState &trkRecov) const
Loops over all muon hits in a muon chamber and tries to find missed ones by checking each tracking la...
Definition: MuonChamberHoleRecoveryTool.cxx:191
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
RpcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:940
sTgcIdHelper::sTgcChannelTypes
sTgcChannelTypes
Definition: sTgcIdHelper.h:190
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
RpcIdHelper
Definition: RpcIdHelper.h:51
Muon::MuonChamberHoleRecoveryTool::getDetectorElement
const Trk::TrkDetElementBase * getDetectorElement(const EventContext &ctx, const Identifier &id) const
Returns the detector element associated with the muon Identifier.
Definition: MuonChamberHoleRecoveryTool.cxx:352
Muon::MdtStatusDriftTime
@ MdtStatusDriftTime
The tube produced a vaild measurement.
Definition: MdtDriftCircleStatus.h:34
Muon::MuonChamberHoleRecoveryTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: MuonChamberHoleRecoveryTool.h:167
RpcIdHelper::gasGapMin
static int gasGapMin()
Definition: RpcIdHelper.cxx:1096
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Muon::MuonChamberHoleRecoveryTool::m_associationPullCutEta
Gaudi::Property< double > m_associationPullCutEta
Definition: MuonChamberHoleRecoveryTool.h:195
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
TRT::Hit::side
@ side
Definition: HitInfo.h:83
Muon::MuonChamberHoleRecoveryTool::m_chamberGeoKey
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > m_chamberGeoKey
Definition: MuonChamberHoleRecoveryTool.h:190
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Trk::TrackStateOnSurface::type
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
Muon::MuonChamberHoleRecoveryTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonChamberHoleRecoveryTool.h:157
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Muon::MuonChamberHoleRecoveryTool::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MuonChamberHoleRecoveryTool.h:179
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:50
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Muon::MuonChamberHoleRecoveryTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonChamberHoleRecoveryTool.h:158
Muon::MuonChamberHoleRecoveryTool::m_pullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_pullCalculator
Definition: MuonChamberHoleRecoveryTool.h:176
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
urldecode::states
states
Definition: urldecode.h:39
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:59
Muon::MuonTSOSHelper::createMeasTSOS
static std::unique_ptr< Trk::TrackStateOnSurface > createMeasTSOS(std::unique_ptr< Trk::MeasurementBase > meas, std::unique_ptr< Trk::TrackParameters > pars, Trk::TrackStateOnSurface::TrackStateOnSurfaceType type)
create a TSOS with a measurement, takes ownership of the pointers
Definition: MuonTSOSHelper.h:62
Trk::RIGHT
@ RIGHT
the drift radius is positive (see Trk::AtaStraightLine)
Definition: DriftCircleSide.h:22
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
MdtIdHelper
Definition: MdtIdHelper.h:61
Trk::TrkDetElementBase::surface
virtual const Surface & surface() const =0
Return surface associated with this detector element.
MmIdHelper::gasGapMax
static int gasGapMax()
Definition: MmIdHelper.cxx:827
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:264
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::MuonChamberHoleRecoveryTool::m_clusRotCreator
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_clusRotCreator
Definition: MuonChamberHoleRecoveryTool.h:173
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
Muon::MuonChamberHoleRecoveryTool::getHoleLayerIds
std::set< Identifier > getHoleLayerIds(const Identifier &detElId, const std::set< Identifier > &knownLayers) const
Returns a set of all layer Identifiers (GasGap + channel orientation) in a muon chamber of type X exc...
Definition: MuonChamberHoleRecoveryTool.cxx:454
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TgcIdHelper::gasGapMax
static int gasGapMax(bool triplet)
Definition: TgcIdHelper.cxx:663
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::MeasurementBase
Definition: MeasurementBase.h:58
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
RpcIdHelper::gasGapMax
int gasGapMax() const
Definition: RpcIdHelper.cxx:1098
sTgcIdHelper
Definition: sTgcIdHelper.h:55
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonChamberHoleRecoveryTool::recoverMdtHits
void recoverMdtHits(const EventContext &ctx, const Identifier &chId, const Trk::TrackParameters &pars, NewTrackStates &newStates, std::set< Identifier > &knownLayers) const
Definition: MuonChamberHoleRecoveryTool.cxx:215
Trk::DriftCircleSide
DriftCircleSide
Enumerates the 'side' of the wire on which the tracks passed (i.e.
Definition: DriftCircleSide.h:16
Muon::MuonChamberHoleRecoveryTool::m_key_csc
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_key_csc
Definition: MuonChamberHoleRecoveryTool.h:183
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::MuonChamberHoleRecoveryTool::holesInMdtChamber
std::set< Identifier > holesInMdtChamber(const EventContext &ctx, const Amg::Vector3D &position, const Amg::Vector3D &direction, const Identifier &chId, const std::set< Identifier > &tubeIds) const
calculate holes in a given chamber using local straight line extrapolation
Definition: MuonChamberHoleRecoveryTool.cxx:376
h
MmIdHelper
Definition: MmIdHelper.h:54
CscIdHelper
Definition: CscIdHelper.h:52
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the closest approach of two lines.
Definition: GeoPrimitivesHelpers.h:302
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
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:49
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonChamberHoleRecoveryTool::m_key_tgc
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_key_tgc
Definition: MuonChamberHoleRecoveryTool.h:184
Muon::MuonChamberHoleRecoveryTool::m_trackingVolumesSvc
ServiceHandle< Trk::ITrackingVolumesSvc > m_trackingVolumesSvc
Definition: MuonChamberHoleRecoveryTool.h:161
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:23
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
Muon::MuonChamberHoleRecoveryTool::RecoveryState::CopyTarget::ChamberTrkStates
@ ChamberTrkStates
Muon::MuonChamberHoleRecoveryTool::m_adcCut
Gaudi::Property< double > m_adcCut
Definition: MuonChamberHoleRecoveryTool.h:197
TgcIdHelper::gasGapMin
static int gasGapMin()
Definition: TgcIdHelper.cxx:661
Muon::MuonChamberHoleRecoveryTool::m_mdtRotCreator
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
Definition: MuonChamberHoleRecoveryTool.h:168
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Trk::hole
@ hole
Definition: MeasurementType.h:36
TgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
Definition: TgcIdHelper.cxx:583
Trk::LEFT
@ LEFT
the drift radius is negative (see Trk::AtaStraightLine)
Definition: DriftCircleSide.h:20
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Muon::MuonChamberHoleRecoveryTool::recoverClusterHits
void recoverClusterHits(const EventContext &ctx, const Identifier &chId, const Trk::TrackParameters &chambPars, NewTrackStates &newStates, std::set< Identifier > &knownLayers) const
Definition: MuonChamberHoleRecoveryTool.cxx:322
Muon::MuonChamberHoleRecoveryTool::RecoveryState::CopyTarget::GlobalTrkStates
@ GlobalTrkStates
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
COOLRates.target
target
Definition: COOLRates.py:1106
IdentifierHash
Definition: IdentifierHash.h:38
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Volume
Definition: Volume.h:35
MuonGM::MuonPadDesign::distanceToPad
Amg::Vector2D distanceToPad(const Amg::Vector2D &pos, int channel) const
Definition: MuonPadDesign.cxx:118
Muon::MuonChamberHoleRecoveryTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonChamberHoleRecoveryTool.h:166
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::MuonChamberHoleRecoveryTool::m_associationPullCutPhi
Gaudi::Property< double > m_associationPullCutPhi
Definition: MuonChamberHoleRecoveryTool.h:196
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
Trk::StraightLineSurface
Definition: StraightLineSurface.h:51
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
fitman.k
k
Definition: fitman.py:528
MmIdHelper::gasGapMin
static int gasGapMin()
Definition: MmIdHelper.cxx:815
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1064
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37