MpdMcordGeo.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * MpdMcordGeo.h
  3. *
  4. * Created on: 21 maj 2019
  5. * Author: Daniel Wielanek
  6. * E-mail: daniel.wielanek@gmail.com
  7. * Warsaw University of Technology, Faculty of Physics
  8. */
  9. #ifndef MCORD_MCORD_MPDMCORDGEO_H_
  10. #define MCORD_MCORD_MPDMCORDGEO_H_
  11. #include "FairGeoSet.h" // for FairGeoSet
  12. #include "Rtypes.h" // for Int_t, etc
  13. #include "TString.h"
  14. class MpdMcordGeo : public FairGeoSet{
  15. protected:
  16. char modName[20]; // name of module
  17. char eleName[20]; // substring for elements in module
  18. public:
  19. MpdMcordGeo();
  20. const char* getModuleName(Int_t );
  21. const char* getEleName(Int_t);
  22. inline Int_t getModNumInMod(const TString& name);
  23. virtual ~MpdMcordGeo();
  24. ClassDef(MpdMcordGeo,1)
  25. };
  26. inline Int_t MpdMcordGeo::getModNumInMod(const TString& name)
  27. {
  28. /** returns the module index from module name
  29. ?? in name[??] has to be the length of the detector name in the
  30. .geo file. For example if all nodes in this file starts with
  31. tutdet ?? has to be 6.
  32. */
  33. return static_cast<Int_t>((name[5]-'0')-1); //
  34. }
  35. #endif /* MCORD_MCORD_MPDMCORDGEO_H_ */