]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryEnvelope.h
oops
[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                             const char* only); 
24     AliMUONGeometryEnvelope(const TString& name, Int_t copyNo,
25                             const char* only); 
26     AliMUONGeometryEnvelope();
27     AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs);
28     virtual ~AliMUONGeometryEnvelope();
29
30     // operators  
31     AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs);
32   
33     // methods
34     void  AddConstituent(const TString& name, Int_t copyNo); 
35     void  AddConstituent(const TString& name, Int_t copyNo, 
36                          const TGeoTranslation& translation); 
37     void  AddConstituent(const TString& name, Int_t copyNo,
38                          const TGeoTranslation& translation, 
39                          const TGeoRotation& rotation);
40
41     void  AddConstituentParam(const TString& name, Int_t copyNo, 
42                          Int_t npar, Double_t* param);
43     void  AddConstituentParam(const TString& name, Int_t copyNo, 
44                          const TGeoTranslation& translation,
45                          Int_t npar, Double_t* param);
46     void  AddConstituentParam(const TString& name, Int_t copyNo, 
47                          const TGeoTranslation& translation, 
48                          const TGeoRotation& rotation,
49                          Int_t npar, Double_t* param);
50
51     void  SetTranslation(const TGeoTranslation& translation);
52     void  SetRotation(const TGeoRotation& rotation);
53
54     // get methods
55     Bool_t                 IsVirtual() const;  
56     Bool_t                 IsMANY() const;  
57     Int_t                  GetCopyNo() const;  
58     const TGeoCombiTrans*  GetTransformation() const;
59     const TObjArray*       GetConstituents() const;
60
61   private:
62     Bool_t           fIsVirtual;     // true if envelope is not represented
63                                      // by a real volume
64     Bool_t           fIsMANY;        // true if envelope is placed with
65                                      // MANY option
66     Int_t            fCopyNo;        // copy number 
67                                      // (only non virtual envelope can have 
68                                      //  more than one copy)
69     TGeoCombiTrans*  fTransformation;// the envelope transformation wrt to the
70                                      // mother frame (the chamber position)
71     TObjArray*       fConstituents;  // the constituents names and transformations
72                                      // wrt to the envelope position                                 
73  
74   ClassDef(AliMUONGeometryEnvelope,1) // MUON chamber geometry base class
75 };
76
77 // inline functions
78
79 inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
80 { return fIsVirtual; }  
81
82 inline Bool_t AliMUONGeometryEnvelope::IsMANY() const
83 { return fIsMANY; }  
84
85 inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
86 { return fCopyNo; }  
87
88 inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const 
89 { return fTransformation; }
90
91 inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
92 { return fConstituents; }
93
94 #endif //ALI_MUON_GEOMETRY_ENVELOPE_H