]>
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" | |
8c343c7c | 27 | #include "AliLog.h" |
d1cd2474 | 28 | |
a9aad96e | 29 | /// \cond CLASSIMP |
d1cd2474 | 30 | ClassImp(AliMUONGeometryConstituent) |
a9aad96e | 31 | /// \endcond |
d1cd2474 | 32 | |
33 | //______________________________________________________________________________ | |
34 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
35 | Int_t copyNo, Int_t npar, Double_t* param) | |
36 | : TNamed(name, name), | |
37 | fCopyNo(copyNo), | |
38 | fNpar(npar), | |
a9aad96e | 39 | fParam(0), |
40 | fTransformation(0) | |
d1cd2474 | 41 | { |
692de412 | 42 | /// Standard constructor for a constituent without translation & rotation |
43 | ||
d1cd2474 | 44 | // fTransformation = new TGeoCombiTrans(name); |
45 | // would be nice to be so simple | |
46 | ||
47 | // Create the constituent transformation | |
48 | fTransformation = new TGeoCombiTrans(""); | |
49 | ||
50 | // Volume parameters | |
51 | if (npar > 0) { | |
52 | fParam = new Double_t[npar]; | |
53 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
54 | } | |
55 | } | |
56 | ||
57 | //______________________________________________________________________________ | |
58 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
59 | Int_t copyNo, const TGeoTranslation& translation, | |
60 | Int_t npar, Double_t* param) | |
61 | : TNamed(name, name), | |
62 | fCopyNo(copyNo), | |
63 | fNpar(npar), | |
64 | fParam(0), | |
65 | fTransformation(0) | |
66 | { | |
692de412 | 67 | /// Standard constructor for a constituent with translation |
68 | ||
d1cd2474 | 69 | // Create the constituent transformation |
70 | fTransformation = new TGeoCombiTrans(translation, TGeoRotation()); | |
71 | ||
72 | // Volume parameters | |
73 | if (npar > 0) { | |
74 | fParam = new Double_t[npar]; | |
75 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
76 | } | |
77 | } | |
78 | ||
79 | ||
80 | //______________________________________________________________________________ | |
81 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
82 | Int_t copyNo, const TGeoTranslation& translation, | |
83 | const TGeoRotation& rotation, | |
84 | Int_t npar, Double_t* param) | |
85 | ||
86 | : TNamed(name, name), | |
87 | fCopyNo(copyNo), | |
88 | fNpar(npar), | |
89 | fParam(0), | |
90 | fTransformation(0) | |
91 | { | |
692de412 | 92 | /// Standard constructor for a constituent with translation and rotation |
93 | ||
d1cd2474 | 94 | // Create the constituent transformation |
95 | fTransformation = new TGeoCombiTrans(translation, rotation); | |
96 | ||
97 | // Volume parameters | |
98 | if (npar > 0) { | |
99 | fParam = new Double_t[npar]; | |
100 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
101 | } | |
102 | } | |
103 | ||
c5354052 | 104 | //______________________________________________________________________________ |
105 | AliMUONGeometryConstituent::AliMUONGeometryConstituent(const TString& name, | |
106 | Int_t copyNo, | |
107 | const TGeoCombiTrans& transform, | |
108 | Int_t npar, Double_t* param) | |
109 | ||
110 | : TNamed(name, name), | |
111 | fCopyNo(copyNo), | |
112 | fNpar(npar), | |
113 | fParam(0), | |
114 | fTransformation(0) | |
115 | { | |
692de412 | 116 | /// Standard constructor for a constituent with translation and rotation |
117 | /// defined via TGeoCombiTrans | |
118 | ||
c5354052 | 119 | // Create the constituent transformation |
120 | fTransformation = new TGeoCombiTrans(transform); | |
121 | ||
122 | // Volume parameters | |
123 | if (npar > 0) { | |
124 | fParam = new Double_t[npar]; | |
125 | for (Int_t i=0; i<npar; i++) fParam[i] = param[i]; | |
126 | } | |
127 | } | |
128 | ||
d1cd2474 | 129 | //______________________________________________________________________________ |
130 | AliMUONGeometryConstituent::AliMUONGeometryConstituent() | |
131 | : TNamed(), | |
132 | fCopyNo(0), | |
133 | fNpar(0), | |
134 | fParam(0), | |
135 | fTransformation(0) | |
136 | { | |
692de412 | 137 | /// Default constructor |
d1cd2474 | 138 | } |
139 | ||
d1cd2474 | 140 | //______________________________________________________________________________ |
141 | AliMUONGeometryConstituent::~AliMUONGeometryConstituent() | |
142 | { | |
692de412 | 143 | /// Destructor |
144 | ||
d1cd2474 | 145 | delete fTransformation; |
c6df4ef2 | 146 | delete [] fParam; |
d1cd2474 | 147 | } |