1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONGeometryEnvelopeStore
8 /// \brief Store for temporary volumes envelopes
10 /// Class for definititon of the temporary volume envelopes
11 /// used in geometry construction
13 /// Author: Ivana Hrivnacova, IPN Orsay
15 #ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
16 #define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
20 #include <TGeoMatrix.h>
22 class TGeoTranslation;
29 class AliMUONGeometryEnvelope;
30 class AliMUONGeometryStore;
32 class AliMUONGeometryEnvelopeStore : public TObject
35 AliMUONGeometryEnvelopeStore(AliMUONGeometryStore* detElements);
36 AliMUONGeometryEnvelopeStore();
37 AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
38 virtual ~AliMUONGeometryEnvelopeStore();
41 AliMUONGeometryEnvelopeStore&
42 operator = (const AliMUONGeometryEnvelopeStore& rhs);
46 // adding virtual envelopes
47 // (not placed in MC geometry, only logical assembly of volumes,
48 // cannot have more copies)
49 void AddEnvelope(const TString& name, Int_t id,
50 Bool_t isVirtual, const char* only="ONLY");
51 void AddEnvelope(const TString& name, Int_t id,
53 const TGeoTranslation& translation,
54 const char* only="ONLY");
55 void AddEnvelope(const TString& name, Int_t id,
57 const TGeoTranslation& translation,
58 const TGeoRotation& rotation,
59 const char* only="ONLY");
60 void AddEnvelope(const TString& name, Int_t id,
62 const TGeoCombiTrans& transform,
63 const char* only="ONLY");
65 // adding non-virtual envelopes
66 // (placed in MC geometry with transformation composed
67 // of transformation of chamber and their transformation,
68 // can have more copies )
69 void AddEnvelope(const TString& name, Int_t id,
70 Int_t copyNo, const char* only="ONLY");
71 void AddEnvelope(const TString& name, Int_t id,
73 const TGeoTranslation& translation,
74 const char* only="ONLY");
75 void AddEnvelope(const TString& name, Int_t id,
77 const TGeoTranslation& translation,
78 const TGeoRotation& rotation,
79 const char* only="ONLY");
80 void AddEnvelope(const TString& name, Int_t id,
82 const TGeoCombiTrans& transform,
83 const char* only="ONLY");
85 // adding constituents to virtual envelopes
86 // (placed in MC geometry with transformation composed
87 // of transformation of chamber, envelope and their own
89 void AddEnvelopeConstituent(const TString& name, const TString& envName,
91 void AddEnvelopeConstituent(const TString& name, const TString& envName,
92 Int_t copyNo, const TGeoTranslation& translation);
93 void AddEnvelopeConstituent(const TString& name, const TString& envName,
94 Int_t copyNo, const TGeoTranslation& translation,
95 const TGeoRotation& rotation);
96 void AddEnvelopeConstituent(const TString& name, const TString& envName,
97 Int_t copyNo, const TGeoCombiTrans& transform);
99 // adding constituents to virtual envelopes with specified shape
101 // (placed in MC geometry with transformation composed
102 // of transformation of chamber, envelope and their own
104 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
105 Int_t copyNo, Int_t npar, Double_t* param);
106 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
107 Int_t copyNo, const TGeoTranslation& translation,
108 Int_t npar, Double_t* param);
109 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
110 Int_t copyNo, const TGeoTranslation& translation,
111 const TGeoRotation& rotation, Int_t npar, Double_t* param);
112 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
113 Int_t copyNo, const TGeoCombiTrans& transform,
114 Int_t npar, Double_t* param);
116 void SetDebug(Bool_t debug);
117 void SetReferenceFrame(const TGeoCombiTrans& referenceFrame);
120 virtual Bool_t GetAlign() const;
121 virtual void SetAlign(Bool_t align);
124 const TObjArray* GetEnvelopes() const;
125 Int_t GetNofDetElements() const;
129 TGeoHMatrix ConvertDETransform(const TGeoHMatrix& transform) const;
130 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
131 Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const;
134 TObjArray* fEnvelopes; // the envelopes names and transformations
135 // wrt to the chamber position in mother volume
136 AliMUONGeometryStore* fDetElements; // detection elements
137 // used for alignement of enevelopes
138 TGeoCombiTrans fReferenceFrame; // the transformation from the builder
139 // reference frame to that of the transform
141 Bool_t fDebug; // Switch for debugging
142 Bool_t fAlign; // option to read transformations from a file
144 ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
149 inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug)
152 inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const
155 inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align)
158 inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const
159 { return fEnvelopes; }
162 AliMUONGeometryEnvelopeStore::SetReferenceFrame(const TGeoCombiTrans& referenceFrame)
163 { fReferenceFrame = referenceFrame; }
165 #endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H