]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | ||
16 | /* | |
17 | $Log$ | |
a8a6107b | 18 | Revision 1.2 1999/09/29 09:24:19 fca |
19 | Introduction of the Copyright and cvs Log | |
20 | ||
4c039060 | 21 | */ |
22 | ||
ab2f6604 | 23 | // -*- C++ -*- |
24 | // | |
25 | // 1998/10/19 | |
26 | // --------------------------------------------------------------------------- | |
27 | // | |
28 | // AliGMaterial Class | |
29 | // | |
30 | // This file is part of the ALICE Geometry Database . | |
31 | // | |
32 | // Author: Joana E. Santo | |
33 | // | |
34 | // --------------------------------------------------------------------------- | |
35 | ||
36 | #include "AliGMaterial.h" | |
37 | ||
38 | ClassImp(AliGMaterial) | |
39 | ||
40 | ||
41 | //------------------------------------------------------------------------- | |
42 | ||
43 | AliGMaterial::AliGMaterial( Int_t imat, Text_t* name, Text_t* title, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin, Float_t* ubuf, Int_t nbuf, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl, Float_t* buf, Int_t nwbuf ) : TNamed(name, title) | |
44 | { | |
45 | /* VIC: Very Important Constructor */ | |
46 | ||
47 | fImat = imat; | |
48 | fIsvol = isvol; | |
49 | fIfield = ifield; | |
50 | fFieldm = fieldm; | |
51 | fTmaxfd = tmaxfd; | |
52 | fStemax = stemax; | |
53 | fDeemax = deemax; | |
54 | fEpsil = epsil; | |
55 | fStmin = stmin; | |
56 | ||
57 | fUbuf = new Float_t[nbuf]; | |
58 | ||
59 | for( int i=0; i<nbuf; i++ ) | |
60 | fUbuf[i] = ubuf[i]; | |
61 | ||
62 | fNbuf = nbuf; | |
63 | fA = a; | |
64 | fZ = z; | |
65 | fDens = dens; | |
66 | fRadl = radl; | |
67 | fAbsl = absl; | |
68 | ||
69 | fBuf = new Float_t[nwbuf]; | |
70 | ||
71 | for( int j=0; j<nwbuf; j++ ) | |
72 | fBuf[j] = buf[j]; | |
73 | ||
74 | fNwbuf = nwbuf; | |
75 | } | |
76 | ||
77 | //------------------------------------------------------------------------- | |
78 | ||
79 | AliGMaterial::AliGMaterial(Text_t* name, Text_t* title, Float_t A, Float_t Z, Float_t rho) : TNamed(name, title) | |
80 | { | |
81 | /* Constructor */ | |
82 | fA = A; | |
83 | fRho = rho; | |
84 | fZ = Z; | |
85 | } | |
86 | ||
87 | //------------------------------------------------------------------------- | |
88 | ||
89 | AliGMaterial::AliGMaterial( AliGMaterial* Mat ) | |
90 | { | |
91 | /* Copy Constructor */ | |
92 | if( Mat ) { | |
93 | fImat = Mat->fImat; | |
94 | fIsvol = Mat->fIsvol; | |
95 | fIfield = Mat->fIfield; | |
96 | fFieldm = Mat->fFieldm; | |
97 | fTmaxfd = Mat->fTmaxfd; | |
98 | fStemax = Mat->fStemax; | |
99 | fDeemax = Mat->fDeemax; | |
100 | fEpsil = Mat->fEpsil; | |
101 | fStmin = Mat->fStmin; | |
102 | ||
103 | fUbuf = new Float_t[Mat->fNbuf]; | |
104 | ||
105 | for( int i=0; i<Mat->fNbuf; i++ ) | |
106 | fUbuf[i] = Mat->fUbuf[i]; | |
107 | ||
108 | fNbuf = Mat->fNbuf; | |
109 | fA = Mat->fA; | |
110 | fZ = Mat->fZ; | |
111 | fDens = Mat->fDens; | |
112 | fRadl = Mat->fRadl; | |
113 | fAbsl = Mat->fAbsl; | |
114 | ||
115 | fBuf = new Float_t[Mat->fNwbuf]; | |
116 | ||
117 | for( int j=0; j<Mat->fNwbuf; j++ ) | |
118 | fBuf[j] = Mat->fBuf[j]; | |
119 | ||
120 | fNwbuf = Mat->fNwbuf; | |
121 | ||
122 | fName = Mat->GetName(); | |
123 | fTitle = Mat->GetTitle(); | |
124 | } | |
125 | else { | |
126 | /* Default Constructor */ | |
127 | fImat = 0; | |
128 | fIsvol = 0; | |
129 | fIfield = 0; | |
130 | fFieldm = 0.; | |
131 | fTmaxfd = 0.; | |
132 | fStemax = 0.; | |
133 | fDeemax = 0.; | |
134 | fEpsil = 0.; | |
135 | fStmin = 0.; | |
136 | ||
137 | fUbuf = NULL; | |
138 | ||
139 | fNbuf = 0; | |
140 | fA = 0.; | |
141 | fZ = 0.; | |
142 | fDens = 0.; | |
143 | fRadl = 0.; | |
144 | fAbsl = 0.; | |
145 | ||
146 | fBuf = NULL; | |
147 | ||
148 | fNwbuf = 0; | |
149 | ||
150 | fName = ""; | |
151 | fTitle = ""; | |
152 | } | |
153 | } | |
154 | ||
155 | //------------------------------------------------------------------------- | |
156 | ||
157 | AliGMaterial::~AliGMaterial() | |
158 | { /* Destructor */ | |
159 | ||
160 | if( fUbuf ) delete [] fUbuf; | |
161 | if( fBuf ) delete [] fBuf; | |
162 | } | |
163 | ||
164 | //------------------------------------------------------------------------- | |
165 | ||
166 | AliGMaterial* AliGMaterial::operator=( const AliGMaterial* Mat ) | |
167 | { | |
168 | /* Operator = */ | |
169 | if( this == Mat ) return this; // special case. | |
170 | ||
171 | fA = Mat->fA; | |
172 | fName = Mat->GetName(); | |
173 | fRho = Mat->fRho; | |
174 | fTitle = Mat->GetTitle(); | |
175 | fZ = Mat->fZ; | |
176 | ||
177 | return this; | |
178 | } |