#ifndef HSTSGEANTGEOMPAR_H #define HSTSGEANTGEOMPAR_H #include "hdetgeompar.h" #include "stsdef.h" #include using namespace std; class HStsGeomPar : public HDetGeomPar { public: HStsGeomPar(const Char_t *name = "StsGeomPar", const Char_t *title = "Geometry simulation parameters of the Sts", const Char_t *context = "GeomProduction"); Bool_t init(HParIo *, Int_t *); Int_t write(HParIo *); Int_t getCompNum(const TString &); inline Int_t getSecNum(const TString &name) { // returns the module index retrieved from the module name DRxMx if(name.Length() < 5) Error("getSecNum()","Name = '%s' is too short!",name.Data()); return (Int_t)(name[4] - '0') - 1; } inline Int_t getModNumInMod(const TString &name) { // returns the module index 0 if(name.Length() < 3) Error("getModNumInMod()","Name = '%s' is too short!",name.Data()); return (Int_t)(name[2] - '0') - 1; } inline Int_t getModNumInComp(const TString &name) { // returns the module index 0 if(name.Length() < 2) Error("getModNumInComp()","Name = '%s' is too short!",name.Data()); return (Int_t)(name[1] - '0') - 1; } ClassDef(HStsGeomPar, 1); // Geometry of a Sts }; #endif // HSTSGEOMPAR_H