3 // Class AliMUONChamberGeometry
4 // -----------------------------
5 // Class for definititon of the MUON chamber positions in ALIC.
7 // Author: Ivana Hrivnacova, IPN Orsay
9 #ifndef ALI_MUON_CHAMBER_GEOMETRY_H
10 #define ALI_MUON_CHAMBER_GEOMETRY_H
14 class TGeoTranslation;
21 class AliMUONGeometryEnvelope;
23 class AliMUONChamberGeometry : public TObject
26 AliMUONChamberGeometry(Int_t chamberId);
27 AliMUONChamberGeometry();
28 AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs);
29 virtual ~AliMUONChamberGeometry();
32 AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs);
36 // adding virtual envelopes
37 // (not placed in MC geometry, only logical assembly of volumes,
38 // cannot have more copies)
39 void AddEnvelope(const TString& name, Bool_t isVirtual);
40 void AddEnvelope(const TString& name, Bool_t isVirtual,
41 const TGeoTranslation& translation);
42 void AddEnvelope(const TString& name, Bool_t isVirtual,
43 const TGeoTranslation& translation,
44 const TGeoRotation& rotation);
46 // adding non-virtual envelopes
47 // (placed in MC geometry with transformation composed
48 // of transformation of chamber and their transformation,
49 // can have more copies )
50 void AddEnvelope(const TString& name, Int_t copyNo);
51 void AddEnvelope(const TString& name, Int_t copyNo,
52 const TGeoTranslation& translation);
53 void AddEnvelope(const TString& name, Int_t copyNo,
54 const TGeoTranslation& translation,
55 const TGeoRotation& rotation);
57 // adding constituents to virtual envelopes
58 // (placed in MC geometry with transformation composed
59 // of transformation of chamber, envelope and their own
61 void AddEnvelopeConstituent(const TString& name, const TString& envName,
63 void AddEnvelopeConstituent(const TString& name, const TString& envName,
64 Int_t copyNo, const TGeoTranslation& translation);
65 void AddEnvelopeConstituent(const TString& name, const TString& envName,
66 Int_t copyNo, const TGeoTranslation& translation,
67 const TGeoRotation& rotation);
69 // adding constituents to virtual envelopes with specified shape
71 // (placed in MC geometry with transformation composed
72 // of transformation of chamber, envelope and their own
74 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
75 Int_t copyNo, Int_t npar, Double_t* param);
76 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
77 Int_t copyNo, const TGeoTranslation& translation,
78 Int_t npar, Double_t* param);
79 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
80 Int_t copyNo, const TGeoTranslation& translation,
81 const TGeoRotation& rotation, Int_t npar, Double_t* param);
83 void SetMotherVolume(const TString& motherVolumeName);
84 void SetTranslation(const TGeoTranslation& translation);
85 void SetRotation(const TGeoRotation& rotation);
87 void SetSensitiveVolume(Int_t volId);
88 void SetSensitiveVolume(const TString& name);
89 void SetDebug(Bool_t debug);
92 TString GetMotherVolume() const;
93 const TGeoCombiTrans* GetTransformation() const;
94 const TObjArray* GetEnvelopes() const;
95 Bool_t IsSensitiveVolume(Int_t volId) const;
99 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
102 Int_t fChamberId; // the chamber Id
103 TString fMotherVolume; // mother volume name
104 TGeoCombiTrans* fTransformation;// the chamber transformation wrt to mother
106 TObjArray* fEnvelopes; // the envelopes names and transformations
107 // wrt to the chamber position in mother volume
108 Int_t fNofSensVolumeIds; // Number of sensitive volumes IDs
109 TArrayI* fSensVolumeIds; // Sensitive volumes IDs
110 Bool_t fDebug; // Switch for debugging
112 ClassDef(AliMUONChamberGeometry,1) // MUON chamber geometry base class
117 inline void AliMUONChamberGeometry::SetMotherVolume(const TString& motherVolumeName)
118 { fMotherVolume = motherVolumeName; }
120 inline void AliMUONChamberGeometry::SetDebug(Bool_t debug)
123 inline TString AliMUONChamberGeometry::GetMotherVolume() const
124 { return fMotherVolume; }
126 inline const TGeoCombiTrans* AliMUONChamberGeometry::GetTransformation() const
127 { return fTransformation; }
129 inline const TObjArray* AliMUONChamberGeometry::GetEnvelopes() const
130 { return fEnvelopes; }
132 #endif //ALI_MUON_V_CHAMBER_GEOMETRY_H