ATLAS Offline Software
Loading...
Searching...
No Matches
MdtChamberGeometry.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DCMATH_MDTCHAMBERGEOMETRY_H
6#define DCMATH_MDTCHAMBERGEOMETRY_H
7
8#include <cassert>
9#include <vector>
10
15
16namespace TrkDriftCircleMath {
17
19 public:
21
22 MdtChamberGeometry(const Identifier& id, const Muon::IMuonIdHelperSvc* idHelperSvc, unsigned int nml, unsigned int nlay, unsigned int ntubesml0, unsigned int ntubesml1,
23 const LocVec2D& tube0ml0, const LocVec2D& tube0ml1, double tubeDist, double tubeStage, double layDist,
24 double stationTheta);
25
26 virtual ~MdtChamberGeometry() = default;
27
28 void init();
29 void setGeometry(unsigned int nml, unsigned int nlay, unsigned int ntubesml0, unsigned int ntubesml1, const LocVec2D& tube0ml0,
30 const LocVec2D& tube0ml1, double tubeDist, double tubeStage, double layDist, double stationTheta);
31
32 unsigned int nml() const { return m_nml; }
33 unsigned int nlay() const override { return m_nlay; }
34 unsigned int ntubesml0() const { return m_ntubesml[0]; }
35 unsigned int ntubesml1() const { return m_ntubesml[1]; }
36
37 const Identifier& stationId() const override { return m_id; }
38
39 const LocVec2D& firstTubeMl0() const { return m_firstTube[0]; }
40 const LocVec2D& firstTubeMl1() const { return m_firstTube[1]; }
41
42 double tubeDist() const { return m_tubeDist; }
43 double tubeStage() const { return m_tubeStage; }
44 double layerDist() const { return m_layDist; }
45
46 double stationTheta() const override { return m_stationTheta; }
47
48 double tubeRadius() const override { return m_tubeRad; }
49
50 LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override;
51
52 DCVec tubesPassedByLine(const Line& line, int ml) const;
53 DCVec tubesPassedByLine(const Line& line) const override { return tubesPassedByLine(line, -1); }
54
56 void tubesPassedByLine(const Line& line, int ml, DCVec& crossedTubes) const;
57 void tubesPassedByLine(const Line& line, DCVec& crossedTubes) const { return tubesPassedByLine(line, -1, crossedTubes); }
58
61 void isSecondMultiLayer(bool isSecond) { m_isSecondMultiLayer = isSecond; }
62
63 bool validGeometry() const override { return m_validGeometry; }
64
65 void print(MsgStream& msg) const override;
66
67 bool validId(unsigned int ml, unsigned int lay, unsigned int tube) const;
68
69 private:
70 double xPosTube(unsigned int ml, unsigned int lay, unsigned int tube) const;
71 double yPosTube(unsigned int ml, unsigned int lay) const;
72
74 bool m_sMdt{false};
75 bool m_isBarrel{false};
76 unsigned int m_nml{0};
77 unsigned int m_nlay{0};
78 std::vector<unsigned int> m_ntubesml{};
79 double m_tubeDist{0};
80 double m_tubeRad{0};
81 double m_tubeStage{0};
82 double m_layDist{0};
83 double m_stationTheta{0};
84
85 std::vector<bool> m_wasInit{};
86 std::vector<LocVec2D> m_firstTube{};
87 bool m_validGeometry{false};
89 };
90
91} // namespace TrkDriftCircleMath
92
93#endif
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Implementation of 2 dimensional vector class.
Definition LocVec2D.h:16
void print(MsgStream &msg) const override
LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override
double xPosTube(unsigned int ml, unsigned int lay, unsigned int tube) const
void setGeometry(unsigned int nml, unsigned int nlay, unsigned int ntubesml0, unsigned int ntubesml1, const LocVec2D &tube0ml0, const LocVec2D &tube0ml1, double tubeDist, double tubeStage, double layDist, double stationTheta)
unsigned int nlay() const override
std::vector< unsigned int > m_ntubesml
void tubesPassedByLine(const Line &line, DCVec &crossedTubes) const
bool validId(unsigned int ml, unsigned int lay, unsigned int tube) const
void isSecondMultiLayer(bool isSecond)
set that this is the second multi layer instead of the first, used in case the first ML is dead
const Identifier & stationId() const override
DCVec tubesPassedByLine(const Line &line) const override
Retrieves the vector of drift circles traveresed by the line.
DCVec tubesPassedByLine(const Line &line, int ml) const
double yPosTube(unsigned int ml, unsigned int lay) const
Function object to check whether two Segments are sub/super sets or different.
std::vector< DriftCircle > DCVec
MsgStream & msg
Definition testRead.cxx:32