1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
6 // Class AliMUONGeometryEnvelopeStore
7 // ----------------------------------
8 // Class for definititon of the temporary volume envelopes
9 // used in geometry construction
11 // Author: Ivana Hrivnacova, IPN Orsay
13 #ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
14 #define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
19 class TGeoTranslation;
26 class AliMUONGeometryEnvelope;
27 class AliMUONGeometryStore;
29 class AliMUONGeometryEnvelopeStore : public TObject
32 AliMUONGeometryEnvelopeStore(AliMUONGeometryStore* detElements);
33 AliMUONGeometryEnvelopeStore();
34 AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
35 virtual ~AliMUONGeometryEnvelopeStore();
38 AliMUONGeometryEnvelopeStore&
39 operator = (const AliMUONGeometryEnvelopeStore& rhs);
43 // adding virtual envelopes
44 // (not placed in MC geometry, only logical assembly of volumes,
45 // cannot have more copies)
46 void AddEnvelope(const TString& name, Int_t id,
47 Bool_t isVirtual, const char* only="ONLY");
48 void AddEnvelope(const TString& name, Int_t id,
50 const TGeoTranslation& translation,
51 const char* only="ONLY");
52 void AddEnvelope(const TString& name, Int_t id,
54 const TGeoTranslation& translation,
55 const TGeoRotation& rotation,
56 const char* only="ONLY");
57 void AddEnvelope(const TString& name, Int_t id,
59 const TGeoCombiTrans& transform,
60 const char* only="ONLY");
62 // adding non-virtual envelopes
63 // (placed in MC geometry with transformation composed
64 // of transformation of chamber and their transformation,
65 // can have more copies )
66 void AddEnvelope(const TString& name, Int_t id,
67 Int_t copyNo, const char* only="ONLY");
68 void AddEnvelope(const TString& name, Int_t id,
70 const TGeoTranslation& translation,
71 const char* only="ONLY");
72 void AddEnvelope(const TString& name, Int_t id,
74 const TGeoTranslation& translation,
75 const TGeoRotation& rotation,
76 const char* only="ONLY");
77 void AddEnvelope(const TString& name, Int_t id,
79 const TGeoCombiTrans& transform,
80 const char* only="ONLY");
82 // adding constituents to virtual envelopes
83 // (placed in MC geometry with transformation composed
84 // of transformation of chamber, envelope and their own
86 void AddEnvelopeConstituent(const TString& name, const TString& envName,
88 void AddEnvelopeConstituent(const TString& name, const TString& envName,
89 Int_t copyNo, const TGeoTranslation& translation);
90 void AddEnvelopeConstituent(const TString& name, const TString& envName,
91 Int_t copyNo, const TGeoTranslation& translation,
92 const TGeoRotation& rotation);
93 void AddEnvelopeConstituent(const TString& name, const TString& envName,
94 Int_t copyNo, const TGeoCombiTrans& transform);
96 // adding constituents to virtual envelopes with specified shape
98 // (placed in MC geometry with transformation composed
99 // of transformation of chamber, envelope and their own
101 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
102 Int_t copyNo, Int_t npar, Double_t* param);
103 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
104 Int_t copyNo, const TGeoTranslation& translation,
105 Int_t npar, Double_t* param);
106 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
107 Int_t copyNo, const TGeoTranslation& translation,
108 const TGeoRotation& rotation, Int_t npar, Double_t* param);
109 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
110 Int_t copyNo, const TGeoCombiTrans& transform,
111 Int_t npar, Double_t* param);
113 void SetDebug(Bool_t debug);
116 virtual Bool_t GetAlign() const;
117 virtual void SetAlign(Bool_t align);
120 const TObjArray* GetEnvelopes() const;
121 Int_t GetNofDetElements() const;
125 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
126 Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const;
129 TObjArray* fEnvelopes; // the envelopes names and transformations
130 // wrt to the chamber position in mother volume
131 AliMUONGeometryStore* fDetElements; // detection elements
132 // used for alignement of enevelopes
133 Bool_t fDebug; // Switch for debugging
134 Bool_t fAlign; // option to read transformations from a file
136 ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
141 inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug)
144 inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const
147 inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align)
150 inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const
151 { return fEnvelopes; }
153 #endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H