CMS 3D CMS Logo

MagVolume6Faces.cc
Go to the documentation of this file.
2 
4  const RotationType& rot,
5  DDSolidShape shape,
6  const std::vector<VolumeSide>& faces,
8  double sf)
9  : MagVolume(pos,rot,shape,mfp,sf), volumeNo(0), copyno(0), theFaces(faces)
10 {}
11 
12 bool MagVolume6Faces::inside( const GlobalPoint& gp, double tolerance) const
13 {
14 
15  // check if the point is on the correct side of all delimiting surfaces
16  for (std::vector<VolumeSide>::const_iterator i=theFaces.begin(); i!=theFaces.end(); ++i) {
17  Surface::Side side = i->surface().side( gp, tolerance);
18  if ( side != i->surfaceSide() && side != SurfaceOrientation::onSurface) return false;
19  }
20  return true;
21 }
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
DDSolidShape
Definition: DDSolidShapes.h:6
MagVolume6Faces(const PositionType &pos, const RotationType &rot, DDSolidShape shape, const std::vector< VolumeSide > &faces, const MagneticFieldProvider< float > *mfp, double sf=1.)
virtual bool inside(const GlobalPoint &gp, double tolerance=0.) const
std::vector< VolumeSide > theFaces