Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef MagVolume6Faces_h
0002 #define MagVolume6Faces_h
0003 
0004 /** \class MagVolume6Faces
0005  *
0006  *  A MagVolume defined by a number of sides (surfaces)
0007  *  NOTE that despite the name the sides can be less (or more) than 6!!! <br>
0008  *
0009  *  inside() is implemented by checking that the given point is on the 
0010  *  correct side of each of the surfaces sides.
0011  *
0012  *  \author T. Todorov, N. Amapane
0013  */
0014 
0015 #include "MagneticField/VolumeGeometry/interface/MagVolume.h"
0016 #include "MagneticField/VolumeGeometry/interface/VolumeSide.h"
0017 
0018 #include <vector>
0019 
0020 template <class T>
0021 class MagneticFieldProvider;
0022 
0023 class MagVolume6Faces final : public MagVolume {
0024 public:
0025   MagVolume6Faces(const PositionType& pos,
0026                   const RotationType& rot,
0027                   const std::vector<VolumeSide>& faces,
0028                   const MagneticFieldProvider<float>* mfp,
0029                   double sf = 1.);
0030 
0031   using MagVolume::inside;
0032   bool inside(const GlobalPoint& gp, double tolerance = 0.) const override;
0033 
0034   /// Access to volume faces
0035   const std::vector<VolumeSide>& faces() const override { return theFaces; }
0036 
0037   //--> These are used for debugging purposes only
0038   short volumeNo;
0039   char copyno;
0040   //<--
0041 
0042 private:
0043   std::vector<VolumeSide> theFaces;
0044 };
0045 
0046 #endif