]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliFRAMEv1.cxx
Lateral gap for compensator dipole in Tunnel wall.
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv1.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 /* $Id$ */
17
18 //-------------------------------------------------------------------------
19 //  AliFRAMEv1.cxx
20 //  symmetric space frame without holes
21 //  Author:
22 //-------------------------------------------------------------------------
23
24 #include "AliFRAMEv1.h"
25 #include "AliRun.h"
26 #include "TSystem.h"
27  
28 ClassImp(AliFRAMEv1)
29  
30 //_____________________________________________________________________________
31 AliFRAMEv1::AliFRAMEv1()
32 {
33 // Constructor
34 }
35
36 //_____________________________________________________________________________
37 AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
38   : AliFRAME(name,title)
39 {
40 // Constructor
41   if(fDebug>1) printf("%s: Create FRAMEv1 object\n",ClassName());  
42   fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099i.euc";
43   fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme";
44 }
45
46  
47 //___________________________________________
48 void AliFRAMEv1::CreateGeometry()
49 {
50 //Begin_Html
51 /*
52 <img src="picts/frame.gif">
53 */
54 //End_Html
55
56
57 //Begin_Html
58 /*
59 <img src="picts/tree_frame.gif">
60 */
61 //End_Html
62
63   char *filetmp;
64   char topvol[5];
65   
66 //
67 // The Space frame
68   filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data());
69   FILE *file = fopen(filetmp,"r");
70   delete [] filetmp;
71   if(file) {
72     fclose(file);
73     if(fDebug) printf("%s: Reading FRAME geometry\n",ClassName());
74     ReadEuclid(fEuclidGeometry.Data(),topvol);
75   } else 
76     Fatal("CreateGeometry","The Euclid file %s does not exist!\n",
77           fEuclidGeometry.Data());
78 //
79 // --- Place the FRAME ghost volume (B010) in its mother volume (ALIC)
80 //    and make it invisible
81 // 
82 //  AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.);
83
84   gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY");
85
86   gMC->Gsatt(topvol, "SEEN", 0);
87 }
88
89  
90 //___________________________________________
91 void AliFRAMEv1::CreateMaterials()
92 {
93 // Create materials and media (from Euclid file)
94   char *filetmp;
95   if(fDebug) printf("%s: Create FRAMEv1 materials\n",ClassName());
96   filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data());
97   FILE *file = fopen(filetmp,"r");
98   delete [] filetmp;
99   if(file) {
100     fclose(file);
101     ReadEuclidMedia(fEuclidMaterial.Data());
102   } else {
103     Warning("CreateMaterials","The material file %s does not exist!\n",
104             fEuclidMaterial.Data());
105     exit(1);
106   }
107 }
108
109 //_____________________________________________________________________________
110 void AliFRAMEv1::Init()
111 {
112   //
113   // Initialise the module after the geometry has been defined
114   //
115
116   if(fDebug) {
117     printf("%s: **************************************"
118            " FRAME "
119            "**************************************\n",ClassName());
120     printf("\n%s:      Version 1 of FRAME initialised, symmetric FRAME\n\n",ClassName());
121     printf("%s: **************************************"
122            " FRAME "
123            "**************************************\n",ClassName());
124   }
125 }