Skip to content
Snippets Groups Projects
Commit 550a98fc authored by Daniel Jeans's avatar Daniel Jeans Committed by Frank Gaede
Browse files

fix calculation of cell position in MegatileLayerGridXY

parent b0793072
No related branches found
No related tags found
No related merge requests found
...@@ -72,8 +72,8 @@ namespace dd4hep { ...@@ -72,8 +72,8 @@ namespace dd4hep {
getSegInfo(layerIndex, waferIndex); getSegInfo(layerIndex, waferIndex);
Vector3D cellPosition(0,0,0); Vector3D cellPosition(0,0,0);
cellPosition.X = cellIndexX * (_currentSegInfo.megaTileSizeX / _currentSegInfo.nCellsX ) + _currentSegInfo.megaTileOffsetX; cellPosition.X = ( cellIndexX + 0.5 ) * (_currentSegInfo.megaTileSizeX / _currentSegInfo.nCellsX ) + _currentSegInfo.megaTileOffsetX;
cellPosition.Y = cellIndexY * (_currentSegInfo.megaTileSizeY / _currentSegInfo.nCellsY ) + _currentSegInfo.megaTileOffsetY; cellPosition.Y = ( cellIndexY + 0.5 ) * (_currentSegInfo.megaTileSizeY / _currentSegInfo.nCellsY ) + _currentSegInfo.megaTileOffsetY;
if ( fabs( cellPosition.X )>10000e0 || fabs( cellPosition.Y )>10000e0 ) { if ( fabs( cellPosition.X )>10000e0 || fabs( cellPosition.Y )>10000e0 ) {
std::cout << "crazy cell position: " << cellPosition.X << " " << cellPosition.Y << std::endl; std::cout << "crazy cell position: " << cellPosition.X << " " << cellPosition.Y << std::endl;
......
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