ATLAS Offline Software
MuonSystemExtensionTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
17 
18 namespace{
19  template <class T>
20  std::string to_string(const std::vector<T>& v) {
21  std::stringstream ostr{};
22  ostr<<"{";
23  for (auto x: v)ostr<<x<<", ";
24  ostr<<"}";
25  return ostr.str();
26  }
28  double pathAlongPars(const Trk::TrackParameters& pars, const Amg::Vector3D& pos) {
29  const Amg::Vector3D parDir{pars.momentum().unit()};
30  return (pars.position().dot(parDir) > 0 ? 1 : -1) * (parDir.dot(pos));
31  }
32 }
33 namespace Muon {
34 
35 
36 
37 
38  MuonSystemExtensionTool::MuonSystemExtensionTool(const std::string& type, const std::string& name, const IInterface* parent) :
40  declareInterface<IMuonSystemExtensionTool>(this);
41  }
42 
44  ATH_CHECK(m_caloExtensionTool.retrieve());
45  ATH_CHECK(m_extrapolator.retrieve());
46  ATH_CHECK(m_idHelperSvc.retrieve());
47  if (!initializeGeometry()) return StatusCode::FAILURE;
48 
49  return StatusCode::SUCCESS;
50  }
51 
53  // initialize reference surfaces hash vectors per region and sector
54 
55  // first build the barrel, we need different reference planes for all sectors
56  ATH_MSG_DEBUG("Initializing barrel ");
57  for (unsigned int sector = 1; sector <= 16; ++sector) {
58  // get rotation into sector frame
59  double sectorPhi = m_sectorMapping.sectorPhi(sector);
60  const Amg::Transform3D sectorRotation(Amg::getRotateZ3D(sectorPhi));
61  if (!initializeGeometryBarrel(sector, sectorRotation)) return false;
62  if (!initializeGeometryEndcap(sector, MuonStationIndex::EndcapA, sectorRotation)) return false;
63  if (!initializeGeometryEndcap(sector, MuonStationIndex::EndcapC, sectorRotation)) return false;
64  }
65 
66  return true;
67  }
68 
70  const Amg::Transform3D& sectorRotation) {
71  ATH_MSG_DEBUG("Initializing endcap: sector " << sector << " " << MuonStationIndex::regionName(regionIndex));
72 
73  SurfaceVec& surfaces = m_referenceSurfaces[regionIndex][sector - 1];
74  MuonChamberLayerDescription chamberLayerDescription;
75 
76  static const std::vector<MuonStationIndex::StIndex> layers = {MuonStationIndex::EI, MuonStationIndex::EE, MuonStationIndex::EM,
78 
79  for (const MuonStationIndex::StIndex& stLayer : layers) {
80  // calculate reference position from radial position of the layer
82  MuonChamberLayerDescriptor layerDescriptor = chamberLayerDescription.getDescriptor(sector, regionIndex, layer);
83  // reference transform + surface
84  Amg::Transform3D trans{Amg::getTranslateZ3D(layerDescriptor.referencePosition) *sectorRotation}; //*Amg::AngleAxis3D(xToZRotation,Amg::Vector3D(0.,1.,0.)
85  std::unique_ptr<Trk::PlaneSurface> surface = std::make_unique<Trk::PlaneSurface>(trans);
86  // sanity checks
87  if (msgLvl(MSG::VERBOSE)) {
88  ATH_MSG_VERBOSE("initializeGeometryEndcap() -- sector " << sector << " layer " << MuonStationIndex::layerName(layer) << " surface "
89  <<Amg::toString(surface->transform())
90  << " center " << Amg::toString(surface->center()) << " theta " << surface->normal().theta()
91  << " normal: " <<Amg::toString(surface->normal()));
92 
93 
94  }
95 
96  MuonLayerSurface data(std::move(surface), sector, regionIndex, layer);
97  surfaces.push_back(std::move(data));
98 
99 
100  }
101  ATH_MSG_VERBOSE(" Total number of surfaces " << surfaces.size());
102  return true;
103  }
104 
105  bool MuonSystemExtensionTool::initializeGeometryBarrel(int sector, const Amg::Transform3D& sectorRotation) {
106  MuonChamberLayerDescription chamberLayerDescription;
107 
109  constexpr double xToZRotation = -M_PI_2;
110 
111  for (unsigned int stationLayer = MuonStationIndex::BI; stationLayer <= MuonStationIndex::BE; ++stationLayer) {
112  // skip BEE if in small sectors, not installed
113  if (stationLayer == MuonStationIndex::BE && m_sectorMapping.isSmall(sector)) continue;
114 
115  // calculate reference position from radial position of the laeyr
117  MuonChamberLayerDescriptor layerDescriptor = chamberLayerDescription.getDescriptor(sector, MuonStationIndex::Barrel, layer);
118  Amg::Vector3D positionInSector(layerDescriptor.referencePosition, 0., 0.);
119  Amg::Vector3D globalPosition = sectorRotation * positionInSector;
120 
121  // reference transform + surface
122  Amg::Transform3D trans(sectorRotation * Amg::getRotateY3D(xToZRotation));
123  trans.pretranslate(globalPosition);
124  std::unique_ptr<Trk::PlaneSurface> surface = std::make_unique<Trk::PlaneSurface>(trans);
125  // sanity checks
126  if (msgLvl(MSG::VERBOSE)) {
127  double sectorPhi = m_sectorMapping.sectorPhi(sector);
128  ATH_MSG_VERBOSE(" sector " << sector << " layer " << MuonStationIndex::layerName(layer) << " phi " << sectorPhi
129  << " ref theta " << globalPosition.theta() << " phi " << globalPosition.phi() << " r "
130  << globalPosition.perp() << " pos " << Amg::toString(globalPosition)
131  << " lpos3d " << Amg::toString(surface->transform().inverse() * globalPosition)
132  << " normal: " << Amg::toString(surface->normal()));
133  }
134  MuonLayerSurface data(std::move(surface), sector, MuonStationIndex::Barrel, layer);
135  surfaces.push_back(std::move(data));
136 
137 
138  }
139  return true;
140  }
141 
142  bool MuonSystemExtensionTool::muonSystemExtension(const EventContext& ctx, SystemExtensionCache& cache) const {
144  if (!cache.candidate->getCaloExtension()) {
145  if (!cache.extensionContainer) {
146  std::unique_ptr<Trk::CaloExtension> caloExtension =
147  m_caloExtensionTool->caloExtension(ctx, cache.candidate->indetTrackParticle());
148  if (!caloExtension || !caloExtension->muonEntryLayerIntersection()) {
149  ATH_MSG_VERBOSE("Failed to create the calo extension for "<<cache.candidate->toString());
150  return false;
151  }
152  cache.candidate->setExtension(caloExtension);
153  } else {
154  const Trk::CaloExtension* caloExtension = m_caloExtensionTool->caloExtension(cache.candidate->indetTrackParticle(),
155  *cache.extensionContainer);
156  if (!caloExtension || !caloExtension->muonEntryLayerIntersection()) {
157  ATH_MSG_VERBOSE("Failed to create the calo extension for "<<cache.candidate->toString());
158  return false;
159  }
160  cache.candidate->setExtension(caloExtension);
161  }
162  }
163 
164  if (!cache.createSystemExtension) {
165  ATH_MSG_VERBOSE("No system extension is required for "<<cache.candidate->toString());
166  return true;
167  }
168  // get entry parameters, use it as current parameter for the extrapolation
169  const Trk::TrackParameters* currentPars = cache.candidate->getCaloExtension()->muonEntryLayerIntersection();
170 
171  // get reference surfaces
172  ATH_MSG_VERBOSE(" getSurfacesForIntersection " << currentPars);
173  SurfaceVec surfaces = getSurfacesForIntersection(*currentPars, cache);
174 
175  // store intersections
176  std::vector<MuonSystemExtension::Intersection> intersections;
177 
178  // garbage collection
179  std::vector<std::shared_ptr<Trk::TrackParameters> > trackParametersVec;
180 
181  // loop over reference surfaces
182  for (const Muon::MuonLayerSurface& it : surfaces) {
183  // extrapolate to next layer
184  const Trk::Surface& surface = *it.surfacePtr;
185  ATH_MSG_VERBOSE(" startPars: "<<m_printer->print(*currentPars));
186  ATH_MSG_VERBOSE(" destination: sector " << it.sector << " " << MuonStationIndex::regionName(it.regionIndex) << " "
187  << MuonStationIndex::layerName(it.layerIndex) << " phi " << surface.center().phi()
188  << " r " << surface.center().perp() << " z " << surface.center().z());
189 
190  std::unique_ptr<Trk::TrackParameters> exPars{m_extrapolator->extrapolate(ctx, *currentPars, surface,
191  Trk::alongMomentum, false, Trk::muon)};
192  if (!exPars) {
193  ATH_MSG_VERBOSE("extrapolation failed, trying next layer ");
194  continue;
195  }
196  ATH_MSG_DEBUG("Extrapolated in event "<<ctx.eventID().event_number()<<" track @ "<<m_printer->print(*exPars));
197 
198  // reject intersections with very big uncertainties (parallel to surface)
199  const double sigma_lx = Amg::error(*exPars->covariance(), Trk::locX);
200  const double sigma_ly = Amg::error(*exPars->covariance(), Trk::locY);
201  if (!Amg::hasPositiveDiagElems(*exPars->covariance()) || std::max(sigma_lx, sigma_ly) > 1. * Gaudi::Units::meter){
202  ATH_MSG_DEBUG("Reject bad extrapolation "<<m_printer->print(*exPars));
203  continue;
204  }
205 
206  // create shared pointer and add to garbage collection
207  std::shared_ptr<Trk::TrackParameters> sharedPtr{std::move(exPars)};
208  trackParametersVec.emplace_back(sharedPtr);
209 
210  intersections.emplace_back(sharedPtr, it);
211  constexpr double TenCm = 10. * Gaudi::Units::cm;
212  if(std::hypot(sigma_lx, sigma_ly) < std::max(TenCm, 10. * std::hypot(Amg::error(*currentPars->covariance(), Trk::locX),
213  Amg::error(*currentPars->covariance(), Trk::locY)))) {
214  // only update the parameters if errors don't blow up
215  currentPars = sharedPtr.get();
216  } else {
217  ATH_MSG_DEBUG("Extrapolation reached at "<<m_printer->print(*sharedPtr)<<" has larger uncertainties than "<<
218  m_printer->print(*currentPars));
219  }
220  }
221  ATH_MSG_DEBUG("Completed extrapolation: destinations " << surfaces.size() << " intersections " << intersections.size());
222  if (intersections.empty()){
223  ATH_MSG_DEBUG("No system extensions are made for "<<cache.candidate->toString()
224  <<" will accept the candidate: "<< (!cache.requireSystemExtension ? "si": "no"));
225  return !cache.requireSystemExtension;
226  }
227  cache.candidate->setExtension(std::make_unique<MuonSystemExtension>(cache.candidate->getCaloExtension()->muonEntryLayerIntersection(),
228  std::move(intersections)));
229  return true;
230  }
232  const SystemExtensionCache& cache) const {
233  // if in endcaps pick endcap surfaces
234  const double eta = muonEntryPars.position().eta();
236  if (eta < -1.05) regionIndex = MuonStationIndex::EndcapC;
237  if (eta > 1.05) regionIndex = MuonStationIndex::EndcapA;
238 
239  // in barrel pick primary sector
240  const double phi = muonEntryPars.position().phi();
241  std::vector<int> sectors;
242  m_sectorMapping.getSectors(phi, sectors);
243  SurfaceVec surfaces;
245  if (cache.useHitSectors) {
246  const auto map_itr = cache.sectorsWithHits->find(regionIndex);
247  if (map_itr == cache.sectorsWithHits->end()) {
248  ATH_MSG_DEBUG("No hits in detector region " << Muon::MuonStationIndex::regionName(regionIndex));
249  return surfaces;
250  }
251  std::vector<int>::const_iterator sec_itr = std::find_if(
252  sectors.begin(), sectors.end(), [&map_itr](const int& sector) -> bool { return map_itr->second.count(sector); });
253  if (sec_itr == sectors.end()) {
254  ATH_MSG_DEBUG("No hits found for sector " << m_sectorMapping.getSector(phi) << " in MuonStation "
255  << Muon::MuonStationIndex::regionName(regionIndex));
256  return surfaces;
257  }
258  }
259 
260  for (const int sector : sectors) {
261  surfaces.insert(surfaces.end(), m_referenceSurfaces[regionIndex][sector - 1].begin(),
262  m_referenceSurfaces[regionIndex][sector - 1].end());
263  }
264  std::stable_sort(surfaces.begin(), surfaces.end(),
265  [&muonEntryPars](const MuonLayerSurface& s1, const MuonLayerSurface& s2) {
266  return std::abs(pathAlongPars(muonEntryPars,s1.surfacePtr->center())) <
267  std::abs(pathAlongPars(muonEntryPars,s2.surfacePtr->center()));
268 
269  });
270  if (msgLvl(MSG::VERBOSE)) {
271  for (auto& s1 : surfaces) {
272  ATH_MSG_VERBOSE("Surface "<<Muon::MuonStationIndex::layerName(s1.layerIndex)
273  <<", center: "<<Amg::toString(s1.surfacePtr->center())
274  <<", pathAlongPars "<<pathAlongPars(muonEntryPars,s1.surfacePtr->center())
275  <<std::endl<<(*s1.surfacePtr));
276 
277  }
278  }
279  return surfaces;
280  }
282  const MuonCombined::TagBase& cmbTag,
283  SystemExtensionCache& cache) const{
284 
285  const Trk::Track* cmbTrk = cmbTag.primaryTrack();
286  if (!cmbTrk){
287  ATH_MSG_WARNING("A combined tag without any track? Please check "<<cmbTag.toString());
288  return false;
289  }
291  const Trk::TrackParameters* entryPars = cache.candidate->getCaloExtension()->muonEntryLayerIntersection();
292  std::vector<const Trk::TrackStateOnSurface*> cmbParVec{};
293 
294  ATH_MSG_VERBOSE("Calo entry parameters "<<m_printer->print(*entryPars));
295  std::vector<Muon::MuonSystemExtension::Intersection> intersections{};
296  Muon::MuonLayerSurface lastSurf{};
297 
298  const Trk::TrackStates::const_iterator end_itr = cmbTrk->trackStateOnSurfaces()->end();
299  for (Trk::TrackStates::const_iterator itr = cmbTrk->trackStateOnSurfaces()->begin(); itr != end_itr; ++itr) {
300  const Trk::TrackStateOnSurface* msTSOS{*itr};
301  ATH_MSG_VERBOSE("Track state "<<m_printer->print(*msTSOS));
302 
303  if (!msTSOS->measurementOnTrack()) {
304  continue;
305  }
306  const Identifier measId = m_edmHelperSvc->getIdentifier(*msTSOS->measurementOnTrack());
307  const Trk::TrackParameters& msPars{*msTSOS->trackParameters()};
309  if (!m_idHelperSvc->isMuon(measId) || pathAlongPars(msPars, msPars.position() - entryPars->position())< 0.){
310  continue;
311  }
312 
313  Muon::MuonStationIndex::DetectorRegionIndex regionIdx = m_idHelperSvc->regionIndex(measId);
314  Muon::MuonStationIndex::LayerIndex layerIdx = m_idHelperSvc->layerIndex(measId);
315  if (layerIdx == Muon::MuonStationIndex::BarrelExtended) {
318  }
319 
320  const int sector = m_sectorMapping.getSector(msTSOS->measurementOnTrack()->associatedSurface().center().phi());
321 
323  if (lastSurf.layerIndex == layerIdx && lastSurf.regionIndex == regionIdx && lastSurf.sector == sector) {
324  continue;
325  }
326  const SurfaceVec& refSurfaces = m_referenceSurfaces[regionIdx][sector - 1];
327  SurfaceVec::const_iterator surfItr = std::find_if(refSurfaces.begin(), refSurfaces.end(),
328  [&layerIdx](const MuonLayerSurface& surf){
329  return surf.layerIndex == layerIdx;
330  });
331  if (surfItr == refSurfaces.end()) {
332  ATH_MSG_WARNING("Failed to find a reference surface matching to combined parameters "<<m_printer->print(*msTSOS)
333  <<", sector: "<<sector <<", layer: "<<Muon::MuonStationIndex::layerName(layerIdx)
334  <<", region index: "<<Muon::MuonStationIndex::regionName(regionIdx));
335  continue;
336  }
337  lastSurf = (*surfItr);
338  const Trk::Surface& target{*lastSurf.surfacePtr};
339 
341  for (Trk::TrackStates::const_iterator closePars = itr+1; closePars != end_itr; ++closePars) {
342  const Trk::TrackStateOnSurface * tsosInChamb{*closePars};
343  if (!tsosInChamb->measurementOnTrack()) continue;
344 
345  const Trk::TrackParameters& chPars{*tsosInChamb->trackParameters()};
346  if (std::abs(pathAlongPars(chPars, chPars.position() - target.center())) >
347  std::abs(pathAlongPars(*msTSOS->trackParameters(),
348  msTSOS->trackParameters()->position() - target.center()))) {
349  break;
350  }
351  itr = closePars -1;
352  msTSOS = *itr;
353  }
354 
355  std::unique_ptr<Trk::TrackParameters> exPars{m_extrapolator->extrapolate(ctx, *msTSOS->trackParameters(),
357  if (!exPars) {
358  ATH_MSG_VERBOSE(__LINE__<<" - Failed to extrapolate track @ "<<m_printer->print(*msTSOS)
359  <<", sector: "<<sector
360  <<", layer: "<<Muon::MuonStationIndex::layerName(layerIdx)
361  <<", region index: "<<Muon::MuonStationIndex::regionName(regionIdx)
362  <<" to surface "<<std::endl<<target<<std::endl
363  <<", sector: "<<lastSurf.sector
364  <<", layer: "<<Muon::MuonStationIndex::layerName(lastSurf.layerIndex)
365  <<", region index: "<<Muon::MuonStationIndex::regionName(lastSurf.regionIndex)
366  <<" pathAlongPars "<<pathAlongPars(*msTSOS->trackParameters(), target.center())
367  <<", dir: "<<Amg::toString(msTSOS->trackParameters()->momentum().unit()));
368  continue;
369  }
370  intersections.emplace_back(std::move(exPars), lastSurf);
371 
372  }
373 
374  ATH_MSG_VERBOSE("Selected "<<intersections.size()<<" intersections");
375 
376  if (intersections.empty()) {
377  ATH_MSG_DEBUG("Failed to find the intersections for the combined track");
378  return false;
379  }
380  cache.candidate->setExtension(std::make_unique<MuonSystemExtension>(entryPars, std::move(intersections)));
381 
382  return true;
383  }
384 } // namespace Muon
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonStationIndex::BE
@ BE
Definition: MuonStationIndex.h:25
Muon::IMuonSystemExtensionTool::SystemExtensionCache::sectorsWithHits
const std::map< MuonStationIndex::DetectorRegionIndex, std::set< int > > * sectorsWithHits
Cache the sectors which have a recorded hit.
Definition: IMuonSystemExtensionTool.h:47
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
Muon::MuonSystemExtensionTool::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonSystemExtensionTool.h:69
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::MuonStationIndex::BarrelExtended
@ BarrelExtended
EE.
Definition: MuonStationIndex.h:42
Muon::MuonStationIndex::EndcapA
@ EndcapA
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::Inner
@ Inner
Definition: MuonStationIndex.h:40
Trk::locX
@ locX
Definition: ParamDefs.h:37
Muon::MuonChamberLayerDescriptor
struct containing all information to build a Hough transform for a given chamber index
Definition: MuonChamberLayerDescriptor.h:13
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Muon::MuonSystemExtensionTool::initialize
StatusCode initialize() override
Definition: MuonSystemExtensionTool.cxx:43
Muon::MuonSystemExtensionTool::initializeGeometryEndcap
bool initializeGeometryEndcap(int sector, MuonStationIndex::DetectorRegionIndex regionIndex, const Amg::Transform3D &sectorRotation)
Definition: MuonSystemExtensionTool.cxx:69
Trk::CaloExtension
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Definition: CaloExtension.h:18
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Muon::MuonStationIndex::EO
@ EO
Definition: MuonStationIndex.h:26
Muon::IMuonSystemExtensionTool::SystemExtensionCache::candidate
std::unique_ptr< MuonCombined::InDetCandidate > candidate
Inner detector candidate.
Definition: IMuonSystemExtensionTool.h:44
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
Muon::MuonSystemExtensionTool::getSurfacesForIntersection
SurfaceVec getSurfacesForIntersection(const Trk::TrackParameters &muonEntryPars, const SystemExtensionCache &cache) const
get surfaces to be intersected for a given start parameters
Definition: MuonSystemExtensionTool.cxx:231
Muon::MuonSectorMapping::getSectors
void getSectors(double phi, std::vector< int > &sectors) const
returns the main sector plus neighboring if the phi position is in an overlap region
Definition: MuonSectorMapping.h:97
EventPrimitivesHelpers.h
Amg::getTranslateZ3D
Amg::Transform3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
Definition: GeoPrimitivesHelpers.h:285
Muon::MuonSystemExtensionTool::m_sectorMapping
MuonSectorMapping m_sectorMapping
sector mapping helper
Definition: MuonSystemExtensionTool.h:77
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MuonChamberLayerDescription::getDescriptor
MuonChamberLayerDescriptor getDescriptor(int sector, Muon::MuonStationIndex::DetectorRegionIndex region, Muon::MuonStationIndex::LayerIndex layer) const
Definition: MuonChamberLayerDescription.cxx:13
Muon::IMuonSystemExtensionTool::SystemExtensionCache::requireSystemExtension
bool requireSystemExtension
Require that the muon system extension was successful.
Definition: IMuonSystemExtensionTool.h:56
Muon::MuonSystemExtensionTool::initializeGeometry
bool initializeGeometry()
initialize geometry
Definition: MuonSystemExtensionTool.cxx:52
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
MuonCombined::TagBase::primaryTrack
virtual const Trk::Track * primaryTrack() const
access to primary muon system track, zero if non available
Definition: TagBase.h:89
Muon::IMuonSystemExtensionTool::SystemExtensionCache::extensionContainer
const CaloExtensionCollection * extensionContainer
Cache of the CaloExtensions.
Definition: IMuonSystemExtensionTool.h:49
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MuonSystemExtensionTool::initializeGeometryBarrel
bool initializeGeometryBarrel(int sector, const Amg::Transform3D &sectorRotation)
Definition: MuonSystemExtensionTool.cxx:105
Trk::CaloExtension::muonEntryLayerIntersection
const TrackParameters * muonEntryLayerIntersection() const
access to intersection with the muon entry layer return NULL if the intersection failed
Definition: CaloExtension.h:70
x
#define x
Muon::MuonChamberLayerDescription
class managing geometry of the chamber layers
Definition: MuonChamberLayerDescription.h:15
Muon::MuonSystemExtensionTool::muonSystemExtension
bool muonSystemExtension(const EventContext &ctx, SystemExtensionCache &cache) const override
get muon system extension
Definition: MuonSystemExtensionTool.cxx:142
Muon::MuonSectorMapping::getSector
int getSector(double phi) const
returns the sector corresponding to the phi position
Definition: MuonSectorMapping.h:86
DetType::Barrel
@ Barrel
Definition: DetType.h:14
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
Muon::MuonSystemExtensionTool::SurfaceVec
std::vector< MuonLayerSurface > SurfaceVec
Definition: MuonSystemExtensionTool.h:34
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
Muon::MuonStationIndex::regionName
static const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:176
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
python.SystemOfUnits.meter
int meter
Definition: SystemOfUnits.py:61
Muon::MuonSystemExtensionTool::MuonSystemExtensionTool
MuonSystemExtensionTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
Definition: MuonSystemExtensionTool.cxx:38
Muon::MuonChamberLayerDescriptor::referencePosition
float referencePosition
Definition: MuonChamberLayerDescriptor.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::IMuonSystemExtensionTool::SystemExtensionCache::createSystemExtension
bool createSystemExtension
Try to create the muon system extension.
Definition: IMuonSystemExtensionTool.h:54
Muon::MuonLayerSurface
types
Definition: MuonLayerSurface.h:15
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonStationIndex::Barrel
@ Barrel
Definition: MuonStationIndex.h:49
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::Surface::normal
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
Muon::MuonSectorMapping::sectorPhi
double sectorPhi(int sector) const
returns the centeral phi position of a sector in radians
Definition: MuonSectorMapping.h:81
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonStationIndex::layerName
static const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:192
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
Muon::MuonStationIndex::toLayerIndex
static LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
Definition: MuonStationIndex.cxx:56
InDetCandidate.h
Muon::MuonSectorMapping::isSmall
static bool isSmall(int sector)
Definition: MuonSectorMapping.h:34
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
MuonSystemExtension.h
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
MuonSystemExtensionTool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
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
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
Muon::MuonSystemExtensionTool::m_referenceSurfaces
std::array< std::array< SurfaceVec, 16 >, MuonStationIndex::DetectorRegionIndexMax > m_referenceSurfaces
reference surfaces per region and sector
Definition: MuonSystemExtensionTool.h:74
MuonChamberLayerDescription.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonSystemExtensionTool::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: MuonSystemExtensionTool.h:65
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Muon::IMuonSystemExtensionTool::SystemExtensionCache
Helper struct to pipe all data needed by the tool to equip the Id track with a MuonSystemExtension.
Definition: IMuonSystemExtensionTool.h:41
MuonCombined::TagBase::toString
virtual std::string toString() const =0
print content to string
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.PyAthena.v
v
Definition: PyAthena.py:154
EventPrimitivesCovarianceHelpers.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonSystemExtensionCollection.h
Muon::MuonStationIndex::EndcapC
@ EndcapC
Definition: MuonStationIndex.h:49
copySelective.target
string target
Definition: copySelective.py:37
PlaneSurface.h
GeoPrimitivesHelpers.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TagBase.h
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
GeoPrimitivesToStringConverter.h
Muon::MuonSystemExtensionTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: MuonSystemExtensionTool.h:63
DiscSurface.h
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
Muon::IMuonSystemExtensionTool::SystemExtensionCache::useHitSectors
bool useHitSectors
Switch to restrict the intersection search only to the sectors with hits.
Definition: IMuonSystemExtensionTool.h:52
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Muon::MuonSystemExtensionTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSystemExtensionTool.h:67
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MuonStationIndex::EE
@ EE
Definition: MuonStationIndex.h:26
Muon::MuonSystemExtensionTool::muonLayerInterSections
bool muonLayerInterSections(const EventContext &ctx, const MuonCombined::TagBase &cmb_tag, SystemExtensionCache &cache) const override
Constructs the layer intersections from a primary muon track using the track states in the muon spect...
Definition: MuonSystemExtensionTool.cxx:281
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Muon::MuonSystemExtensionTool::m_caloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
Definition: MuonSystemExtensionTool.h:58
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
MuonCombined::TagBase
base-class for combined reconstruction output Provides access to MuonType and Author
Definition: TagBase.h:48
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Identifier
Definition: IdentifierFieldParser.cxx:14