Skip to content
Snippets Groups Projects
Commit 2e945ef4 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'RadialStripLength' into 'main'

RadialStripDesign - Calculate the strip length from the mounting points

See merge request atlas/athena!69993
parents 9faf784f e0372f55
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,8 @@ class RadialStripDesign: public StripDesign {
int numStrips() const override;
/// Returns the associated channel number of an external vector
int stripNumber(const Amg::Vector2D& extPos) const override final;
/// Returns the length of the associated strip
double stripLength(int stripNumb) const override;
private:
CheckVector2D leftInterSect(int stripNum, bool uncapped = false) const override final;
CheckVector2D rightInterSect(int stripNum, bool uncapped = false) const override final;
......
......@@ -32,6 +32,16 @@ namespace MuonGMR4{
m_strips[stripNum +1].bottomMounting()));
}
inline double RadialStripDesign::stripLength(int stripNumb) const {
const int stripCh = (stripNumb - firstStripNumber());
if (stripCh < 0 || stripCh >= numStrips()) {
ATH_MSG_WARNING(__func__<<"() -- Invalid strip number given "
<<stripNumb<<" allowed range ["
<<firstStripNumber()<<";"<<(firstStripNumber() +numStrips())<<"]");
return 0.;
}
return m_strips[stripCh].fromBottomToTop().mag();
}
inline Amg::Vector2D RadialStripDesign::stripLeftEdge(int stripNumber) const{
CHECK_STRIPRANGE(stripNumber);
return m_strips[stripCh].fromBottomToTop().unit();
......
......@@ -89,7 +89,7 @@ namespace MuonGMR4 {
/// Odering operator
bool operator<(const StripDesign& other) const;
/// Returns length of the strip
double stripLength(int stripNumb) const;
virtual double stripLength(int stripNumb) const;
/// Dump properties to the ostr
virtual void print(std::ostream&ostr) const;
/// Checks whether an external point is inside the trapezoidal area
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment