]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentation.h
Formatting changes.
[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 DE segmentations based on the
11 /// old AliSegmentation interface:
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 /// (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  AddDESegmentation(AliMUONVGeometryDESegmentation* segmentation);
44
45     void  AddModuleSegmentation(Int_t moduleId, Int_t cathod,
46                             AliMUONGeometrySegmentation* segmentation);
47     void  Init();
48             // This function should not be needed;
49             // the segmentations should be built in a valid state
50             // To be revised                        
51
52     //
53     // get methods
54     //
55     
56     // Geometry segmentations
57     //
58
59     AliMUONGeometrySegmentation* GetModuleSegmentationByDEId(
60                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
61
62     // DE segmentations
63     //
64     const AliMUONVGeometryDESegmentation* GetDESegmentation(
65                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
66
67                          
68     // DE properties
69     //
70     Bool_t   HasDE(Int_t detElemId, Int_t cathod = 0) const;
71     TString  GetDEName(Int_t detElemId, Int_t cathod = 0) const;
72
73   protected:
74     AliMUONSegmentation(const AliMUONSegmentation& right);
75     AliMUONSegmentation&  operator = (const AliMUONSegmentation& right);
76      
77   private:
78     AliMUONGeometrySegmentation* GetModuleSegmentation(
79                      Int_t moduleId, Int_t cathod, Bool_t warn = true) const;
80
81     // data members
82     TObjArray*  fDESegmentations;        ///< array of DE segmentations
83     TObjArray*  fModuleSegmentations[2]; ///< \brief array of module segmentations
84                                          /// for two cathods         
85   ClassDef(AliMUONSegmentation,2)  // Container class for module segmentations
86 };
87
88 #endif //ALI_MUON_SEGMENTATION_H
89
90
91
92
93
94
95