]>
Commit | Line | Data |
---|---|---|
fc337f2e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /* $Id$ */ | |
5 | ||
5398f946 | 6 | /// \ingroup base |
fc337f2e | 7 | /// \class AliMUONSegFactory |
8 | /// \brief New factory for building segmentations at all levels | |
13985652 | 9 | /// |
e9b0e655 | 10 | /// The factory is associated with the AliMUONGeometryTransformer |
fc337f2e | 11 | /// object, used in geometry (module) segmentations for performing |
12 | /// trasformation between the global reference frame and the local DE one. | |
13 | /// This transformer object can be passed by pointer or can be created | |
14 | /// by a factory and filled from the transformations data file. | |
15 | /// The transformer need not to be set if factory is used only | |
16 | /// to create mapping segmentation: \n | |
17 | /// | |
18 | /// Construction: | |
19 | /// - AliMUONSegFactory factory(kTransformer); | |
43151827 | 20 | /// - AliMUONSegFactory factory("volpath.dat", "transform.dat"); |
fc337f2e | 21 | /// - AliMUONSegFactory factory(0); \n |
22 | /// | |
23 | /// All created objects are registered in the AliMUONSegmentation | |
24 | /// object, which can be accessed via GetSegmentation() method. | |
25 | /// A repetetive call to the same Create.. method does not create | |
26 | /// a new object but returns the existing one. \n | |
27 | /// | |
28 | /// Factory does not delete the created segmentation objects. | |
29 | /// They have to be deleted in the client code via the AliMUONSegmentation | |
30 | /// container: \n | |
31 | /// delete factory.GetSegmentation(); | |
32 | /// | |
13985652 | 33 | /// \author Ivana Hrivnacova, IPN Orsay |
fc337f2e | 34 | |
35 | #ifndef ALI_MUON_SEG_FACTORY_H | |
36 | #define ALI_MUON_SEG_FACTORY_H | |
37 | ||
fc337f2e | 38 | #include "AliMpStringObjMap.h" |
866c3232 | 39 | #include "AliMpCathodType.h" |
fc337f2e | 40 | |
41 | #include <TObject.h> | |
42 | ||
43 | class AliMpVSegmentation; | |
44 | class AliMUONVGeometryDESegmentation; | |
45 | class AliMUONGeometrySegmentation; | |
46 | class AliMUONSegmentation; | |
47 | class AliMUONGeometryTransformer; | |
48 | ||
49 | class AliMUONSegFactory : public TObject { | |
50 | ||
51 | public: | |
52 | AliMUONSegFactory(const AliMUONGeometryTransformer* geometry); | |
4f27ddd4 | 53 | AliMUONSegFactory(const TString& volPathsFileName, |
54 | const TString& transformsFileName); | |
fc337f2e | 55 | AliMUONSegFactory(); |
56 | virtual ~AliMUONSegFactory(); | |
57 | ||
58 | // | |
59 | // Build methods | |
60 | // | |
61 | ||
c3e6d1f3 | 62 | AliMUONSegmentation* CreateSegmentation(); |
fc337f2e | 63 | // Create segmentations on all levels and return their container. |
64 | ||
65 | // | |
66 | // Get method | |
67 | // | |
68 | AliMUONSegmentation* GetSegmentation() const; | |
69 | // Returned segmentation contains all the lower level segmentations | |
70 | // created with the factory | |
71 | ||
71a2d3aa | 72 | private: |
73 | /// Not implemented | |
fc337f2e | 74 | AliMUONSegFactory(const AliMUONSegFactory& rhs); |
71a2d3aa | 75 | /// Not implemented |
fc337f2e | 76 | AliMUONSegFactory& operator=(const AliMUONSegFactory& rhs); |
77 | ||
e9b0e655 | 78 | AliMUONVGeometryDESegmentation* |
866c3232 | 79 | CreateDESegmentation(Int_t detElemId, AliMp::CathodType cath); |
e9b0e655 | 80 | // Create DE segmentation, operating in local reference frame |
81 | ||
82 | void | |
866c3232 | 83 | CreateModuleSegmentations(Int_t chamberId, AliMp::CathodType cath); |
e9b0e655 | 84 | // Create module segmentation(s) for a given chamber, operating |
85 | // in global reference frame | |
86 | ||
fc337f2e | 87 | // methods |
88 | Bool_t IsGeometryDefined(Int_t ichamber); | |
89 | AliMUONSegmentation* Segmentation(); | |
90 | ||
fc337f2e | 91 | // data members |
ae505e9f | 92 | AliMpStringObjMap fDESegmentations;///< Map of DE segmentations to DE seg names |
18b6b8c7 | 93 | AliMUONSegmentation* fSegmentation; ///< Segmentation container |
94 | const AliMUONGeometryTransformer* fkTransformer; ///< Geometry transformer | |
fc337f2e | 95 | |
96 | ClassDef(AliMUONSegFactory,0) // MUON Factory for Chambers and Segmentation | |
97 | }; | |
98 | ||
5398f946 | 99 | /// Return segmentation |
fc337f2e | 100 | inline AliMUONSegmentation* AliMUONSegFactory::GetSegmentation() const |
101 | { return fSegmentation; } | |
102 | ||
103 | #endif //ALI_MUON_SEG_FACTORY_H | |
104 | ||
105 | ||
106 | ||
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 |