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