![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
23 unsigned int ntubesml1,
const LocVec2D& tube0ml0,
const LocVec2D& tube0ml1,
double tubeDist,
24 double tubeStage,
double layDist,
double stationTheta) :
27 m_sMdt = idHelperSvc->issMdt(
id);
28 m_isBarrel = idHelperSvc->mdtIdHelper().isBarrel(
id);
30 setGeometry(nml, nlay, ntubesml0, ntubesml1, tube0ml0, tube0ml1, tubeDist, tubeStage, layDist, stationTheta);
34 const LocVec2D& tube0ml0,
const LocVec2D& tube0ml1,
double tubeDist,
double tubeStage,
35 double layDist,
double stationTheta) {
48 if (m_nml < 1 || m_nml > 2)
49 throw std::runtime_error(
50 Form(
"File: %s, Line: %d\nMdtChamberGeometry::setGeometry() - got called with nml=%d which is definitely out of range",
51 __FILE__, __LINE__,
m_nml));
52 if (m_nlay < 1 || m_nlay > 4)
53 throw std::runtime_error(
54 Form(
"File: %s, Line: %d\nMdtChamberGeometry::setGeometry() - got called with nlay=%d which is definitely out of range",
55 __FILE__, __LINE__,
m_nlay));
56 if (ntubesml0 < 1 || ntubesml0 > maxNTubesPerLayer)
57 throw std::runtime_error(Form(
58 "File: %s, Line: %d\nMdtChamberGeometry::setGeometry() - got called with ntubesml0=%d which is definitely out of range",
62 throw std::runtime_error(Form(
63 "File: %s, Line: %d\nMdtChamberGeometry::setGeometry() - got called with ntubesml1=%d which is definitely out of range",
93 msg <<MSG::ERROR <<
" Wrong index: ml " << ml <<
" max " <<
m_nml <<
endmsg;
99 msg <<MSG::ERROR <<
" Wrong index: lay " << lay <<
" max " <<
m_nlay <<
endmsg;
112 crossedTubes.reserve(50);
116 double dxdy = std::abs(linedir.
y()) > 0.0001 ? linedir.
x() / linedir.
y() : linedir.
x() / 0.0001;
117 for (
unsigned int ml = 0; ml <
m_nml; ++ml) {
122 if (inMultilayer != -1 && inMultilayer != (
int)ml) {
continue; }
123 for (
unsigned int lay = 0; lay <
m_nlay; ++lay) {
125 double xfirsttube =
xPosTube(ml, lay, 0);
126 double xintersect = dxdy * (ylay - linepos.
y()) + linepos.
x();
127 double relpos = (xintersect - xfirsttube) /
m_tubeDist;
128 int ctube = (
int)relpos;
129 if (ctube < 0) ctube = 0;
132 if (inMultilayer != -1)
134 for (
int i = ctube - 1;
i >= 0; --
i) {
136 double res = resLine.residual(lp);
152 double res = resLine.residual(lp);
175 std::stable_sort(crossedTubes.begin(), crossedTubes.end(),
SortDcsByY());
187 throw std::runtime_error(Form(
"%s:%d -- Invalid combination of multilayer ml: %u, layer: %u and tube: %d given: ", __FILE__,
188 __LINE__, ml, lay,
tube));
198 if (
m_nlay == 4 && ml == 1)
void print(MsgStream &msg) const override
bool m_isSecondMultiLayer
singleton-like access to IMessageSvc via open function and helper
double yPosTube(unsigned int ml, unsigned int lay) const
unsigned int ntubesml1() const
std::vector< unsigned int > m_ntubesml
Function object to check whether two Segments are sub/super sets or different.
double x() const
Returns the x coordinate of the vector.
IMessageSvc * getMessageSvc(bool quiet=false)
Implementation of 2 dimensional vector class.
std::vector< DriftCircle > DCVec
unsigned int ntubesml0() const
std::vector< LocVec2D > m_firstTube
std::pair< std::vector< unsigned int >, bool > res
double y() const
Returns the y coordinate of the vector.
double stationTheta() const override
std::vector< bool > m_wasInit
double xPosTube(unsigned int ml, unsigned int lay, unsigned int tube) const
def init(v_theApp, v_rootStream=None)
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)
DCVec tubesPassedByLine(const Line &line, int ml) const
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
@ EmptyTube
drift time too large to be compatible with drift spectrum
LocVec2D tubePosition(unsigned int ml, unsigned int lay, unsigned int tube) const override
static constexpr int maxNTubesPerLayer
The maxNTubesPerLayer represents the absolute maximum of tubes which are built into a single multilay...
unsigned int nlay() const override
bool validId(unsigned int ml, unsigned int lay, unsigned int tube) const