Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TkrDetGeo.h

Go to the documentation of this file.
00001 #ifndef __tkrDetGeo_H
00002 #define __tkrDetGeo_H 1
00003 
00004 #include <vector>
00005 #include <string>
00006 #include "TkrRecon/TkrAxis.h"
00007 #include "geometry/Point.h"
00008 #include "gui/DisplayRep.h"
00009 
00010 //##############################################
00011 class TkrGeo
00012 //##############################################
00013 {
00014 public:
00015         // construct
00016         TkrGeo(Point p = Point(0.,0.,0.), Point s=Point(0.,0.,0))
00017                 : m_position(p),m_size(s) {}
00018         void setGeo(Point p, Point s);
00019         void setPosition(Point p)   {m_position = p;};
00020         void setSize(Point s)       {m_size = s;};
00021 
00022         // access
00023         Point position() const  {return m_position;}
00024         Point size() const      {return m_size;}
00025 
00026 private:
00027 
00028         Point m_position;
00029         Point m_size;
00030 };
00031 
00032 //##############################################
00033 class TkrMatGeo : public TkrGeo
00034 //##############################################
00035 {
00036 public:
00037 
00038         // construct
00039         TkrMatGeo(){}
00040         TkrMatGeo(Point p, Point s):m_material("vacuum"),m_X0(0), TkrGeo(p,s){}
00041         TkrMatGeo(std::string name, double d, Point p, Point s):m_material("vacuum"),
00042                 m_X0(0), TkrGeo(p,s){}
00043         void setMaterial(std::string name, double d);
00044 
00045         // access
00046         std::string material() const  {return m_material;}
00047         double X0() const        {return m_X0;}
00048         double radLen();
00049 
00050 private:
00051 
00052         std::string   m_material;
00053         double        m_X0;
00054 };
00055 //##############################################
00056 class tkrDetGeo : public TkrMatGeo, public TkrAxis
00057 //##############################################
00058 {
00059 public:
00060 
00061         friend class trackerGeo;
00062 
00063 public:
00064 
00065         // construct
00066         tkrDetGeo(int ilayer, axis a, int id, Point p, Point s):m_layer(ilayer),
00067                 m_axis(a), m_id(id), TkrMatGeo(p,s) {}
00068         tkrDetGeo(int ilayer, axis a, int id): m_layer(ilayer),
00069                 m_axis(a), m_id(id), TkrMatGeo() {}
00070         ~tkrDetGeo() {};
00071         void setName(std::string n)  {m_name = n;}
00072 
00073         // access
00074 //      type getType() const        {return m_type;}
00075         int layer()            const {return m_layer;}
00076         axis getAxis()         const {return m_axis;}
00077         int id()               const {return m_id;}
00078         std::string name()     const {return m_name;}
00079 
00080         // operations
00081         static tkrDetGeo::axis makeAxis(int i) {return (i == 0? tkrDetGeo::X : tkrDetGeo::Y);}
00082         static int makeAxis(tkrDetGeo::axis a) {return (int) a;}
00083         // void writeOut() const;
00084         void draw(gui::DisplayRep& v) const;
00085 
00086 private:
00087 
00088         std::string m_name;
00089         int m_layer;
00090         axis m_axis;
00091         int m_id;
00092 
00093 };
00094 
00095 #endif

Generated at Wed Nov 21 12:21:21 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000