Commit 1120304d authored by Soshi Tsuno's avatar Soshi Tsuno Committed by Graeme Stewart
Browse files

added new function to determine readout technology in pixel (InDetReadoutGeometry-02-00-37)

  * Added new function to determine readout technology in PixelModuleDesign
	* Tagged as InDetReadoutGeometry-02-00-37

2016-05-09 Nick Styles
	* Added new DetectorType enum for StripStereoAnnulusDesign
	* Tagged as InDetReadoutGeometry-02-00-35
	* Also fixed erroneous transform shift
	* Tagged as InDetReadoutGeometry-02-00-36

2016-04-29 Nick Styles
	* Fix to length method of StripBoxDesign
	* Tagged as  InDetReadoutGeometry-02-00-34

2016-04-18 Shaun Roe
	* Coverity fixes 108273, 108274:
108273 06/04/2016 (Medium) Uninitialized scalar field :/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/StripAnnulusDesign.cxx in function "StripAnnulusDesign"
108274 06/04/2016 (Medium) Uninitialized scalar field :/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx in function "InDetDetectorManager"
	* tag as Tagged as InDetReadoutGeometry-02-00-33
2016-04-17 Nick Styles
	* Merge changes from InDetReadoutGeometry-02-00-26-branch
...
(Long ChangeLog diff - truncated)
parent 89b40cd5
################################################################################
# Package: InDetReadoutGeometry
################################################################################
# Declare the package name:
atlas_subdir( InDetReadoutGeometry )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaKernel
Control/CLIDSvc
Control/SGTools
Control/StoreGate
DetectorDescription/AtlasDetDescr
DetectorDescription/GeoModel/GeoModelKernel
DetectorDescription/GeoPrimitives
DetectorDescription/Identifier
GaudiKernel
InnerDetector/InDetConditions/InDetCondServices
InnerDetector/InDetDetDescr/InDetIdentifier
Tracking/TrkDetDescr/TrkDetElementBase
Tracking/TrkDetDescr/TrkSurfaces
Tracking/TrkEvent/TrkEventPrimitives
PRIVATE
Database/AthenaPOOL/AthenaPoolUtilities
DetectorDescription/DetDescrCond/DetDescrConditions
DetectorDescription/IdDictDetDescr
InnerDetector/InDetConditions/TRT_ConditionsData )
# External dependencies:
find_package( CLHEP )
find_package( Eigen )
# Component(s) in the package:
atlas_add_library( InDetReadoutGeometry
src/*.c*
PUBLIC_HEADERS InDetReadoutGeometry
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel SGTools AtlasDetDescr GeoModelKernel GeoPrimitives Identifier GaudiKernel InDetCondServices InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests
PRIVATE_LINK_LIBRARIES AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData )
......@@ -197,7 +197,11 @@ namespace InDetDD {
virtual const Trk::SurfaceBounds & bounds() const;
virtual bool is3D() const;
enum ReadoutTechnology{FEI3,FEI4,RD53};
ReadoutTechnology getReadoutTechnology() const;
///////////////////////////////////////////////////////////////////
// Non-const methods:
///////////////////////////////////////////////////////////////////
......@@ -331,10 +335,16 @@ namespace InDetDD {
inline bool PixelModuleDesign::is3D() const
{
return m_is3D;
}
{
return m_is3D;
}
inline PixelModuleDesign::ReadoutTechnology PixelModuleDesign::getReadoutTechnology() const {
const int maxRow = m_readoutScheme.rowsPerCircuit();
const int maxCol = m_readoutScheme.columnsPerCircuit();
if (maxRow*maxCol>26000) { return FEI4; }
else { return FEI3; }
}
} // namespace InDetDD
......
......@@ -39,7 +39,7 @@ class SiLocalPosition;
class SiIntersect;
enum DetectorShape {
Box=0, Trapezoid, Other
Box=0, Trapezoid, Annulus,Other
};
/** @class SiDetectorDesign
......
......@@ -212,18 +212,6 @@ inline int StripBoxDesign::strip(int stripId1Dim) const {
return stripId1Dim % m_nStrips;
}
HepGeom::Vector3D<double> StripBoxDesign::phiMeasureSegment(const SiLocalPosition & /*position*/)
const {
throw std::runtime_error("Call to phiMeasureSegment, DEPRECATED, not implemented.");
}
/// DEPRECATED: Unused (2014)
void StripBoxDesign::distanceToDetectorEdge(SiLocalPosition const & /*pos*/,
double & /*etaDist*/,
double & /*phiDist*/) const {
throw std::runtime_error(
"Call to distanceToDetectorEdge which is Deprecated and not yet implemented");
}
/// DEPRECATED for StripBoxDesign; no dead area
double StripBoxDesign::deadAreaUpperBoundary() const {
......
......@@ -36,7 +36,7 @@
#include "CLHEP/Geometry/Vector3D.h" // For unused phiMeasureSegment
namespace Trk {
class RectangleBounds;
class AnnulusBounds;
class SurfaceBounds;
}
......@@ -91,6 +91,7 @@ public:
double phiPitch(const SiLocalPosition &localPosition) const;
double phiPitch(const SiCellId &cellId) const;
double phiPitch() const;
double localModuleCentreRadius() const;
// distance to the nearest diode in units of pitch, from 0.0 to 0.5,
// this method should be fast as it is called for every surface charge
......@@ -147,6 +148,8 @@ public:
bool nearBondGap(const SiLocalPosition &, double) const;
/** Shape of element */
virtual DetectorShape shape() const;
// ------------------------------------------------------------------------------------------
......@@ -170,7 +173,7 @@ private:
const double m_stereo;
const double m_R;
const double m_lengthBF;
Trk::RectangleBounds *m_bounds;
Trk::AnnulusBounds *m_bounds;
};
///////////////////////////////////////////////////////////////////
......@@ -230,28 +233,20 @@ inline SiReadoutCellId StripStereoAnnulusDesign::readoutIdOfCell(const SiCellId
}
inline int StripStereoAnnulusDesign::row(int stripId1Dim) const {
/*
std::vector<int>::const_iterator endPtr = std::lower_bound(m_firstStrip.begin(), m_firstStrip.end(), stripId1Dim);
if (std::distance(m_firstStrip.begin(), endPtr) - 1 < 0) {
std::cout << "-ve row. row = " << std::distance(m_firstStrip.begin(), endPtr) - 1 << "; strip1D = " << stripId1Dim << "\n";
std::cout << "While with stripId1Dim = 1 I get " << row(1) << "\n";
}
return std::distance(m_firstStrip.begin(), endPtr) - 1;
*/
std::vector<int>::const_iterator endPtr = std::upper_bound(m_firstStrip.begin(), m_firstStrip.end(), stripId1Dim);
int rowNum = std::distance(m_firstStrip.begin(), endPtr) - 1;
if (rowNum < 0 || rowNum >= m_nRows) {
std::cout << "str1D = " << stripId1Dim << " gives row " << rowNum << ", outside range 0 - " << m_nRows << "\n";
const std::string errMsg=std::string("StripId1Dim index out of acceptable range ") + __FILE__+std::string(": ")+std::to_string(__LINE__);
throw std::runtime_error(errMsg);
}
return rowNum;
}
inline int StripStereoAnnulusDesign::strip(int stripId1Dim) const {
int rowNum = row(stripId1Dim);
/*
std::vector<int>::const_iterator endPtr = std::lower_bound(m_firstStrip.begin(), m_firstStrip.end(), stripId1Dim);
int row = std::distance(m_firstStrip.begin(), endPtr) - 1;
*/
int strip2D = stripId1Dim - m_firstStrip[rowNum];
if (strip2D < 0 || strip2D >= m_firstStrip[rowNum + 1]) {
std::cout << "str1D " << stripId1Dim << " gives strip " << strip2D << " which is outside range 0 - " <<
......@@ -260,38 +255,25 @@ inline int StripStereoAnnulusDesign::strip(int stripId1Dim) const {
return strip2D;
}
HepGeom::Vector3D<double> StripStereoAnnulusDesign::phiMeasureSegment(const SiLocalPosition & /*position*/)
const {
throw std::runtime_error("Call to phiMeasureSegment, DEPRECATED, not implemented.");
}
/// DEPRECATED: Unused (2014)
void StripStereoAnnulusDesign::distanceToDetectorEdge(SiLocalPosition const & /*pos*/,
double & /*etaDist*/,
double & /*phiDist*/) const {
throw std::runtime_error(
"Call to distanceToDetectorEdge which is Deprecated and not yet implemented");
}
/// DEPRECATED for StripStereoAnnulusDesign; no dead area
double StripStereoAnnulusDesign::deadAreaUpperBoundary() const {
inline double StripStereoAnnulusDesign::deadAreaUpperBoundary() const {
return 0.;
}
double StripStereoAnnulusDesign::deadAreaLowerBoundary() const {
inline double StripStereoAnnulusDesign::deadAreaLowerBoundary() const {
return 0.;
}
double StripStereoAnnulusDesign::deadAreaLength() const {
inline double StripStereoAnnulusDesign::deadAreaLength() const {
return 0.;
}
bool StripStereoAnnulusDesign::swapHitPhiReadoutDirection() const {
inline bool StripStereoAnnulusDesign::swapHitPhiReadoutDirection() const {
return false;
}
bool StripStereoAnnulusDesign::swapHitEtaReadoutDirection() const {
inline bool StripStereoAnnulusDesign::swapHitEtaReadoutDirection() const {
return false;
}
}
} // namespace InDetDD
#endif // INDETREADOUTGEOMETRY_STRIPSTEREOANNULUSDESIGN_H
......@@ -15,7 +15,7 @@ namespace InDetDD
{
InDetDetectorManager::InDetDetectorManager(StoreGateSvc * detStore, const std::string & name)
: m_detStore(detStore),
: m_alignfoldertype{none},m_detStore(detStore),
m_msg(name+"DetectorManager"),
m_suppressWarnings(false)
{
......
......@@ -26,6 +26,7 @@
#include "InDetReadoutGeometry/SiCellId.h"
#include "InDetReadoutGeometry/SiReadoutCellId.h"
#include "InDetReadoutGeometry/SCT_ModuleSideDesign.h"
#include "InDetReadoutGeometry/StripStereoAnnulusDesign.h"
#include "InDetReadoutGeometry/SiCommonItems.h"
......@@ -156,8 +157,11 @@ SiDetectorElement::updateCache() const
const HepGeom::Transform3D & geoTransform = transformHit();
double radialShift = 0.;
const InDetDD::StripStereoAnnulusDesign * testDesign = dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(m_design);
if(testDesign) radialShift = testDesign->localModuleCentreRadius();
HepGeom::Point3D<double> centerGeoModel(0., 0., 0.);
HepGeom::Point3D<double> centerGeoModel(radialShift, 0., 0.);
m_centerCLHEP = geoTransform * centerGeoModel;
m_center = Amg::Vector3D(m_centerCLHEP[0],m_centerCLHEP[1],m_centerCLHEP[2]);
......@@ -199,84 +203,9 @@ SiDetectorElement::updateCache() const
// unit radial vector
HepGeom::Vector3D<double> unitR(m_center.x(), m_center.y(), 0.);
if (fabs(m_center.x()) < 0.001 && fabs(m_center.y()) < 0.001) {
//
// Sensor local frame is centred on beamline; probably a StereoAnnulus.
// Get a point near the centre of the sensor. We take the two strips in the middle
// of the allowed range. In StereoAnnulus sensors, these are edge strips, in the
// centre two rows. Their midpoint is more or less the centre of the sensor.
//
const SCT_ModuleSideDesign *sctDesign = dynamic_cast<const SCT_ModuleSideDesign *> (m_design);
int strip1 = sctDesign->diodes() / 2 - 1;
int strip2 = strip1 + 1;
SiCellId cellId1(strip1);
SiCellId cellId2(strip2);
SiLocalPosition p1 = sctDesign->localPositionOfCell(cellId1);
SiLocalPosition p2 = sctDesign->localPositionOfCell(cellId2);
SiLocalPosition centerSiLocPos = (p1 + p2) / 2.;
centerGeoModel[m_hitEta] = centerSiLocPos.xEta();
centerGeoModel[m_hitPhi] = centerSiLocPos.xPhi();
centerGeoModel[m_hitDepth] = centerSiLocPos.xDepth();
unitR = geoTransform * centerGeoModel;
unitR[2] = 0.;
}
if (unitR.mag() < 10.0) { // 10 mm is too close still
msg(MSG::FATAL) << "Silicon Detector was centred on beamline. Goodbye." << endreq;
std::abort();
}
unitR.setMag(1.);
/*// OK, Jike reverse Nigel's ...
if (isBarrel()) {
// Strips should be along globalZ
if (fabs(globalEtaAxis[2]) < 0.7) {
if (isPixel()) {
msg(MSG::WARNING) << "Pixel barrel sensor: eta far from parallel to z\n GlobalEtaAxis = (" <<
globalEtaAxis[0] << ", " << globalEtaAxis[1] << ", " << globalEtaAxis[2] << ")" << endreq;
}
else {
msg(MSG::WARNING) << "SCT/Strip barrel sensor: eta far from parallel to z\n GlobalEtaAxis = (" <<
globalEtaAxis[0] << ", " << globalEtaAxis[1] << ", " << globalEtaAxis[2] << ")" << endreq;
}
}
// Depth should be radial
if (fabs(globalDepthAxis.dot(unitR)) < 0.7) {
if (isPixel()) {
msg(MSG::WARNING) << "Pixel barrel sensor: depth direction far from radial" << endreq;
}
else {
msg(MSG::WARNING) << "SCT/Strip barrel sensor: depth direction far from radial" << endreq;
}
}
}
else {
// Strips should be radial
if (fabs(globalEtaAxis.dot(unitR)) < 0.7) {
if (isPixel()) {
msg(MSG::WARNING) << "Pixel endcap sensor: eta/strip direction far from radial" << endreq;
}
else {
msg(MSG::WARNING) << "SCT/Strip endcap sensor: eta/strip direction far from radial" << endreq;
}
}
// Depth should be along z
if (fabs(globalDepthAxis[2]) < 0.7) {
if (isPixel()) {
msg(MSG::WARNING) << "Pixel endcap sensor: depth direction far from parallel to z\n";
}
else {
msg(MSG::WARNING) << "SCT/Strip endcap sensor: depth direction far from parallel to z\n";
}
}
}
//
// Should any axes be swapped? Certainly not. Why would you do that?
//
m_depthDirection = true;
m_etaDirection = true;
m_phiDirection = true;
*/
HepGeom::Vector3D<double> nominalEta;
HepGeom::Vector3D<double> nominalNormal;
......@@ -519,7 +448,9 @@ SiDetectorElement::recoToHitTransform() const
HepGeom::Vector3D<double>(0,1,0),
HepGeom::Vector3D<double>(0,0,1)
};
static const HepGeom::Transform3D recoToHit(HepGeom::Point3D<double>(0,0,0),localAxes[distPhi],localAxes[distEta],
//static
const HepGeom::Transform3D recoToHit(HepGeom::Point3D<double>(0,0,0),localAxes[distPhi],localAxes[distEta],
HepGeom::Point3D<double>(0,0,0),localAxes[m_hitPhi],localAxes[m_hitEta]);
// Swap direction of axis as appropriate
......@@ -873,8 +804,10 @@ SiDetectorElement::sinStereoLocal(const HepGeom::Point3D<double> &globalPos) con
const Trk::Surface &
SiDetectorElement::surface() const
{
if (!m_surface) m_surface = new Trk::PlaneSurface(*this);
return *m_surface;
if (!m_surface){
m_surface = new Trk::PlaneSurface(*this);
}
return *m_surface;
}
const std::vector<const Trk::Surface*>& SiDetectorElement::surfaces() const
......@@ -903,6 +836,8 @@ void SiDetectorElement::getExtent(double &rMin, double &rMax,
double &phiMin, double &phiMax) const
{
const InDetDD::StripStereoAnnulusDesign * testDesign = dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(m_design);
HepGeom::Point3D<double> corners[4];
getCorners(corners);
......@@ -910,8 +845,14 @@ void SiDetectorElement::getExtent(double &rMin, double &rMax,
double phiOffset = 0.;
double radialShift = 0.;
if(testDesign) radialShift = testDesign->localModuleCentreRadius();//additional radial shift for sensors centred on beamline
const HepGeom::Transform3D rShift = HepGeom::TranslateX3D(radialShift);//in local frame, radius is x
for (int i = 0; i < 4; i++) {
if(testDesign) corners[i].transform(rShift);
HepGeom::Point3D<double> globalPoint = globalPosition(corners[i]);
double rPoint = globalPoint.perp();
......@@ -955,6 +896,7 @@ void SiDetectorElement::getExtent(double &rMin, double &rMax,
if (phiMin > M_PI) phiMin -= 2. * M_PI;
if (phiMax < -M_PI) phiMax += 2. * M_PI;
if (phiMax > M_PI) phiMax -= 2. * M_PI;
}
......
......@@ -24,7 +24,7 @@ StripAnnulusDesign::StripAnnulusDesign(const SiDetectorDesign::Axis stripDirecti
const vector<double> stripStartRadius,
const vector<double> stripEndRadius) :
SCT_ModuleSideDesign(thickness, true, true, true, 1, 0, 0, 0, false, carrier,
readoutSide, stripDirection, thicknessDirection) {
readoutSide, stripDirection, thicknessDirection),m_nRows(nRows) {
if (nRows < 0) {
throw std::runtime_error(
"ERROR: StripAnnulusDesign called with negative number of rows");
......@@ -83,7 +83,6 @@ int StripAnnulusDesign::strip1Dim(int strip, int row) const {
}
void StripAnnulusDesign::neighboursOfCell(const SiCellId &cellId, std::vector<SiCellId> &neighbours) const {
cout << "Niggle: Get neighbours\n";
neighbours.clear();
......@@ -107,12 +106,12 @@ cout << "Niggle: Get neighbours\n";
}
const Trk::SurfaceBounds &StripAnnulusDesign::bounds() const {
cout << "Niggle: Get bounds\n";
return *m_bounds;
}
SiCellId StripAnnulusDesign::cellIdOfPosition(SiLocalPosition const &pos) const {
cout << "Niggle: cellIdOfPosition\n";
double r = pos.r();
double phi = pos.phi();
//
......@@ -138,7 +137,7 @@ cout << "Niggle: cellIdOfPosition\n";
}
SiLocalPosition StripAnnulusDesign::localPositionOfCell(SiCellId const &cellId) const {
cout << "Niggle: localPositionOfCell\n";
int strip, row;
getStripRow(cellId, &strip, &row);
double r = (m_stripEndRadius[row] - m_stripStartRadius[row]) / 2.;
......@@ -149,7 +148,7 @@ cout << "Niggle: localPositionOfCell\n";
}
SiLocalPosition StripAnnulusDesign::localPositionOfCluster(SiCellId const &cellId, int clusterSize) const {
cout << "Niggle: localPositionOfCluster\n";
SiLocalPosition pos = localPositionOfCell(cellId);
if (clusterSize <= 1) {
......@@ -170,7 +169,7 @@ cout << "Niggle: localPositionOfCluster\n";
/// Give end points of the strip that covers the given position
std::pair<SiLocalPosition, SiLocalPosition> StripAnnulusDesign::endsOfStrip(SiLocalPosition const &pos) const {
cout << "Niggle: endsOfStrip\n";
SiCellId cellId = cellIdOfPosition(pos);
int strip, row;
......@@ -187,7 +186,7 @@ cout << "Niggle: endsOfStrip\n";
}
bool StripAnnulusDesign::inActiveArea(SiLocalPosition const &pos, bool /*checkBondGap*/) const {
cout << "Niggle: inActiveArea\n";
SiCellId id = cellIdOfPosition(pos);
......@@ -196,7 +195,7 @@ cout << "Niggle: inActiveArea\n";
// Used in surfaceChargesGenerator
double StripAnnulusDesign::scaledDistanceToNearestDiode(SiLocalPosition const &pos) const {
cout << "Niggle: scaledDistanceToNearestDiode\n";
SiCellId cellId = cellIdOfPosition(pos);
SiLocalPosition posStrip = localPositionOfCell(cellId);
int strip, row;
......@@ -226,7 +225,7 @@ SiLocalPosition StripAnnulusDesign::positionFromStrip(const int stripNumber1D) c
// returns an invalid id.
//
SiCellId StripAnnulusDesign::cellIdInRange(const SiCellId &cellId) const {
cout << "Niggle: cellIdInRange\n";
if (!cellId.isValid()) {
return SiCellId(); // Invalid
}
......
......@@ -56,7 +56,7 @@ int StripBoxDesign::strip1Dim(int strip, int row) const {
void StripBoxDesign::neighboursOfCell(const SiCellId &cellId,
std::vector<SiCellId> &neighbours) const {
cout << "Niggle: Get neighbours\n";
neighbours.clear();
......@@ -81,7 +81,7 @@ cout << "Niggle: Get neighbours\n";
const Trk::SurfaceBounds &StripBoxDesign::bounds() const {
// Return smallest rectangle that fully encompasses the active area.
cout << "Niggle: Get bounds\n";
return *m_bounds;
}
......@@ -91,20 +91,17 @@ SiCellId StripBoxDesign::cellIdOfPosition(SiLocalPosition const &pos) const {
//
int strip = (int) floor(pos.xPhi() / m_pitch) + m_nStrips / 2;
if (strip < 0 || strip >= m_nStrips) {
//cout << "Niggle: cellIdOfPosition; pos.xPhi, pos.xEta = " << pos.xPhi() << ", " << pos.xEta() << " Strip = " <<
//strip << " is Outside\n";
return SiCellId(); // return an invalid id
}
int row = (int) floor(pos.xEta() / m_length) + m_nRows / 2;
if (row < 0 || row >= m_nRows) {
//cout << "Niggle: cellIdOfPosition; pos.xPhi, pos.xEta = " << pos.xPhi() << ", " << pos.xEta() << " Row = " <<
//row << " is Outside\n";
return SiCellId(); // return an invalid id
}
int strip1D = strip1Dim(strip, row);
//cout << "Niggle: cellIdOfPosition; pos.xPhi, pos.xEta = " << pos.xPhi() << ", " << pos.xEta() <<
//" gives strip1D = " << strip1D << endl;
return SiCellId(strip1D, 0);
}
......@@ -116,13 +113,13 @@ SiLocalPosition StripBoxDesign::localPositionOfCell(SiCellId const &cellId) cons
double phi = ((double) strip - (double) m_nStrips / 2. + 0.5) * m_pitch;
//cout << "Niggle: localPositionOfCell; eta, phi = " << eta << " " << phi << endl;
return SiLocalPosition(eta, phi, 0.0);
}
SiLocalPosition StripBoxDesign::localPositionOfCluster(SiCellId const &cellId,
int clusterSize) const {
cout << "Niggle: localPositionOfCluster\n";
SiLocalPosition pos = localPositionOfCell(cellId);
if (clusterSize <= 1) {
......@@ -138,7 +135,7 @@ cout << "Niggle: localPositionOfCluster\n";
/// Give end points of the strip that covers the given position
std::pair<SiLocalPosition, SiLocalPosition> StripBoxDesign::endsOfStrip(
SiLocalPosition const &pos) const {
// cout << "Niggle: endsOfStrip. pos eta/phi = " << pos.xEta() << "/" << pos.xPhi() << "\n";
SiCellId cellId = cellIdOfPosition(pos);
int strip, row;
......@@ -160,14 +157,14 @@ bool StripBoxDesign::inActiveArea(SiLocalPosition const &pos,
bool /*checkBondGap*/) const {
SiCellId id = cellIdOfPosition(pos);
// cout << "Niggle: inActiveArea is " << id.isValid() << endl;
return id.isValid();
}
// Used in surfaceChargesGenerator
double StripBoxDesign::scaledDistanceToNearestDiode(SiLocalPosition const &pos) const {
// cout << "Niggle: scaledDistanceToNearestDiode. pos.xPhi = " << pos.xPhi() << endl;
SiCellId cellId = cellIdOfPosition(pos);
SiLocalPosition posStrip = localPositionOfCell(cellId);
// cout << "posStrip.xPhi = " << posStrip.xPhi() << " giving " << fabs(pos.xPhi() - posStrip.xPhi()) / m_pitch << endl;
......@@ -195,7 +192,7 @@ SiLocalPosition StripBoxDesign::positionFromStrip(const int stripNumber) const {
///Check if cell is in range. Returns the original cellId if it is in range, otherwise it
// returns an invalid id.
SiCellId StripBoxDesign::cellIdInRange(const SiCellId &cellId) const {
cout << "Niggle: cellIdInRange\n";
if (!cellId.isValid()) {
return SiCellId(); // Invalid
}
......@@ -208,7 +205,7 @@ cout << "Niggle: cellIdInRange\n";
}
double StripBoxDesign::length() const {
return m_length;
return m_length*m_nRows;
}
double StripBoxDesign::width() const {
......@@ -224,6 +221,33 @@ double StripBoxDesign::maxWidth() const {
}
double StripBoxDesign::etaPitch() const {
return length();
return m_length;
}
HepGeom::Vector3D<double> StripBoxDesign::phiMeasureSegment(const SiLocalPosition & /*position*/)
const {
throw std::runtime_error("Call to phiMeasureSegment, DEPRECATED, not implemented.");
}