X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONGeometrySegmentation.h;h=d41d419d6b6500727d3396d016ecb2ea5164ac0b;hb=9938d01c15dc844539262c4b9d7c8f9c4e985f05;hp=915157cec989c63432dc4c7f890f3a192b2d46fb;hpb=4ebc23234314e2b9a3fc0684288ba1035aab0313;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONGeometrySegmentation.h b/MUON/AliMUONGeometrySegmentation.h index 915157cec98..d41d419d6b6 100644 --- a/MUON/AliMUONGeometrySegmentation.h +++ b/MUON/AliMUONGeometrySegmentation.h @@ -3,49 +3,65 @@ /* $Id$ */ -// -// Class AliMUONGeometrySegmentation -// ---------------------------------- -// New class for the geometry segmentation -// composed of the segmentations of detection elements. -// Applies transformations defined in geometry. -// -// Author:Ivana Hrivnacova, IPN Orsay +/// \ingroup geometry +/// \class AliMUONGeometrySegmentation +/// \brief Segmentation for a geometry module +/// +/// New class for the geometry segmentation +/// composed of the segmentations of detection elements. +/// Applies transformations defined in geometry. +/// +/// \author Ivana Hrivnacova, IPN Orsay #ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H #define ALI_MUON_GEOMETRY_SEGMENTATION_H -#include - #include "AliMUONGeometryDirection.h" +#include +#include + class TObjArray; class TF1; -class AliMUONGeometryModule; -class AliMUONGeometryStore; +class AliMUONGeometryModuleTransformer; class AliMUONGeometryDetElement; class AliMUONVGeometryDESegmentation; +class AliMUONSegmentManuIndex; + +class AliMpExMap; class AliMUONGeometrySegmentation : public TObject { public: - AliMUONGeometrySegmentation(AliMUONGeometryModule* geometry); + AliMUONGeometrySegmentation( + const AliMUONGeometryModuleTransformer* geometry); AliMUONGeometrySegmentation(); virtual ~AliMUONGeometrySegmentation(); - // methods - void Add(Int_t detElemId, + // Methods + // + void Add(Int_t detElemId, const TString& detElemName, AliMUONVGeometryDESegmentation* segmentation); - // get methods - AliMUONGeometryModule* GetGeometry() const; - virtual AliMUONGeometryDirection GetDirection(Int_t detElemId) const; + // Get methods + // + const AliMUONGeometryModuleTransformer* GetTransformer() const; + // Geometry transformer + + const AliMUONVGeometryDESegmentation* GetDESegmentation( + Int_t detElemId, Bool_t warn = true) const; + // DE segmentation + + AliMUONGeometryDirection GetDirection(Int_t detElemId) const; // Direction with a constant pad size - // (Direction or coordinate where the resolution is the best) + // (Direction or coordinate where the resolution + // is the best) - // - // redefined methods from AliSegmentation interface + TString GetDEName(Int_t detElemId) const; + // DE name + + // Redefined methods from AliSegmentation interface // // Set Chamber Segmentation Parameters @@ -68,6 +84,11 @@ class AliMUONGeometrySegmentation : public TObject Float_t& x, Float_t& y, Float_t& z); // Transform from real to pad coordinates + virtual Bool_t HasPad(Int_t detElemId, + Int_t ix, Int_t iy); + virtual Bool_t HasPad(Int_t detElemId, + Float_t x, Float_t y, Float_t z); + // Initialisation // virtual void Init(Int_t chamber); @@ -157,31 +178,42 @@ class AliMUONGeometrySegmentation : public TObject // Set the correction function virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const; // Get the correction Function - + // Printing + // + virtual void Print(Option_t* opt = "") const; + protected: AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs); - - // operators AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs); private: // methods - Bool_t OwnNotify(Int_t detElemId) const; + Bool_t OwnNotify(Int_t detElemId, Bool_t warn = true) const; + + // static data members + static const Float_t fgkMaxDistance; ///< \brief the big value passed to pad coordinates + /// if pad does not exist // data members - mutable Int_t fCurrentDetElemId; - mutable AliMUONGeometryDetElement* fCurrentDetElement; - mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation; - AliMUONGeometryModule* fGeometryModule; - AliMUONGeometryStore* fDESegmentations; + mutable Int_t fCurrentDetElemId; ///< current DE ID + mutable AliMUONGeometryDetElement* fCurrentDetElement; ///< current detection element + mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation;///< current DE segmentation + + const AliMUONGeometryModuleTransformer* fkModuleTransformer; ///< associated geometry transformer + AliMpExMap* fDESegmentations; ///< DE segmentations + AliMpExMap* fDENames; ///< DE names + - ClassDef(AliMUONGeometrySegmentation,2) // Geometry segmentation + ClassDef(AliMUONGeometrySegmentation,3) // Geometry segmentation }; // inline functions -inline AliMUONGeometryModule* AliMUONGeometrySegmentation::GetGeometry() const -{ return fGeometryModule; } +/// Return associated geometry transformer +inline +const AliMUONGeometryModuleTransformer* +AliMUONGeometrySegmentation::GetTransformer() const +{ return fkModuleTransformer; } #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H