FairShip
Loading...
Searching...
No Matches
ActsStrawGeometry.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef ACTSTRACKING_ACTSSTRAWGEOMETRY_HPP_
6#define ACTSTRACKING_ACTSSTRAWGEOMETRY_HPP_
7
8#include <memory>
9#include <unordered_map>
10
11#include "Acts/Surfaces/Surface.hpp"
12
13class TGeoManager;
14
15namespace SHiP {
16
18struct StrawWire {
21 int view;
22 int layer;
24 double x, y, z;
26 double dx, dy, dz;
28 double radius;
30 double halfLength;
31};
32
39 public:
40 explicit ActsStrawGeometry(const TGeoManager& geometry);
41
43 const Acts::Surface* surface(int detectorId) const;
45 const StrawWire* wire(int detectorId) const;
46 const std::unordered_map<int, StrawWire>& wires() const { return m_wires; }
47 std::size_t size() const { return m_surfaces.size(); }
48
49 private:
50 std::unordered_map<int, std::shared_ptr<Acts::Surface>> m_surfaces;
51 std::unordered_map<int, StrawWire> m_wires;
52};
53
54} // namespace SHiP
55
56#endif // ACTSTRACKING_ACTSSTRAWGEOMETRY_HPP_
ActsStrawGeometry(const TGeoManager &geometry)
const StrawWire * wire(int detectorId) const
The wire for a strawtubes detector ID, or nullptr if unknown.
std::unordered_map< int, std::shared_ptr< Acts::Surface > > m_surfaces
const std::unordered_map< int, StrawWire > & wires() const
std::unordered_map< int, StrawWire > m_wires
const Acts::Surface * surface(int detectorId) const
The straw surface for a strawtubes detector ID, or nullptr if unknown.
A straw wire in the SHiP frame (cm), for pattern recognition.
double dx
Unit vector along the wire.
double x
Wire centre.
double halfLength
Half-length of the straw.
double radius
Inner radius of the straw.