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