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) {
10 }
11 
12 bool MagVolume6Faces::inside(const GlobalPoint& gp, double tolerance) const {
13  // check if the point is on the correct side of all delimiting surfaces
14  for (std::vector<VolumeSide>::const_iterator i = theFaces.begin(); i != theFaces.end(); ++i) {
15  Surface::Side side = i->surface().side(gp, tolerance);
16  if (side != i->surfaceSide() && side != SurfaceOrientation::onSurface)
17  return false;
18  }
19  return true;
20 }
TkRotation< Scalar > RotationType
Definition: Definitions.h:27
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:18
const double tolerance
Point3DBase< Scalar, GlobalTag > PositionType
Definition: Definitions.h:28
bool inside(const GlobalPoint &gp, double tolerance=0.) const override
std::vector< VolumeSide > theFaces
void setNominalValue()
MagVolume6Faces(const PositionType &pos, const RotationType &rot, const std::vector< VolumeSide > &faces, const MagneticFieldProvider< float > *mfp, double sf=1.)