1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONSegmentation
8 /// \brief Container class for modules segmentations
10 /// It provides access to segmentations on all levels:
11 /// - mapping segmentation
12 /// - DE segmentation (operating in local DE reference frame)
13 /// - module segmentation (operating in global reference frame)
15 /// As some detection elements are sharing the same objects
16 /// (AliMpVSegmentation, AliMUONVGeometryDESegmentation),
17 /// all segmentations objects have to be always deleted
18 /// altogether via deleting this container object.
20 /// \author Ivana Hrivnacova, IPN Orsay
22 #ifndef ALI_MUON_SEGMENTATION_H
23 #define ALI_MUON_SEGMENTATION_H
26 #include <TGeoMatrix.h>
30 class AliMpVSegmentation;
32 class AliMUONGeometrySegmentation;
33 class AliMUONVGeometryDESegmentation;
35 class AliMUONSegmentation : public TObject
38 AliMUONSegmentation(Int_t nofModules);
39 AliMUONSegmentation();
40 virtual ~AliMUONSegmentation();
43 void AddMpSegmentation(AliMpVSegmentation* segmentation);
44 void AddDESegmentation(AliMUONVGeometryDESegmentation* segmentation);
46 void AddModuleSegmentation(Int_t moduleId, Int_t cathod,
47 AliMUONGeometrySegmentation* segmentation);
49 // This function should not be needed;
50 // the segmentations should be built in a valid state
57 // Geometry segmentations
59 AliMUONGeometrySegmentation* GetModuleSegmentation(
60 Int_t moduleId, Int_t cathod, Bool_t warn = true) const;
62 AliMUONGeometrySegmentation* GetModuleSegmentationByDEId(
63 Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
67 const AliMUONVGeometryDESegmentation* GetDESegmentation(
68 Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
70 /** Mapping segmentations access by cathode number.
71 cathod can be 0 or 1. Note that there's no trivial relationship
72 between the cathod number and whether the corresponding plane
73 is a Bending or NonBending one.
75 const AliMpVSegmentation* GetMpSegmentation(
76 Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
80 Bool_t HasDE(Int_t detElemId, Int_t cathod = 0) const;
81 TString GetDEName(Int_t detElemId, Int_t cathod = 0) const;
84 AliMUONSegmentation(const AliMUONSegmentation& right);
85 AliMUONSegmentation& operator = (const AliMUONSegmentation& right);
89 TObjArray* fMpSegmentations; ///< array of mapping segmentations
90 TObjArray* fDESegmentations; ///< array of DE segmentations
91 TObjArray* fModuleSegmentations[2]; ///< \brief array of module segmentations
93 ClassDef(AliMUONSegmentation,2) // Container class for module segmentations
96 #endif //ALI_MUON_SEGMENTATION_H