Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-14 02:34:03

0001 #include "MagneticField/VolumeGeometry/interface/MagVolume6Faces.h"
0002 
0003 MagVolume6Faces::MagVolume6Faces(const PositionType& pos,
0004                                  const RotationType& rot,
0005                                  const std::vector<VolumeSide>& faces,
0006                                  const MagneticFieldProvider<float>* mfp,
0007                                  double sf)
0008     : MagVolume(pos, rot, mfp, sf), volumeNo(0), copyno(0), theFaces(faces) {
0009   setNominalValue();
0010 }
0011 
0012 bool MagVolume6Faces::inside(const GlobalPoint& gp, double tolerance) const {
0013   // check if the point is on the correct side of all delimiting surfaces
0014   for (std::vector<VolumeSide>::const_iterator i = theFaces.begin(); i != theFaces.end(); ++i) {
0015     Surface::Side side = i->surface().side(gp, tolerance);
0016     if (side != i->surfaceSide() && side != SurfaceOrientation::onSurface)
0017       return false;
0018   }
0019   return true;
0020 }