Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

CalDetGeo.h

Go to the documentation of this file.
00001 #ifndef __CalDetGeo_H
00002 #define __CalDetGeo_H 1
00003 
00004 #include <vector>
00005 #include <string>
00006 #include "CalRecon/CalAxis.h"
00007 #include "geometry/Point.h"
00008 #include "gui/DisplayRep.h"
00009 
00010 //##############################################
00011 class CalGeo
00012 //##############################################
00013 {
00014 public:
00015         // construct
00016         CalGeo(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 CalMatGeo : public CalGeo
00034 //##############################################
00035 {
00036 public:
00037 
00038         // construct
00039         CalMatGeo(){}
00040         CalMatGeo(Point p, Point s):m_material("vacuum"),m_X0(0), CalGeo(p,s){}
00041         CalMatGeo(std::string name, double d, Point p, Point s):m_material("vacuum"),
00042                 m_X0(0), CalGeo(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 CalDetGeo : public CalMatGeo, public CalAxis
00057 //##############################################
00058 {
00059 public:
00060 
00061 
00062 public:
00063 
00064         // construct
00065         CalDetGeo(int ilayer, axis a, int id, Point p, Point s):m_layer(ilayer),
00066                 m_axis(a), m_id(id), CalMatGeo(p,s) {}
00067         CalDetGeo(int ilayer, axis a, int id): m_layer(ilayer),
00068                 m_axis(a), m_id(id), CalMatGeo() {}
00069         ~CalDetGeo() {};
00070         void setName(std::string n)  {m_name = n;}
00071 
00072         // access
00073 //      type getType() const        {return m_type;}
00074         int layer()            const {return m_layer;}
00075         axis getAxis()         const {return m_axis;}
00076         int id()               const {return m_id;}
00077         std::string name()     const {return m_name;}
00078 
00079         // operations
00080         static CalDetGeo::axis makeAxis(int i) {return (i == 0? CalDetGeo::X : CalDetGeo::Y);}
00081         static int makeAxis(CalDetGeo::axis a) {return (int) a;}
00082         // void writeOut() const;
00083         void draw(gui::DisplayRep& v) const;
00084 
00085 private:
00086 
00087         std::string m_name;
00088         int m_layer;
00089         axis m_axis;
00090         int m_id;
00091 
00092 };
00093 
00094 #endif

Generated on Thu Nov 29 16:38:48 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001