X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONGeometryModule.h;h=dce48e7ce24945d9b07665703f9f22b96f4d9659;hb=92fabd039e41091628d7854f3b4fb02e5b795f5a;hp=7ea89fbd2ff9c01f38de7afbddc4ff7942d851d6;hpb=f29ba3e1555f9cc21a4e8926e589d23342306213;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONGeometryModule.h b/MUON/AliMUONGeometryModule.h index 7ea89fbd2ff..dce48e7ce24 100644 --- a/MUON/AliMUONGeometryModule.h +++ b/MUON/AliMUONGeometryModule.h @@ -12,27 +12,27 @@ /// (the transformations of detection elements, mapping between /// sensitive volumes and detection elements). /// -/// Author: Ivana Hrivnacova, IPN Orsay +/// \author Ivana Hrivnacova, IPN Orsay #ifndef ALI_MUON_GEOMETRY_MODULE_H #define ALI_MUON_GEOMETRY_MODULE_H +#include "AliMUONGeometryModuleTransformer.h" + #include #include +class AliMUONGeometryEnvelope; +class AliMUONGeometryEnvelopeStore; +class AliMUONGeometryDetElement; +class AliMUONStringIntMap; + class TGeoTranslation; class TGeoRotation; class TGeoCombiTrans; class TObjArray; class TArrayI; -class AliMUONGeometryEnvelope; -class AliMUONGeometryEnvelopeStore; -class AliMUONGeometryDetElement; -class AliMUONGeometryStore; -class AliMUONGeometrySVMap; -class AliMUONVGeometryDEIndexing; - class AliMUONGeometryModule : public TObject { public: @@ -40,50 +40,35 @@ class AliMUONGeometryModule : public TObject AliMUONGeometryModule(); virtual ~AliMUONGeometryModule(); - // 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 SetMotherVolume(const TString& motherVolumeName); - void SetVolume(const TString& volumeName); - void SetTranslation(const TGeoTranslation& translation); - void SetRotation(const TGeoRotation& rotation); + // + void SetTransformation(const TGeoCombiTrans& transform); + void SetVolumePath(const TString& volumePath); + void SetIsVirtual(Bool_t isVirtual); void SetSensitiveVolume(Int_t volId); void SetSensitiveVolume(const TString& name); void SetAlign(Bool_t align); // get methods - Bool_t IsVirtual() const; - Int_t GetModuleId() const; - TString GetMotherVolume() const; - TString GetVolume() const; - const TGeoCombiTrans* GetTransformation() const; + // + Bool_t IsVirtual() const; + Int_t GetModuleId() const; + TString GetVolumePath() const; + AliMUONGeometryDetElement* FindBySensitiveVolume( const TString& volumePath) const; - AliMUONVGeometryDEIndexing* GetDEIndexing() const; - AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const; - AliMUONGeometryStore* GetDetElementStore() const; - AliMUONGeometryDetElement* GetDetElement(Int_t detElemId) const; - AliMUONGeometrySVMap* GetSVMap() const; Bool_t IsSensitiveVolume(Int_t volId) const; Bool_t IsSensitiveVolume(const TString& volName) const; + AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const; + AliMUONStringIntMap* GetSVMap() const; + AliMUONGeometryModuleTransformer* GetTransformer() const; + protected: + /// Not implemented AliMUONGeometryModule(const AliMUONGeometryModule& rhs); - // operators + /// Not implemented AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs); private: @@ -91,56 +76,49 @@ class AliMUONGeometryModule : public TObject Int_t GetSVIndex(Int_t svVolId) const; // data members - Bool_t fIsVirtual; // true if module is not represented - // by a real volume - Int_t fModuleId; // the module Id - TString fMotherVolume; // mother volume name - TString fVolume; // the volume name if not virtual - Int_t fNofSVs; // number of sensitive volumes - TArrayI* fSVVolumeIds; // densitive volumes IDs - TGeoCombiTrans* fTransformation;// the module transformation wrt to mother - // volume - AliMUONGeometryEnvelopeStore* fEnvelopes; // envelopes - AliMUONVGeometryDEIndexing* fDEIndexing; // DE indexing - AliMUONGeometryStore* fDetElements;// detection elements - AliMUONGeometrySVMap* fSVMap; // sensitive volumes map + Bool_t fIsVirtual; ///< \brief true if module is not represented + /// by a real volume + Int_t fNofSVs; ///< number of sensitive volumes + TArrayI* fSVVolumeIds; ///< sensitive volumes IDs + + AliMUONGeometryEnvelopeStore* fEnvelopes; ///< envelopes + AliMUONStringIntMap* fSVMap; ///< sensitive volumes map + AliMUONGeometryModuleTransformer* fTransformer;///< geometry transformations - ClassDef(AliMUONGeometryModule,2) // MUON geometry module class + ClassDef(AliMUONGeometryModule,4) // MUON geometry module class }; // inline functions -inline void -AliMUONGeometryModule::SetMotherVolume(const TString& motherVolumeName) -{ fMotherVolume = motherVolumeName; } +/// Set virtuality (true if module is not represented by a real volume) +inline void AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual) +{ fIsVirtual = isVirtual; } +/// Return true if module is not represented by a real volume inline Bool_t AliMUONGeometryModule::IsVirtual() const { return fIsVirtual; } +/// Return module ID inline Int_t AliMUONGeometryModule::GetModuleId() const -{ return fModuleId; } - -inline TString AliMUONGeometryModule::GetMotherVolume() const -{ return fMotherVolume; } +{ return fTransformer->GetModuleId(); } -inline TString AliMUONGeometryModule::GetVolume() const -{ return fVolume; } +/// Return the full path of aligned module volume or envelope in geometry +inline TString AliMUONGeometryModule::GetVolumePath() const +{ return fTransformer->GetVolumePath(); } -inline const TGeoCombiTrans* AliMUONGeometryModule::GetTransformation() const -{ return fTransformation; } - -inline AliMUONGeometryEnvelopeStore* -AliMUONGeometryModule::GetEnvelopeStore() const +/// Return envelopes associated with this module +inline +AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const { return fEnvelopes; } -inline AliMUONVGeometryDEIndexing* -AliMUONGeometryModule::GetDEIndexing() const -{ return fDEIndexing; } - -inline AliMUONGeometryStore* AliMUONGeometryModule::GetDetElementStore() const -{ return fDetElements; } - -inline AliMUONGeometrySVMap* AliMUONGeometryModule::GetSVMap() const +/// Return sensitive volume map +inline +AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const { return fSVMap; } +/// Return transformer +inline +AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const +{ return fTransformer; } + #endif //ALI_MUON_GEOMETRY_MODULE_H