New definition of the geometry based on builders and usign Ivana's envelop method...
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryEnvelope.h
CommitLineData
d1cd2474 1// $Id$
2//
3// Class AliMUONGeometryEnvelope
4// -----------------------------
5// Helper class for definititon an assembly of volumes.
6//
7// Author: Ivana Hrivnacova, IPN Orsay
8
9#ifndef ALI_MUON_GEOMETRY_ENVELOPE_H
10#define ALI_MUON_GEOMETRY_ENVELOPE_H
11
12#include <TNamed.h>
13
14class TGeoTranslation;
15class TGeoRotation;
16class TGeoCombiTrans;
17class TObjArray;
18
19class AliMUONGeometryEnvelope : public TNamed
20{
21 public:
22 AliMUONGeometryEnvelope(const TString& name, Bool_t isVirtual);
23 AliMUONGeometryEnvelope(const TString& name, Int_t copyNo);
24 AliMUONGeometryEnvelope();
25 AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs);
26 virtual ~AliMUONGeometryEnvelope();
27
28 // operators
29 AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs);
30
31 // methods
32 void AddConstituent(const TString& name, Int_t copyNo);
33 void AddConstituent(const TString& name, Int_t copyNo,
34 const TGeoTranslation& translation);
35 void AddConstituent(const TString& name, Int_t copyNo,
36 const TGeoTranslation& translation,
37 const TGeoRotation& rotation);
38
39 void AddConstituentParam(const TString& name, Int_t copyNo,
40 Int_t npar, Double_t* param);
41 void AddConstituentParam(const TString& name, Int_t copyNo,
42 const TGeoTranslation& translation,
43 Int_t npar, Double_t* param);
44 void AddConstituentParam(const TString& name, Int_t copyNo,
45 const TGeoTranslation& translation,
46 const TGeoRotation& rotation,
47 Int_t npar, Double_t* param);
48
49 void SetTranslation(const TGeoTranslation& translation);
50 void SetRotation(const TGeoRotation& rotation);
51
52 // get methods
53 Bool_t IsVirtual() const;
54 Int_t GetCopyNo() const;
55 const TGeoCombiTrans* GetTransformation() const;
56 const TObjArray* GetConstituents() const;
57
58 private:
59 Bool_t fIsVirtual; // true if envelope is not represented
60 // by a real volume
61 Int_t fCopyNo; // copy number
62 // (only non virtual envelope can have
63 // more than one copy)
64 TGeoCombiTrans* fTransformation;// the envelope transformation wrt to the
65 // mother frame (the chamber position)
66 TObjArray* fConstituents; // the constituents names and transformations
67 // wrt to the envelope position
68
69 ClassDef(AliMUONGeometryEnvelope,1) // MUON chamber geometry base class
70};
71
72// inline functions
73
74inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
75{ return fIsVirtual; }
76
77inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
78{ return fCopyNo; }
79
80inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const
81{ return fTransformation; }
82
83inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
84{ return fConstituents; }
85
86#endif //ALI_MUON_GEOMETRY_ENVELOPE_H