ATLAS Offline Software
MuonCalibSimpleHoleSearch.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iostream>
8 
11 
12 namespace MuonCalib {
13 
14  MuonCalibSimpleGeometry MuonCalibSimpleHoleSearch::m_geometry;
15  MuonCalibSLPropagator MuonCalibSimpleHoleSearch::m_propagator;
16  MuonFixedIdManipulator MuonCalibSimpleHoleSearch::m_idManipulator;
18 
20  if (!m_surfaceIdList.empty()) return;
21  m_surfaceIdList.push_back(
23  m_surfaceIdList.push_back(
25  m_surfaceIdList.push_back(
27 
28  m_surfaceIdList.push_back(
30  m_surfaceIdList.push_back(
32  m_surfaceIdList.push_back(
34 
35  m_surfaceIdList.push_back(
37  m_surfaceIdList.push_back(
39  m_surfaceIdList.push_back(
41  }
42 
44  const Amg::Vector3D& parDir, double tolerance) {
45  ResultVec intersectedLayers;
46  SurfaceIdIt it = m_surfaceIdList.begin();
47  SurfaceIdIt it_end = m_surfaceIdList.end();
48  for (; it != it_end; ++it) { searchForSurfaceIntersect(parPos, parDir, *it->first, it->second, intersectedLayers, tolerance); }
49 
50  return intersectedLayers;
51  }
52 
54  const MuonCalibSurface& surf, const MuonFixedId& stLayerId,
55  ResultVec& intersects, double tolerance) const {
56  // propagate to layer
57  Amg::Vector3D pos = m_propagator.propagate(parPos, parDir, surf);
58 
59  // check if position is within bounds, if so add intersect
60  if (surf.inBounds(pos, tolerance)) {
61  bool add = true;
62  if (m_idManipulator.isEndcap(stLayerId)) {
63  // for the endcap only take intersects on the same side as the track
64  double sideTrack = parPos.z() < 0. ? -1. : 1.;
65  double sideInter = pos.z() < 0. ? -1. : 1.;
66  if (sideTrack != sideInter) add = false;
67  }
68  if (add) intersects.push_back(Result(stLayerId, pos));
69  }
70  }
71 
72 } // namespace MuonCalib
MuonCalib::MuonFixedIdManipulator::EMA
@ EMA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::stationLayerIdentifier
MuonFixedId stationLayerIdentifier(const MuonFixedId &id) const
returns a station layer identifier for the give identifier
Definition: MuonFixedIdManipulator.cxx:34
MuonCalib::MuonCalibSimpleGeometry::barrelOuterCylinder
const MuonCalibCylinder barrelOuterCylinder
Definition: MuonCalibSimpleGeometry.h:48
MuonCalib::MuonCalibSimpleHoleSearch::ResultVec
std::vector< Result > ResultVec
Definition: MuonCalibSimpleHoleSearch.h:27
MuonCalib::MuonCalibSLPropagator::propagate
Amg::Vector3D propagate(const Amg::Vector3D &pos, const Amg::Vector3D &dir, const MuonCalibSurface &surf) const
Propagator track parameters to a plane paralel to the xy plane.
Definition: MuonCalibSLPropagator.cxx:64
MuonCalib::MuonCalibSurface
Definition: MuonCalibSimpleGeometry.h:12
MuonCalib::MuonCalibSimpleGeometry::endcapOuterDiskASide
const MuonCalibDisk endcapOuterDiskASide
Definition: MuonCalibSimpleGeometry.h:40
MuonCalib::MuonFixedIdManipulator::BM
@ BM
Definition: MuonFixedIdManipulator.h:17
MuonFixedIdPrinter.h
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MuonCalib::MuonFixedIdManipulator::BO
@ BO
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOC
@ EOC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonCalibSimpleHoleSearch::m_propagator
static MuonCalibSLPropagator m_propagator
Definition: MuonCalibSimpleHoleSearch.h:44
MuonCalib::MuonCalibSimpleGeometry::endcapInnerDiskASide
const MuonCalibDisk endcapInnerDiskASide
Definition: MuonCalibSimpleGeometry.h:38
MuonCalib::MuonFixedIdManipulator::EMC
@ EMC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonCalibSimpleHoleSearch::intersectsWithGeometry
ResultVec intersectsWithGeometry(const Amg::Vector3D &parPos, const Amg::Vector3D &parDir, double tolerance=1e9)
Definition: MuonCalibSimpleHoleSearch.cxx:43
MuonCalib::MuonFixedIdManipulator::BI
@ BI
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonCalibSimpleHoleSearch::m_idManipulator
static MuonFixedIdManipulator m_idManipulator
Definition: MuonCalibSimpleHoleSearch.h:45
MuonCalib::MuonCalibSimpleHoleSearch::m_surfaceIdList
static SurfaceIdVec m_surfaceIdList
Definition: MuonCalibSimpleHoleSearch.h:48
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
MuonCalib::MuonFixedIdManipulator::EIA
@ EIA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonCalibSimpleHoleSearch::SurfaceIdVec
std::vector< std::pair< const MuonCalibSurface *, MuonFixedId > > SurfaceIdVec
Definition: MuonCalibSimpleHoleSearch.h:46
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
MuonCalib::MuonCalibSimpleHoleSearch::searchForSurfaceIntersect
void searchForSurfaceIntersect(const Amg::Vector3D &parPos, const Amg::Vector3D &parDir, const MuonCalibSurface &surf, const MuonFixedId &stLayerId, ResultVec &intersects, double tolerance=1e9) const
search for intersect with the give surface
Definition: MuonCalibSimpleHoleSearch.cxx:53
MuonCalib::MuonCalibSurface::inBounds
virtual bool inBounds(const Amg::Vector3D &pos, double tolerance=0.) const =0
tolerance
Definition: suep_shower.h:17
MuonCalib::MuonCalibSimpleGeometry::endcapMiddleDiskCSide
const MuonCalibDisk endcapMiddleDiskCSide
Definition: MuonCalibSimpleGeometry.h:43
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50
MuonCalib::MuonCalibSimpleHoleSearch::m_geometry
static MuonCalibSimpleGeometry m_geometry
Definition: MuonCalibSimpleHoleSearch.h:43
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonCalib::MuonCalibSimpleGeometry::barrelMiddleCylinder
const MuonCalibCylinder barrelMiddleCylinder
Definition: MuonCalibSimpleGeometry.h:47
MuonCalib::MuonCalibSimpleGeometry::endcapMiddleDiskASide
const MuonCalibDisk endcapMiddleDiskASide
Definition: MuonCalibSimpleGeometry.h:39
MuonCalibSLPropagator.h
MuonCalib::MuonFixedIdManipulator::isEndcap
bool isEndcap(const MuonFixedId &id) const
returns whether this is a phi measurement
Definition: MuonFixedIdManipulator.h:77
MuonCalibSimpleHoleSearch.h
MuonCalib::MuonFixedIdManipulator::EIC
@ EIC
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonFixedIdManipulator::EOA
@ EOA
Definition: MuonFixedIdManipulator.h:17
MuonCalib::MuonCalibSimpleGeometry::barrelInnerCylinder
const MuonCalibCylinder barrelInnerCylinder
Definition: MuonCalibSimpleGeometry.h:46
MuonCalib::MuonCalibSimpleGeometry::endcapInnerDiskCSide
const MuonCalibDisk endcapInnerDiskCSide
Definition: MuonCalibSimpleGeometry.h:42
MuonCalib::MuonCalibSimpleHoleSearch::SurfaceIdIt
SurfaceIdVec::iterator SurfaceIdIt
Definition: MuonCalibSimpleHoleSearch.h:47
MuonCalib::MuonCalibSimpleHoleSearch::init
void init()
init static members
Definition: MuonCalibSimpleHoleSearch.cxx:19
MuonCalib::MuonCalibSimpleGeometry::endcapOuterDiskCSide
const MuonCalibDisk endcapOuterDiskCSide
Definition: MuonCalibSimpleGeometry.h:44