#include <MdtChamberGeometry.h>
|
| | MdtChamberGeometry () |
| | MdtChamberGeometry (const Identifier &id, const Muon::IMuonIdHelperSvc *idHelperSvc, 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) |
| virtual | ~MdtChamberGeometry ()=default |
| void | init () |
| 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 | nml () const |
| unsigned int | nlay () const override |
| unsigned int | ntubesml0 () const |
| unsigned int | ntubesml1 () const |
| const Identifier & | stationId () const override |
| const LocVec2D & | firstTubeMl0 () const |
| const LocVec2D & | firstTubeMl1 () const |
| double | tubeDist () const |
| double | tubeStage () const |
| double | layerDist () const |
| double | stationTheta () const override |
| double | tubeRadius () const override |
| LocVec2D | tubePosition (unsigned int ml, unsigned int lay, unsigned int tube) const override |
| DCVec | tubesPassedByLine (const Line &line, int ml) const |
| DCVec | tubesPassedByLine (const Line &line) const override |
| | Retrieves the vector of drift circles traveresed by the line.
|
| void | tubesPassedByLine (const Line &line, int ml, DCVec &crossedTubes) const |
| | methods taking reference to output vector to reduce memory usage
|
| void | tubesPassedByLine (const Line &line, DCVec &crossedTubes) 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
|
| bool | validGeometry () const override |
| void | print (MsgStream &msg) const override |
| bool | validId (unsigned int ml, unsigned int lay, unsigned int tube) const |
|
| double | xPosTube (unsigned int ml, unsigned int lay, unsigned int tube) const |
| double | yPosTube (unsigned int ml, unsigned int lay) const |
Definition at line 18 of file MdtChamberGeometry.h.
◆ MdtChamberGeometry() [1/2]
| TrkDriftCircleMath::MdtChamberGeometry::MdtChamberGeometry |
( |
| ) |
|
◆ MdtChamberGeometry() [2/2]
| TrkDriftCircleMath::MdtChamberGeometry::MdtChamberGeometry |
( |
const Identifier & | id, |
|
|
const Muon::IMuonIdHelperSvc * | idHelperSvc, |
|
|
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 ) |
Definition at line 22 of file MdtChamberGeometry.cxx.
24 :
26
31 }
bool isBarrel(const Identifier &id) const
virtual bool issMdt(const Identifier &id) const =0
returns whether this is a sMDT Identifier or not
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
unsigned int ntubesml0() 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
double stationTheta() const override
unsigned int ntubesml1() const
◆ ~MdtChamberGeometry()
| virtual TrkDriftCircleMath::MdtChamberGeometry::~MdtChamberGeometry |
( |
| ) |
|
|
virtualdefault |
◆ firstTubeMl0()
| const LocVec2D & TrkDriftCircleMath::MdtChamberGeometry::firstTubeMl0 |
( |
| ) |
const |
|
inline |
◆ firstTubeMl1()
| const LocVec2D & TrkDriftCircleMath::MdtChamberGeometry::firstTubeMl1 |
( |
| ) |
const |
|
inline |
◆ init()
| void TrkDriftCircleMath::MdtChamberGeometry::init |
( |
| ) |
|
Definition at line 61 of file MdtChamberGeometry.cxx.
61 {
65 } else {
67 }
68
75 }
std::vector< unsigned int > m_ntubesml
std::vector< bool > m_wasInit
◆ isSecondMultiLayer()
| void TrkDriftCircleMath::MdtChamberGeometry::isSecondMultiLayer |
( |
bool | isSecond | ) |
|
|
inline |
set that this is the second multi layer instead of the first, used in case the first ML is dead
Definition at line 61 of file MdtChamberGeometry.h.
bool m_isSecondMultiLayer
◆ layerDist()
| double TrkDriftCircleMath::MdtChamberGeometry::layerDist |
( |
| ) |
const |
|
inline |
◆ nlay()
| unsigned int TrkDriftCircleMath::MdtChamberGeometry::nlay |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ nml()
| unsigned int TrkDriftCircleMath::MdtChamberGeometry::nml |
( |
| ) |
const |
|
inline |
◆ ntubesml0()
| unsigned int TrkDriftCircleMath::MdtChamberGeometry::ntubesml0 |
( |
| ) |
const |
|
inline |
◆ ntubesml1()
| unsigned int TrkDriftCircleMath::MdtChamberGeometry::ntubesml1 |
( |
| ) |
const |
|
inline |
◆ print()
| void TrkDriftCircleMath::MdtChamberGeometry::print |
( |
MsgStream & | msg | ) |
const |
|
overridevirtual |
◆ setGeometry()
| void TrkDriftCircleMath::MdtChamberGeometry::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 ) |
Definition at line 33 of file MdtChamberGeometry.cxx.
35 {
44
47
49 THROW_EXCEPTION(
"MdtChamberGeometry::setGeometry() - got called with nml="<<
m_nml<<
" which is definitely out of range.");
51 THROW_EXCEPTION(
"MdtChamberGeometry::setGeometry() - got called with nlay="<<
m_nlay<<
" which is definitely out of range");
53 THROW_EXCEPTION(
"MdtChamberGeometry::setGeometry() - got called with ntubesml0="<<
ntubesml0<<
" which is definitely out of range");
54
56 THROW_EXCEPTION(
"MdtChamberGeometry::setGeometry() - got called with ntubesml1="<<
ntubesml1<<
" which is definitely out of range");
57
59 }
#define THROW_EXCEPTION(MESSAGE)
◆ stationId()
| const Identifier & TrkDriftCircleMath::MdtChamberGeometry::stationId |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ stationTheta()
| double TrkDriftCircleMath::MdtChamberGeometry::stationTheta |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ tubeDist()
| double TrkDriftCircleMath::MdtChamberGeometry::tubeDist |
( |
| ) |
const |
|
inline |
◆ tubePosition()
| LocVec2D TrkDriftCircleMath::MdtChamberGeometry::tubePosition |
( |
unsigned int | ml, |
|
|
unsigned int | lay, |
|
|
unsigned int | tube ) const |
|
overridevirtual |
Implements TrkDriftCircleMath::ChamberGeometry.
Definition at line 173 of file MdtChamberGeometry.cxx.
173 {
175 THROW_EXCEPTION(
"Combination of multilayer ml: "<<ml<<
", layer: "<<lay<<
" and tube: "<<tube<<
" given ");
176 }
178 return tube_vec;
179 }
double xPosTube(unsigned int ml, unsigned int lay, unsigned int tube) const
bool validId(unsigned int ml, unsigned int lay, unsigned int tube) const
double yPosTube(unsigned int ml, unsigned int lay) const
◆ tubeRadius()
| double TrkDriftCircleMath::MdtChamberGeometry::tubeRadius |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ tubesPassedByLine() [1/4]
| DCVec TrkDriftCircleMath::MdtChamberGeometry::tubesPassedByLine |
( |
const Line & | line | ) |
const |
|
inlineoverridevirtual |
◆ tubesPassedByLine() [2/4]
| void TrkDriftCircleMath::MdtChamberGeometry::tubesPassedByLine |
( |
const Line & | line, |
|
|
DCVec & | crossedTubes ) const |
|
inline |
◆ tubesPassedByLine() [3/4]
| DCVec TrkDriftCircleMath::MdtChamberGeometry::tubesPassedByLine |
( |
const Line & | line, |
|
|
int | ml ) const |
Definition at line 156 of file MdtChamberGeometry.cxx.
156 {
158
160
162
164 return crossedTubes;
165 }
std::vector< DriftCircle > DCVec
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.
◆ tubesPassedByLine() [4/4]
| void TrkDriftCircleMath::MdtChamberGeometry::tubesPassedByLine |
( |
const Line & | line, |
|
|
int | ml, |
|
|
DCVec & | crossedTubes ) const |
methods taking reference to output vector to reduce memory usage
Definition at line 99 of file MdtChamberGeometry.cxx.
99 {
100 crossedTubes.reserve(50);
101 ResidualWithLine resLine{
line};
102 const LocVec2D& linepos =
line.position();
103 const LocVec2D& linedir =
line.direction();
104 double dxdy = std::abs(linedir.y()) > 0.0001 ? linedir.x() / linedir.y() : linedir.x() / 0.0001;
105 for (
unsigned int ml = 0; ml <
m_nml; ++ml) {
106
108
109
110 if (inMultilayer != -1 && inMultilayer != (int)ml) { continue; }
111 for (
unsigned int lay = 0; lay <
m_nlay; ++lay) {
113 double xfirsttube =
xPosTube(ml, lay, 0);
114 double xintersect = dxdy * (ylay - linepos.y()) + linepos.x();
115 double relpos = (xintersect - xfirsttube) /
m_tubeDist;
116 int ctube = (
int)relpos;
117 if (ctube < 0) ctube = 0;
119
120 if (inMultilayer != -1)
121
122 for (
int i = ctube - 1;
i >= 0; --
i) {
124 double res = resLine.residual(lp);
128 } else {
130 }
131 } else {
132
135 nullptr);
136 }
137 }
140 double res = resLine.residual(lp);
144 } else {
146 }
147 } else {
150 }
151 }
152 }
153 }
154 }
std::pair< std::vector< unsigned int >, bool > res
@ EmptyTube
drift time too large to be compatible with drift spectrum
LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override
◆ tubeStage()
| double TrkDriftCircleMath::MdtChamberGeometry::tubeStage |
( |
| ) |
const |
|
inline |
◆ validGeometry()
| bool TrkDriftCircleMath::MdtChamberGeometry::validGeometry |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ validId()
| bool TrkDriftCircleMath::MdtChamberGeometry::validId |
( |
unsigned int | ml, |
|
|
unsigned int | lay, |
|
|
unsigned int | tube ) const |
Definition at line 77 of file MdtChamberGeometry.cxx.
77 {
79 if (ml > 1) {
81 msg <<MSG::ERROR <<
" Wrong index: ml " << ml <<
" max " <<
m_nml <<
endmsg;
83
84 return false;
87 msg <<MSG::ERROR <<
" Wrong index: lay " << lay <<
" max " <<
m_nlay <<
endmsg;
89 return false;
94 return false;
95 }
96 return true;
97 }
void print(MsgStream &msg) const override
IMessageSvc * getMessageSvc(bool quiet=false)
◆ xPosTube()
| double TrkDriftCircleMath::MdtChamberGeometry::xPosTube |
( |
unsigned int | ml, |
|
|
unsigned int | lay, |
|
|
unsigned int | tube ) const |
|
inlineprivate |
Definition at line 181 of file MdtChamberGeometry.cxx.
181 {
183
184
185
186 if (lay % 2 == 1 ) {
189 else
191
192 }
193
194 return xpos;
195 }
◆ yPosTube()
| double TrkDriftCircleMath::MdtChamberGeometry::yPosTube |
( |
unsigned int | ml, |
|
|
unsigned int | lay ) const |
|
private |
◆ m_firstTube
| std::vector<LocVec2D> TrkDriftCircleMath::MdtChamberGeometry::m_firstTube {} |
|
private |
◆ m_id
| Identifier TrkDriftCircleMath::MdtChamberGeometry::m_id {} |
|
private |
◆ m_isBarrel
| bool TrkDriftCircleMath::MdtChamberGeometry::m_isBarrel {false} |
|
private |
◆ m_isSecondMultiLayer
| bool TrkDriftCircleMath::MdtChamberGeometry::m_isSecondMultiLayer {false} |
|
private |
◆ m_layDist
| double TrkDriftCircleMath::MdtChamberGeometry::m_layDist {0} |
|
private |
◆ m_nlay
| unsigned int TrkDriftCircleMath::MdtChamberGeometry::m_nlay {0} |
|
private |
◆ m_nml
| unsigned int TrkDriftCircleMath::MdtChamberGeometry::m_nml {0} |
|
private |
◆ m_ntubesml
| std::vector<unsigned int> TrkDriftCircleMath::MdtChamberGeometry::m_ntubesml {} |
|
private |
◆ m_sMdt
| bool TrkDriftCircleMath::MdtChamberGeometry::m_sMdt {false} |
|
private |
◆ m_stationTheta
| double TrkDriftCircleMath::MdtChamberGeometry::m_stationTheta {0} |
|
private |
◆ m_tubeDist
| double TrkDriftCircleMath::MdtChamberGeometry::m_tubeDist {0} |
|
private |
◆ m_tubeRad
| double TrkDriftCircleMath::MdtChamberGeometry::m_tubeRad {0} |
|
private |
◆ m_tubeStage
| double TrkDriftCircleMath::MdtChamberGeometry::m_tubeStage {0} |
|
private |
◆ m_validGeometry
| bool TrkDriftCircleMath::MdtChamberGeometry::m_validGeometry {false} |
|
private |
◆ m_wasInit
| std::vector<bool> TrkDriftCircleMath::MdtChamberGeometry::m_wasInit {} |
|
private |
The documentation for this class was generated from the following files: