]>
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 | ||
94 | //______________________________________________________________________________ | |
95 | AliMUONGeometryConstituent::AliMUONGeometryConstituent() | |
96 | : TNamed(), | |
97 | fCopyNo(0), | |
98 | fNpar(0), | |
99 | fParam(0), | |
100 | fTransformation(0) | |
101 | { | |
102 | // Default constructor | |
103 | } | |
104 | ||
105 | ||
106 | //______________________________________________________________________________ | |
107 | AliMUONGeometryConstituent::AliMUONGeometryConstituent( | |
108 | const AliMUONGeometryConstituent& rhs) | |
109 | : TNamed(rhs) | |
110 | { | |
111 | Fatal("Copy constructor", | |
112 | "Copy constructor is not implemented."); | |
113 | } | |
114 | ||
115 | //______________________________________________________________________________ | |
116 | AliMUONGeometryConstituent::~AliMUONGeometryConstituent() | |
117 | { | |
118 | // | |
119 | delete fTransformation; | |
c6df4ef2 | 120 | delete [] fParam; |
d1cd2474 | 121 | } |
122 | ||
123 | //______________________________________________________________________________ | |
124 | AliMUONGeometryConstituent& | |
125 | AliMUONGeometryConstituent::operator = (const AliMUONGeometryConstituent& rhs) | |
126 | { | |
127 | // check assignement to self | |
128 | if (this == &rhs) return *this; | |
129 | ||
130 | Fatal("operator=", | |
131 | "Assignment operator is not implemented."); | |
132 | ||
133 | return *this; | |
134 | } | |
135 |