]>
Commit | Line | Data |
---|---|---|
30178c30 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
d1cd2474 | 16 | // $Id$ |
17 | // | |
18 | // Class AliMUONGeometryConstituent | |
19 | // ----------------------------- | |
20 | // Helper class for definititon of an assembly of volumes. | |
d1cd2474 | 21 | // Author: Ivana Hrivnacova, IPN Orsay |
5f1df83a | 22 | // 23/01/2004 |
d1cd2474 | 23 | |
24 | #include <TGeoMatrix.h> | |
25 | ||
26 | #include "AliMUONGeometryConstituent.h" | |
27 | ||
28 | ClassImp(AliMUONGeometryConstituent) | |
29 | ||
30 | //______________________________________________________________________________ | |
31 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
32 | Int_t copyNo, Int_t npar, Double_t* param) | |
33 | : TNamed(name, name), | |
34 | fCopyNo(copyNo), | |
35 | fNpar(npar), | |
36 | fParam(0) | |
37 | { | |
38 | // fTransformation = new TGeoCombiTrans(name); | |
39 | // would be nice to be so simple | |
40 | ||
41 | // Create the constituent transformation | |
42 | fTransformation = new TGeoCombiTrans(""); | |
43 | ||
44 | // Volume parameters | |
45 | if (npar > 0) { | |
46 | fParam = new Double_t[npar]; | |
47 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
48 | } | |
49 | } | |
50 | ||
51 | //______________________________________________________________________________ | |
52 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
53 | Int_t copyNo, const TGeoTranslation& translation, | |
54 | Int_t npar, Double_t* param) | |
55 | : TNamed(name, name), | |
56 | fCopyNo(copyNo), | |
57 | fNpar(npar), | |
58 | fParam(0), | |
59 | fTransformation(0) | |
60 | { | |
61 | // Create the constituent transformation | |
62 | fTransformation = new TGeoCombiTrans(translation, TGeoRotation()); | |
63 | ||
64 | // Volume parameters | |
65 | if (npar > 0) { | |
66 | fParam = new Double_t[npar]; | |
67 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
68 | } | |
69 | } | |
70 | ||
71 | ||
72 | //______________________________________________________________________________ | |
73 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
74 | Int_t copyNo, const TGeoTranslation& translation, | |
75 | const TGeoRotation& rotation, | |
76 | Int_t npar, Double_t* param) | |
77 | ||
78 | : TNamed(name, name), | |
79 | fCopyNo(copyNo), | |
80 | fNpar(npar), | |
81 | fParam(0), | |
82 | fTransformation(0) | |
83 | { | |
84 | // Create the constituent transformation | |
85 | fTransformation = new TGeoCombiTrans(translation, rotation); | |
86 | ||
87 | // Volume parameters | |
88 | if (npar > 0) { | |
89 | fParam = new Double_t[npar]; | |
90 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
91 | } | |
92 | } | |
93 | ||
c5354052 | 94 | //______________________________________________________________________________ |
95 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
96 | Int_t copyNo, | |
97 | const TGeoCombiTrans& transform, | |
98 | Int_t npar, Double_t* param) | |
99 | ||
100 | : TNamed(name, name), | |
101 | fCopyNo(copyNo), | |
102 | fNpar(npar), | |
103 | fParam(0), | |
104 | fTransformation(0) | |
105 | { | |
106 | // Create the constituent transformation | |
107 | fTransformation = new TGeoCombiTrans(transform); | |
108 | ||
109 | // Volume parameters | |
110 | if (npar > 0) { | |
111 | fParam = new Double_t[npar]; | |
112 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
113 | } | |
114 | } | |
115 | ||
d1cd2474 | 116 | //______________________________________________________________________________ |
117 | AliMUONGeometryConstituent::AliMUONGeometryConstituent() | |
118 | : TNamed(), | |
119 | fCopyNo(0), | |
120 | fNpar(0), | |
121 | fParam(0), | |
122 | fTransformation(0) | |
123 | { | |
124 | // Default constructor | |
125 | } | |
126 | ||
127 | ||
128 | //______________________________________________________________________________ | |
129 | AliMUONGeometryConstituent::AliMUONGeometryConstituent( | |
130 | const AliMUONGeometryConstituent& rhs) | |
131 | : TNamed(rhs) | |
132 | { | |
133 | Fatal("Copy constructor", | |
134 | "Copy constructor is not implemented."); | |
135 | } | |
136 | ||
137 | //______________________________________________________________________________ | |
138 | AliMUONGeometryConstituent::~AliMUONGeometryConstituent() | |
139 | { | |
140 | // | |
141 | delete fTransformation; | |
c6df4ef2 | 142 | delete [] fParam; |
d1cd2474 | 143 | } |
144 | ||
145 | //______________________________________________________________________________ | |
146 | AliMUONGeometryConstituent& | |
147 | AliMUONGeometryConstituent::operator = (const AliMUONGeometryConstituent& rhs) | |
148 | { | |
149 | // check assignement to self | |
150 | if (this == &rhs) return *this; | |
151 | ||
152 | Fatal("operator=", | |
153 | "Assignment operator is not implemented."); | |
154 | ||
155 | return *this; | |
156 | } | |
157 |