ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MuonCombined::MuonCandidateTool Class Reference

#include <MuonCandidateTool.h>

Inheritance diagram for MuonCombined::MuonCandidateTool:
Collaboration diagram for MuonCombined::MuonCandidateTool:

Public Member Functions

 MuonCandidateTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~MuonCandidateTool ()=default
 
virtual StatusCode initialize () override
 
virtual void create (const xAOD::TrackParticleContainer &tracks, MuonCandidateCollection &outputCollection, TrackCollection &outputTracks, const EventContext &ctx) const override
 IMuonCandidateTool interface: build a MuonCandidateCollection from a TrackCollection of spectrometer tracks. More...
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

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

ToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
 
ToolHandle< Rec::ICombinedMuonTrackBuilderm_trackBuilder {this, "TrackBuilder", "", ""}
 
ToolHandle< Muon::IMuonTrackExtrapolationToolm_trackExtrapolationTool
 
ToolHandle< Trk::ITrackAmbiguityProcessorToolm_ambiguityProcessor
 
ToolHandle< Trk::IExtendedTrackSummaryToolm_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
 
SG::ReadHandleKey< Trk::SegmentCollectionm_segmentKey {this, "SegmentContainer", ""}
 Retrieve the segment container to perform the segment association offline. More...
 
PublicToolHandle< MuonCombined::IMuonTrackToSegmentAssociationToolm_trackSegmentAssociationTool
 
Gaudi::Property< unsigned int > m_extrapolationStrategy {this, "ExtrapolationStrategy", 0}
 
Gaudi::Property< bool > m_commissioning
 
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

Definition at line 25 of file MuonCandidateTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonCandidateTool()

MuonCombined::MuonCandidateTool::MuonCandidateTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 29 of file MuonCandidateTool.cxx.

29  :
31  declareInterface<IMuonCandidateTool>(this);
32  }

◆ ~MuonCandidateTool()

virtual MuonCombined::MuonCandidateTool::~MuonCandidateTool ( )
virtualdefault

Member Function Documentation

◆ create()

void MuonCombined::MuonCandidateTool::create ( const xAOD::TrackParticleContainer tracks,
MuonCandidateCollection outputCollection,
TrackCollection outputTracks,
const EventContext &  ctx 
) const
overridevirtual

IMuonCandidateTool interface: build a MuonCandidateCollection from a TrackCollection of spectrometer tracks.

Last but not least set the segments

Implements MuonCombined::IMuonCandidateTool.

Definition at line 53 of file MuonCandidateTool.cxx.

54  {
55  ATH_MSG_DEBUG("Producing MuonCandidates for " << tracks.size());
56  unsigned int ntracks = 0;
57 
59  if (!beamSpotHandle.isValid()) {
60  ATH_MSG_ERROR("Could not retrieve the BeamSpot data from key " << m_beamSpotKey.objKey());
61  return;
62  }
63 
64  ATH_MSG_DEBUG("Beamspot position bs_x=" << beamSpotHandle->beamPos());
65 
66  std::vector<track_link> trackLinks;
67 
68  unsigned int index = -1;
69  // Loop over MS tracks
70  for (const auto* track : tracks) {
71  ++index;
72 
73  if (!track->trackLink().isValid() || !track->track()) {
74  ATH_MSG_WARNING("MuonStandalone track particle without Trk::Track");
75  continue;
76  }
77  const Trk::Track& msTrack = *track->track();
78 
79  ATH_MSG_VERBOSE("Re-Fitting track " << std::endl
80  << m_printer->print(msTrack) << std::endl
81  << m_printer->printStations(msTrack));
82  std::unique_ptr<Trk::Track> standaloneTrack;
83  if (m_extrapolationStrategy == 0u) {
84  standaloneTrack = m_trackBuilder->standaloneFit(ctx, msTrack, beamSpotHandle->beamPos(), nullptr);
85  } else {
86  standaloneTrack = m_trackExtrapolationTool->extrapolate(msTrack, ctx);
87  }
88  if (standaloneTrack) {
89  // Reject the track if its fit quality is much (much much) worse than that of the non-extrapolated track
90  if (standaloneTrack->fitQuality()->doubleNumberDoF() == 0) {
91  standaloneTrack.reset();
92  ATH_MSG_DEBUG("extrapolated track has no DOF, don't use it");
93  } else {
94  double mschi2 = 2.5; // a default we should hopefully never have to use (taken from CombinedMuonTrackBuilder)
95  if (msTrack.fitQuality()->doubleNumberDoF() > 0)
96  mschi2 = msTrack.fitQuality()->chiSquared() / msTrack.fitQuality()->doubleNumberDoF();
97  // choice of 1000 is slightly arbitrary, the point is that the fit should be really be terrible
98  if (standaloneTrack->fitQuality()->chiSquared() / standaloneTrack->fitQuality()->doubleNumberDoF() > 1000 * mschi2) {
99  standaloneTrack.reset();
100  ATH_MSG_DEBUG("extrapolated track has a degraded fit, don't use it");
101  }
102  }
103  }
104  if (standaloneTrack) {
105  standaloneTrack->info().setParticleHypothesis(Trk::muon);
107  ATH_MSG_VERBOSE("Extrapolated track " << std::endl
108  << m_printer->print(*standaloneTrack) << std::endl
109  << m_printer->printStations(*standaloneTrack));
110  ++ntracks;
111  if (!standaloneTrack->perigeeParameters())
112  ATH_MSG_WARNING(" Track without perigee " << (*standaloneTrack));
113  else if (!standaloneTrack->perigeeParameters()->covariance())
114  ATH_MSG_WARNING(" Track with perigee without covariance " << (*standaloneTrack));
115  trackLinks.emplace_back(std::move(standaloneTrack), index, true);
116  } else {
117  // We can create tracks from EM segments+TGC hits
118  // If these are not successfully extrapolated, they are too low quality to be useful
119  // So only make candidates from un-extrapolated tracks if they are not EM-only
120  bool skipTrack = true;
121  const Trk::MuonTrackSummary* msMuonTrackSummary = nullptr;
122  std::unique_ptr<Trk::TrackSummary> msTrackSummary;
123  // If reading from an ESD, the track will not have a track summary yet
124  if (!msTrack.trackSummary()) {
125  msTrackSummary = m_trackSummaryTool->summary(msTrack);
126  msMuonTrackSummary = msTrackSummary->muonTrackSummary();
127  } else
128  msMuonTrackSummary = msTrack.trackSummary()->muonTrackSummary();
129  for (const auto& chs : msMuonTrackSummary->chamberHitSummary()) {
130  if ((chs.isMdt() && m_idHelperSvc->stationIndex(chs.chamberId()) != Muon::MuonStationIndex::EM) ||
131  m_idHelperSvc->isCsc(chs.chamberId())) {
132  skipTrack = false;
133  break;
134  }
135  }
136  if (!skipTrack) { trackLinks.emplace_back(std::make_unique<Trk::Track>(msTrack), index, false); }
137  }
138  }
140  std::unique_ptr<TrackCollection> extrapTracks = std::make_unique<TrackCollection>(SG::VIEW_ELEMENTS);
141  extrapTracks->reserve(trackLinks.size());
142  for (const track_link& link : trackLinks) extrapTracks->push_back(link.track.get());
143  ATH_MSG_DEBUG("Finished back-tracking, total number of successfull fits " << ntracks);
144 
145  // Resolve ambiguity between extrapolated tracks (where available)
146  std::unique_ptr<const TrackCollection> resolvedTracks(m_ambiguityProcessor->process(extrapTracks.get()));
147 
148  ATH_MSG_DEBUG("Finished ambiguity solving: " << extrapTracks->size() << " track(s) in -> " << resolvedTracks->size()
149  << " track(s) out");
150 
151  const Trk::SegmentCollection* segments{nullptr};
152  if (!m_segmentKey.empty()) {
154  if (!readHandle.isValid()) {
155  ATH_MSG_WARNING("Failed to retrieve the segment container " << m_segmentKey.fullKey());
156  } else
157  segments = readHandle.cptr();
158  }
159 
160  // Loop over resolved tracks and build MuonCondidate collection
161  for (const Trk::Track* track : *resolvedTracks) {
163  std::find_if(trackLinks.begin(), trackLinks.end(), [&track](const track_link& link) { return link.track.get() == track; });
164 
165  if (tLink == trackLinks.end()) {
166  ATH_MSG_WARNING("Unable to find internal link between MS and SA tracks!");
167  continue;
168  }
169 
170  std::unique_ptr<MuonCandidate> muon_candidate;
171  ElementLink<xAOD::TrackParticleContainer> MS_TrkLink{tracks, tLink->container_index, ctx};
172  if (tLink->extp_succeed) {
173  outputTracks.push_back(std::move(tLink->track));
174  ElementLink<TrackCollection> saLink(outputTracks, outputTracks.size() - 1, ctx);
175  muon_candidate = std::make_unique<MuonCandidate>(MS_TrkLink, saLink, outputTracks.size() - 1);
176  // remove track from set so it is not deleted
177  } else {
178  // in this case the extrapolation failed
179  muon_candidate = std::make_unique<MuonCandidate>(MS_TrkLink);
180  }
181  muon_candidate->setCommissioning(m_commissioning);
183  if (segments) {
184  std::vector<const Muon::MuonSegment*> assoc_segs;
185  m_trackSegmentAssociationTool->associatedSegments(*muon_candidate->primaryTrack(), segments, assoc_segs);
186  muon_candidate->setSegments(std::move(assoc_segs));
187  }
188 
189  outputCollection.push_back(std::move(muon_candidate));
190  }
191  }

◆ 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

◆ initialize()

StatusCode MuonCombined::MuonCandidateTool::initialize ( )
overridevirtual

Definition at line 34 of file MuonCandidateTool.cxx.

34  {
35  ATH_CHECK(m_printer.retrieve());
36  if (!m_trackBuilder.empty())
37  ATH_CHECK(m_trackBuilder.retrieve());
38  else
39  m_trackBuilder.disable();
40  if (!m_trackExtrapolationTool.empty())
42  else
43  m_trackExtrapolationTool.disable();
44  ATH_CHECK(m_ambiguityProcessor.retrieve());
45  ATH_CHECK(m_trackSummaryTool.retrieve());
46  ATH_CHECK(m_idHelperSvc.retrieve());
48 
49  ATH_CHECK(m_segmentKey.initialize(!m_segmentKey.empty()));
50  if (!m_segmentKey.empty()) { ATH_CHECK(m_trackSegmentAssociationTool.retrieve()); }
51  return StatusCode::SUCCESS;
52  }

◆ 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& MuonCombined::IMuonCandidateTool::interfaceID ( )
inlinestaticinherited

Definition at line 22 of file IMuonCandidateTool.h.

22  {
23  static const InterfaceID IID_IMuonCandidateTool("MuonCombined::IMuonCandidateTool", 1, 0);
24  return IID_IMuonCandidateTool;
25  }

◆ 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.

◆ 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_ambiguityProcessor

ToolHandle<Trk::ITrackAmbiguityProcessorTool> MuonCombined::MuonCandidateTool::m_ambiguityProcessor
private
Initial value:
{this, "AmbiguityProcessor",
"Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"}

Definition at line 41 of file MuonCandidateTool.h.

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> MuonCombined::MuonCandidateTool::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
private

Definition at line 47 of file MuonCandidateTool.h.

◆ m_commissioning

Gaudi::Property<bool> MuonCombined::MuonCandidateTool::m_commissioning
private
Initial value:
{this, "Commissioning", false,
"Flag deciding whether the candidate belongs to the comissioning."}

Definition at line 56 of file MuonCandidateTool.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_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_extrapolationStrategy

Gaudi::Property<unsigned int> MuonCombined::MuonCandidateTool::m_extrapolationStrategy {this, "ExtrapolationStrategy", 0}
private

Definition at line 54 of file MuonCandidateTool.h.

◆ m_idHelperSvc

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

Definition at line 45 of file MuonCandidateTool.h.

◆ m_printer

ToolHandle<Muon::MuonEDMPrinterTool> MuonCombined::MuonCandidateTool::m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 37 of file MuonCandidateTool.h.

◆ m_segmentKey

SG::ReadHandleKey<Trk::SegmentCollection> MuonCombined::MuonCandidateTool::m_segmentKey {this, "SegmentContainer", ""}
private

Retrieve the segment container to perform the segment association offline.

Definition at line 50 of file MuonCandidateTool.h.

◆ m_trackBuilder

ToolHandle<Rec::ICombinedMuonTrackBuilder> MuonCombined::MuonCandidateTool::m_trackBuilder {this, "TrackBuilder", "", ""}
private

Definition at line 38 of file MuonCandidateTool.h.

◆ m_trackExtrapolationTool

ToolHandle<Muon::IMuonTrackExtrapolationTool> MuonCombined::MuonCandidateTool::m_trackExtrapolationTool
private
Initial value:
{this, "TrackExtrapolationTool",
"ExtrapolateMuonToIPTool/ExtrapolateMuonToIPTool"}

Definition at line 39 of file MuonCandidateTool.h.

◆ m_trackSegmentAssociationTool

PublicToolHandle<MuonCombined::IMuonTrackToSegmentAssociationTool> MuonCombined::MuonCandidateTool::m_trackSegmentAssociationTool
private
Initial value:
{
this, "TrackSegmentAssociationTool", "MuonCombined::TrackSegmentAssociationTool/TrackSegmentAssociationTool"}

Definition at line 51 of file MuonCandidateTool.h.

◆ m_trackSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> MuonCombined::MuonCandidateTool::m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
private

Definition at line 43 of file MuonCandidateTool.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:
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MuonCombined::MuonCandidateTool::m_commissioning
Gaudi::Property< bool > m_commissioning
Definition: MuonCandidateTool.h:56
Trk::Track::fitQuality
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MuonCombined::MuonCandidateTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonCandidateTool.h:45
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::Track::info
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
MuonCombined::MuonCandidateTool::m_trackBuilder
ToolHandle< Rec::ICombinedMuonTrackBuilder > m_trackBuilder
Definition: MuonCandidateTool.h:38
Trk::TrackInfo::MuidStandAlone
@ MuidStandAlone
MuidStandalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:165
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
Trk::MuonTrackSummary::chamberHitSummary
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
Definition: MuonTrackSummary.h:148
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonCombined::MuonCandidateTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonCandidateTool.h:37
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::MuonTrackSummary
Detailed track summary for the muon system Give access to hit counts per chamber.
Definition: MuonTrackSummary.h:26
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
DataVector< Trk::Segment >
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
postInclude.outputCollection
outputCollection
Definition: postInclude.SortInput.py:27
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MuonCombined::MuonCandidateTool::m_trackSegmentAssociationTool
PublicToolHandle< MuonCombined::IMuonTrackToSegmentAssociationTool > m_trackSegmentAssociationTool
Definition: MuonCandidateTool.h:51
MuonCombined::MuonCandidateTool::m_extrapolationStrategy
Gaudi::Property< unsigned int > m_extrapolationStrategy
Definition: MuonCandidateTool.h:54
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::Track::trackSummary
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCombined::MuonCandidateTool::m_trackExtrapolationTool
ToolHandle< Muon::IMuonTrackExtrapolationTool > m_trackExtrapolationTool
Definition: MuonCandidateTool.h:39
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
Trk::TrackInfo::setParticleHypothesis
void setParticleHypothesis(const ParticleHypothesis &hypothesis)
Method re-setting the ParticleHypothesis.
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::TrackInfo::setPatternRecognitionInfo
void setPatternRecognitionInfo(const TrackPatternRecoInfo &patternReco)
Method setting the pattern recognition algorithm.
Trk::TrackSummary::muonTrackSummary
const MuonTrackSummary * muonTrackSummary() const
returns a pointer to the MuonTrackSummary if available
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
MuonCombined::MuonCandidateTool::m_segmentKey
SG::ReadHandleKey< Trk::SegmentCollection > m_segmentKey
Retrieve the segment container to perform the segment association offline.
Definition: MuonCandidateTool.h:50
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::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
MuonCombined::MuonCandidateTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: MuonCandidateTool.h:47
MuonCombined::MuonCandidateTool::m_ambiguityProcessor
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_ambiguityProcessor
Definition: MuonCandidateTool.h:41
Trk::FitQuality::doubleNumberDoF
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition: FitQuality.h:68
fitman.k
k
Definition: fitman.py:528
MuonCombined::MuonCandidateTool::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: MuonCandidateTool.h:43