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 
24  virtual Container nextSurface( const NavVolume::LocalPoint& pos,
25  const NavVolume::LocalVector& mom,
26  double charge, PropagationDirection propDir=alongMomentum) const;
27 
29  virtual Container nextSurface( const NavVolume::LocalPoint& pos,
30  const NavVolume::LocalVector& mom,
31  double charge, PropagationDirection propDir,
32  ConstReferenceCountingPointer<Surface> NotThisSurfaceP) const;
33 
36  const Propagator& prop) const;
37 
39  virtual const std::vector<VolumeSide>& faces() const { return theFaces; }
40 
42  bool isIron() const { return isThisIron; }
43 
44  using MagVolume::inside;
45  bool inside( const GlobalPoint& gp, double tolerance) const;
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
bool inside(const GlobalPoint &gp, double tolerance) const
virtual Container nextSurface(const NavVolume::LocalPoint &pos, const NavVolume::LocalVector &mom, double charge, PropagationDirection propDir=alongMomentum) const
Give a sorted list of possible surfaces to propagate to.
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
DDSolidShape
Definition: DDSolidShapes.h:6
PropagationDirection
bool isIron() const
Access to Iron/Air information:
Definition: Plane.h:17
std::vector< SurfaceAndBounds > Container
Definition: NavVolume.h:27
virtual VolumeCrossReturnType crossToNextVolume(const TrajectoryStateOnSurface &currentState, const Propagator &prop) const
Cross this volume and point at the next.
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
NavVolume6Faces(const PositionType &pos, const RotationType &rot, DDSolidShape shape, const std::vector< NavVolumeSide > &faces, const MagneticFieldProvider< float > *mfp)
virtual const std::vector< VolumeSide > & faces() const
Access to volume faces.
Definition: Bounds.h:22
std::vector< VolumeSide > theFaces
void computeBounds(const std::vector< NavVolumeSide > &faces)