]>
Commit | Line | Data |
---|---|---|
ef42d733 | 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$ | |
18 | Revision 1.8 2000/07/12 08:56:32 fca | |
19 | Coding convention correction and warning removal | |
20 | ||
21 | Revision 1.7 2000/06/28 21:27:45 morsch | |
22 | Most coding rule violations corrected. | |
23 | Still to do: Split the file (on file per class) ? Avoid the global variables. | |
24 | Copy constructors and assignment operators (dummy ?) | |
25 | ||
26 | Revision 1.6 2000/04/14 11:07:46 morsch | |
27 | Correct volume to medium assignment in case several media are asigned to the | |
28 | same material. | |
29 | ||
30 | Revision 1.5 2000/03/20 15:11:03 fca | |
31 | Mods to make the code compile on HP | |
32 | ||
33 | Revision 1.4 2000/01/18 16:12:08 morsch | |
34 | Bug in calculation of number of volume divisions and number of positionings corrected | |
35 | Browser for Material and Media properties added | |
36 | ||
37 | Revision 1.3 1999/11/14 14:31:14 fca | |
38 | Correct small error and remove compilation warnings on HP | |
39 | ||
40 | Revision 1.2 1999/11/10 16:53:35 fca | |
41 | The new geometry viewer from A.Morsch | |
42 | ||
43 | */ | |
44 | ||
45 | /* | |
46 | * Version: 0 | |
47 | * Written by Andreas Morsch | |
48 | * | |
49 | * | |
50 | * | |
51 | * For questions critics and suggestions to this part of the code | |
52 | * contact andreas.morsch@cern.ch | |
53 | * | |
54 | **************************************************************************/ | |
55 | ||
56 | #include "AliGUIMaterial.h" | |
57 | ||
58 | ClassImp(AliGUIMaterial) | |
59 | ||
60 | AliGUIMaterial::AliGUIMaterial() | |
61 | { | |
62 | // Constructor | |
63 | fId=-1; | |
64 | fName = 0; | |
65 | fA=-1; | |
66 | fZ=-1; | |
67 | fDensity=-1; | |
68 | fRadl=-1; | |
69 | fAbsl=-1; | |
70 | } | |
71 | ||
72 | AliGUIMaterial::AliGUIMaterial(Int_t imat, char* name, Float_t a, Float_t z, | |
73 | Float_t dens, Float_t radl, Float_t absl) | |
74 | { | |
75 | // Constructor | |
76 | fId=imat; | |
77 | fName=name; | |
78 | fA=a; | |
79 | fZ=z; | |
80 | fDensity=dens; | |
81 | fRadl=radl; | |
82 | fAbsl=absl; | |
83 | } | |
84 | void AliGUIMaterial::Dump() | |
85 | { | |
86 | // Dump material information | |
87 | printf("\n *****************************************"); | |
88 | printf("\n Material Number: %10d", fId); | |
89 | printf("\n %s", fName); | |
90 | printf("\n Mass Number: %10.2f", fA); | |
91 | printf("\n Charge Number: %10.2f", fZ); | |
92 | printf("\n Density: %10.2f", fDensity); | |
93 | printf("\n Radiation Length: %10.2f", fRadl); | |
94 | printf("\n Absorption Length: %10.2f", fAbsl); | |
95 | } | |
96 | ||
97 | Int_t AliGUIMaterial::Id() | |
98 | { | |
99 | // return material id | |
100 | return fId; | |
101 | } | |
102 | ||
103 | char* AliGUIMaterial::Name() | |
104 | { | |
105 | // return material name | |
106 | return fName; | |
107 | } | |
108 | ||
109 | Float_t AliGUIMaterial::A() | |
110 | { | |
111 | // return atomic number | |
112 | return fA; | |
113 | } | |
114 | ||
115 | Float_t AliGUIMaterial::Z() | |
116 | { | |
117 | // return charge number | |
118 | return fZ; | |
119 | } | |
120 | ||
121 | Float_t AliGUIMaterial::Density() | |
122 | { | |
123 | // return density | |
124 | return fDensity; | |
125 | } | |
126 | ||
127 | Float_t AliGUIMaterial::RadiationLength() | |
128 | { | |
129 | // return radiation length | |
130 | return fRadl; | |
131 | } | |
132 | ||
133 | Float_t AliGUIMaterial::AbsorptionLength() | |
134 | { | |
135 | // return absorption length | |
136 | return fAbsl; | |
137 | } | |
138 | ||
139 | ||
140 | void AliGUIMaterial::Plot() | |
141 | { | |
142 | // dummy plot routine | |
143 | ; | |
144 | } | |
145 | ||
146 | void AliGUIMaterial::Streamer(TBuffer &) | |
147 | { | |
148 | // dummy streamner | |
149 | ; | |
150 | } | |
151 | ||
152 | ||
153 | ||
154 | ||
155 | ||
156 | ||
157 | ||
158 | ||
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 | ||
165 |