1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // Revision of includes 07/05/2004
8 // Class AliMUONChamberGeometry
9 // -----------------------------
10 // Class for definititon of the MUON chamber positions in ALIC.
12 // Author: Ivana Hrivnacova, IPN Orsay
14 #ifndef ALI_MUON_CHAMBER_GEOMETRY_H
15 #define ALI_MUON_CHAMBER_GEOMETRY_H
19 class TGeoTranslation;
26 class AliMUONGeometryEnvelope;
28 class AliMUONChamberGeometry : public TObject
31 AliMUONChamberGeometry(Int_t chamberId);
32 AliMUONChamberGeometry();
33 virtual ~AliMUONChamberGeometry();
37 // adding virtual envelopes
38 // (not placed in MC geometry, only logical assembly of volumes,
39 // cannot have more copies)
40 void AddEnvelope(const TString& name, Bool_t isVirtual,
41 const char* only="ONLY");
42 void AddEnvelope(const TString& name, Bool_t isVirtual,
43 const TGeoTranslation& translation,
44 const char* only="ONLY");
45 void AddEnvelope(const TString& name, Bool_t isVirtual,
46 const TGeoTranslation& translation,
47 const TGeoRotation& rotation,
48 const char* only="ONLY");
50 // adding non-virtual envelopes
51 // (placed in MC geometry with transformation composed
52 // of transformation of chamber and their transformation,
53 // can have more copies )
54 void AddEnvelope(const TString& name, Int_t copyNo,
55 const char* only="ONLY");
56 void AddEnvelope(const TString& name, Int_t copyNo,
57 const TGeoTranslation& translation,
58 const char* only="ONLY");
59 void AddEnvelope(const TString& name, Int_t copyNo,
60 const TGeoTranslation& translation,
61 const TGeoRotation& rotation,
62 const char* only="ONLY");
64 // adding constituents to virtual envelopes
65 // (placed in MC geometry with transformation composed
66 // of transformation of chamber, envelope and their own
68 void AddEnvelopeConstituent(const TString& name, const TString& envName,
70 void AddEnvelopeConstituent(const TString& name, const TString& envName,
71 Int_t copyNo, const TGeoTranslation& translation);
72 void AddEnvelopeConstituent(const TString& name, const TString& envName,
73 Int_t copyNo, const TGeoTranslation& translation,
74 const TGeoRotation& rotation);
76 // adding constituents to virtual envelopes with specified shape
78 // (placed in MC geometry with transformation composed
79 // of transformation of chamber, envelope and their own
81 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
82 Int_t copyNo, Int_t npar, Double_t* param);
83 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
84 Int_t copyNo, const TGeoTranslation& translation,
85 Int_t npar, Double_t* param);
86 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
87 Int_t copyNo, const TGeoTranslation& translation,
88 const TGeoRotation& rotation, Int_t npar, Double_t* param);
90 void SetMotherVolume(const TString& motherVolumeName);
91 void SetTranslation(const TGeoTranslation& translation);
92 void SetRotation(const TGeoRotation& rotation);
94 void SetSensitiveVolume(Int_t volId);
95 void SetSensitiveVolume(const TString& name);
96 void SetDebug(Bool_t debug);
99 TString GetMotherVolume() const;
100 const TGeoCombiTrans* GetTransformation() const;
101 const TObjArray* GetEnvelopes() const;
102 Bool_t IsSensitiveVolume(Int_t volId) const;
105 AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs);
107 AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs);
111 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
114 Int_t fChamberId; // the chamber Id
115 TString fMotherVolume; // mother volume name
116 TGeoCombiTrans* fTransformation;// the chamber transformation wrt to mother
118 TObjArray* fEnvelopes; // the envelopes names and transformations
119 // wrt to the chamber position in mother volume
120 Int_t fNofSensVolumeIds; // Number of sensitive volumes IDs
121 TArrayI* fSensVolumeIds; // Sensitive volumes IDs
122 Bool_t fDebug; // Switch for debugging
124 ClassDef(AliMUONChamberGeometry,1) // MUON chamber geometry base class
129 inline void AliMUONChamberGeometry::SetMotherVolume(const TString& motherVolumeName)
130 { fMotherVolume = motherVolumeName; }
132 inline void AliMUONChamberGeometry::SetDebug(Bool_t debug)
135 inline TString AliMUONChamberGeometry::GetMotherVolume() const
136 { return fMotherVolume; }
138 inline const TGeoCombiTrans* AliMUONChamberGeometry::GetTransformation() const
139 { return fTransformation; }
141 inline const TObjArray* AliMUONChamberGeometry::GetEnvelopes() const
142 { return fEnvelopes; }
144 #endif //ALI_MUON_V_CHAMBER_GEOMETRY_H