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