]>
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" |
5d12ce38 | 27 | #include <TVirtualMC.h> |
fe4da5cc | 28 | |
29 | ClassImp(AliFRAMEv0) | |
30 | ||
31 | //_____________________________________________________________________________ | |
b8032157 | 32 | AliFRAMEv0::AliFRAMEv0() |
fe4da5cc | 33 | { |
b43eb0dc | 34 | // Constructor |
fe4da5cc | 35 | } |
36 | ||
37 | //_____________________________________________________________________________ | |
38 | AliFRAMEv0::AliFRAMEv0(const char *name, const char *title) | |
39 | : AliFRAME(name,title) | |
40 | { | |
b43eb0dc | 41 | // Constructor |
dda5e866 | 42 | printf("Create FRAMEv0 object\n"); |
90a46d5c | 43 | fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099h.euc"; |
dda5e866 | 44 | fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme"; |
fe4da5cc | 45 | } |
46 | ||
47 | ||
48 | //___________________________________________ | |
49 | void AliFRAMEv0::CreateGeometry() | |
50 | { | |
fe4da5cc | 51 | //Begin_Html |
52 | /* | |
1439f98e | 53 | <img src="picts/frame.gif"> |
fe4da5cc | 54 | */ |
55 | //End_Html | |
56 | ||
57 | ||
58 | //Begin_Html | |
59 | /* | |
1439f98e | 60 | <img src="picts/tree_frame.gif"> |
fe4da5cc | 61 | */ |
62 | //End_Html | |
63 | ||
fe4da5cc | 64 | char *filetmp; |
fe4da5cc | 65 | char topvol[5]; |
fe4da5cc | 66 | |
67 | // | |
68 | // The Space frame | |
dda5e866 | 69 | filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data()); |
fe4da5cc | 70 | FILE *file = fopen(filetmp,"r"); |
71 | delete [] filetmp; | |
72 | if(file) { | |
73 | fclose(file); | |
dda5e866 | 74 | printf(" Reading FRAME geometry\n"); |
b13db077 | 75 | ReadEuclid(fEuclidGeometry.Data(),topvol); |
fe4da5cc | 76 | } else { |
dda5e866 | 77 | Warning("CreateGeometry","The Euclid file %s does not exist!\n", |
78 | fEuclidGeometry.Data()); | |
fe4da5cc | 79 | exit(1); |
80 | } | |
81 | // | |
82 | // --- Place the FRAME ghost volume (B010) in its mother volume (ALIC) | |
83 | // and make it invisible | |
84 | // | |
85 | // AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.); | |
fe4da5cc | 86 | |
dda5e866 | 87 | gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY"); |
88 | ||
89 | gMC->Gsatt(topvol, "SEEN", 0); | |
fe4da5cc | 90 | } |
91 | ||
92 | ||
fe4da5cc | 93 | //___________________________________________ |
94 | void AliFRAMEv0::CreateMaterials() | |
95 | { | |
13391c3e | 96 | // Create Geant materials |
97 | // | |
fe4da5cc | 98 | char *filetmp; |
dda5e866 | 99 | printf("Create FRAMEv0 materials\n"); |
100 | filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data()); | |
fe4da5cc | 101 | FILE *file = fopen(filetmp,"r"); |
102 | delete [] filetmp; | |
103 | if(file) { | |
104 | fclose(file); | |
b13db077 | 105 | ReadEuclidMedia(fEuclidMaterial.Data()); |
fe4da5cc | 106 | } else { |
dda5e866 | 107 | Warning("CreateMaterials","The material file %s does not exist!\n", |
108 | fEuclidMaterial.Data()); | |
fe4da5cc | 109 | exit(1); |
110 | } | |
111 | } | |
112 | ||
ba25f477 | 113 | //_____________________________________________________________________________ |
114 | void AliFRAMEv0::Init() | |
115 | { | |
116 | // | |
117 | // Initialise the module after the geometry has been defined | |
118 | // | |
119 | ||
120 | printf("**************************************" | |
121 | " FRAME " | |
122 | "**************************************\n"); | |
123 | printf("\n Version 0 of FRAME initialised, " | |
f4b3bbb7 | 124 | "with openings for PHOS and HMPID\n\n"); |
ba25f477 | 125 | printf("**************************************" |
126 | " FRAME " | |
127 | "**************************************\n"); | |
128 | ||
129 | } | |
fe4da5cc | 130 | |
131 | ||
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | ||
138 | ||
139 | ||
140 | ||
141 | ||
142 |