ATLAS Offline Software
Tracking
TrkUtilityPackages
TrkDriftCircleMath
src
MdtMultiChamberGeometry.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrkDriftCircleMath/MdtMultiChamberGeometry.h
"
6
7
#include <algorithm>
8
#include <iostream>
9
#include <iterator>
10
11
#include "
TrkDriftCircleMath/SortDcsByY.h
"
12
13
namespace
TrkDriftCircleMath
{
14
15
MdtMultiChamberGeometry::MdtMultiChamberGeometry
(
const
std::vector<MdtChamberGeometry>& chambers) : m_chambers(chambers) {
16
m_validGeometry
= std::find_if(
m_chambers
.begin(),
m_chambers
.end(),
17
[](
const
MdtChamberGeometry
&
geo
) { return !geo.validGeometry(); }) ==
m_chambers
.end();
18
}
19
20
MdtMultiChamberGeometry::~MdtMultiChamberGeometry
() =
default
;
21
DCVec
MdtMultiChamberGeometry::tubesPassedByLine
(
const
Line
&
line
,
int
ml)
const
{
22
DCVec
crossedTubes;
23
crossedTubes.reserve(60);
24
if
(!
m_validGeometry
) {
25
std::cout <<
" >>>>> invalid geometry <<<<< "
<< std::endl;
26
return
crossedTubes;
27
}
28
29
for
(
const
MdtChamberGeometry
&
it
:
m_chambers
) {
it
.tubesPassedByLine(
line
, ml, crossedTubes); }
30
31
std::stable_sort(crossedTubes.begin(), crossedTubes.end(),
SortDcsByY
());
32
33
return
crossedTubes;
34
}
35
36
void
MdtMultiChamberGeometry::print
(MsgStream&
msg
)
const
{
37
for
(
const
MdtChamberGeometry
&
it
:
m_chambers
) {
it
.print(
msg
); }
38
}
39
40
unsigned
int
MdtMultiChamberGeometry::nlay
()
const
{
return
m_chambers
.empty() ? 0 :
m_chambers
[0].nlay(); }
41
42
LocVec2D
MdtMultiChamberGeometry::tubePosition
(
unsigned
int
ml,
unsigned
int
lay,
unsigned
int
tube
)
const
{
43
std::vector<MdtChamberGeometry>::const_iterator
it
=
m_chambers
.begin();
44
if
(
it
->validId(ml, lay,
tube
))
45
return
it
->tubePosition(ml, lay,
tube
);
46
else
47
return
it
->tubePosition(1, 0, 0);
48
}
49
}
// namespace TrkDriftCircleMath
MdtMultiChamberGeometry.h
SortDcsByY.h
checkFileSG.line
line
Definition:
checkFileSG.py:75
TrkDriftCircleMath::MdtMultiChamberGeometry::m_chambers
std::vector< MdtChamberGeometry > m_chambers
Definition:
MdtMultiChamberGeometry.h:47
TrkDriftCircleMath::MdtMultiChamberGeometry::tubesPassedByLine
DCVec tubesPassedByLine(const Line &line, int ml) const
Definition:
MdtMultiChamberGeometry.cxx:21
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition:
IMdtSegmentFinder.h:13
TrkDriftCircleMath::MdtMultiChamberGeometry::MdtMultiChamberGeometry
MdtMultiChamberGeometry()
TrkDriftCircleMath::LocVec2D
Implementation of 2 dimensional vector class.
Definition:
LocVec2D.h:16
TrkDriftCircleMath::DCVec
std::vector< DriftCircle > DCVec
Definition:
DriftCircle.h:117
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
TrkDriftCircleMath::SortDcsByY
Definition:
SortDcsByY.h:17
TrkDriftCircleMath::MdtMultiChamberGeometry::m_validGeometry
bool m_validGeometry
Definition:
MdtMultiChamberGeometry.h:48
TrkDriftCircleMath::MdtChamberGeometry
Definition:
MdtChamberGeometry.h:18
TrkDriftCircleMath::MdtMultiChamberGeometry::~MdtMultiChamberGeometry
virtual ~MdtMultiChamberGeometry()
TrkDriftCircleMath::MdtMultiChamberGeometry::print
void print(MsgStream &msg) const override
Definition:
MdtMultiChamberGeometry.cxx:36
LArCellConditions.geo
bool geo
Definition:
LArCellConditions.py:46
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
Generated on Mon Dec 23 2024 21:14:19 for ATLAS Offline Software by
1.8.18