ROOT logo
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

// $Id$
// Revision of includes 07/05/2004

/// \ingroup geometry
/// \class AliMUONGeometryEnvelope
/// \brief Geometry envelope helper class
///
/// Helper class for definititon of an assembly of volumes.
///
/// \author Ivana Hrivnacova, IPN Orsay

#ifndef ALI_MUON_GEOMETRY_ENVELOPE_H
#define ALI_MUON_GEOMETRY_ENVELOPE_H

#include <TNamed.h>

class TGeoTranslation;
class TGeoRotation;
class TGeoCombiTrans;
class TObjArray;

class AliMUONGeometryEnvelope : public TNamed
{
  public:
    AliMUONGeometryEnvelope(const TString& name, Int_t id,  
                            Bool_t isVirtual, const char* only); 
    AliMUONGeometryEnvelope(const TString& name,  Int_t id,
                            Int_t copyNo, const char* only); 
    AliMUONGeometryEnvelope();
    virtual ~AliMUONGeometryEnvelope();
  
    // methods
    void  AddConstituent(const TString& name, Int_t copyNo); 
    void  AddConstituent(const TString& name, Int_t copyNo, 
                         const TGeoTranslation& translation); 
    void  AddConstituent(const TString& name, Int_t copyNo,
                         const TGeoTranslation& translation, 
	  	         const TGeoRotation& rotation);
    void  AddConstituent(const TString& name, Int_t copyNo,
                         const TGeoCombiTrans& transform); 

    void  AddConstituentParam(const TString& name, Int_t copyNo, 
                         Int_t npar, Double_t* param);
    void  AddConstituentParam(const TString& name, Int_t copyNo, 
                         const TGeoTranslation& translation,
			 Int_t npar, Double_t* param);
    void  AddConstituentParam(const TString& name, Int_t copyNo, 
                         const TGeoTranslation& translation, 
	  	         const TGeoRotation& rotation,
			 Int_t npar, Double_t* param);
    void  AddConstituentParam(const TString& name, Int_t copyNo, 
                         const TGeoCombiTrans& transform,
			 Int_t npar, Double_t* param);

    void  SetTranslation(const TGeoTranslation& translation);
    void  SetRotation(const TGeoRotation& rotation);
    void  SetTransform(const TGeoCombiTrans& transform);

    // get methods
    Bool_t                 IsVirtual() const;  
    Bool_t                 IsMANY() const;  
    Int_t                  GetCopyNo() const;  
    const TGeoCombiTrans*  GetTransformation() const;
    const TObjArray*       GetConstituents() const;

  protected:
    /// Not implemented
    AliMUONGeometryEnvelope(const AliMUONGeometryEnvelope& rhs);
    /// Not implemented
    AliMUONGeometryEnvelope& operator = (const AliMUONGeometryEnvelope& rhs);

  private:
    Bool_t           fIsVirtual;     ///< \brief true if envelope is not represented
                                     /// by a real volume
    Bool_t           fIsMANY;        ///< \brief true if envelope is placed with
                                     /// MANY option
    Int_t            fCopyNo;        ///< \brief copy number 
                                     /// (only non virtual envelope can have 
				     ///  more than one copy)
    TGeoCombiTrans*  fTransformation;///< \brief  the envelope transformation wrt to the
                                     /// mother frame (the chamber position)
    TObjArray*       fConstituents;  ///< \brief the constituents names and transformations
		                     /// wrt to the envelope position                                 
 
  ClassDef(AliMUONGeometryEnvelope,1) // MUON chamber geometry base class
};

// inline functions

/// Return true if envelope is virtual
inline Bool_t AliMUONGeometryEnvelope::IsVirtual() const
{ return fIsVirtual; }  

/// Return true if envelope is placed with MANY option
inline Bool_t AliMUONGeometryEnvelope::IsMANY() const
{ return fIsMANY; }  

/// Return copy number
inline Int_t AliMUONGeometryEnvelope::GetCopyNo() const
{ return fCopyNo; }  

/// Return the envelope transformation wrt to the mother frame 
/// (the chamber position)
inline const TGeoCombiTrans* AliMUONGeometryEnvelope::GetTransformation() const 
{ return fTransformation; }

/// Return the array of constituents names and transformations 
/// wrt to the envelope position
inline const TObjArray* AliMUONGeometryEnvelope::GetConstituents() const
{ return fConstituents; }

#endif //ALI_MUON_GEOMETRY_ENVELOPE_H
 AliMUONGeometryEnvelope.h:1
 AliMUONGeometryEnvelope.h:2
 AliMUONGeometryEnvelope.h:3
 AliMUONGeometryEnvelope.h:4
 AliMUONGeometryEnvelope.h:5
 AliMUONGeometryEnvelope.h:6
 AliMUONGeometryEnvelope.h:7
 AliMUONGeometryEnvelope.h:8
 AliMUONGeometryEnvelope.h:9
 AliMUONGeometryEnvelope.h:10
 AliMUONGeometryEnvelope.h:11
 AliMUONGeometryEnvelope.h:12
 AliMUONGeometryEnvelope.h:13
 AliMUONGeometryEnvelope.h:14
 AliMUONGeometryEnvelope.h:15
 AliMUONGeometryEnvelope.h:16
 AliMUONGeometryEnvelope.h:17
 AliMUONGeometryEnvelope.h:18
 AliMUONGeometryEnvelope.h:19
 AliMUONGeometryEnvelope.h:20
 AliMUONGeometryEnvelope.h:21
 AliMUONGeometryEnvelope.h:22
 AliMUONGeometryEnvelope.h:23
 AliMUONGeometryEnvelope.h:24
 AliMUONGeometryEnvelope.h:25
 AliMUONGeometryEnvelope.h:26
 AliMUONGeometryEnvelope.h:27
 AliMUONGeometryEnvelope.h:28
 AliMUONGeometryEnvelope.h:29
 AliMUONGeometryEnvelope.h:30
 AliMUONGeometryEnvelope.h:31
 AliMUONGeometryEnvelope.h:32
 AliMUONGeometryEnvelope.h:33
 AliMUONGeometryEnvelope.h:34
 AliMUONGeometryEnvelope.h:35
 AliMUONGeometryEnvelope.h:36
 AliMUONGeometryEnvelope.h:37
 AliMUONGeometryEnvelope.h:38
 AliMUONGeometryEnvelope.h:39
 AliMUONGeometryEnvelope.h:40
 AliMUONGeometryEnvelope.h:41
 AliMUONGeometryEnvelope.h:42
 AliMUONGeometryEnvelope.h:43
 AliMUONGeometryEnvelope.h:44
 AliMUONGeometryEnvelope.h:45
 AliMUONGeometryEnvelope.h:46
 AliMUONGeometryEnvelope.h:47
 AliMUONGeometryEnvelope.h:48
 AliMUONGeometryEnvelope.h:49
 AliMUONGeometryEnvelope.h:50
 AliMUONGeometryEnvelope.h:51
 AliMUONGeometryEnvelope.h:52
 AliMUONGeometryEnvelope.h:53
 AliMUONGeometryEnvelope.h:54
 AliMUONGeometryEnvelope.h:55
 AliMUONGeometryEnvelope.h:56
 AliMUONGeometryEnvelope.h:57
 AliMUONGeometryEnvelope.h:58
 AliMUONGeometryEnvelope.h:59
 AliMUONGeometryEnvelope.h:60
 AliMUONGeometryEnvelope.h:61
 AliMUONGeometryEnvelope.h:62
 AliMUONGeometryEnvelope.h:63
 AliMUONGeometryEnvelope.h:64
 AliMUONGeometryEnvelope.h:65
 AliMUONGeometryEnvelope.h:66
 AliMUONGeometryEnvelope.h:67
 AliMUONGeometryEnvelope.h:68
 AliMUONGeometryEnvelope.h:69
 AliMUONGeometryEnvelope.h:70
 AliMUONGeometryEnvelope.h:71
 AliMUONGeometryEnvelope.h:72
 AliMUONGeometryEnvelope.h:73
 AliMUONGeometryEnvelope.h:74
 AliMUONGeometryEnvelope.h:75
 AliMUONGeometryEnvelope.h:76
 AliMUONGeometryEnvelope.h:77
 AliMUONGeometryEnvelope.h:78
 AliMUONGeometryEnvelope.h:79
 AliMUONGeometryEnvelope.h:80
 AliMUONGeometryEnvelope.h:81
 AliMUONGeometryEnvelope.h:82
 AliMUONGeometryEnvelope.h:83
 AliMUONGeometryEnvelope.h:84
 AliMUONGeometryEnvelope.h:85
 AliMUONGeometryEnvelope.h:86
 AliMUONGeometryEnvelope.h:87
 AliMUONGeometryEnvelope.h:88
 AliMUONGeometryEnvelope.h:89
 AliMUONGeometryEnvelope.h:90
 AliMUONGeometryEnvelope.h:91
 AliMUONGeometryEnvelope.h:92
 AliMUONGeometryEnvelope.h:93
 AliMUONGeometryEnvelope.h:94
 AliMUONGeometryEnvelope.h:95
 AliMUONGeometryEnvelope.h:96
 AliMUONGeometryEnvelope.h:97
 AliMUONGeometryEnvelope.h:98
 AliMUONGeometryEnvelope.h:99
 AliMUONGeometryEnvelope.h:100
 AliMUONGeometryEnvelope.h:101
 AliMUONGeometryEnvelope.h:102
 AliMUONGeometryEnvelope.h:103
 AliMUONGeometryEnvelope.h:104
 AliMUONGeometryEnvelope.h:105
 AliMUONGeometryEnvelope.h:106
 AliMUONGeometryEnvelope.h:107
 AliMUONGeometryEnvelope.h:108
 AliMUONGeometryEnvelope.h:109
 AliMUONGeometryEnvelope.h:110
 AliMUONGeometryEnvelope.h:111
 AliMUONGeometryEnvelope.h:112
 AliMUONGeometryEnvelope.h:113
 AliMUONGeometryEnvelope.h:114
 AliMUONGeometryEnvelope.h:115