CMS 3D CMS Logo

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