Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:33

0001 #ifndef MagBLayer_H
0002 #define MagBLayer_H
0003 
0004 /** \class MagBLayer
0005  *  
0006  *  A barrel layer (MagBLayer) groups volumes at the same distance to
0007  *  the origin. It consists of either 1 single volume (a cylinder) or
0008  *  12 sectors in phi (MagBSector). 
0009  *  Each sector consists of one or more rods (MagBRods) of equal width in phi.
0010  *  Rods consist of one or more slabs (MagBSlab); each one consisting of one 
0011  *  or, in few cases, several volumes with the same lenght in Z.
0012  *
0013  *  \author N. Amapane - INFN Torino
0014  */
0015 
0016 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0017 #include <vector>
0018 
0019 class MagBSector;
0020 class MagVolume;
0021 template <class T>
0022 class PeriodicBinFinderInPhi;
0023 
0024 class MagBLayer {
0025 public:
0026   /// Constructor
0027   MagBLayer(std::vector<MagBSector*>& sectors, double rMin);
0028 
0029   /// Constructor for a trivial layer consisting of one single volume.
0030   MagBLayer(MagVolume* aVolume, double rMin);
0031 
0032   /// Destructor
0033   virtual ~MagBLayer();
0034 
0035   /// Find the volume containing a point, with a given tolerance
0036   const MagVolume* findVolume(const GlobalPoint& gp, double tolerance) const;
0037 
0038   /// Lowest radius of the layer
0039   double minR() const { return theRMin; }
0040 
0041 private:
0042   // To support either the case of a simple one-volume layer or a
0043   // composite structure we have both theSectors or theSingleVolume.
0044   // Only one can be active at a time; not very elegant, but acceptable.
0045   std::vector<MagBSector*> theSectors;
0046   MagVolume* theSingleVolume;
0047   double theRMin;
0048 
0049   PeriodicBinFinderInPhi<float>* theBinFinder;
0050 };
0051 #endif