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
19 #include <TGeoMatrix.h>
21 class TGeoTranslation;
29 class AliMUONGeometryEnvelope;
32 class AliMUONGeometryEnvelopeStore : public TObject
35 AliMUONGeometryEnvelopeStore(AliMpExMap* detElements);
36 AliMUONGeometryEnvelopeStore();
37 virtual ~AliMUONGeometryEnvelopeStore();
41 // adding virtual envelopes
42 // (not placed in MC geometry, only logical assembly of volumes,
43 // cannot have more copies)
44 void AddEnvelope(const TString& name, Int_t id,
45 Bool_t isVirtual, const char* only="ONLY");
46 void AddEnvelope(const TString& name, Int_t id,
48 const TGeoTranslation& translation,
49 const char* only="ONLY");
50 void AddEnvelope(const TString& name, Int_t id,
52 const TGeoTranslation& translation,
53 const TGeoRotation& rotation,
54 const char* only="ONLY");
55 void AddEnvelope(const TString& name, Int_t id,
57 const TGeoCombiTrans& transform,
58 const char* only="ONLY");
60 // adding non-virtual envelopes
61 // (placed in MC geometry with transformation composed
62 // of transformation of chamber and their transformation,
63 // can have more copies )
64 void AddEnvelope(const TString& name, Int_t id,
65 Int_t copyNo, const char* only="ONLY");
66 void AddEnvelope(const TString& name, Int_t id,
68 const TGeoTranslation& translation,
69 const char* only="ONLY");
70 void AddEnvelope(const TString& name, Int_t id,
72 const TGeoTranslation& translation,
73 const TGeoRotation& rotation,
74 const char* only="ONLY");
75 void AddEnvelope(const TString& name, Int_t id,
77 const TGeoCombiTrans& transform,
78 const char* only="ONLY");
80 // adding constituents to virtual envelopes
81 // (placed in MC geometry with transformation composed
82 // of transformation of chamber, envelope and their own
84 void AddEnvelopeConstituent(const TString& name, const TString& envName,
86 void AddEnvelopeConstituent(const TString& name, const TString& envName,
87 Int_t copyNo, const TGeoTranslation& translation);
88 void AddEnvelopeConstituent(const TString& name, const TString& envName,
89 Int_t copyNo, const TGeoTranslation& translation,
90 const TGeoRotation& rotation);
91 void AddEnvelopeConstituent(const TString& name, const TString& envName,
92 Int_t copyNo, const TGeoCombiTrans& transform);
94 // adding constituents to virtual envelopes with specified shape
96 // (placed in MC geometry with transformation composed
97 // of transformation of chamber, envelope and their own
99 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
100 Int_t copyNo, Int_t npar, Double_t* param);
101 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
102 Int_t copyNo, const TGeoTranslation& translation,
103 Int_t npar, Double_t* param);
104 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
105 Int_t copyNo, const TGeoTranslation& translation,
106 const TGeoRotation& rotation, Int_t npar, Double_t* param);
107 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
108 Int_t copyNo, const TGeoCombiTrans& transform,
109 Int_t npar, Double_t* param);
111 void SetDebug(Bool_t debug);
112 void SetReferenceFrame(const TGeoCombiTrans& referenceFrame);
115 virtual Bool_t GetAlign() const;
116 virtual void SetAlign(Bool_t align);
119 const TObjArray* GetEnvelopes() const;
120 Int_t GetNofDetElements() const;
122 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
126 AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
128 AliMUONGeometryEnvelopeStore& operator = (const AliMUONGeometryEnvelopeStore& rhs);
132 TGeoHMatrix ConvertDETransform(const TGeoHMatrix& transform) const;
133 Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const;
136 TObjArray* fEnvelopes; ///< \brief the envelopes names and transformations
137 /// wrt to the chamber position in mother volume
138 AliMpExMap* fDetElements; ///< \brief detection elements
139 /// used for alignement of envelopes
140 TGeoCombiTrans fReferenceFrame; ///< \brief the transformation from the builder
141 /// reference frame to that of the transform
143 Bool_t fDebug; ///< Switch for debugging \deprecated - use AliLog instead
144 Bool_t fAlign; ///< option to read transformations from a file
146 ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
152 /// \deprecated - use AliLog instead
153 inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug)
156 /// Return align option - if true, transformations are read from a file
157 inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const
160 /// Set align option - if true, transformations are read from a file
161 inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align)
164 /// Return the array of the envelopes names and transformations
165 /// wrt to the chamber position in mother volume
166 inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const
167 { return fEnvelopes; }
169 /// Set the transformation from the builder reference frame to that of the transform
172 AliMUONGeometryEnvelopeStore::SetReferenceFrame(const TGeoCombiTrans& referenceFrame)
173 { fReferenceFrame = referenceFrame; }
175 #endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H