]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentation.h
ReadRaw(): TGraphs are created once per event (B.Polichtchouk)
[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     AliMUONGeometrySegmentation* GetModuleSegmentation(
60                      Int_t moduleId, Int_t cathod, Bool_t warn = true) const;
61
62     AliMUONGeometrySegmentation* GetModuleSegmentationByDEId(
63                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
64
65     // DE segmentations
66     //
67     const AliMUONVGeometryDESegmentation* GetDESegmentation(
68                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
69
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.
74       **/
75     const AliMpVSegmentation* GetMpSegmentation(
76                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
77                          
78     // DE properties
79     //
80     Bool_t   HasDE(Int_t detElemId, Int_t cathod = 0) const;
81     TString  GetDEName(Int_t detElemId, Int_t cathod = 0) const;
82
83   protected:
84     AliMUONSegmentation(const AliMUONSegmentation& right);
85     AliMUONSegmentation&  operator = (const AliMUONSegmentation& right);
86      
87   private:
88     // data members
89     TObjArray*  fMpSegmentations;        ///< array of mapping segmentations
90     TObjArray*  fDESegmentations;        ///< array of DE segmentations
91     TObjArray*  fModuleSegmentations[2]; ///< \brief array of module segmentations
92                                          /// for two cathods         
93   ClassDef(AliMUONSegmentation,2)  // Container class for module segmentations
94 };
95
96 #endif //ALI_MUON_SEGMENTATION_H
97
98
99
100
101
102
103