]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONChamberGeometry.h
Bug fix for SDD test beam simulation.
[u/mrichter/AliRoot.git] / MUON / AliMUONChamberGeometry.h
CommitLineData
d1cd2474 1// $Id$
2//
3// Class AliMUONChamberGeometry
4// -----------------------------
5// Class for definititon of the MUON chamber positions in ALIC.
6//
7// Author: Ivana Hrivnacova, IPN Orsay
8
9#ifndef ALI_MUON_CHAMBER_GEOMETRY_H
10#define ALI_MUON_CHAMBER_GEOMETRY_H
11
12#include <TObject.h>
13
14class TGeoTranslation;
15class TGeoRotation;
16class TGeoCombiTrans;
17class TObjArray;
18class TArrayI;
19
20class AliMUONChamber;
21class AliMUONGeometryEnvelope;
22
23class AliMUONChamberGeometry : public TObject
24{
25 public:
26 AliMUONChamberGeometry(Int_t chamberId);
27 AliMUONChamberGeometry();
28 AliMUONChamberGeometry(const AliMUONChamberGeometry& rhs);
29 virtual ~AliMUONChamberGeometry();
30
31 // operators
32 AliMUONChamberGeometry& operator = (const AliMUONChamberGeometry& rhs);
33
34 // methods
35
36 // adding virtual envelopes
37 // (not placed in MC geometry, only logical assembly of volumes,
38 // cannot have more copies)
d1cd2474 39 void AddEnvelope(const TString& name, Bool_t isVirtual,
6b82c1f0 40 const char* only="ONLY");
d1cd2474 41 void AddEnvelope(const TString& name, Bool_t isVirtual,
42 const TGeoTranslation& translation,
6b82c1f0 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");
d1cd2474 48
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 )
d1cd2474 53 void AddEnvelope(const TString& name, Int_t copyNo,
6b82c1f0 54 const char* only="ONLY");
55 void AddEnvelope(const TString& name, Int_t copyNo,
56 const TGeoTranslation& translation,
57 const char* only="ONLY");
d1cd2474 58 void AddEnvelope(const TString& name, Int_t copyNo,
59 const TGeoTranslation& translation,
6b82c1f0 60 const TGeoRotation& rotation,
61 const char* only="ONLY");
d1cd2474 62
63 // adding constituents to virtual envelopes
64 // (placed in MC geometry with transformation composed
65 // of transformation of chamber, envelope and their own
66 // transformation )
67 void AddEnvelopeConstituent(const TString& name, const TString& envName,
68 Int_t copyNo);
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);
74
75 // adding constituents to virtual envelopes with specified shape
76 // parameters
77 // (placed in MC geometry with transformation composed
78 // of transformation of chamber, envelope and their own
79 // transformation )
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);
88
89 void SetMotherVolume(const TString& motherVolumeName);
90 void SetTranslation(const TGeoTranslation& translation);
91 void SetRotation(const TGeoRotation& rotation);
92
93 void SetSensitiveVolume(Int_t volId);
94 void SetSensitiveVolume(const TString& name);
95 void SetDebug(Bool_t debug);
96
97 // get methods
98 TString GetMotherVolume() const;
99 const TGeoCombiTrans* GetTransformation() const;
100 const TObjArray* GetEnvelopes() const;
101 Bool_t IsSensitiveVolume(Int_t volId) const;
102
103 private:
104 // methods
105 AliMUONGeometryEnvelope* FindEnvelope(const TString& name) const;
106
107 // data members
108 Int_t fChamberId; // the chamber Id
109 TString fMotherVolume; // mother volume name
110 TGeoCombiTrans* fTransformation;// the chamber transformation wrt to mother
111 // volume
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
117
118 ClassDef(AliMUONChamberGeometry,1) // MUON chamber geometry base class
119};
120
121// inline functions
122
123inline void AliMUONChamberGeometry::SetMotherVolume(const TString& motherVolumeName)
124{ fMotherVolume = motherVolumeName; }
125
126inline void AliMUONChamberGeometry::SetDebug(Bool_t debug)
127{ fDebug = debug; }
128
129inline TString AliMUONChamberGeometry::GetMotherVolume() const
130{ return fMotherVolume; }
131
132inline const TGeoCombiTrans* AliMUONChamberGeometry::GetTransformation() const
133{ return fTransformation; }
134
135inline const TObjArray* AliMUONChamberGeometry::GetEnvelopes() const
136{ return fEnvelopes; }
137
138#endif //ALI_MUON_V_CHAMBER_GEOMETRY_H