]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryEnvelope.h
Removing obsolete constants.
[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 /// \ingroup geometry
8 /// \class AliMUONGeometryEnvelope
9 /// \brief Geometry envelope helper class
10 ///
11 /// Helper class for definititon of an assembly of volumes.
12 ///
13 /// \author Ivana Hrivnacova, IPN Orsay
14
15 #ifndef ALI_MUON_GEOMETRY_ENVELOPE_H
16 #define ALI_MUON_GEOMETRY_ENVELOPE_H
17
18 #include <TNamed.h>
19
20 class TGeoTranslation;
21 class TGeoRotation;
22 class TGeoCombiTrans;
23 class TObjArray;
24
25 class AliMUONGeometryEnvelope : public TNamed
26 {
27   public:
28     AliMUONGeometryEnvelope(const TString& name, Int_t id,  
29                             Bool_t isVirtual, const char* only); 
30     AliMUONGeometryEnvelope(const TString& name,  Int_t id,
31                             Int_t copyNo, const char* only); 
32     AliMUONGeometryEnvelope();
33     virtual ~AliMUONGeometryEnvelope();
34   
35     // methods
36     void  AddConstituent(const TString& name, Int_t copyNo); 
37     void  AddConstituent(const TString& name, Int_t copyNo, 
38                          const TGeoTranslation& translation); 
39     void  AddConstituent(const TString& name, Int_t copyNo,
40                          const TGeoTranslation& translation, 
41                          const TGeoRotation& rotation);
42     void  AddConstituent(const TString& name, Int_t copyNo,
43                          const TGeoCombiTrans& transform); 
44
45     void  AddConstituentParam(const TString& name, Int_t copyNo, 
46                          Int_t npar, Double_t* param);
47     void  AddConstituentParam(const TString& name, Int_t copyNo, 
48                          const TGeoTranslation& translation,
49                          Int_t npar, Double_t* param);
50     void  AddConstituentParam(const TString& name, Int_t copyNo, 
51                          const TGeoTranslation& translation, 
52                          const TGeoRotation& rotation,
53                          Int_t npar, Double_t* param);
54     void  AddConstituentParam(const TString& name, Int_t copyNo, 
55                          const TGeoCombiTrans& transform,
56                          Int_t npar, Double_t* param);
57
58     void  SetTranslation(const TGeoTranslation& translation);
59     void  SetRotation(const TGeoRotation& rotation);
60     void  SetTransform(const TGeoCombiTrans& transform);
61
62     // get methods
63     Bool_t                 IsVirtual() const;  
64     Bool_t                 IsMANY() const;  
65     Int_t                  GetCopyNo() const;  
66     const TGeoCombiTrans*  GetTransformation() const;
67     const TObjArray*       GetConstituents() const;
68
69   protected:
70     AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs);
71     AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs);
72
73   private:
74     Bool_t           fIsVirtual;     ///< \brief true if envelope is not represented
75                                      /// by a real volume
76     Bool_t           fIsMANY;        ///< \brief true if envelope is placed with
77                                      /// MANY option
78     Int_t            fCopyNo;        ///< \brief copy number 
79                                      /// (only non virtual envelope can have 
80                                      ///  more than one copy)
81     TGeoCombiTrans*  fTransformation;///< \brief  the envelope transformation wrt to the
82                                      /// mother frame (the chamber position)
83     TObjArray*       fConstituents;  ///< \brief the constituents names and transformations
84                                      /// wrt to the envelope position                                 
85  
86   ClassDef(AliMUONGeometryEnvelope,1) // MUON chamber geometry base class
87 };
88
89 // inline functions
90
91 /// Return true if envelope is virtual
92 inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
93 { return fIsVirtual; }  
94
95 /// Return true if envelope is placed with MANY option
96 inline Bool_t AliMUONGeometryEnvelope::IsMANY() const
97 { return fIsMANY; }  
98
99 /// Return copy number
100 inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
101 { return fCopyNo; }  
102
103 /// Return the envelope transformation wrt to the mother frame 
104 /// (the chamber position)
105 inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const 
106 { return fTransformation; }
107
108 /// Return the array of constituents names and transformations 
109 /// wrt to the envelope position
110 inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
111 { return fConstituents; }
112
113 #endif //ALI_MUON_GEOMETRY_ENVELOPE_H