ATLAS Offline Software
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 
16 namespace 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 
51  inline double MdtMultiChamberGeometry::stationTheta() const {
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 
59  inline double MdtMultiChamberGeometry::tubeRadius() const {
60  if (m_chambers.empty()) return 14.6;
61  return m_chambers.front().tubeRadius();
62  }
63 
64 } // namespace TrkDriftCircleMath
65 
66 #endif
TrkDriftCircleMath::MdtMultiChamberGeometry
Definition: MdtMultiChamberGeometry.h:18
TrkDriftCircleMath::MdtMultiChamberGeometry::tubeRadius
virtual double tubeRadius() const override
Definition: MdtMultiChamberGeometry.h:59
checkFileSG.line
line
Definition: checkFileSG.py:75
TrkDriftCircleMath::MdtMultiChamberGeometry::m_chambers
std::vector< MdtChamberGeometry > m_chambers
Definition: MdtMultiChamberGeometry.h:47
TrkDriftCircleMath::ChamberGeometry
Definition: ChamberGeometry.h:17
TrkDriftCircleMath::MdtMultiChamberGeometry::tubesPassedByLine
DCVec tubesPassedByLine(const Line &line, int ml) const
Definition: MdtMultiChamberGeometry.cxx:21
TrkDriftCircleMath::MdtMultiChamberGeometry::stationId
const Identifier & stationId() const override
Definition: MdtMultiChamberGeometry.h:42
TrkDriftCircleMath::MdtMultiChamberGeometry::tubesPassedByLine
DCVec tubesPassedByLine(const Line &line) const override
Retrieves the vector of drift circles traveresed by the line.
Definition: MdtMultiChamberGeometry.h:28
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition: IMdtSegmentFinder.h:13
TrkDriftCircleMath::MdtMultiChamberGeometry::MdtMultiChamberGeometry
MdtMultiChamberGeometry()
DriftCircle.h
TrkDriftCircleMath::MdtMultiChamberGeometry::stationTheta
double stationTheta() const override
Definition: MdtMultiChamberGeometry.h:51
TrkDriftCircleMath::LocVec2D
Implementation of 2 dimensional vector class.
Definition: LocVec2D.h:16
TrkDriftCircleMath::DCVec
std::vector< DriftCircle > DCVec
Definition: DriftCircle.h:117
ChamberGeometry.h
TrkDriftCircleMath::Line
Definition: Line.h:17
TrkDriftCircleMath::MdtMultiChamberGeometry::tubePosition
LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override
Definition: MdtMultiChamberGeometry.cxx:42
Line.h
TrkDriftCircleMath::MdtMultiChamberGeometry::m_validGeometry
bool m_validGeometry
Definition: MdtMultiChamberGeometry.h:48
TrkDriftCircleMath::MdtChamberGeometry
Definition: MdtChamberGeometry.h:18
MdtChamberGeometry.h
TrkDriftCircleMath::MdtMultiChamberGeometry::nChambers
unsigned int nChambers() const
Definition: MdtMultiChamberGeometry.h:44
TrkDriftCircleMath::MdtMultiChamberGeometry::~MdtMultiChamberGeometry
virtual ~MdtMultiChamberGeometry()
TrkDriftCircleMath::MdtMultiChamberGeometry::print
void print(MsgStream &msg) const override
Definition: MdtMultiChamberGeometry.cxx:36
TrkDriftCircleMath::MdtMultiChamberGeometry::validGeometry
bool validGeometry() const override
Definition: MdtMultiChamberGeometry.h:34
TrkDriftCircleMath::MdtMultiChamberGeometry::nlay
unsigned int nlay() const override
Definition: MdtMultiChamberGeometry.cxx:40
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
calibdata.tube
tube
Definition: calibdata.py:31
Identifier
Definition: IdentifierFieldParser.cxx:14