CMS 3D CMS Logo

NavVolume6Faces.h
Go to the documentation of this file.
1 #ifndef NavVolume6Faces_H
2 #define NavVolume6Faces_H
3 
6 
7 #include <vector>
8 
9 class Bounds;
10 class Plane;
12 
13 class NavVolume6Faces final : public NavVolume {
14 public:
15 
17  DDSolidShape shape, const std::vector<NavVolumeSide>& faces,
18  const MagneticFieldProvider<float> * mfp);
19 
21  explicit NavVolume6Faces( const MagVolume& magvol, const bool isIron=false);
22 
25  const NavVolume::LocalVector& mom,
26  double charge, PropagationDirection propDir=alongMomentum) const override;
27 
30  const NavVolume::LocalVector& mom,
31  double charge, PropagationDirection propDir,
32  ConstReferenceCountingPointer<Surface> NotThisSurfaceP) const override;
33 
36  const Propagator& prop) const override;
37 
39  const std::vector<VolumeSide>& faces() const override { return theFaces; }
40 
42  bool isIron() const override { return isThisIron; }
43 
44  using MagVolume::inside;
45  bool inside( const GlobalPoint& gp, double tolerance) const override;
46 
47 private:
48 
49  std::vector<VolumeSide> theFaces;
51  bool isThisIron;
52 
53  void computeBounds(const std::vector<NavVolumeSide>& faces);
54  Bounds* computeBounds( int index, const std::vector<const Plane*>& bpc);
55  Bounds* computeBounds( int index, const std::vector<NavVolumeSide>& faces);
56 
57 };
58 
59 /* bool NavVolume6Faces::inside( const GlobalPoint& gp, double tolerance) const
60 {
61 
62  // check if the point is on the correct side of all delimiting surfaces
63  for (std::vector<VolumeSide>::const_iterator i=theFaces.begin(); i!=theFaces.end(); i++) {
64  Surface::Side side = i->surface().side( gp, tolerance);
65  if ( side != i->surfaceSide() && side != SurfaceOrientation::onSurface) return false;
66  }
67  return true;
68 }
69 */
70 
71 #endif
Container theNavSurfaces
const std::vector< VolumeSide > & faces() const override
Access to volume faces.
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
Container nextSurface(const NavVolume::LocalPoint &pos, const NavVolume::LocalVector &mom, double charge, PropagationDirection propDir=alongMomentum) const override
Give a sorted list of possible surfaces to propagate to.
DDSolidShape
Definition: DDSolidShapes.h:6
PropagationDirection
Definition: Plane.h:17
std::vector< SurfaceAndBounds > Container
Definition: NavVolume.h:27
bool isIron() const override
Access to Iron/Air information:
GloballyPositioned< float >::LocalPoint LocalPoint
Definition: MagVolume.h:18
GloballyPositioned< float >::LocalVector LocalVector
Definition: MagVolume.h:19
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const =0
bool inside(const GlobalPoint &gp, double tolerance) const override
NavVolume6Faces(const PositionType &pos, const RotationType &rot, DDSolidShape shape, const std::vector< NavVolumeSide > &faces, const MagneticFieldProvider< float > *mfp)
VolumeCrossReturnType crossToNextVolume(const TrajectoryStateOnSurface &currentState, const Propagator &prop) const override
Cross this volume and point at the next.
Definition: Bounds.h:22
std::vector< VolumeSide > theFaces
void computeBounds(const std::vector< NavVolumeSide > &faces)