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

#include <MuonTrackToSegmentTool.h>

Inheritance diagram for Muon::MuonTrackToSegmentTool:
Collaboration diagram for Muon::MuonTrackToSegmentTool:

Public Types

using MeasVec = std::vector< const Trk::MeasurementBase * >
 

Public Member Functions

 MuonTrackToSegmentTool (const std::string &, const std::string &, const IInterface *)
 default AlgTool constructor More...
 
 ~MuonTrackToSegmentTool ()=default
 destructor More...
 
StatusCode initialize ()
 initialize method, method taken from bass-class AlgTool More...
 
MuonSegmentconvert (const EventContext &ctx, const Trk::Track &track) const
 convert track to segment 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 ()
 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

std::vector< IdentifiercalculateHoles (const EventContext &ctx, const Identifier &chid, const Trk::TrackParameters &pars, const MeasVec &measurements) const
 calculate holes More...
 
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< IMuonEDMHelperSvcm_edmHelperSvc
 
PublicToolHandle< MuonEDMPrinterToolm_printer
 
ToolHandle< Trk::IPropagatorm_propagator {this, "Propagator", "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"}
 
SG::ReadCondHandleKey< Muon::MuonIntersectGeoDatam_chamberGeoKey {this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"}
 
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 combine two segments. It appoximates the combined segment by a straight line. The tool assumes that this is a valid assumption.

For more details look at the mainpage of this package.

Definition at line 40 of file MuonTrackToSegmentTool.h.

Member Typedef Documentation

◆ MeasVec

Definition at line 42 of file MuonTrackToSegmentTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonTrackToSegmentTool()

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

default AlgTool constructor

Definition at line 23 of file MuonTrackToSegmentTool.cxx.

23  : AthAlgTool(t, n, p) {
24  declareInterface<IMuonTrackToSegmentTool>(this);
25  }

◆ ~MuonTrackToSegmentTool()

Muon::MuonTrackToSegmentTool::~MuonTrackToSegmentTool ( )
default

destructor

Member Function Documentation

◆ calculateHoles()

std::vector< Identifier > Muon::MuonTrackToSegmentTool::calculateHoles ( const EventContext &  ctx,
const Identifier chid,
const Trk::TrackParameters pars,
const MeasVec measurements 
) const
private

calculate holes

Definition at line 210 of file MuonTrackToSegmentTool.cxx.

212  {
214  if (!InterSectSvc.isValid()) {
215  ATH_MSG_ERROR("Failed to retrieve chamber intersection service");
216  }
217 
218  const MuonStationIntersect intersect = InterSectSvc->tubesCrossedByTrack(chid, pars.position(), pars.momentum().unit());
219  const MuonGM::MuonDetectorManager* MuonDetMgr = InterSectSvc->detMgr();
220 
221  // set to identify the hit on the segment
222  std::set<Identifier> hitsOnSegment;
223  for (const Trk::MeasurementBase* mit : measurements) {
224  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(mit);
225  if (mdt) hitsOnSegment.insert(mdt->identify());
226  }
227 
228  // clear hole vector
229  std::vector<Identifier> holes;
230  for (unsigned int ii = 0; ii < intersect.tubeIntersects().size(); ++ii) {
231  const MuonTubeIntersect& tint = intersect.tubeIntersects()[ii];
232 
233  // skip hole check if there is a hit in this tube
234  if (hitsOnSegment.count(tint.tubeId)) continue;
235 
236  // if track goes through a tube which did not have a hit count as hole
237  if (std::abs(tint.rIntersect) < MuonDetMgr->getMdtReadoutElement(tint.tubeId)->innerTubeRadius() && tint.xIntersect < -200.) {
238  holes.push_back(tint.tubeId);
239  }
240  }
241  return holes;
242  }

◆ convert()

MuonSegment * Muon::MuonTrackToSegmentTool::convert ( const EventContext &  ctx,
const Trk::Track track 
) const
virtual

convert track to segment

convert track to segment, express the new segment parameters on the surface of the first segment

Implements Muon::IMuonTrackToSegmentTool.

Definition at line 36 of file MuonTrackToSegmentTool.cxx.

36  {
37  // Avoids FPE with clang.
41  ATH_MSG_DEBUG(" creating MuonSegment from track ");
42 
43  const Trk::Perigee* perigee = track.perigeeParameters();
44  if (!perigee) {
45  ATH_MSG_WARNING(" was expecting a perigee here... ");
46  return nullptr;
47  }
48 
49  const Trk::FitQuality* fq = track.fitQuality();
50  if (!fq) {
51  ATH_MSG_WARNING(" was expecting a FitQuality here... ");
52  return nullptr;
53  }
54 
55  std::set<Identifier> chIds;
56 
57  // copy rots, get surface
59  rots.reserve(track.measurementsOnTrack()->size());
60 
61  // loop over TSOS
62  const Trk::TrackStates* states = track.trackStateOnSurfaces();
63  if (!states) {
64  ATH_MSG_WARNING(" track without states, discarding track ");
65  return nullptr;
66  }
67  // track direction vector
68  const Amg::Vector3D dir = perigee->momentum().unit();
69 
70  const Amg::Transform3D* surfaceTransform = nullptr;
71  const Amg::Transform3D* backupTransform = nullptr;
72  std::unique_ptr<Amg::Transform3D> surfaceTransformToBeDeleted;
73  double weightedDistanceSquared{0}, weightSquared{0};
74  for (const Trk::TrackStateOnSurface* tsos : *states) {
75  // require TrackParameters
76  const Trk::TrackParameters* pars = tsos->trackParameters();
77  if (!pars) continue;
78 
79  // check whether state is a measurement
80  const Trk::MeasurementBase* meas = tsos->measurementOnTrack();
81  if (!meas || tsos->type(Trk::TrackStateOnSurface::Outlier)) continue;
82  rots.push_back(meas->clone());
83 
84  // only consider eta hits
85  Identifier id = m_edmHelperSvc->getIdentifier(*meas);
86  if (!id.is_valid() || m_idHelperSvc->measuresPhi(id)) continue;
87 
88  double distance = (pars->position() - perigee->position()).dot(dir);
89  double weight = 1. / meas->localCovariance()(Trk::locX, Trk::locX);
90  ATH_MSG_VERBOSE(" distance " << distance << " error " << Amg::error(meas->localCovariance(), Trk::locX) << " weight " << weight
91  << " " << m_idHelperSvc->toString(id));
92  weightedDistanceSquared += distance * weight;
93  weightSquared += weight;
94  if (m_idHelperSvc->isMdt(id)) {
95  chIds.insert(m_idHelperSvc->chamberId(id));
96  if (!surfaceTransform) {
97  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(meas);
98  if (mdt) {
99  // create new surface using AMDB reference frame
100  surfaceTransformToBeDeleted = std::make_unique<Amg::Transform3D>(mdt->detectorElement()->AmdbLRSToGlobalTransform().rotation());
101  surfaceTransformToBeDeleted->pretranslate(mdt->detectorElement()->center());
102  surfaceTransform = surfaceTransformToBeDeleted.get();
103  }
104  }
105  } else if ((m_idHelperSvc->isMM(id) || m_idHelperSvc->isCsc(id)) && !surfaceTransform) {
106  surfaceTransform = &(meas)->associatedSurface().transform();
107  } else if (!surfaceTransform && !backupTransform) {
108  backupTransform = &(meas)->associatedSurface().transform();
109  }
110  }
111  if (!surfaceTransform) surfaceTransform = backupTransform;
112  // calculate distance new reference point, shift it 100 mm towards the start of the segment
113  double refDistance = (weightSquared > 0 ? weightedDistanceSquared / weightSquared : 1) - 100;
114  ATH_MSG_DEBUG(" weighted distance " << refDistance);
115 
116  const Amg::Vector3D refPos = perigee->position() + refDistance * dir;
117 
118  // find closest measured parameters
119  double minDist = -1e6;
120  const Trk::TrackParameters* closestPars = nullptr;
121  for (const Trk::TrackStateOnSurface* tsos : *states) {
122  // require TrackParameters
123  const Trk::TrackParameters* pars = tsos->trackParameters();
124  if (!pars || !pars->covariance()) continue;
125 
126  // look for the closest measured parameters to the reference point
127  double distance = (pars->position() - refPos).dot(dir);
128  if (distance < 0 && std::abs(distance) < std::abs(minDist)) {
129  minDist = distance;
130  closestPars = pars;
131  }
132  }
133 
134  if (!surfaceTransform) {
135  ATH_MSG_DEBUG(" failed to create a PlaneSurface for the track, cannot make segment!!! " << std::endl
136  << m_printer->print(track)
137  << std::endl
138  << m_printer->printStations(track));
139  return nullptr;
140  }
141 
142  if (!closestPars) {
143  closestPars = perigee;
144  minDist = (perigee->position() - refPos).dot(dir);
145  }
146 
147  Amg::Transform3D transform(surfaceTransform->rotation());
148  transform.pretranslate(refPos);
149  constexpr double surfDim = 500.;
150  std::unique_ptr<Trk::PlaneSurface> surf = std::make_unique<Trk::PlaneSurface>(transform, surfDim, surfDim);
151  std::unique_ptr<Trk::TrackParameters> exPars = m_propagator->propagate(ctx, *closestPars, *surf, minDist > 0 ? Trk::oppositeMomentum : Trk::alongMomentum, false,
153  if (!exPars || !exPars->covariance()) {
154  ATH_MSG_VERBOSE("First trial reaching the surface failed. This is presumably due to a too large momentum. Let's try with a dummy 1 GeV momentum");
155  std::unique_ptr<Trk::TrackParameters> cloned_pars {closestPars->clone()};
156  constexpr double OneOverGeV = 1./ Gaudi::Units::GeV;
157  cloned_pars->parameters()[Trk::qOverP] = cloned_pars->charge() *OneOverGeV;
158  exPars = m_propagator->propagate(ctx, *cloned_pars, *surf, Trk::anyDirection, false,
160 
161  if (!exPars){
162  ATH_MSG_DEBUG(" propagation failed!!! "<<*cloned_pars<<std::endl<<std::endl<<*surf);
163  return nullptr;
164  }
165  exPars->parameters()[Trk::qOverP] = closestPars->parameters()[Trk::qOverP];
166  }
168  if (!surf->globalToLocal(exPars->position(), exPars->momentum(), locPos)) {
169  ATH_MSG_WARNING(" localToGlobal failed!!! ");
170  return nullptr;
171  }
173  surf->globalToLocalDirection(exPars->momentum(), locDir);
174 
175  // convert errors on global angles theta/phi to errors on local angles angleYZ/angleXZ
176  Trk::JacobianPhiThetaLocalAngles globalToLocalMeasAnglesJacobian(exPars->parameters()[Trk::phi], exPars->parameters()[Trk::theta],
177  exPars->associatedSurface().transform().rotation().inverse());
178 
179  // make the Jacobian to convert all in one go from global to local
180  // so that the correlations are calculated correctly
181  AmgSymMatrix(5) globalToLocalMeasJacobian{AmgSymMatrix(5)::Zero()};
182  globalToLocalMeasJacobian(Trk::locX, Trk::locX) = 1.0;
183  globalToLocalMeasJacobian(Trk::locY, Trk::locY) = 1.0;
184  globalToLocalMeasJacobian(Trk::phi, Trk::phi) = globalToLocalMeasAnglesJacobian(0, 0);
185  globalToLocalMeasJacobian(Trk::theta, Trk::theta) = globalToLocalMeasAnglesJacobian(1, 1);
186  globalToLocalMeasJacobian(Trk::theta, Trk::phi) = globalToLocalMeasAnglesJacobian(0, 1); // also fills (Trk::phi,Trk::theta)
187  globalToLocalMeasJacobian(Trk::phi, Trk::theta) = globalToLocalMeasJacobian(Trk::theta, Trk::phi); // also fills (Trk::theta,Trk::phi)
188  globalToLocalMeasJacobian(Trk::qOverP, Trk::qOverP) = 1.0;
189 
190  AmgSymMatrix(5) cov = exPars->covariance()->similarity(globalToLocalMeasJacobian);
191 
192  Trk::FitQuality* quality = nullptr;
193  if (!chIds.empty()) {
194  // calculate holes
195  std::vector<Identifier> holes;
196  for (const Identifier& chid : chIds) {
197  std::vector<Identifier> holesChamber = calculateHoles(ctx, chid, *exPars, rots.stdcont());
198  holes.insert(holes.end(), holesChamber.begin(), holesChamber.end());
199  }
200  quality = new MuonSegmentQuality(fq->chiSquared(), fq->numberDoF(), holes);
201 
202  } else {
203  quality = new Trk::FitQuality(fq->chiSquared(), fq->numberDoF());
204  }
205  MuonSegment* seg = new MuonSegment(
206  locPos, locDir, cov, surf.release(), std::move(rots), quality);
207  return seg;
208  }

◆ 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 Muon::MuonTrackToSegmentTool::initialize ( )

initialize method, method taken from bass-class AlgTool

Definition at line 27 of file MuonTrackToSegmentTool.cxx.

27  {
28  ATH_CHECK(m_propagator.retrieve());
29  ATH_CHECK(m_idHelperSvc.retrieve());
30  ATH_CHECK(m_edmHelperSvc.retrieve());
31  ATH_CHECK(m_printer.retrieve());
33  return StatusCode::SUCCESS;
34  }

◆ 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()

const InterfaceID & Muon::IMuonTrackToSegmentTool::interfaceID ( )
inlinestaticinherited

access to tool interface

Definition at line 32 of file IMuonTrackToSegmentTool.h.

32 { return IID_IMuonTrackToSegmentTool; }

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

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

Definition at line 71 of file MuonTrackToSegmentTool.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<IMuonEDMHelperSvc> Muon::MuonTrackToSegmentTool::m_edmHelperSvc
private
Initial value:
{
this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}

Definition at line 63 of file MuonTrackToSegmentTool.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_idHelperSvc

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

Definition at line 62 of file MuonTrackToSegmentTool.h.

◆ m_printer

PublicToolHandle<MuonEDMPrinterTool> Muon::MuonTrackToSegmentTool::m_printer
private
Initial value:
{this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
"helper to nicely print out tracks"}

Definition at line 67 of file MuonTrackToSegmentTool.h.

◆ m_propagator

ToolHandle<Trk::IPropagator> Muon::MuonTrackToSegmentTool::m_propagator {this, "Propagator", "Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"}
private

Definition at line 69 of file MuonTrackToSegmentTool.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.
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Trk::PlaneSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
Definition: PlaneSurface.cxx:213
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition: trapping_fp.h:24
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
Muon::MuonTrackToSegmentTool::m_propagator
ToolHandle< Trk::IPropagator > m_propagator
Definition: MuonTrackToSegmentTool.h:69
Trk::MeasurementBase::clone
virtual MeasurementBase * clone() const =0
Pseudo-Constructor.
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::oppositeMomentum
@ oppositeMomentum
Definition: PropDirection.h:21
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
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::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::MuonSegment
MuonSegment_v1 MuonSegment
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/MuonSegment.h:13
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
similarity
Matrix< Scalar, OtherDerived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime > similarity(const MatrixBase< OtherDerived > &m) const
similarity method : yields ms = m*s*m^T
Definition: AmgMatrixBasePlugin.h:133
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonGM::MuonDetectorManager::getMdtReadoutElement
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:204
beamspotman.n
n
Definition: beamspotman.py:731
Trk::theta
@ theta
Definition: ParamDefs.h:66
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
urldecode::states
states
Definition: urldecode.h:39
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Muon::MuonTrackToSegmentTool::m_chamberGeoKey
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > m_chamberGeoKey
Definition: MuonTrackToSegmentTool.h:71
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::PlaneSurface::globalToLocalDirection
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
Definition: PlaneSurface.cxx:260
Muon::MuonTrackToSegmentTool::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuonTrackToSegmentTool.h:67
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
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
DataVector< const Trk::MeasurementBase >
Trk::LocalDirection
represents the three-dimensional global direction with respect to a planar surface frame.
Definition: LocalDirection.h:81
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
beamspotman.dir
string dir
Definition: beamspotman.py:623
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
Muon::MuonTrackToSegmentTool::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonTrackToSegmentTool.h:63
Trk::NoField
@ NoField
Field is set to 0., 0., 0.,.
Definition: MagneticFieldMode.h:18
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
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:221
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
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.copyTCTOutput.locDir
locDir
Definition: copyTCTOutput.py:113
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Trk::JacobianPhiThetaLocalAngles
Definition: JacobianPhiThetaLocalAngles.h:32
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
Definition: GeoPrimitivesHelpers.h:325
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Muon::MuonTrackToSegmentTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonTrackToSegmentTool.h:62
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::phi
@ phi
Definition: ParamDefs.h:75
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.Dumpers.FitQuality
FitQuality
Definition: Dumpers.py:63
Muon::MuonTrackToSegmentTool::calculateHoles
std::vector< Identifier > calculateHoles(const EventContext &ctx, const Identifier &chid, const Trk::TrackParameters &pars, const MeasVec &measurements) const
calculate holes
Definition: MuonTrackToSegmentTool.cxx:210
fitman.k
k
Definition: fitman.py:528
Trk::ParametersBase::clone
virtual ParametersBase< DIM, T > * clone() const override=0
clone method for polymorphic deep copy
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14