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