]>
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 | ||
eeacf08b | 16 | /* $Id$ */ |
43ea1292 | 17 | |
eeacf08b | 18 | //------------------------------------------------------------------------- |
19 | // Space frame class | |
20 | // Reads the geometry from an Euclid file | |
21 | // Author: A.Morsch | |
22 | //------------------------------------------------------------------------- | |
fe4da5cc | 23 | |
fe4da5cc | 24 | #include "AliFRAMEv0.h" |
25 | #include "AliRun.h" | |
fe4da5cc | 26 | #include "TSystem.h" |
27 | ||
28 | ClassImp(AliFRAMEv0) | |
29 | ||
30 | //_____________________________________________________________________________ | |
b8032157 | 31 | AliFRAMEv0::AliFRAMEv0() |
fe4da5cc | 32 | { |
b43eb0dc | 33 | // Constructor |
fe4da5cc | 34 | } |
35 | ||
36 | //_____________________________________________________________________________ | |
37 | AliFRAMEv0::AliFRAMEv0(const char *name, const char *title) | |
38 | : AliFRAME(name,title) | |
39 | { | |
b43eb0dc | 40 | // Constructor |
dda5e866 | 41 | printf("Create FRAMEv0 object\n"); |
90a46d5c | 42 | fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099h.euc"; |
dda5e866 | 43 | fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme"; |
fe4da5cc | 44 | } |
45 | ||
46 | ||
47 | //___________________________________________ | |
48 | void AliFRAMEv0::CreateGeometry() | |
49 | { | |
fe4da5cc | 50 | //Begin_Html |
51 | /* | |
1439f98e | 52 | <img src="picts/frame.gif"> |
fe4da5cc | 53 | */ |
54 | //End_Html | |
55 | ||
56 | ||
57 | //Begin_Html | |
58 | /* | |
1439f98e | 59 | <img src="picts/tree_frame.gif"> |
fe4da5cc | 60 | */ |
61 | //End_Html | |
62 | ||
fe4da5cc | 63 | char *filetmp; |
fe4da5cc | 64 | char topvol[5]; |
fe4da5cc | 65 | |
66 | // | |
67 | // The Space frame | |
dda5e866 | 68 | filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data()); |
fe4da5cc | 69 | FILE *file = fopen(filetmp,"r"); |
70 | delete [] filetmp; | |
71 | if(file) { | |
72 | fclose(file); | |
dda5e866 | 73 | printf(" Reading FRAME geometry\n"); |
b13db077 | 74 | ReadEuclid(fEuclidGeometry.Data(),topvol); |
fe4da5cc | 75 | } else { |
dda5e866 | 76 | Warning("CreateGeometry","The Euclid file %s does not exist!\n", |
77 | fEuclidGeometry.Data()); | |
fe4da5cc | 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.); | |
fe4da5cc | 85 | |
dda5e866 | 86 | gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY"); |
87 | ||
88 | gMC->Gsatt(topvol, "SEEN", 0); | |
fe4da5cc | 89 | } |
90 | ||
91 | ||
fe4da5cc | 92 | //___________________________________________ |
93 | void AliFRAMEv0::CreateMaterials() | |
94 | { | |
13391c3e | 95 | // Create Geant materials |
96 | // | |
fe4da5cc | 97 | char *filetmp; |
dda5e866 | 98 | printf("Create FRAMEv0 materials\n"); |
99 | filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data()); | |
fe4da5cc | 100 | FILE *file = fopen(filetmp,"r"); |
101 | delete [] filetmp; | |
102 | if(file) { | |
103 | fclose(file); | |
b13db077 | 104 | ReadEuclidMedia(fEuclidMaterial.Data()); |
fe4da5cc | 105 | } else { |
dda5e866 | 106 | Warning("CreateMaterials","The material file %s does not exist!\n", |
107 | fEuclidMaterial.Data()); | |
fe4da5cc | 108 | exit(1); |
109 | } | |
110 | } | |
111 | ||
ba25f477 | 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 | } | |
fe4da5cc | 129 | |
130 | ||
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 |