AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONGeometryBuilder.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
11 
12 #ifndef ALI_MUON_GEOMETRY_BUILDER_H
13 #define ALI_MUON_GEOMETRY_BUILDER_H
14 
15 #include "AliMUONGeometry.h"
16 
17 #include <TObject.h>
18 #include <TGeoMatrix.h>
19 
20 class TObjArray;
21 
22 class AliModule;
24 
25 class AliMUONGeometryBuilder : public TObject
26 {
27  public:
28  AliMUONGeometryBuilder(AliModule* detector);
30  virtual ~AliMUONGeometryBuilder();
31 
32  // static methods
33  static TGeoHMatrix Multiply(const TGeoMatrix& m1, const TGeoMatrix& m2);
34  static TGeoHMatrix Multiply(const TGeoMatrix& m1, const TGeoMatrix& m2,
35  const TGeoMatrix& m3);
36  static TGeoHMatrix Multiply(const TGeoMatrix& m1, const TGeoMatrix& m2,
37  const TGeoMatrix& m3, const TGeoMatrix& m4);
38 
39  // methods
40  //
41  void AddBuilder(AliMUONVGeometryBuilder* geomBuilder);
42  void CreateGeometry();
43  void CreateMaterials();
44 
45  void InitGeometry();
46  void InitGeometry(const TString& svmapFileName);
48 
49  void WriteSVMaps();
50  void WriteSVMaps(const TString& fileName,
51  Bool_t rebuild = true, Bool_t writeEnvelopes = true);
52 
53  // Geometry parametrisation
54  const AliMUONGeometry* GetGeometry() const;
56 
57  // Alignement
58  virtual Bool_t GetAlign() const;
59  virtual void SetAlign(Bool_t align = true);
60  virtual void SetAlign(const TString& fileName, Bool_t align = true);
61 
62  protected:
67 
68  private:
69  // static methods
70  static const TString& GetDefaultTransformFileName();
71  static const TString& GetDefaultSVMapFileName();
72  static const TString& GetOutFileNameExtension();
73 
74  // method
75  void PlaceVolume(const TString& name, const TString& mName, Int_t copyNo,
76  const TGeoHMatrix& matrix, Int_t npar, Double_t* param,
77  const char* only, Bool_t makeAssembly = false) const;
80  void SetAlignToBuilder(AliMUONVGeometryBuilder* builder) const;
81 
82  // data members
83  AliModule* fModule;
84  Bool_t fAlign;
85  TString fTransformFileName;
87  TString fSVMapFileName;
88  TGeoCombiTrans fGlobalTransformation;
92 
93  ClassDef(AliMUONGeometryBuilder,6) // Geometry builder
94 };
95 
96 // inline functions
97 
101 
105 
107 inline
109 { return fGeometry; }
110 
112 inline
114 { return fGeometry->GetTransformer(); }
115 
117 inline Bool_t AliMUONGeometryBuilder::GetAlign() const
118 { return fAlign; }
119 
120 #endif //ALI_MUON_GEOMETRY_BUILDER_H
121 
122 
123 
124 
125 
126 
127 
virtual void SetAlign(Bool_t align=true)
Abstract base class for geometry construction per module(s)
void AddBuilder(AliMUONVGeometryBuilder *geomBuilder)
Manager class for geometry construction via geometry builders.
AliModule * fModule
the AliRoot module
AliMUONGeometryTransformer * GetTransformer() const
Return geometry transformer.
#define TObjArray
AliTPCcalibAlign align
Definition: CalibAlign.C:43
Top container class for geometry transformations.
virtual Bool_t GetAlign() const
Return option for reading transformations from a file.
static const TString & GetDefaultSVMapFileName()
void SetAlignToBuilder(AliMUONVGeometryBuilder *builder) const
void InitGeometry()
Initialize geometry.
static const TString & GetOutFileNameExtension()
const AliMUONGeometryTransformer * GetTransformer() const
Return geometry transformer.
const AliMUONGeometry * GetGeometry() const
Return geometry parametrisation.
TString fTransformFileName
transformations file name
static TGeoHMatrix Multiply(const TGeoMatrix &m1, const TGeoMatrix &m2)
Container class for geometry modules.
void PlaceVolume(const TString &name, const TString &mName, Int_t copyNo, const TGeoHMatrix &matrix, Int_t npar, Double_t *param, const char *only, Bool_t makeAssembly=false) const
detector
Definition: AliFMDv1.cxx:71
TObjArray * fGeometryBuilders
list of Geometry Builders
void WriteSVMaps()
Write sensitive volume maps.
static const TString & GetDefaultTransformFileName()
AliMUONGeometry * fGeometry
geometry parametrisation
TGeoCombiTrans fGlobalTransformation
global transformation applied to the whole geometry
TString fSVMapFileName
svmaps file name
Bool_t fAlign
option to read transformations from a file
AliMUONGeometryBuilder & operator=(const AliMUONGeometryBuilder &right)
Not implemented.