]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentation.h
- GetModuleSegmentation(moduleId) moved to private to prevent from
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentation.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5
6 /// \ingroup geometry
7 /// \class AliMUONSegmentation
8 /// \brief Container class for modules segmentations
9 ///
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)
14 ///
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. 
19 /// 
20 /// \author Ivana Hrivnacova, IPN Orsay
21
22 #ifndef ALI_MUON_SEGMENTATION_H
23 #define ALI_MUON_SEGMENTATION_H
24
25 #include <TObject.h>
26 #include <TGeoMatrix.h>
27
28 class TObjArray;
29
30 class AliMpVSegmentation;
31
32 class AliMUONGeometrySegmentation;
33 class AliMUONVGeometryDESegmentation;
34
35 class AliMUONSegmentation : public TObject
36 {
37   public:
38     AliMUONSegmentation(Int_t nofModules);
39     AliMUONSegmentation();
40     virtual  ~AliMUONSegmentation();
41     
42     // methods
43     void  AddMpSegmentation(AliMpVSegmentation* segmentation);
44     void  AddDESegmentation(AliMUONVGeometryDESegmentation* segmentation);
45
46     void  AddModuleSegmentation(Int_t moduleId, Int_t cathod,
47                             AliMUONGeometrySegmentation* segmentation);
48     void  Init();
49             // This function should not be needed;
50             // the segmentations should be built in a valid state
51             // To be revised                        
52
53     //
54     // get methods
55     //
56     
57     // Geometry segmentations
58     //
59
60     AliMUONGeometrySegmentation* GetModuleSegmentationByDEId(
61                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
62
63     // DE segmentations
64     //
65     const AliMUONVGeometryDESegmentation* GetDESegmentation(
66                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
67
68     /** Mapping segmentations access by cathode number.
69       cathod can be 0 or 1. Note that there's no trivial relationship
70       between the cathod number and whether the corresponding plane
71       is a Bending or NonBending one.
72       **/
73     const AliMpVSegmentation* GetMpSegmentation(
74                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
75                          
76     // DE properties
77     //
78     Bool_t   HasDE(Int_t detElemId, Int_t cathod = 0) const;
79     TString  GetDEName(Int_t detElemId, Int_t cathod = 0) const;
80
81   protected:
82     AliMUONSegmentation(const AliMUONSegmentation& right);
83     AliMUONSegmentation&  operator = (const AliMUONSegmentation& right);
84      
85   private:
86     AliMUONGeometrySegmentation* GetModuleSegmentation(
87                      Int_t moduleId, Int_t cathod, Bool_t warn = true) const;
88
89     // data members
90     TObjArray*  fMpSegmentations;        ///< array of mapping segmentations
91     TObjArray*  fDESegmentations;        ///< array of DE segmentations
92     TObjArray*  fModuleSegmentations[2]; ///< \brief array of module segmentations
93                                          /// for two cathods         
94   ClassDef(AliMUONSegmentation,2)  // Container class for module segmentations
95 };
96
97 #endif //ALI_MUON_SEGMENTATION_H
98
99
100
101
102
103
104