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