#ifndef TScintDetGeom_hxx_seen #define TScintDetGeom_hxx_seen #include #include #include #include #include #include #include #include "IScintBarGeom.hxx" namespace COMET { OA_EXCEPTION(ENoSuchScintBarGeom, EoaGeomInfo); class IScintDetGeom; class IGeomInfo; }; /// Minimal sub-detector ROOT geometry info class used in IGeomInfo. This /// contains useful information about the scintillator bars geometry and layout. /// All of the information is derived from the ROOT TGeoManager geometry /// description of the off-axis detector. Each subdetectors can be accessed /// with the following call : /// IGeomInfo::Get().P0D() to access the IP0DGeom object /// IGeomInfo::Get().FGD() to access the IFGDGeom object /// IGeomInfo::Get().ECAL() to access the IECALGeom object /// IGeomInfo::Get().SMRD() to access the ISMRDGeom object /// IGeomInfo::Get().Ingrid() to access the IIngridGeom object class COMET::IScintDetGeom { friend class IGeomInfo; public: typedef std::map BarMap; IScintDetGeom(const char* mothervolname, const char* layername, const char* barname); virtual ~IScintDetGeom(); /// Return the scintillator bar information const IScintBarGeom& GetBar(COMET::IGeometryId geomId) const; /// Return a vector of nodes for bars that are part of this sub-detector. const BarMap& GetBars() const; /// Return the scintillator bar information void ls(const char* opt); /// clear the geometry information void Clear(); /// fill the scintlillator bars geometry information. This void Fill(); private: Bool_t FindModuleBars(); BarMap fBarList; std::string fMotherVol; std::string fLayerName; std::string fBarName; std::string Left; std::string Right; void setUpNames(); }; #endif