#ifndef TGeomModuleBase_hxx_seen #define TGeomModuleBase_hxx_seen #include #include #include #include #include #include #include #include "EoaGeomInfo.hxx" #include "IScintBarGeom.hxx" namespace COMET { OA_EXCEPTION(EGeomBase, EoaGeomInfo); OA_EXCEPTION(ENoSuchModule, EGeomBase); OA_EXCEPTION(EBadOrientation, EGeomBase); class IGeomModuleBase; class IGeomBase; class IGeomInfo; }; class COMET::IGeomModuleBase { friend class IGeomInfo; public: enum EmoduleOrientation { kPlusX, kMinusX, kPlusY, kMinusY, kPlusZ, kWrong }; IGeomModuleBase(){/*fModuleNames.clear();*/} IGeomModuleBase(std::string thePath); IGeomModuleBase(COMET::IGeomModuleBase::EmoduleOrientation orientation); virtual ~IGeomModuleBase(); //Set the orientation from what the path says (path must have been set) virtual void pathToOrientation(std::string path){} /// fill module geometry information virtual void Fill(){} /// Set the unique path of the module void SetPath(const char* path); /// Get the unique path of the module const std::string& GetPath() const {return fModulePath;} /// Get the node ID of the module //Int_t GetNodeID() const {return fModuleNodeID;} COMET::IGeometryId GetGeomId() const { return fModuleGeomId; } // return orientation of the module in space COMET::IGeomModuleBase::EmoduleOrientation GetOrientation() const {return fOrientation;} /// Get the average radiation length const double GetX0() const {return fX0;} /// Set the average radiation length void SetX0(double x0) {fX0 = x0;} /// Get the average dE/dx (use a constant value for the moment) const double GetDeDx(double p) const {return fDeDx;} /// Set the average dE/dx (use a constant value for the moment) void SetDeDx(double dedx) {fDeDx=dedx;} protected: virtual void setUpNames(){} std::string fModulePath; //Int_t fModuleNodeID; COMET::IGeometryId fModuleGeomId; COMET::IGeomModuleBase::EmoduleOrientation fOrientation; double fX0; double fDeDx; }; #endif