]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STRUCT/AliFRAMEv1.cxx
ty is Double_t
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv1.cxx
... / ...
CommitLineData
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$
18Revision 1.10 2000/10/02 21:28:15 fca
19Removal of useless dependecies via forward declarations
20
21Revision 1.9 2000/06/11 12:35:02 morsch
22Coding rule violations corrected
23
24Revision 1.8 2000/02/23 16:25:24 fca
25AliVMC and AliGeant3 classes introduced
26ReadEuclid moved from AliRun to AliModule
27
28Revision 1.7 1999/11/01 20:42:42 fca
29FRAME version 1 is now the symmetric one.
30
31Revision 1.6 1999/09/29 09:24:30 fca
32Introduction of the Copyright and cvs Log
33
34*/
35
36////////////////////////////////////////////////
37// space frame class /
38////////////////////////////////////////////////
39
40#include "AliFRAMEv1.h"
41#include "AliRun.h"
42#include "AliMC.h"
43#include "TSystem.h"
44
45ClassImp(AliFRAMEv1)
46
47//_____________________________________________________________________________
48AliFRAMEv1::AliFRAMEv1()
49{
50// Constructor
51}
52
53//_____________________________________________________________________________
54AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
55 : AliFRAME(name,title)
56{
57// Constructor
58 if(fDebug>1) printf("%s: Create FRAMEv1 object\n",ClassName());
59 fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099i.euc";
60 fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme";
61}
62
63
64//___________________________________________
65void AliFRAMEv1::CreateGeometry()
66{
67//Begin_Html
68/*
69<img src="picts/frame.gif">
70*/
71//End_Html
72
73
74//Begin_Html
75/*
76<img src="picts/tree_frame.gif">
77*/
78//End_Html
79
80 char *filetmp;
81 char topvol[5];
82
83//
84// The Space frame
85 filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data());
86 FILE *file = fopen(filetmp,"r");
87 delete [] filetmp;
88 if(file) {
89 fclose(file);
90 if(fDebug) printf("%s: Reading FRAME geometry\n",ClassName());
91 ReadEuclid(fEuclidGeometry.Data(),topvol);
92 } else
93 Fatal("CreateGeometry","The Euclid file %s does not exist!\n",
94 fEuclidGeometry.Data());
95//
96// --- Place the FRAME ghost volume (B010) in its mother volume (ALIC)
97// and make it invisible
98//
99// AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.);
100
101 gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY");
102
103 gMC->Gsatt(topvol, "SEEN", 0);
104}
105
106
107//___________________________________________
108void AliFRAMEv1::CreateMaterials()
109{
110// Create materials and media (from Euclid file)
111 char *filetmp;
112 if(fDebug) printf("%s: Create FRAMEv1 materials\n",ClassName());
113 filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data());
114 FILE *file = fopen(filetmp,"r");
115 delete [] filetmp;
116 if(file) {
117 fclose(file);
118 ReadEuclidMedia(fEuclidMaterial.Data());
119 } else {
120 Warning("CreateMaterials","The material file %s does not exist!\n",
121 fEuclidMaterial.Data());
122 exit(1);
123 }
124}
125
126//_____________________________________________________________________________
127void AliFRAMEv1::Init()
128{
129 //
130 // Initialise the module after the geometry has been defined
131 //
132
133 if(fDebug) {
134 printf("%s: **************************************"
135 " FRAME "
136 "**************************************\n",ClassName());
137 printf("\n%s: Version 1 of FRAME initialised, symmetric FRAME\n\n",ClassName());
138 printf("%s: **************************************"
139 " FRAME "
140 "**************************************\n",ClassName());
141 }
142}