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 
6 
17 
18 namespace {
19  std::string to_string(const Trk::TrackParameters& pars) {
20  std::stringstream sstr;
21  sstr<<"position: "<<pars.position().x()<<", "<<pars.position().y()<<", "<<pars.position().z()
22  <<" -- momentum: "<<pars.momentum().x()<<", "<<pars.momentum().y()<<", "<<pars.momentum().z()<<" ";
23  if (pars.covariance())
24  sstr<<" -- uncertainties Lx:"<<Amg::error(*pars.covariance(), Trk::locX)<<
25  ", Ly: "<< Amg::error(*pars.covariance(), Trk::locY);
26  return sstr.str();
27  }
28 }
29 
30 namespace Muon {
31 
32  MuonSystemExtensionTool::MuonSystemExtensionTool(const std::string& type, const std::string& name, const IInterface* parent) :
34  declareInterface<IMuonSystemExtensionTool>(this);
35  }
36 
38  ATH_CHECK(m_caloExtensionTool.retrieve());
39  ATH_CHECK(m_extrapolator.retrieve());
40  ATH_CHECK(m_idHelperSvc.retrieve());
41  if (!initializeGeometry()) return StatusCode::FAILURE;
42 
43  return StatusCode::SUCCESS;
44  }
45 
47  // initialize reference surfaces hash vectors per region and sector
50 
51  // first build the barrel, we need different reference planes for all sectors
52  ATH_MSG_DEBUG("Initializing barrel ");
53  for (unsigned int sector = 1; sector <= 16; ++sector) {
54  // get rotation into sector frame
55  double sectorPhi = m_sectorMapping.sectorPhi(sector);
56  Amg::AngleAxis3D sectorRotation(sectorPhi, Amg::Vector3D(0., 0., 1.));
57  if (!initializeGeometryBarrel(sector, sectorRotation)) return false;
58 
59  if (!initializeGeometryEndcap(sector, MuonStationIndex::EndcapA, sectorRotation)) return false;
60  if (!initializeGeometryEndcap(sector, MuonStationIndex::EndcapC, sectorRotation)) return false;
61  }
62 
63  return true;
64  }
65 
67  const Amg::AngleAxis3D& sectorRotation) {
68  ATH_MSG_DEBUG("Initializing endcap: sector " << sector << " " << MuonStationIndex::regionName(regionIndex));
69 
70  SurfaceVec& surfaces = m_referenceSurfaces[regionIndex][sector - 1];
71  MuonChamberLayerDescription chamberLayerDescription;
72 
73  static const std::vector<MuonStationIndex::StIndex> layers = {MuonStationIndex::EI, MuonStationIndex::EE, MuonStationIndex::EM,
75 
76  for (const MuonStationIndex::StIndex& stLayer : layers) {
77  // calculate reference position from radial position of the layer
79  MuonChamberLayerDescriptor layerDescriptor = chamberLayerDescription.getDescriptor(sector, regionIndex, layer);
80  Amg::Vector3D globalPosition(0., 0., layerDescriptor.referencePosition);
81 
82  // reference transform + surface
83  Amg::Transform3D trans(sectorRotation); //*Amg::AngleAxis3D(xToZRotation,Amg::Vector3D(0.,1.,0.)
84  trans.pretranslate(globalPosition);
85 
86  Trk::PlaneSurface* surface = new Trk::PlaneSurface(trans);
87  MuonLayerSurface data(MuonLayerSurface::SurfacePtr(surface), sector, regionIndex, layer);
88  surfaces.push_back(std::move(data));
89 
90  // sanity checks
91  if (msgLvl(MSG::VERBOSE)) {
92  for (unsigned int test = 0; test < 2; ++test) {
93  Amg::Vector3D lpos3d = surface->transform().inverse() * globalPosition;
94  Amg::Vector2D lpos;
95  surface->globalToLocal(globalPosition, globalPosition, lpos);
96 
97  ATH_MSG_VERBOSE(" sector " << sector << " layer " << MuonStationIndex::layerName(layer) << " hit x "
98  << globalPosition.x() << " hit z " << globalPosition.z() << " lpos3d " << lpos3d.x() << " "
99  << lpos3d.y() << " " << lpos3d.z() << " lpos " << lpos[Trk::loc1] << " " << lpos[Trk::loc2]
100  << " center " << surface->center().z() << " normal: phi " << surface->normal().phi()
101  << " theta " << surface->normal().theta() << " normal: x " << surface->normal().x() << " y "
102  << surface->normal().y() << " z " << surface->normal().z());
103  globalPosition[0] += 100;
104  }
105  }
106  }
107  ATH_MSG_VERBOSE(" Total number of surfaces " << surfaces.size());
108  return true;
109  }
110 
111  bool MuonSystemExtensionTool::initializeGeometryBarrel(int sector, const Amg::AngleAxis3D& sectorRotation) {
112  MuonChamberLayerDescription chamberLayerDescription;
113 
115  constexpr double xToZRotation = -M_PI_2;
116 
117  for (unsigned int stationLayer = MuonStationIndex::BI; stationLayer <= MuonStationIndex::BE; ++stationLayer) {
118  // skip BEE if in small sectors, not installed
119  if (stationLayer == MuonStationIndex::BE && MuonStationIndexHelpers::isSmall(sector)) continue;
120 
121  // calculate reference position from radial position of the laeyr
123  MuonChamberLayerDescriptor layerDescriptor = chamberLayerDescription.getDescriptor(sector, MuonStationIndex::Barrel, layer);
124  Amg::Vector3D positionInSector(layerDescriptor.referencePosition, 0., 0.);
125  Amg::Vector3D globalPosition = sectorRotation * positionInSector;
126 
127  // reference transform + surface
128  Amg::Transform3D trans(sectorRotation * Amg::AngleAxis3D(xToZRotation, Amg::Vector3D(0., 1., 0.)));
129  trans.pretranslate(globalPosition);
130  Trk::PlaneSurface* surface = new Trk::PlaneSurface(trans);
131 
133  surfaces.push_back(std::move(data));
134 
135  // sanity checks
136  if (msgLvl(MSG::VERBOSE)) {
137  Amg::Vector3D lpos3d = surface->transform().inverse() * globalPosition;
138  // Amg::Vector3D lpos3d2 = surface->transform().inverse()*globalPosition2;
139  Amg::Vector2D lpos;
140  surface->globalToLocal(globalPosition, globalPosition, lpos);
141  double sectorPhi = m_sectorMapping.sectorPhi(sector);
142 
143  ATH_MSG_VERBOSE(" sector " << sector << " layer " << MuonStationIndex::layerName(layer) << " phi " << sectorPhi
144  << " ref theta " << globalPosition.theta() << " phi " << globalPosition.phi() << " r "
145  << globalPosition.perp() << " pos " << globalPosition.x() << " " << globalPosition.y() << " "
146  << globalPosition.z() << " lpos3d " << lpos3d.x() << " " << lpos3d.y() << " " << lpos3d.z()
147  << " normal: x " << surface->normal().x() << " y " << surface->normal().y() << " z "
148  << surface->normal().z());
149  }
150  }
151  return true;
152  }
153 
154  bool MuonSystemExtensionTool::muonSystemExtension(const EventContext& ctx, SystemExtensionCache& cache) const {
156  if (!cache.candidate->getCaloExtension()) {
157  if (!cache.extensionContainer) {
158  std::unique_ptr<Trk::CaloExtension> caloExtension =
159  m_caloExtensionTool->caloExtension(ctx, cache.candidate->indetTrackParticle());
160  if (!caloExtension || !caloExtension->muonEntryLayerIntersection()) {
161  ATH_MSG_VERBOSE("Failed to create the calo extension for "<<cache.candidate->toString());
162  return false;
163  }
164  cache.candidate->setExtension(caloExtension);
165  } else {
166  const Trk::CaloExtension* caloExtension = m_caloExtensionTool->caloExtension(cache.candidate->indetTrackParticle(),
167  *cache.extensionContainer);
168  if (!caloExtension || !caloExtension->muonEntryLayerIntersection()) {
169  ATH_MSG_VERBOSE("Failed to create the calo extension for "<<cache.candidate->toString());
170  return false;
171  }
172  cache.candidate->setExtension(caloExtension);
173  }
174  }
175 
176  if (!cache.createSystemExtension) {
177  ATH_MSG_VERBOSE("No system extension is required for "<<cache.candidate->toString());
178  return true;
179  }
180  // get entry parameters, use it as current parameter for the extrapolation
181  const Trk::TrackParameters* currentPars = cache.candidate->getCaloExtension()->muonEntryLayerIntersection();
182 
183  // get reference surfaces
184  ATH_MSG_VERBOSE(" getSurfacesForIntersection " << currentPars);
185  SurfaceVec surfaces = getSurfacesForIntersection(*currentPars, cache);
186 
187  // store intersections
188  std::vector<MuonSystemExtension::Intersection> intersections;
189 
190  // garbage collection
191  std::vector<std::shared_ptr<const Trk::TrackParameters> > trackParametersVec;
192 
193  // loop over reference surfaces
194  for (const Muon::MuonLayerSurface& it : surfaces) {
195  // extrapolate to next layer
196  const Trk::Surface& surface = *it.surfacePtr;
197  ATH_MSG_VERBOSE(" startPars: "<<to_string(*currentPars));
198  ATH_MSG_VERBOSE(" destination: sector " << it.sector << " " << MuonStationIndex::regionName(it.regionIndex) << " "
199  << MuonStationIndex::layerName(it.layerIndex) << " phi " << surface.center().phi()
200  << " r " << surface.center().perp() << " z " << surface.center().z());
201 
202  std::unique_ptr<const Trk::TrackParameters> exPars{
203  m_extrapolator->extrapolate(ctx, *currentPars, surface, Trk::alongMomentum, false, Trk::muon)};
204  if (!exPars) {
205  ATH_MSG_VERBOSE("extrapolation failed, trying next layer ");
206  continue;
207  }
208  ATH_MSG_DEBUG("Extrapolated in event "<<ctx.eventID().event_number()<<" track @ "<<to_string(*exPars));
209 
210  // reject intersections with very big uncertainties (parallel to surface)
211  constexpr double TenMeter = 10. * Gaudi::Units::meter;
212  const double sigma_lx = Amg::error(*exPars->covariance(), Trk::locX);
213  const double sigma_ly = Amg::error(*exPars->covariance(), Trk::locY);
214  if (!Amg::hasPositiveDiagElems(*exPars->covariance()) || std::max(sigma_lx, sigma_ly) > TenMeter){
215  ATH_MSG_DEBUG("Reject bad extrapolation "<<to_string(*exPars));
216  continue;
217  }
218 
219  // create shared pointer and add to garbage collection
220  std::shared_ptr<const Trk::TrackParameters> sharedPtr{std::move(exPars)};
221  trackParametersVec.emplace_back(sharedPtr);
222 
224  if (intersection.trackParameters) intersections.push_back(std::move(intersection));
225 
226  constexpr double TenCm = 10. * Gaudi::Units::cm;
227  if(std::hypot(sigma_lx, sigma_ly) < std::max(TenCm, 10. * std::hypot(Amg::error(*currentPars->covariance(), Trk::locX),
228  Amg::error(*currentPars->covariance(), Trk::locY)))) {
229  // only update the parameters if errors don't blow up
230  currentPars = sharedPtr.get();
231  } else {
232  ATH_MSG_DEBUG("Extrapolation reached at "<<to_string(*sharedPtr)<<" has larger uncertainties than "<<
233  to_string(*currentPars));
234  }
235  }
236  ATH_MSG_DEBUG("Completed extrapolation: destinations " << surfaces.size() << " intersections " << intersections.size());
237  if (intersections.empty()){
238  ATH_MSG_DEBUG("No system extensions are made for "<<cache.candidate->toString()
239  <<" will accept the candidate: "<< (!cache.requireSystemExtension ? "si": "no"));
240  return !cache.requireSystemExtension;
241  }
242  cache.candidate->setExtension(
243  std::make_unique<MuonSystemExtension>(cache.candidate->getCaloExtension()->muonEntryLayerIntersection(), std::move(intersections)));
244  return true;
245  }
246  MuonSystemExtension::Intersection MuonSystemExtensionTool::makeInterSection(const std::shared_ptr<const Trk::TrackParameters>& sharedPtr, const MuonLayerSurface& it) const{
247  if (sharedPtr && it.regionIndex != MuonStationIndex::Barrel) {
248  // in the endcaps we need to update the sector and check that we are in the correct sector
249  double phi = sharedPtr->position().phi();
250  std::vector<int> sectors;
251  m_sectorMapping.getSectors(phi, sectors);
252 
253  // loop over sectors, if the surface sector and the sector in the loop are either both large or small, pick
254  // the sector
255  int sector = -1;
256  for (const int& sec : sectors) {
257  if (it.sector % 2 == sec % 2) {
258  sector = sec;
259  break;
260  }
261  }
262  ATH_MSG_DEBUG(" sector " << it.sector << " selected " << sector << " nsectors " << sectors);
263  // only select if we found a matching sector in the set
264  if (sector != -1) {
266  intersection.layerSurface.sector = sector;
267  return intersection;
268  }
269  return MuonSystemExtension::Intersection{nullptr, it};
270  }
271  return MuonSystemExtension::Intersection{sharedPtr, it};
272  }
273 
275  const SystemExtensionCache& cache) const {
276  // if in endcaps pick endcap surfaces
277  const double eta = muonEntryPars.position().eta();
279  if (eta < -1.05) regionIndex = MuonStationIndex::EndcapC;
280  if (eta > 1.05) regionIndex = MuonStationIndex::EndcapA;
281 
282  // in barrel pick primary sector
283  const double phi = muonEntryPars.position().phi();
284  std::vector<int> sectors;
285  m_sectorMapping.getSectors(phi, sectors);
286  SurfaceVec surfaces;
288  if (cache.useHitSectors) {
289  const auto map_itr = cache.sectorsWithHits->find(regionIndex);
290  if (map_itr == cache.sectorsWithHits->end()) {
291  ATH_MSG_DEBUG("No hits in detector region " << Muon::MuonStationIndex::regionName(regionIndex));
292  return surfaces;
293  }
294  std::vector<int>::const_iterator sec_itr = std::find_if(
295  sectors.begin(), sectors.end(), [&map_itr](const int& sector) -> bool { return map_itr->second.count(sector); });
296  if (sec_itr == sectors.end()) {
297  ATH_MSG_DEBUG("No hits found for sector " << m_sectorMapping.getSector(phi) << " in MuonStation "
298  << Muon::MuonStationIndex::regionName(regionIndex));
299  return surfaces;
300  }
301  }
302 
303  for (const int sector : sectors) {
304  surfaces.insert(surfaces.end(), m_referenceSurfaces[regionIndex][sector - 1].begin(),
305  m_referenceSurfaces[regionIndex][sector - 1].end());
306  }
307  auto sortFunction = (regionIndex == MuonStationIndex::Barrel)
308  ? [](const MuonLayerSurface& s1,
309  const MuonLayerSurface& s2) { return s1.surfacePtr->center().perp() < s2.surfacePtr->center().perp(); }
310  : [](const MuonLayerSurface& s1, const MuonLayerSurface& s2) {
311  return std::abs(s1.surfacePtr->center().z()) < std::abs(s2.surfacePtr->center().z());
312  };
313 
314  std::stable_sort(surfaces.begin(), surfaces.end(), sortFunction);
315  return surfaces;
316  }
318  const MuonCombined::TagBase& cmb_tag,
319  SystemExtensionCache& cache) const{
320 
321  const Trk::Track* cmb_trk = cmb_tag.primaryTrack();
322  if (!cmb_trk){
323  ATH_MSG_WARNING("A combined tag without any track? Please check "<<cmb_tag.toString());
324  return false;
325  }
327  const Trk::TrackParameters* entry_pars = cache.candidate->getCaloExtension()->muonEntryLayerIntersection();
328  const Trk::TrackStates* const cmb_tsos = cmb_trk->trackStateOnSurfaces();
330  std::vector<const Trk::TrackStateOnSurface*> ms_tsos;
331  ms_tsos.reserve(cmb_tsos->size());
332  std::copy_if(cmb_tsos->begin(), cmb_tsos->end(), ms_tsos.end(),[this, entry_pars](const Trk::TrackStateOnSurface* tsos){
333  if (!(tsos->type(Trk::TrackStateOnSurface::Perigee) || tsos->type(Trk::TrackStateOnSurface::Parameter)))
334  return false;
335  const Trk::TrackParameters* params = tsos->trackParameters();
336  if (!params) return false;
337  const Trk::Surface& surf = params->associatedSurface();
338  if (!surf.associatedDetectorElement()) {
339  return entry_pars->associatedSurface().normal().dot(params->position() - entry_pars->associatedSurface().center())>0;
340  }
341  return m_idHelperSvc->isMuon(surf.associatedDetectorElement()->identify());
342  });
343 
344  if (ms_tsos.empty()){
345  ATH_MSG_VERBOSE("A combined track without track parameters in the MS. THat should not happen");
346  return false;
347  }
348 
349  SurfaceVec surfaces = getSurfacesForIntersection(*entry_pars, cache);
350  if (surfaces.empty()) {
351  ATH_MSG_DEBUG("MS extenion without surfaces.. "<<cache.candidate->toString());
352  return false;
353  }
354 
355  std::vector<Muon::MuonSystemExtension::Intersection> intersections;
356 
357  std::vector<const Trk::TrackStateOnSurface*>::const_iterator itr = ms_tsos.begin();
358  std::vector<const Trk::TrackStateOnSurface*>::const_iterator end = ms_tsos.end();
359  for (const Muon::MuonLayerSurface& it : surfaces) {
360  const Trk::Surface& surf = *(it.surfacePtr);
362  itr = std::min_element(itr, end, [&surf](const Trk::TrackStateOnSurface* a, const Trk::TrackStateOnSurface* b) {
363  return std::abs(surf.normal().dot(a->trackParameters()->position() - surf.center())) <
364  std::abs(surf.normal().dot(b->trackParameters()->position() - surf.center()));
365  });
366  const Trk::TrackParameters* trk_pars = (*itr)->trackParameters();
367 
368  const Amg::Vector3D pos = trk_pars->position();
369  const bool isBarrel = it.regionIndex == MuonStationIndex::Barrel;
370  ATH_MSG_VERBOSE("Distance of closest parameters to the surface: "<< std::sqrt(std::abs(surf.normal().dot(pos - surf.center()))));
371 
372 
373 
374  const Trk::PropDirection dir = (isBarrel && pos.perp2() < surf.center().perp2()) ||
375  (!isBarrel && std::abs(pos.z()) < std::abs(surf.center().z()) ) ? Trk::alongMomentum : Trk::oppositeMomentum;
376  std::shared_ptr<const Trk::TrackParameters> exPars{m_extrapolator->extrapolate(ctx, *trk_pars, surf, dir, false, Trk::muon)};
377  if (!exPars) {
378  ATH_MSG_WARNING("Failed to extrapolate track @ "<<to_string(*trk_pars)<<" to surface "<<std::endl<<surf);
379  continue;
380  }
381  MuonSystemExtension::Intersection intersect = makeInterSection(exPars,it);
382  if (intersect.trackParameters) intersections.push_back(std::move(intersect));
383  }
386  if (intersections.empty()) {
387  ATH_MSG_DEBUG("Failed to find the intersections for the combined track");
388  return false;
389  }
390  cache.candidate->setExtension(std::make_unique<MuonSystemExtension>(entry_pars, std::move(intersections)));
391 
392  return true;
393  }
394 } // namespace Muon
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonStationIndex::BE
@ BE
Definition: MuonStationIndex.h:25
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
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
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
max
#define max(a, b)
Definition: cfImp.cxx:41
Muon::MuonStationIndex::EndcapA
@ EndcapA
Definition: MuonStationIndex.h:49
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
Trk::locX
@ locX
Definition: ParamDefs.h:43
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:44
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Muon::MuonSystemExtensionTool::initialize
StatusCode initialize() override
Definition: MuonSystemExtensionTool.cxx:37
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
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Muon::MuonStationIndex::EO
@ EO
Definition: MuonStationIndex.h:26
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::oppositeMomentum
@ oppositeMomentum
Definition: PropDirection.h:21
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.
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:274
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:93
EventPrimitivesHelpers.h
Muon::MuonSystemExtensionTool::m_sectorMapping
MuonSectorMapping m_sectorMapping
sector mapping helper
Definition: MuonSystemExtensionTool.h:78
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:423
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:46
Muon::MuonSystemExtensionTool::initializeGeometryEndcap
bool initializeGeometryEndcap(int sector, MuonStationIndex::DetectorRegionIndex regionIndex, const Amg::AngleAxis3D &sectorRotation)
Definition: MuonSystemExtensionTool.cxx:66
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:41
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
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
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:144
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::MuonSystemExtensionTool::m_referenceSurfaces
std::vector< std::vector< SurfaceVec > > m_referenceSurfaces
reference surfaces per region and sector
Definition: MuonSystemExtensionTool.h:75
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
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
Muon::MuonChamberLayerDescription
class managing geometry of the chamber layers
Definition: MuonChamberLayerDescription.h:15
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
Muon::MuonSystemExtensionTool::muonSystemExtension
bool muonSystemExtension(const EventContext &ctx, SystemExtensionCache &cache) const override
get muon system extension
Definition: MuonSystemExtensionTool.cxx:154
Muon::MuonSectorMapping::getSector
int getSector(double phi) const
returns the sector corresponding to the phi position
Definition: MuonSectorMapping.h:82
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Muon::MuonStationIndex::numberOfSectors
static unsigned int numberOfSectors()
return total number of sectors
Definition: MuonStationIndex.h:106
Muon::MuonSystemExtensionTool::SurfaceVec
std::vector< MuonLayerSurface > SurfaceVec
Definition: MuonSystemExtensionTool.h:33
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Muon::MuonStationIndex::regionName
static const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:176
python.SystemOfUnits.meter
int meter
Definition: SystemOfUnits.py:61
Muon::MuonSystemExtensionTool::initializeGeometryBarrel
bool initializeGeometryBarrel(int sector, const Amg::AngleAxis3D &sectorRotation)
Definition: MuonSystemExtensionTool.cxx:111
Muon::MuonSystemExtensionTool::MuonSystemExtensionTool
MuonSystemExtensionTool(const std::string &type, const std::string &name, const IInterface *parent)
Default AlgTool functions.
Definition: MuonSystemExtensionTool.cxx:32
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
Muon::MuonSystemExtensionTool::makeInterSection
MuonSystemExtension::Intersection makeInterSection(const std::shared_ptr< const Trk::TrackParameters > &pars, const MuonLayerSurface &surf) const
Definition: MuonSystemExtensionTool.cxx:246
Muon::MuonLayerSurface::SurfacePtr
std::shared_ptr< const Trk::Surface > SurfacePtr
Definition: MuonLayerSurface.h:16
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
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:77
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
DataVector< const Trk::TrackStateOnSurface >
InDetCandidate.h
MuonStationIndexHelpers.h
beamspotman.dir
string dir
Definition: beamspotman.py:623
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:192
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
MuonChamberLayerDescription.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonStationIndex::DetectorRegionIndexMax
@ DetectorRegionIndexMax
Definition: MuonStationIndex.h:50
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.
EventPrimitivesCovarianceHelpers.h
a
TList * a
Definition: liststreamerinfos.cxx:10
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the closest approach of two lines.
Definition: GeoPrimitivesHelpers.h:302
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::PlaneSurface
Definition: PlaneSurface.h:64
MuonSystemExtensionCollection.h
Muon::MuonStationIndex::EndcapC
@ EndcapC
Definition: MuonStationIndex.h:49
PlaneSurface.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TagBase.h
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
Muon::MuonSystemExtensionTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: MuonSystemExtensionTool.h:65
DiscSurface.h
Muon::MuonStationIndexHelpers::isSmall
static bool isSmall(int sector)
returns whether a sector is small
Definition: MuonStationIndexHelpers.cxx:26
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
Muon::MuonSystemExtension::Intersection
data per intersection
Definition: MuonSystemExtension.h:21
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:71
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:317
Trk::loc1
@ loc1
Definition: ParamDefs.h:40
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Muon::MuonSystemExtensionTool::m_caloExtensionTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
Definition: MuonSystemExtensionTool.h:60
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.