]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryEnvelope.h
Code revision:
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryEnvelope.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // Revision of includes 07/05/2004
6 //
7 // Class AliMUONGeometryEnvelope
8 // -----------------------------
9 // Helper class for definititon an assembly of volumes.
10 //
11 // Author: Ivana Hrivnacova, IPN Orsay
12
13 #ifndef ALI_MUON_GEOMETRY_ENVELOPE_H
14 #define ALI_MUON_GEOMETRY_ENVELOPE_H
15
16 #include <TNamed.h>
17
18 class TGeoTranslation;
19 class TGeoRotation;
20 class TGeoCombiTrans;
21 class TObjArray;
22
23 class AliMUONGeometryEnvelope : public TNamed
24 {
25   public:
26     AliMUONGeometryEnvelope(const TString& name, Bool_t isVirtual, 
27                             const char* only); 
28     AliMUONGeometryEnvelope(const TString& name, Int_t copyNo,
29                             const char* only); 
30     AliMUONGeometryEnvelope();
31     virtual ~AliMUONGeometryEnvelope();
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   protected:
62     AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs);
63
64     // operators  
65     AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs);
66
67   private:
68     Bool_t           fIsVirtual;     // true if envelope is not represented
69                                      // by a real volume
70     Bool_t           fIsMANY;        // true if envelope is placed with
71                                      // MANY option
72     Int_t            fCopyNo;        // copy number 
73                                      // (only non virtual envelope can have 
74                                      //  more than one copy)
75     TGeoCombiTrans*  fTransformation;// the envelope transformation wrt to the
76                                      // mother frame (the chamber position)
77     TObjArray*       fConstituents;  // the constituents names and transformations
78                                      // wrt to the envelope position                                 
79  
80   ClassDef(AliMUONGeometryEnvelope,1) // MUON chamber geometry base class
81 };
82
83 // inline functions
84
85 inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
86 { return fIsVirtual; }  
87
88 inline Bool_t AliMUONGeometryEnvelope::IsMANY() const
89 { return fIsMANY; }  
90
91 inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
92 { return fCopyNo; }  
93
94 inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const 
95 { return fTransformation; }
96
97 inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
98 { return fConstituents; }
99
100 #endif //ALI_MUON_GEOMETRY_ENVELOPE_H