]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSegFactory.h
Updated comments (Raffaele)
[u/mrichter/AliRoot.git] / MUON / AliMUONSegFactory.h
CommitLineData
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///
fc337f2e 10/// The factory is associated with a AliMUONGeometryTransformer
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);
4f27ddd4 20/// - AliMUONSegFactory factory("volpaths.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
38#include "AliMpSegFactory.h"
39#include "AliMpStringObjMap.h"
40
41#include <TObject.h>
42
43class AliMpVSegmentation;
44class AliMUONVGeometryDESegmentation;
45class AliMUONGeometrySegmentation;
46class AliMUONSegmentation;
47class AliMUONGeometryTransformer;
48
49class 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
62 AliMpVSegmentation*
63 CreateMpSegmentation(Int_t detElemId, Int_t cath);
64 // Create mapping segmentation only
65
66 AliMUONVGeometryDESegmentation*
67 CreateDESegmentation(Int_t detElemId, Int_t cath);
68 // Create DE segmentation, operating in local reference frame
69
70 AliMUONGeometrySegmentation*
71 CreateModuleSegmentation(Int_t moduleId, Int_t cath);
72 // Create module segmentation, operating in global reference frame
73
74 AliMUONSegmentation*
75 CreateSegmentation(const TString& option = "default");
76 // Create segmentations on all levels and return their container.
77
78 //
79 // Get method
80 //
81 AliMUONSegmentation* GetSegmentation() const;
82 // Returned segmentation contains all the lower level segmentations
83 // created with the factory
84
85 protected:
86 AliMUONSegFactory(const AliMUONSegFactory& rhs);
87 AliMUONSegFactory& operator=(const AliMUONSegFactory& rhs);
88
89 private:
90 // methods
91 Bool_t IsGeometryDefined(Int_t ichamber);
92 AliMUONSegmentation* Segmentation();
93
94 // Old segmentations (not based on mapping)
95 void BuildStation3();
96 void BuildStation4();
97 void BuildStation5();
98 void BuildStation6();
99
100 // data members
18b6b8c7 101 AliMpSegFactory fMpSegFactory; ///< Mapping segmentation factory
102 AliMpStringObjMap fDESegmentations;///< Map of DE segmentations to DE names
103 AliMUONSegmentation* fSegmentation; ///< Segmentation container
104 const AliMUONGeometryTransformer* fkTransformer; ///< Geometry transformer
fc337f2e 105
106 ClassDef(AliMUONSegFactory,0) // MUON Factory for Chambers and Segmentation
107};
108
5398f946 109/// Return segmentation
fc337f2e 110inline AliMUONSegmentation* AliMUONSegFactory::GetSegmentation() const
111{ return fSegmentation; }
112
113#endif //ALI_MUON_SEG_FACTORY_H
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128