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