MpdKalmanGeoScheme.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef MPDKALMANGEOSCHEME_H
  2. #define MPDKALMANGEOSCHEME_H
  3. /// \ingroup rec
  4. /// \class MpdKalmanGeoScheme
  5. /// \brief Geometry manager for MPD Kalman filter
  6. ///
  7. /// \author Alexander Zinchenko, LHEP JINR Dubna
  8. class MpdKalmanHit;
  9. #include <TString.h>
  10. #include <TVector2.h>
  11. #include <TVector3.h>
  12. #include <map>
  13. class MpdKalmanGeoScheme : public TObject
  14. {
  15. public:
  16. MpdKalmanGeoScheme(); ///< Default ctor
  17. virtual ~MpdKalmanGeoScheme(); ///< Destructor
  18. Bool_t Exist(Int_t detID); ///< check if detector detID exists in geo scheme
  19. TVector3 GlobalPos(const MpdKalmanHit *hit); ///< get global coordinates of the hit
  20. TVector3 Normal(const MpdKalmanHit *hit); ///< get normal direction to the plane hit
  21. TVector2 Size(const MpdKalmanHit *hit); ///< get detector dimensions
  22. Int_t DetId(TString detName); ///< get detector ID from its name
  23. TString Path(Int_t detId); ///< get detector path from its ID
  24. void SetGlobalPos(const MpdKalmanHit *hit, TVector3 pos, Bool_t erase = kFALSE); ///< put hit in GeoScheme
  25. void SetGlobalPos(Int_t detID, TVector3 pos, Bool_t erase = kFALSE); ///< put detector position in GeoScheme
  26. void SetNormal(Int_t detID, TVector3 norm, Bool_t erase = kFALSE); ///< put detector normal in GeoScheme
  27. void SetSize(Int_t detID, TVector2 size, Bool_t erase = kFALSE); ///< put detector dimensions in GeoScheme
  28. void SetDetId(TString detName, Int_t detID); ///< store detector ID with name detName
  29. void SetPath(Int_t detID, TString path, Bool_t erase = kFALSE); ///< store detector path with detID
  30. void Reset(); ///< reset maps
  31. protected:
  32. //virtual void Finish();
  33. private:
  34. std::map<Int_t,TVector3> fPosMap;
  35. std::map<Int_t,TVector3> fNormMap;
  36. std::map<Int_t,TVector2> fSizeMap;
  37. std::map<TString,Int_t> fDetMap;
  38. std::map<Int_t,TString> fPathMap;
  39. ClassDef(MpdKalmanGeoScheme,1);
  40. };
  41. #endif