00001
00002
00003 #ifndef __SITRACKER_H
00004 #define __SITRACKER_H 1
00005
00006
00007 #include "instrument/GlastDetector.h"
00008 #include "instrument/DetectorVisitor.h"
00009 #include "instrument/SiDetector.h"
00010 #include "xml/IFile.h"
00011
00018 class SiTracker : public GlastDetector, public DetectorVisitor {
00019 public:
00020
00021 class _Factory : public GlastDetector::_Factory {
00022 public:
00023 xml::PersistentObject* create ( const DOM_Element& parent) {
00024 return new SiTracker (parent);
00025 }
00026 };
00027
00029 typedef SiDetector SiLayerType;
00030
00031 SiTracker ();
00032
00033 virtual ~SiTracker ();
00034
00036 static void loadParameters(xml::IFile& ini);
00037
00038
00039
00041 static int numTrays () { return num_trays; }
00042
00044 static double traySpacing () { return tray_spacing; }
00045
00047 static double zFirstPlane () { return z_first_plane; }
00048
00050 static double convRadLen (int i=3, int towerid=0);
00051
00053 static double siStripPitch () { return SiDetector::si_strip_pitch(); }
00054
00056 static double siThickness () { return si_thickness; }
00057
00059 static double modWidth () { return mod_width; }
00060
00062 static double footThickness () {return foot_thickness; }
00063
00065 static double electronicsGap () {return electronics_gap; }
00066
00068 static const char* color () { return s_color; }
00069
00070 static const char* conv_mat() {return s_conv_mat;}
00071
00072
00073 void visit ( SiDetector* );
00074 void accept ( DetectorVisitor& );
00075
00076
00077 virtual const char* nameOf () const { return "SiTracker"; }
00078
00079
00080 static const GlastDetector::_PersistKey classPersistKey;
00081
00082 virtual DOM_Element persist(DOM_Element&) const;
00083
00084
00085 static void set_spec_file_name(const char *){}
00086 static std::string spec_file_name(){return "";}
00087
00088 protected:
00089 SiTracker(const DOM_Element&);
00090
00091
00092 const GlastDetector::_PersistKey& persistKey () const {
00093 return classPersistKey;
00094 }
00095
00096
00097 friend class _Factory;
00098
00099 private:
00100
00101 static int num_trays;
00102 static double tray_spacing;
00103 static double z_first_plane;
00104 static xml::IFile::doubleVector s_conv_rad_len;
00105 static double si_thickness;
00106 static double mod_width;
00107 static double panel_thickness;
00108 static double foot_thickness;
00109 static double electronics_gap;
00110 static const char* s_conv_mat;
00111 static const char* s_color;
00112 };
00113
00114 #endif