1 /* *************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.8 2000/07/12 08:56:32 fca
19 Coding convention correction and warning removal
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 ?)
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
30 Revision 1.5 2000/03/20 15:11:03 fca
31 Mods to make the code compile on HP
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
37 Revision 1.3 1999/11/14 14:31:14 fca
38 Correct small error and remove compilation warnings on HP
40 Revision 1.2 1999/11/10 16:53:35 fca
41 The new geometry viewer from A.Morsch
47 * Written by Andreas Morsch
51 * For questions critics and suggestions to this part of the code
52 * contact andreas.morsch@cern.ch
54 **************************************************************************/
56 #include "AliDrawVolume.h"
58 ClassImp(AliDrawVolume)
60 AliDrawVolume::AliDrawVolume(char* name)
84 char* AliDrawVolume::Name()
92 void AliDrawVolume::Streamer(TBuffer &)
100 void AliDrawVolume::Draw(Option_t *)
102 // Wraps the geant Gdraw
103 gMC->Gsatt(fName,"seen", fSeen);
106 gMC->Gdopt("hide", "on");
108 gMC->Gdopt("hide", "off");
112 gMC->Gdopt("shad", "on");
113 gMC->Gsatt("*", "fill", fFill);
115 gMC->Gdopt("shad", "off");
118 gMC->SetClipBox(".");
120 gMC->SetClipBox("*", fClipXmin, fClipXmax,
121 fClipYmin, fClipYmax, fClipZmin, fClipZmax);
123 gMC->SetClipBox(".");
127 gMC->Gdraw(fName, fTheta, fPhi, fPsi, fU, fV, fUscale, fVscale);
128 THIGZ *higz = (THIGZ*)gROOT->GetListOfCanvases()->FindObject("higz");
129 if (higz) higz->Update();
132 void AliDrawVolume::DrawSpec()
134 // Wraps the Geant DrawSpec
135 gMC->Gsatt(fName,"seen", fSeen);
138 gMC->Gdopt("hide", "on");
140 gMC->Gdopt("hide", "off");
144 gMC->Gdopt("shad", "on");
145 gMC->Gsatt("*", "fill", fFill);
147 gMC->Gdopt("shad", "off");
150 gMC->SetClipBox(".");
152 gMC->SetClipBox("*", fClipXmin, fClipXmax, fClipYmin, fClipYmax, fClipZmin, fClipZmax);
154 gMC->SetClipBox(".");
158 ((TGeant3*) gMC)->DrawOneSpec(fName);
159 THIGZ *higz = (THIGZ*)gROOT->GetListOfCanvases()->FindObject("higz");
160 if (higz) higz->Update();
163 void AliDrawVolume::SetParam(Int_t ip, Float_t param)
165 // Set drawing parameters
192 fShadow=Int_t(param);
224 Float_t AliDrawVolume::GetParam(Int_t ip)
226 // Get drawing parameters
243 return Float_t(fHide);
245 return Float_t(fShadow);
247 return Float_t(fFill);
249 return Float_t(fSeen);
251 return Float_t(fClip);