ATLAS Offline Software
Loading...
Searching...
No Matches
MdtMultiChamberGeometry.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DCMATH_MDTMULTICHAMBERGEOMETRY_H
6#define DCMATH_MDTMULTICHAMBERGEOMETRY_H
7
8#include <ostream>
9#include <vector>
10
15
16namespace TrkDriftCircleMath {
17
19 public:
21
22 MdtMultiChamberGeometry(const std::vector<MdtChamberGeometry>& chambers);
23
25
26
27 DCVec tubesPassedByLine(const Line& line, int ml) const;
28 DCVec tubesPassedByLine(const Line& line) const override { return tubesPassedByLine(line, -1); }
29
30 unsigned int nlay() const override;
31
32 LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override;
33
34 bool validGeometry() const override { return m_validGeometry; }
35
36 void print(MsgStream& msg) const override;
37
38 virtual double tubeRadius() const override;
39
40 double stationTheta() const override;
41
42 const Identifier& stationId() const override { return m_chambers[0].stationId(); }
43
44 unsigned int nChambers() const { return m_chambers.size(); }
45
46 private:
47 std::vector<MdtChamberGeometry> m_chambers;
48 bool m_validGeometry{false};
49 };
50
52 double theta = 0.;
53 if (m_chambers.empty() || !m_validGeometry) return 0.;
54
55 for (const MdtChamberGeometry& chit : m_chambers) theta += chit.stationTheta();
56 return theta / m_chambers.size();
57 }
58
60 if (m_chambers.empty()) return 14.6;
61 return m_chambers.front().tubeRadius();
62 }
63
64} // namespace TrkDriftCircleMath
65
66#endif
Scalar theta() const
theta method
Implementation of 2 dimensional vector class.
Definition LocVec2D.h:16
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
LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override
Function object to check whether two Segments are sub/super sets or different.
std::vector< DriftCircle > DCVec
MsgStream & msg
Definition testRead.cxx:32