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 const char* only="ONLY");
41 void AddEnvelope(const TString& name, Bool_t isVirtual,
42 const TGeoTranslation& translation,
43 const char* only="ONLY");
44 void AddEnvelope(const TString& name, Bool_t isVirtual,
45 const TGeoTranslation& translation,
46 const TGeoRotation& rotation,
47 const char* only="ONLY");
49 // adding non-virtual envelopes
50 // (placed in MC geometry with transformation composed
51 // of transformation of chamber and their transformation,
52 // can have more copies )
53 void AddEnvelope(const TString& name, Int_t copyNo,
54 const char* only="ONLY");
55 void AddEnvelope(const TString& name, Int_t copyNo,
56 const TGeoTranslation& translation,
57 const char* only="ONLY");
58 void AddEnvelope(const TString& name, Int_t copyNo,
59 const TGeoTranslation& translation,
60 const TGeoRotation& rotation,
61 const char* only="ONLY");
63 // adding constituents to virtual envelopes
64 // (placed in MC geometry with transformation composed
65 // of transformation of chamber, envelope and their own
67 void AddEnvelopeConstituent(const TString& name, const TString& envName,
69 void AddEnvelopeConstituent(const TString& name, const TString& envName,
70 Int_t copyNo, const TGeoTranslation& translation);
71 void AddEnvelopeConstituent(const TString& name, const TString& envName,
72 Int_t copyNo, const TGeoTranslation& translation,
73 const TGeoRotation& rotation);
75 // adding constituents to virtual envelopes with specified shape
77 // (placed in MC geometry with transformation composed
78 // of transformation of chamber, envelope and their own
80 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
81 Int_t copyNo, Int_t npar, Double_t* param);
82 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
83 Int_t copyNo, const TGeoTranslation& translation,
84 Int_t npar, Double_t* param);
85 void AddEnvelopeConstituentParam(const TString& name, const TString& envName,
86 Int_t copyNo, const TGeoTranslation& translation,
87 const TGeoRotation& rotation, Int_t npar, Double_t* param);
89 void SetMotherVolume(const TString& motherVolumeName);
90 void SetTranslation(const TGeoTranslation& translation);
91 void SetRotation(const TGeoRotation& rotation);
93 void SetSensitiveVolume(Int_t volId);
94 void SetSensitiveVolume(const TString& name);
95 void SetDebug(Bool_t debug);
98 TString GetMotherVolume() const;
99 const TGeoCombiTrans* GetTransformation() const;
100 const TObjArray* GetEnvelopes() const;
101 Bool_t IsSensitiveVolume(Int_t volId) const;
105 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
108 Int_t fChamberId; // the chamber Id
109 TString fMotherVolume; // mother volume name
110 TGeoCombiTrans* fTransformation;// the chamber transformation wrt to mother
112 TObjArray* fEnvelopes; // the envelopes names and transformations
113 // wrt to the chamber position in mother volume
114 Int_t fNofSensVolumeIds; // Number of sensitive volumes IDs
115 TArrayI* fSensVolumeIds; // Sensitive volumes IDs
116 Bool_t fDebug; // Switch for debugging
118 ClassDef(AliMUONChamberGeometry,1) // MUON chamber geometry base class
123 inline void AliMUONChamberGeometry::SetMotherVolume(const TString& motherVolumeName)
124 { fMotherVolume = motherVolumeName; }
126 inline void AliMUONChamberGeometry::SetDebug(Bool_t debug)
129 inline TString AliMUONChamberGeometry::GetMotherVolume() const
130 { return fMotherVolume; }
132 inline const TGeoCombiTrans* AliMUONChamberGeometry::GetTransformation() const
133 { return fTransformation; }
135 inline const TObjArray* AliMUONChamberGeometry::GetEnvelopes() const
136 { return fEnvelopes; }
138 #endif //ALI_MUON_V_CHAMBER_GEOMETRY_H