AliRoot Core  edcc906 (edcc906)
AliMUONGeometryEnvelopeStore.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
14 
15 #ifndef ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
16 #define ALI_MUON_GEOMETRY_ENVELOPE_STORE_H
17 
18 #include <TObject.h>
19 #include <TGeoMatrix.h>
20 
21 class TGeoTranslation;
22 class TGeoRotation;
23 class TGeoCombiTrans;
24 class TObjArray;
25 class TArrayI;
26 class TString;
27 
28 class AliMUONChamber;
30 class AliMpExMap;
31 
32 class AliMUONGeometryEnvelopeStore : public TObject
33 {
34  public:
38 
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);
112  void SetReferenceFrame(const TGeoCombiTrans& referenceFrame);
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;
120  Int_t GetNofDetElements() const;
121 
122  AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
123 
124  protected:
129 
130  private:
131  // methods
132  TGeoHMatrix ConvertDETransform(const TGeoHMatrix& transform) const;
133  Bool_t AlignEnvelope(AliMUONGeometryEnvelope* envelope) const;
134 
135  // data members
139  TGeoCombiTrans fReferenceFrame;
141  Bool_t fDebug;
144  Bool_t fAlign;
145 
146  ClassDef(AliMUONGeometryEnvelopeStore,2) // Geometry envelope store
147 };
148 
149 // inline functions
150 
154 { fDebug = debug; }
155 
158 { return fAlign; }
159 
162 { fAlign = align; }
163 
167 { return fEnvelopes; }
168 
171 inline void
172 AliMUONGeometryEnvelopeStore::SetReferenceFrame(const TGeoCombiTrans& referenceFrame)
173 { fReferenceFrame = referenceFrame; }
174 
175 #endif //ALI_MUON_CHAMBER_ENVELOPE_STORE_H
Bool_t fAlign
option to read transformations from a file
AliMUONGeometryEnvelopeStore & operator=(const AliMUONGeometryEnvelopeStore &rhs)
Not implemented.
#define TObjArray
AliTPCcalibAlign align
Definition: CalibAlign.C:43
MUON tracking chamber class.
AliMpExMap * fDetElements
wrt to the chamber position in mother volume
TGeoHMatrix ConvertDETransform(const TGeoHMatrix &transform) const
Bool_t AlignEnvelope(AliMUONGeometryEnvelope *envelope) const
void SetReferenceFrame(const TGeoCombiTrans &referenceFrame)
void AddEnvelope(const TString &name, Int_t id, Bool_t isVirtual, const char *only="ONLY")
AliMUONGeometryEnvelope * FindEnvelope(const TString &name) const
TGeoCombiTrans fReferenceFrame
the transformation from the builder reference frame to that of the transform
TObjArray * fEnvelopes
the envelopes names and transformations
void AddEnvelopeConstituent(const TString &name, const TString &envName, Int_t copyNo)
Store for temporary volumes envelopes.
Geometry envelope helper class.
virtual Bool_t GetAlign() const
Return align option - if true, transformations are read from a file.
void AddEnvelopeConstituentParam(const TString &name, const TString &envName, Int_t copyNo, Int_t npar, Double_t *param)
Int_t debug
const TObjArray * GetEnvelopes() const
Helper class making Root persistent TExMap.
Definition: AliMpExMap.h:28
virtual void SetAlign(Bool_t align)
Set align option - if true, transformations are read from a file.