]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryEnvelopeStore.h
Added static method GetDENamePrefix();
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryEnvelopeStore.h
CommitLineData
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$
692de412 5
6/// \ingroup geometry
7/// \class AliMUONGeometryEnvelopeStore
8/// \brief Store for temporary volumes envelopes
9///
10/// Class for definititon of the temporary volume envelopes
11/// used in geometry construction
12///
a9aad96e 13/// \author Ivana Hrivnacova, IPN Orsay
89cc3034 14
15#ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
16#define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
17
18#include <TObject.h>
6cfb12b4 19#include <TGeoMatrix.h>
89cc3034 20
21class TGeoTranslation;
22class TGeoRotation;
23class TGeoCombiTrans;
24class TObjArray;
25class TArrayI;
7183d525 26class TString;
89cc3034 27
28class AliMUONChamber;
29class AliMUONGeometryEnvelope;
e118b27e 30class AliMUONGeometryStore;
89cc3034 31
32class AliMUONGeometryEnvelopeStore : public TObject
33{
34 public:
e118b27e 35 AliMUONGeometryEnvelopeStore(AliMUONGeometryStore* detElements);
89cc3034 36 AliMUONGeometryEnvelopeStore();
89cc3034 37 virtual ~AliMUONGeometryEnvelopeStore();
38
89cc3034 39 // methods
40
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,
47 Bool_t isVirtual,
48 const TGeoTranslation& translation,
49 const char* only="ONLY");
50 void AddEnvelope(const TString& name, Int_t id,
51 Bool_t isVirtual,
52 const TGeoTranslation& translation,
53 const TGeoRotation& rotation,
54 const char* only="ONLY");
55 void AddEnvelope(const TString& name, Int_t id,
56 Bool_t isVirtual,
57 const TGeoCombiTrans& transform,
58 const char* only="ONLY");
59
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,
67 Int_t copyNo,
68 const TGeoTranslation& translation,
69 const char* only="ONLY");
70 void AddEnvelope(const TString& name, Int_t id,
71 Int_t copyNo,
72 const TGeoTranslation& translation,
73 const TGeoRotation& rotation,
74 const char* only="ONLY");
75 void AddEnvelope(const TString& name, Int_t id,
76 Int_t copyNo,
77 const TGeoCombiTrans& transform,
78 const char* only="ONLY");
79
80 // adding constituents to virtual envelopes
81 // (placed in MC geometry with transformation composed
82 // of transformation of chamber, envelope and their own
83 // transformation )
84 void AddEnvelopeConstituent(const TString& name, const TString& envName,
85 Int_t copyNo);
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);
93
94 // adding constituents to virtual envelopes with specified shape
95 // parameters
96 // (placed in MC geometry with transformation composed
97 // of transformation of chamber, envelope and their own
98 // transformation )
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);
110
111 void SetDebug(Bool_t debug);
6cfb12b4 112 void SetReferenceFrame(const TGeoCombiTrans& referenceFrame);
89cc3034 113
114 // Alignement
115 virtual Bool_t GetAlign() const;
116 virtual void SetAlign(Bool_t align);
117
118 // get methods
119 const TObjArray* GetEnvelopes() const;
e118b27e 120 Int_t GetNofDetElements() const;
89cc3034 121
a9aad96e 122 protected:
123 AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
124 AliMUONGeometryEnvelopeStore& operator = (const AliMUONGeometryEnvelopeStore& rhs);
125
89cc3034 126 private:
127 // methods
6ec9cd4e 128 TGeoHMatrix ConvertDETransform(const TGeoHMatrix& transform) const;
89cc3034 129 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
130 Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const;
131
132 // data members
829425a5 133 TObjArray* fEnvelopes; ///< \brief the envelopes names and transformations
134 /// wrt to the chamber position in mother volume
135 AliMUONGeometryStore* fDetElements; ///< \brief detection elements
a9aad96e 136 /// used for alignement of envelopes
829425a5 137 TGeoCombiTrans fReferenceFrame; ///< \brief the transformation from the builder
138 /// reference frame to that of the transform
139 /// data files
a9aad96e 140 Bool_t fDebug; ///< Switch for debugging \deprecated - use AliLog instead
829425a5 141 Bool_t fAlign; ///< option to read transformations from a file
89cc3034 142
e118b27e 143 ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
89cc3034 144};
145
146// inline functions
147
a9aad96e 148/// Set debug option
149/// \deprecated - use AliLog instead
89cc3034 150inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug)
151{ fDebug = debug; }
152
a9aad96e 153/// Return align option - if true, transformations are read from a file
89cc3034 154inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const
155{ return fAlign; }
156
a9aad96e 157/// Set align option - if true, transformations are read from a file
89cc3034 158inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align)
159{ fAlign = align; }
160
a9aad96e 161/// Return the array of the envelopes names and transformations
162/// wrt to the chamber position in mother volume
89cc3034 163inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const
164{ return fEnvelopes; }
165
a9aad96e 166/// Set the transformation from the builder reference frame to that of the transform
167/// data files
6cfb12b4 168inline void
169AliMUONGeometryEnvelopeStore::SetReferenceFrame(const TGeoCombiTrans& referenceFrame)
170{ fReferenceFrame = referenceFrame; }
171
89cc3034 172#endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H