ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace MuonCalib {
13
18
20 if (!m_surfaceIdList.empty()) return;
21 m_surfaceIdList.push_back(
22 std::make_pair(&m_geometry.endcapInnerDiskASide, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::EIA)));
23 m_surfaceIdList.push_back(
24 std::make_pair(&m_geometry.endcapMiddleDiskASide, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::EMA)));
25 m_surfaceIdList.push_back(
26 std::make_pair(&m_geometry.endcapOuterDiskASide, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::EOA)));
27
28 m_surfaceIdList.push_back(
29 std::make_pair(&m_geometry.endcapInnerDiskCSide, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::EIC)));
30 m_surfaceIdList.push_back(
31 std::make_pair(&m_geometry.endcapMiddleDiskCSide, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::EMC)));
32 m_surfaceIdList.push_back(
33 std::make_pair(&m_geometry.endcapOuterDiskCSide, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::EOC)));
34
35 m_surfaceIdList.push_back(
36 std::make_pair(&m_geometry.barrelInnerCylinder, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::BI)));
37 m_surfaceIdList.push_back(
38 std::make_pair(&m_geometry.barrelMiddleCylinder, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::BM)));
39 m_surfaceIdList.push_back(
40 std::make_pair(&m_geometry.barrelOuterCylinder, m_idManipulator.stationLayerIdentifier(MuonFixedIdManipulator::BO)));
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
ICscStripFitter::Result Result
static MuonCalibSimpleGeometry m_geometry
ResultVec intersectsWithGeometry(const Amg::Vector3D &parPos, const Amg::Vector3D &parDir, double tolerance=1e9)
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
std::vector< std::pair< const MuonCalibSurface *, MuonFixedId > > SurfaceIdVec
static MuonFixedIdManipulator m_idManipulator
virtual bool inBounds(const Amg::Vector3D &pos, double tolerance=0.) const =0
Implements fixed identifiers not dependent upon Athena Identifier for internal use in the calibration...
Definition MuonFixedId.h:50
bool add(const std::string &hname, TKey *tobj)
Definition fastadd.cxx:55
Eigen::Matrix< double, 3, 1 > Vector3D
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.