MpdEmcGeo.h 749 B

123456789101112131415161718192021222324252627282930
  1. #ifndef MPDEMCDETGEO_H
  2. #define MPDEMCDETGEO_H
  3. #include "FairGeoSet.h"
  4. class MpdEmcGeo : public FairGeoSet {
  5. protected:
  6. char modName[20]; // name of module
  7. char eleName[20]; // substring for elements in module
  8. public:
  9. MpdEmcGeo();
  10. ~MpdEmcGeo() {}
  11. const char* getModuleName(Int_t);
  12. const char* getEleName(Int_t);
  13. inline Int_t getModNumInMod(const TString&);
  14. ClassDef(MpdEmcGeo,1)
  15. };
  16. inline Int_t MpdEmcGeo::getModNumInMod(const TString& name) {
  17. /** returns the module index from module name
  18. ?? in name[??] has to be the length of the detector name in the
  19. .geo file. For example if all nodes in this file starts with
  20. tutdet ?? has to be 6.
  21. */
  22. return (Int_t)(name[6]-'0')-1; //
  23. }
  24. #endif /* MPDEMCDETGEO_H */