]>
Commit | Line | Data |
---|---|---|
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 | // Space frame class | |
20 | // Reads the geometry from an Euclid file | |
21 | // Author: A.Morsch | |
22 | //------------------------------------------------------------------------- | |
23 | ||
24 | #include "AliFRAMEv0.h" | |
25 | #include "AliRun.h" | |
26 | #include "TSystem.h" | |
27 | ||
28 | ClassImp(AliFRAMEv0) | |
29 | ||
30 | //_____________________________________________________________________________ | |
31 | AliFRAMEv0::AliFRAMEv0() | |
32 | { | |
33 | // Constructor | |
34 | } | |
35 | ||
36 | //_____________________________________________________________________________ | |
37 | AliFRAMEv0::AliFRAMEv0(const char *name, const char *title) | |
38 | : AliFRAME(name,title) | |
39 | { | |
40 | // Constructor | |
41 | printf("Create FRAMEv0 object\n"); | |
42 | fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099h.euc"; | |
43 | fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme"; | |
44 | } | |
45 | ||
46 | ||
47 | //___________________________________________ | |
48 | void AliFRAMEv0::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 | printf(" Reading FRAME geometry\n"); | |
74 | ReadEuclid(fEuclidGeometry.Data(),topvol); | |
75 | } else { | |
76 | Warning("CreateGeometry","The Euclid file %s does not exist!\n", | |
77 | fEuclidGeometry.Data()); | |
78 | exit(1); | |
79 | } | |
80 | // | |
81 | // --- Place the FRAME ghost volume (B010) in its mother volume (ALIC) | |
82 | // and make it invisible | |
83 | // | |
84 | // AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.); | |
85 | ||
86 | gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY"); | |
87 | ||
88 | gMC->Gsatt(topvol, "SEEN", 0); | |
89 | } | |
90 | ||
91 | ||
92 | //___________________________________________ | |
93 | void AliFRAMEv0::CreateMaterials() | |
94 | { | |
95 | // Create Geant materials | |
96 | // | |
97 | char *filetmp; | |
98 | printf("Create FRAMEv0 materials\n"); | |
99 | filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data()); | |
100 | FILE *file = fopen(filetmp,"r"); | |
101 | delete [] filetmp; | |
102 | if(file) { | |
103 | fclose(file); | |
104 | ReadEuclidMedia(fEuclidMaterial.Data()); | |
105 | } else { | |
106 | Warning("CreateMaterials","The material file %s does not exist!\n", | |
107 | fEuclidMaterial.Data()); | |
108 | exit(1); | |
109 | } | |
110 | } | |
111 | ||
112 | //_____________________________________________________________________________ | |
113 | void AliFRAMEv0::Init() | |
114 | { | |
115 | // | |
116 | // Initialise the module after the geometry has been defined | |
117 | // | |
118 | ||
119 | printf("**************************************" | |
120 | " FRAME " | |
121 | "**************************************\n"); | |
122 | printf("\n Version 0 of FRAME initialised, " | |
123 | "with openings for PHOS and RICH\n\n"); | |
124 | printf("**************************************" | |
125 | " FRAME " | |
126 | "**************************************\n"); | |
127 | ||
128 | } | |
129 | ||
130 | ||
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 |