]>
Commit | Line | Data |
---|---|---|
89cc3034 | 1 | // $Id$ |
2 | // | |
3 | // Class AliMUONGeometryEnvelopeStore | |
4 | // ----------------------------- | |
5 | // Class for definititon of the temporary volume envelopes | |
6 | // used in geometry construction | |
7 | // | |
8 | // Author: Ivana Hrivnacova, IPN Orsay | |
9 | ||
10 | #ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H | |
11 | #define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H | |
12 | ||
13 | #include <TObject.h> | |
14 | #include <TString.h> | |
15 | ||
16 | class TGeoTranslation; | |
17 | class TGeoRotation; | |
18 | class TGeoCombiTrans; | |
19 | class TObjArray; | |
20 | class TArrayI; | |
21 | ||
22 | class AliMUONChamber; | |
23 | class AliMUONGeometryEnvelope; | |
24 | class AliMUONGeometryTransformStore; | |
25 | ||
26 | class AliMUONGeometryEnvelopeStore : public TObject | |
27 | { | |
28 | public: | |
29 | AliMUONGeometryEnvelopeStore(AliMUONGeometryTransformStore* transforms); | |
30 | AliMUONGeometryEnvelopeStore(); | |
31 | AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs); | |
32 | virtual ~AliMUONGeometryEnvelopeStore(); | |
33 | ||
34 | // operators | |
35 | AliMUONGeometryEnvelopeStore& operator = (const AliMUONGeometryEnvelopeStore& rhs); | |
36 | ||
37 | // methods | |
38 | ||
39 | // adding virtual envelopes | |
40 | // (not placed in MC geometry, only logical assembly of volumes, | |
41 | // cannot have more copies) | |
42 | void AddEnvelope(const TString& name, Int_t id, | |
43 | Bool_t isVirtual, const char* only="ONLY"); | |
44 | void AddEnvelope(const TString& name, Int_t id, | |
45 | Bool_t isVirtual, | |
46 | const TGeoTranslation& translation, | |
47 | const char* only="ONLY"); | |
48 | void AddEnvelope(const TString& name, Int_t id, | |
49 | Bool_t isVirtual, | |
50 | const TGeoTranslation& translation, | |
51 | const TGeoRotation& rotation, | |
52 | const char* only="ONLY"); | |
53 | void AddEnvelope(const TString& name, Int_t id, | |
54 | Bool_t isVirtual, | |
55 | const TGeoCombiTrans& transform, | |
56 | const char* only="ONLY"); | |
57 | ||
58 | // adding non-virtual envelopes | |
59 | // (placed in MC geometry with transformation composed | |
60 | // of transformation of chamber and their transformation, | |
61 | // can have more copies ) | |
62 | void AddEnvelope(const TString& name, Int_t id, | |
63 | Int_t copyNo, const char* only="ONLY"); | |
64 | void AddEnvelope(const TString& name, Int_t id, | |
65 | Int_t copyNo, | |
66 | const TGeoTranslation& translation, | |
67 | const char* only="ONLY"); | |
68 | void AddEnvelope(const TString& name, Int_t id, | |
69 | Int_t copyNo, | |
70 | const TGeoTranslation& translation, | |
71 | const TGeoRotation& rotation, | |
72 | const char* only="ONLY"); | |
73 | void AddEnvelope(const TString& name, Int_t id, | |
74 | Int_t copyNo, | |
75 | const TGeoCombiTrans& transform, | |
76 | const char* only="ONLY"); | |
77 | ||
78 | // adding constituents to virtual envelopes | |
79 | // (placed in MC geometry with transformation composed | |
80 | // of transformation of chamber, envelope and their own | |
81 | // transformation ) | |
82 | void AddEnvelopeConstituent(const TString& name, const TString& envName, | |
83 | Int_t copyNo); | |
84 | void AddEnvelopeConstituent(const TString& name, const TString& envName, | |
85 | Int_t copyNo, const TGeoTranslation& translation); | |
86 | void AddEnvelopeConstituent(const TString& name, const TString& envName, | |
87 | Int_t copyNo, const TGeoTranslation& translation, | |
88 | const TGeoRotation& rotation); | |
89 | void AddEnvelopeConstituent(const TString& name, const TString& envName, | |
90 | Int_t copyNo, const TGeoCombiTrans& transform); | |
91 | ||
92 | // adding constituents to virtual envelopes with specified shape | |
93 | // parameters | |
94 | // (placed in MC geometry with transformation composed | |
95 | // of transformation of chamber, envelope and their own | |
96 | // transformation ) | |
97 | void AddEnvelopeConstituentParam(const TString& name, const TString& envName, | |
98 | Int_t copyNo, Int_t npar, Double_t* param); | |
99 | void AddEnvelopeConstituentParam(const TString& name, const TString& envName, | |
100 | Int_t copyNo, const TGeoTranslation& translation, | |
101 | Int_t npar, Double_t* param); | |
102 | void AddEnvelopeConstituentParam(const TString& name, const TString& envName, | |
103 | Int_t copyNo, const TGeoTranslation& translation, | |
104 | const TGeoRotation& rotation, Int_t npar, Double_t* param); | |
105 | void AddEnvelopeConstituentParam(const TString& name, const TString& envName, | |
106 | Int_t copyNo, const TGeoCombiTrans& transform, | |
107 | Int_t npar, Double_t* param); | |
108 | ||
109 | void SetDebug(Bool_t debug); | |
110 | ||
111 | // Alignement | |
112 | virtual Bool_t GetAlign() const; | |
113 | virtual void SetAlign(Bool_t align); | |
114 | ||
115 | // get methods | |
116 | const TObjArray* GetEnvelopes() const; | |
117 | ||
118 | private: | |
119 | // methods | |
120 | AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const; | |
121 | Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const; | |
122 | ||
123 | // data members | |
124 | AliMUONGeometryTransformStore* fDETransforms; // det elements transformations | |
125 | TObjArray* fEnvelopes; // the envelopes names and transformations | |
126 | // wrt to the chamber position in mother volume | |
127 | Bool_t fDebug; // Switch for debugging | |
128 | Bool_t fAlign; // option to read transformations from a file | |
129 | ||
130 | ClassDef(AliMUONGeometryEnvelopeStore,1) // MUON envelope store | |
131 | }; | |
132 | ||
133 | // inline functions | |
134 | ||
135 | inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug) | |
136 | { fDebug = debug; } | |
137 | ||
138 | inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const | |
139 | { return fAlign; } | |
140 | ||
141 | inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align) | |
142 | { fAlign = align; } | |
143 | ||
144 | inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const | |
145 | { return fEnvelopes; } | |
146 | ||
147 | #endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H |