]>
Commit | Line | Data |
---|---|---|
e118b27e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
89cc3034 | 4 | // $Id$ |
5 | // | |
6 | // Class AliMUONGeometryEnvelopeStore | |
e118b27e | 7 | // ---------------------------------- |
89cc3034 | 8 | // Class for definititon of the temporary volume envelopes |
9 | // used in geometry construction | |
10 | // | |
11 | // Author: Ivana Hrivnacova, IPN Orsay | |
12 | ||
13 | #ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H | |
14 | #define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H | |
15 | ||
16 | #include <TObject.h> | |
17 | #include <TString.h> | |
18 | ||
19 | class TGeoTranslation; | |
20 | class TGeoRotation; | |
21 | class TGeoCombiTrans; | |
22 | class TObjArray; | |
23 | class TArrayI; | |
24 | ||
25 | class AliMUONChamber; | |
26 | class AliMUONGeometryEnvelope; | |
e118b27e | 27 | class AliMUONGeometryStore; |
89cc3034 | 28 | |
29 | class AliMUONGeometryEnvelopeStore : public TObject | |
30 | { | |
31 | public: | |
e118b27e | 32 | AliMUONGeometryEnvelopeStore(AliMUONGeometryStore* detElements); |
89cc3034 | 33 | AliMUONGeometryEnvelopeStore(); |
34 | AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs); | |
35 | virtual ~AliMUONGeometryEnvelopeStore(); | |
36 | ||
37 | // operators | |
e118b27e | 38 | AliMUONGeometryEnvelopeStore& |
39 | operator = (const AliMUONGeometryEnvelopeStore& rhs); | |
89cc3034 | 40 | |
41 | // methods | |
42 | ||
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, | |
49 | Bool_t isVirtual, | |
50 | const TGeoTranslation& translation, | |
51 | const char* only="ONLY"); | |
52 | void AddEnvelope(const TString& name, Int_t id, | |
53 | Bool_t isVirtual, | |
54 | const TGeoTranslation& translation, | |
55 | const TGeoRotation& rotation, | |
56 | const char* only="ONLY"); | |
57 | void AddEnvelope(const TString& name, Int_t id, | |
58 | Bool_t isVirtual, | |
59 | const TGeoCombiTrans& transform, | |
60 | const char* only="ONLY"); | |
61 | ||
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, | |
69 | Int_t copyNo, | |
70 | const TGeoTranslation& translation, | |
71 | const char* only="ONLY"); | |
72 | void AddEnvelope(const TString& name, Int_t id, | |
73 | Int_t copyNo, | |
74 | const TGeoTranslation& translation, | |
75 | const TGeoRotation& rotation, | |
76 | const char* only="ONLY"); | |
77 | void AddEnvelope(const TString& name, Int_t id, | |
78 | Int_t copyNo, | |
79 | const TGeoCombiTrans& transform, | |
80 | const char* only="ONLY"); | |
81 | ||
82 | // adding constituents to virtual envelopes | |
83 | // (placed in MC geometry with transformation composed | |
84 | // of transformation of chamber, envelope and their own | |
85 | // transformation ) | |
86 | void AddEnvelopeConstituent(const TString& name, const TString& envName, | |
87 | Int_t copyNo); | |
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); | |
95 | ||
96 | // adding constituents to virtual envelopes with specified shape | |
97 | // parameters | |
98 | // (placed in MC geometry with transformation composed | |
99 | // of transformation of chamber, envelope and their own | |
100 | // transformation ) | |
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); | |
112 | ||
113 | void SetDebug(Bool_t debug); | |
114 | ||
115 | // Alignement | |
116 | virtual Bool_t GetAlign() const; | |
117 | virtual void SetAlign(Bool_t align); | |
118 | ||
119 | // get methods | |
120 | const TObjArray* GetEnvelopes() const; | |
e118b27e | 121 | Int_t GetNofDetElements() const; |
89cc3034 | 122 | |
123 | private: | |
124 | // methods | |
125 | AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const; | |
126 | Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const; | |
127 | ||
128 | // data members | |
89cc3034 | 129 | TObjArray* fEnvelopes; // the envelopes names and transformations |
130 | // wrt to the chamber position in mother volume | |
e118b27e | 131 | AliMUONGeometryStore* fDetElements; // detection elements |
132 | // used for alignement of enevelopes | |
89cc3034 | 133 | Bool_t fDebug; // Switch for debugging |
134 | Bool_t fAlign; // option to read transformations from a file | |
135 | ||
e118b27e | 136 | ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store |
89cc3034 | 137 | }; |
138 | ||
139 | // inline functions | |
140 | ||
141 | inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug) | |
142 | { fDebug = debug; } | |
143 | ||
144 | inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const | |
145 | { return fAlign; } | |
146 | ||
147 | inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align) | |
148 | { fAlign = align; } | |
149 | ||
150 | inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const | |
151 | { return fEnvelopes; } | |
152 | ||
153 | #endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H |