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 AliMUONGeometryModule
/// \brief Geometry parameters for detector module
///
/// Class for definition of the detector module parameters
/// (the transformations of detection elements, mapping between
///  sensitive volumes and detection elements).
///
/// \author Ivana Hrivnacova, IPN Orsay

#ifndef ALI_MUON_GEOMETRY_MODULE_H
#define ALI_MUON_GEOMETRY_MODULE_H

#include "AliMUONGeometryModuleTransformer.h"

#include <TObject.h>
#include <TString.h>

class AliMUONGeometryEnvelope;
class AliMUONGeometryEnvelopeStore;
class AliMUONGeometryDetElement;
class AliMUONStringIntMap;

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

class AliMUONGeometryModule : public TObject
{
  public:
    AliMUONGeometryModule(Int_t moduleId);
    AliMUONGeometryModule();
    virtual ~AliMUONGeometryModule();

    // set methods
    //
    void  SetTransformation(const TGeoCombiTrans& transform);
    void  SetVolumePath(const TString& volumePath);
    void  SetIsVirtual(Bool_t isVirtual);
    
    void  SetSensitiveVolume(Int_t volId);
    void  SetSensitiveVolume(const TString& name);
    void  SetAlign(Bool_t align);
 
    // get methods
    //
    Bool_t   IsVirtual() const;  
    Int_t    GetModuleId() const;
    TString  GetVolumePath() const;
    
    AliMUONGeometryDetElement* FindBySensitiveVolume(
                                         const TString& volumePath) const;
    Bool_t IsSensitiveVolume(Int_t volId) const; 
    Bool_t IsSensitiveVolume(const TString& volName) const; 

    AliMUONGeometryEnvelopeStore*     GetEnvelopeStore() const;
    AliMUONStringIntMap*              GetSVMap() const;
    AliMUONGeometryModuleTransformer* GetTransformer() const;

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

  private:
    // methods
    Int_t  GetSVIndex(Int_t svVolId) const; 
  
    // data members
    Bool_t           fIsVirtual;     ///< \brief true if module is not represented
                                     /// by a real volume
    Int_t            fNofSVs;        ///< number of sensitive volumes   
    TArrayI*         fSVVolumeIds;   ///< sensitive volumes IDs  

    AliMUONGeometryEnvelopeStore*     fEnvelopes;  ///< envelopes                                 
    AliMUONStringIntMap*              fSVMap;      ///< sensitive volumes map
    AliMUONGeometryModuleTransformer* fTransformer;///< geometry transformations
 
  ClassDef(AliMUONGeometryModule,4) // MUON geometry module class
};

// inline functions

/// Set virtuality (true if module is not represented by a real volume)
inline void  AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual)
{ fIsVirtual = isVirtual; }

/// Return true if module is not represented by a real volume
inline Bool_t AliMUONGeometryModule::IsVirtual() const
{ return fIsVirtual; }  

/// Return module ID
inline Int_t  AliMUONGeometryModule::GetModuleId() const
{ return fTransformer->GetModuleId(); }

/// Return the full path of aligned module volume or envelope in geometry
inline TString AliMUONGeometryModule::GetVolumePath() const
{ return fTransformer->GetVolumePath(); }

/// Return envelopes associated with this module
inline  
AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const
{ return fEnvelopes; }

/// Return sensitive volume map
inline 
AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const
{ return fSVMap; }

/// Return transformer
inline 
AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const
{ return fTransformer; }

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