#ifndef HGEOMSTS_H #define HGEOMSTS_H #include "hgeomset.h" class HGeomSts : public HGeomSet { protected: Char_t modName[5]; // name of module Char_t eleName[3]; // substring for elements in module public: HGeomSts(); ~HGeomSts() {} inline const Char_t* getModuleName(Int_t); inline const Char_t* getEleName(Int_t); inline Int_t getModNumInMod(const TString&); ClassDef(HGeomSts,0) // Class for geometry of the new forward detector }; inline const Char_t* HGeomSts::getModuleName(Int_t m) { // Returns the name of module m sprintf(modName,"AD%iM",m+1); return modName; } inline const Char_t* HGeomSts::getEleName(Int_t m) { // Returns the element name in module m sprintf(eleName,"A%i",m+1); return eleName; } inline Int_t HGeomSts::getModNumInMod(const TString& name) { // returns the module index retrieved from ADxM return (Int_t)(name[2]-'0')-1; } #endif /* !HGEOMSTS_H */