]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentation.h
Adding MuonSim.SetMakeTrigger(MUON); now required by the new CTP framework (Christian)
[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 /// As some detection element are sharing the same objects
15 /// (AliMpVSegmentation, AliMUONVGeometryDESegmentation),
16 /// all segmentations objects have to be always deleted
17 /// altogether via deleting this container object. 
18 /// 
19 /// Author: Ivana Hrivnacova, IPN Orsay
20
21 #ifndef ALI_MUON_SEGMENTATION_H
22 #define ALI_MUON_SEGMENTATION_H
23
24 #include <TObject.h>
25 #include <TGeoMatrix.h>
26
27 class TObjArray;
28
29 class AliMpVSegmentation;
30
31 class AliMUONGeometrySegmentation;
32 class AliMUONVGeometryDESegmentation;
33
34 class AliMUONSegmentation : public TObject
35 {
36   public:
37     AliMUONSegmentation(Int_t nofModules);
38     AliMUONSegmentation();
39     virtual  ~AliMUONSegmentation();
40     
41     // methods
42     void  AddMpSegmentation(AliMpVSegmentation* segmentation);
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     AliMUONGeometrySegmentation* GetModuleSegmentation(
59                      Int_t moduleId, Int_t cathod, Bool_t warn = true) const;
60
61     AliMUONGeometrySegmentation* GetModuleSegmentationByDEId(
62                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
63
64     // DE segmentations
65     //
66     const AliMUONVGeometryDESegmentation* GetDESegmentation(
67                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
68
69     /** Mapping segmentations access by cathode number.
70       cathod can be 0 or 1. Note that there's no trivial relationship
71       between the cathode number and whether the corresponding plane
72       is a Bending or NonBending one.
73       **/
74     const AliMpVSegmentation* GetMpSegmentation(
75                      Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
76                          
77     // DE properties
78     //
79     Bool_t   HasDE(Int_t detElemId, Int_t cathod = 0) const;
80     TString  GetDEName(Int_t detElemId, Int_t cathod = 0) const;
81
82   protected:
83     AliMUONSegmentation(const AliMUONSegmentation& right);
84     AliMUONSegmentation&  operator = (const AliMUONSegmentation& right);
85      
86   private:
87     // data members
88     TObjArray*  fMpSegmentations;        // array of mapping segmentations
89     TObjArray*  fDESegmentations;        // array of DE segmentations
90     TObjArray*  fModuleSegmentations[2]; // array of module segmentations
91                                          // for two cathods         
92   ClassDef(AliMUONSegmentation,2)  // Container class for module segmentations
93 };
94
95 #endif //ALI_MUON_SEGMENTATION_H
96
97
98
99
100
101
102