]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryEnvelope.h
ed09cec86825dae518650ee6c72170bb44f6bce5
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryEnvelope.h
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
14 class TGeoTranslation;
15 class TGeoRotation;
16 class TGeoCombiTrans;
17 class TObjArray;
18
19 class 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
74 inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
75 { return fIsVirtual; }  
76
77 inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
78 { return fCopyNo; }  
79
80 inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const 
81 { return fTransformation; }
82
83 inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
84 { return fConstituents; }
85
86 #endif //ALI_MUON_GEOMETRY_ENVELOPE_H