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

Tower.h

Go to the documentation of this file.
00001 // $Id $
00002 //
00003 // Interface for the GlastDetector data abstract base class
00004 
00005 #ifndef _H_TOWER
00006 #define _H_TOWER
00007 
00008 // include headers
00009 #include "idents/ModuleId.h"
00010 
00011 #include "instrument/GlastDetector.h"
00012 #include "instrument/Calorimeter.h"
00013 #include "instrument/DetectorVisitor.h"
00014 #include <vector>
00015 
00016 // forward declarations
00017 class SiTracker;
00018 namespace xml {
00019   class IFile;
00020 }
00021 
00033 class Tower : public GlastDetector, public DetectorVisitor {  // abstract class
00034  public:
00035   Tower();
00036   Tower(idents::ModuleId id);
00037   Tower(const Tower&);
00038   virtual ~Tower ();
00039     
00040   // type declarations
00041   class _Factory : public GlastDetector::_Factory {
00042   public:
00043     xml::PersistentObject*  create(const DOM_Element& elem) 
00044       { return new Tower(elem); }
00045   };
00046     
00047   // type declarations
00048   typedef Calorimeter CalorimeterType;
00049   typedef SiTracker   TrackerType;
00050 
00051   // enumerations
00052   enum Skirt_bit{E=1,N=2,W=4,S=8};
00053     
00054   // access methods
00055   // access to tracker mod.
00056   const SiTracker*    tracker() const {return m_tracker;} 
00057 
00058   // access to cal mod.
00059   const Calorimeter*  calorimeter() const { return m_calorimeter; }  
00060   SiTracker*      tracker() { return m_tracker; }        
00061   Calorimeter*    calorimeter() { return m_calorimeter; }
00062 
00063   // module number of this tower
00064   const idents::ModuleId& getId() const { return m_module_id; }  
00065     
00066   // visitor access
00067   virtual void accept(DetectorVisitor& v);
00068   virtual void accept(DetectorConverter& v)const;
00069     
00070   // overloads from GlastDetector
00071   void    printOn(std::ostream&) const;    // print in readable form
00072   const char* nameOf() const { return "Tower"; } // detector medium name
00073     
00074   // visitation
00075   virtual void    visit(SiTracker*);
00076   virtual void    visit(Calorimeter*);
00077     
00078   //  setup parameters, done once
00079   static void loadParameters(xml::IFile& ini);
00080    
00081   // "persistence"
00082   //  virtual DOM_Element&    persist(DOM_Element&) const;
00083   virtual DOM_Element    persist(DOM_Element&) const;
00084   static const GlastDetector::_PersistKey classPersistKey;
00085 
00086   // static parameters
00087   static double       mod_width;
00088 
00089   static double       wall_thickness;
00090   static double       wall_width;
00091   static double       wall_gap;
00092   static const char*  wall_material;
00093   static const char*  wall_color;
00094 
00095   static double       tray_spacing;
00096   static double       cal_tracker_gap;
00097   static int          num_trays;
00098   static int          align;
00099     
00100     
00101  protected:
00102   Tower(const DOM_Element& elem);
00103     
00104   // "persistence"
00105   const GlastDetector::_PersistKey&   persistKey () const 
00106     { return classPersistKey; }
00107 
00108   // set methods
00109   void    tracker(SiTracker* s) { m_tracker = s; }
00110   void    calorimeter(Calorimeter* c) { m_calorimeter = c; }
00111     
00112   // friends
00113   friend class _Factory;
00114 
00115  private:
00116      idents::ModuleId        m_module_id;    // module ID for the tower
00117   SiTracker*      m_tracker;      // si-strip tracker module
00118   Calorimeter*    m_calorimeter;  // CsI calorimeter module
00119     
00120   // friends
00121   friend class GlastRecon;  // give these classes access
00122   friend class Glast;
00123 };
00124 
00125 #endif  // _H_Tower

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