]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryEnvelopeStore.h
Updated with refactoring of geometry & segmentation classes;
[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///
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>
19#include <TString.h>
20
21class TGeoTranslation;
22class TGeoRotation;
23class TGeoCombiTrans;
24class TObjArray;
25class TArrayI;
26
27class AliMUONChamber;
28class AliMUONGeometryEnvelope;
e118b27e 29class AliMUONGeometryStore;
89cc3034 30
31class AliMUONGeometryEnvelopeStore : public TObject
32{
33 public:
e118b27e 34 AliMUONGeometryEnvelopeStore(AliMUONGeometryStore* detElements);
89cc3034 35 AliMUONGeometryEnvelopeStore();
36 AliMUONGeometryEnvelopeStore(const AliMUONGeometryEnvelopeStore& rhs);
37 virtual ~AliMUONGeometryEnvelopeStore();
38
39 // operators
e118b27e 40 AliMUONGeometryEnvelopeStore&
41 operator = (const AliMUONGeometryEnvelopeStore& rhs);
89cc3034 42
43 // methods
44
45 // adding virtual envelopes
46 // (not placed in MC geometry, only logical assembly of volumes,
47 // cannot have more copies)
48 void AddEnvelope(const TString& name, Int_t id,
49 Bool_t isVirtual, const char* only="ONLY");
50 void AddEnvelope(const TString& name, Int_t id,
51 Bool_t isVirtual,
52 const TGeoTranslation& translation,
53 const char* only="ONLY");
54 void AddEnvelope(const TString& name, Int_t id,
55 Bool_t isVirtual,
56 const TGeoTranslation& translation,
57 const TGeoRotation& rotation,
58 const char* only="ONLY");
59 void AddEnvelope(const TString& name, Int_t id,
60 Bool_t isVirtual,
61 const TGeoCombiTrans& transform,
62 const char* only="ONLY");
63
64 // adding non-virtual envelopes
65 // (placed in MC geometry with transformation composed
66 // of transformation of chamber and their transformation,
67 // can have more copies )
68 void AddEnvelope(const TString& name, Int_t id,
69 Int_t copyNo, const char* only="ONLY");
70 void AddEnvelope(const TString& name, Int_t id,
71 Int_t copyNo,
72 const TGeoTranslation& translation,
73 const char* only="ONLY");
74 void AddEnvelope(const TString& name, Int_t id,
75 Int_t copyNo,
76 const TGeoTranslation& translation,
77 const TGeoRotation& rotation,
78 const char* only="ONLY");
79 void AddEnvelope(const TString& name, Int_t id,
80 Int_t copyNo,
81 const TGeoCombiTrans& transform,
82 const char* only="ONLY");
83
84 // adding constituents to virtual envelopes
85 // (placed in MC geometry with transformation composed
86 // of transformation of chamber, envelope and their own
87 // transformation )
88 void AddEnvelopeConstituent(const TString& name, const TString& envName,
89 Int_t copyNo);
90 void AddEnvelopeConstituent(const TString& name, const TString& envName,
91 Int_t copyNo, const TGeoTranslation& translation);
92 void AddEnvelopeConstituent(const TString& name, const TString& envName,
93 Int_t copyNo, const TGeoTranslation& translation,
94 const TGeoRotation& rotation);
95 void AddEnvelopeConstituent(const TString& name, const TString& envName,
96 Int_t copyNo, const TGeoCombiTrans& transform);
97
98 // adding constituents to virtual envelopes with specified shape
99 // parameters
100 // (placed in MC geometry with transformation composed
101 // of transformation of chamber, envelope and their own
102 // transformation )
103 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
104 Int_t copyNo, Int_t npar, Double_t* param);
105 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
106 Int_t copyNo, const TGeoTranslation& translation,
107 Int_t npar, Double_t* param);
108 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
109 Int_t copyNo, const TGeoTranslation& translation,
110 const TGeoRotation& rotation, Int_t npar, Double_t* param);
111 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
112 Int_t copyNo, const TGeoCombiTrans& transform,
113 Int_t npar, Double_t* param);
114
115 void SetDebug(Bool_t debug);
116
117 // Alignement
118 virtual Bool_t GetAlign() const;
119 virtual void SetAlign(Bool_t align);
120
121 // get methods
122 const TObjArray* GetEnvelopes() const;
e118b27e 123 Int_t GetNofDetElements() const;
89cc3034 124
125 private:
126 // methods
127 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
128 Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const;
129
130 // data members
89cc3034 131 TObjArray* fEnvelopes; // the envelopes names and transformations
132 // wrt to the chamber position in mother volume
e118b27e 133 AliMUONGeometryStore* fDetElements; // detection elements
134 // used for alignement of enevelopes
89cc3034 135 Bool_t fDebug; // Switch for debugging
136 Bool_t fAlign; // option to read transformations from a file
137
e118b27e 138 ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
89cc3034 139};
140
141// inline functions
142
143inline void AliMUONGeometryEnvelopeStore::SetDebug(Bool_t debug)
144{ fDebug = debug; }
145
146inline Bool_t AliMUONGeometryEnvelopeStore::GetAlign() const
147{ return fAlign; }
148
149inline void AliMUONGeometryEnvelopeStore::SetAlign(Bool_t align)
150{ fAlign = align; }
151
152inline const TObjArray* AliMUONGeometryEnvelopeStore::GetEnvelopes() const
153{ return fEnvelopes; }
154
155#endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H