#ifndef TIngridGeom_hxx_seen #define TIngridGeom_hxx_seen #include #include #include #include #include #include #include #include "IScintBarGeom.hxx" #include "IGeomBase.hxx" namespace COMET { OA_EXCEPTION(ENoSuchIngridBarGeom, EoaGeomInfo); class IIngridGeom; class IGeomInfo; }; /// Class providing some geometry information for ingrid. In this moment you can find more /// functions to interpret or create ingrid geometry on the classes at the SimIngridUtils package, /// however that might change one day from migrating the oaGeomInfo-like functions to this class. /// /// This must accessed through IGeomInfo::Get().Ingrid(). IIngridGeom is a "singleton" /// object that is managed by the IGeomInfo class (which really is a singleton.) /// class COMET::IIngridGeom: public COMET::IGeomBase { public: typedef std::map BarMap; IIngridGeom(); virtual ~IIngridGeom(); /// 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(); /// clear the geometry information void Clear(); /// fill the scintlillator bars geometry information void Fill(); /// true if id is on the ingrid detector bool IsIngrid(const COMET::IGeometryId& id) const; /// returns if this is a veto or module as defined on COMETGeomIdDef.hxx at oaEvent package int GeomIdToObjectType(const COMET::IGeometryId& id) const; /// returns the veto or module number int GeomIdToObjectNumber(const COMET::IGeometryId& id) const; /// returns the tracker number on a module int GeomIdToTracker(const COMET::IGeometryId& id) const; /// Returns if this is a vertical or horizontal scintillator as defined on COMETGeomIdDef.hxx at oaEvent package int GeomIdToProjection(const COMET::IGeometryId& id) const; /// Returns the scintillator number on the tracker/veto plane int GeomIdToScintillator(const COMET::IGeometryId& id) const; private: /// Fills the fBarList with scintillators, starting from the actual gGeoManager position Bool_t FindModuleBars(); /// Stores a list of scintillators on ingrid BarMap fBarList; }; #endif