/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ // Revision of includes 07/05/2004 /// \ingroup geometry /// \class AliMUONGeometryModuleTransformer /// \brief Geometry transformer for a detector module /// /// Class for definition of the transformation for a detector module /// and its detection elements /// /// \author Ivana Hrivnacova, IPN Orsay #ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H #define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H #include #include class AliMUONGeometryDetElement; class AliMpExMap; class TGeoTranslation; class TGeoRotation; class TGeoHMatrix; class TObjArray; class TArrayI; class AliMUONGeometryModuleTransformer : public TObject { public: AliMUONGeometryModuleTransformer(Int_t moduleId); AliMUONGeometryModuleTransformer(TRootIOCtor* /*ioCtor*/); virtual ~AliMUONGeometryModuleTransformer(); // static methods static TString GetModuleNamePrefix(); static TString GetModuleName(Int_t moduleId); // methods void Global2Local(Int_t detElemId, Float_t xg, Float_t yg, Float_t zg, Float_t& xl, Float_t& yl, Float_t& zl) const; void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg, Double_t& xl, Double_t& yl, Double_t& zl) const; void Local2Global(Int_t detElemId, Float_t xl, Float_t yl, Float_t zl, Float_t& xg, Float_t& yg, Float_t& zg) const; void Local2Global(Int_t detElemId, Double_t xl, Double_t yl, Double_t zl, Double_t& xg, Double_t& yg, Double_t& zg) const; // set methods void SetTransformation(const TGeoHMatrix& transform); void SetVolumePath(const TString& volumePath); // get methods Int_t GetModuleId() const; TString GetModuleName() const; TString GetVolumePath() const; TString GetVolumeName() const; TString GetMotherVolumeName() const; const TGeoHMatrix* GetTransformation() const; AliMpExMap* GetDetElementStore() const; AliMUONGeometryDetElement* GetDetElement(Int_t detElemId, Bool_t warn = true) const; protected: /// Not implemented AliMUONGeometryModuleTransformer(); /// Not implemented AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs); /// Not implemented AliMUONGeometryModuleTransformer& operator = (const AliMUONGeometryModuleTransformer& rhs); private: // static data members static const TString fgkModuleNamePrefix; ///< Geometry module name prefix // data members Int_t fModuleId; ///< the module Id TString fModuleName; ///< the module name TString fVolumePath; ///< \brief the full path of aligned module volume /// or envelope in geometry TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top /// volume (world) AliMpExMap* fDetElements; ///< detection elements ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class }; // inline functions /// Return module name prefix inline TString AliMUONGeometryModuleTransformer::GetModuleNamePrefix() { return fgkModuleNamePrefix; } /// Set the full path of aligned module volume or envelope in geometry inline void AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath) { fVolumePath = volumePath; } /// Return module ID inline Int_t AliMUONGeometryModuleTransformer::GetModuleId() const { return fModuleId; } /// Return module name inline TString AliMUONGeometryModuleTransformer::GetModuleName() const { return fModuleName; } /// Return the full path of aligned module volume or envelope in geometry inline TString AliMUONGeometryModuleTransformer::GetVolumePath() const { return fVolumePath; } /// Return the module transformation wrt to the top volume (world) inline const TGeoHMatrix* AliMUONGeometryModuleTransformer::GetTransformation() const { return fTransformation; } /// Return detection elements associated with this module inline AliMpExMap* AliMUONGeometryModuleTransformer::GetDetElementStore() const { return fDetElements; } #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H