#ifndef GEOMETRY_HH #define GEOMETRY_HH typedef double Float; class Constants { public: static const double inchToMeter; static const double mmToMeter; static const double degreeToRadian; static const double radianToDegree; }; class Layer { public: int numberWires() {return _numberWires;} Float offsetFirstWire() {return _offsetFirstWire;} Float radius() {return _radius;} Float halfLength() {return _halfLength;} Float dCellDz() {return _dCellDz;} bool isStereo() {return _isStereo;} friend istream& operator>> (istream&, Layer&); friend ostream& operator<< (ostream&, Layer&); protected: int layerNumber; int _numberWires; Float _offsetFirstWire; Float _radius; Float _halfLength; Float _dCellDz; bool _isStereo; }; class Boundary { public: Float radius() {return _radius;} Float thickness() {return _thickness;} Float radLength() {return _radLength;} friend ostream& operator<< (ostream&, Boundary&); friend istream& operator>> (istream&, Boundary&); protected: Float _radius; Float _thickness; Float _radLength; }; class Detector { public: void PostScript(ostream&); friend ostream& operator<< (ostream&, Detector&); static Detector* Instance(char*, istream&); protected: char name[40]; int numberLayers; Layer* layer; Boundary* innerBoundary; Boundary* outerBoundary; Detector(char*, istream&); private: static Detector* _instance; }; #endif