File: DebugPolyhedron.cpp

package info (click to toggle)
vecgeom 1.2.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,016 kB
  • sloc: cpp: 88,803; ansic: 6,888; python: 1,035; sh: 582; sql: 538; makefile: 23
file content (27 lines) | stat: -rw-r--r-- 761 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "VecGeom/volumes/Polyhedron.h"
#include "VecGeomTest/ShapeDebugger.h"

#include <memory>

using namespace vecgeom;

int main()
{

  constexpr int nPlanes      = 4;
  Precision zPlanes[nPlanes] = {-2, -1, 1, 2};
  Precision rInner[nPlanes]  = {1, 1, 1, 1};
  Precision rOuter[nPlanes]  = {2, 2, 2, 2};
  UnplacedPolyhedron unplaced(0, 3 * kPi / 4, 5, nPlanes, zPlanes, rInner, rOuter);
  LogicalVolume logical(&unplaced);
  Transformation3D translation(0, 0, 0);
  std::unique_ptr<VPlacedVolume> placed(logical.Place(&translation));
  Vector3D<Precision> bounds(3, 3, 3);

  ShapeDebugger debugger(placed.get());
  debugger.SetMaxMismatches(10);
  debugger.ShowCorrectResults(false);
  debugger.CompareDistanceToOutToROOT(bounds, 50000);

  return 0;
}