]>
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$ | |
94de3818 | 18 | Revision 1.8 2000/06/11 12:37:01 morsch |
19 | Coding rule violations corrected | |
20 | ||
b43eb0dc | 21 | Revision 1.7 2000/02/23 16:25:24 fca |
22 | AliVMC and AliGeant3 classes introduced | |
23 | ReadEuclid moved from AliRun to AliModule | |
24 | ||
b13db077 | 25 | Revision 1.6 1999/09/29 09:24:30 fca |
26 | Introduction of the Copyright and cvs Log | |
27 | ||
4c039060 | 28 | */ |
29 | ||
fe4da5cc | 30 | //////////////////////////////////////////////// |
31 | // Beam pipe class / | |
32 | //////////////////////////////////////////////// | |
33 | ||
fe4da5cc | 34 | #include "AliPIPEv0.h" |
35 | #include "AliRun.h" | |
94de3818 | 36 | #include "AliMC.h" |
fe4da5cc | 37 | #include "TSystem.h" |
38 | ||
39 | ClassImp(AliPIPEv0) | |
40 | ||
41 | //_____________________________________________________________________________ | |
b8032157 | 42 | AliPIPEv0::AliPIPEv0() |
fe4da5cc | 43 | { |
b43eb0dc | 44 | // Constructor |
fe4da5cc | 45 | } |
46 | ||
47 | //_____________________________________________________________________________ | |
48 | AliPIPEv0::AliPIPEv0(const char *name, const char *title) | |
49 | : AliPIPE(name,title) | |
50 | { | |
b43eb0dc | 51 | // Constructor |
fe4da5cc | 52 | } |
53 | ||
54 | ||
55 | //___________________________________________ | |
56 | void AliPIPEv0::CreateGeometry() | |
57 | { | |
58 | printf("Create PIPEv0 geometry\n "); | |
59 | //Begin_Html | |
60 | /* | |
1439f98e | 61 | <img src="picts/pipe.gif"> |
fe4da5cc | 62 | */ |
63 | //End_Html | |
64 | ||
65 | ||
66 | //Begin_Html | |
67 | /* | |
1439f98e | 68 | <img src="picts/tree_pipe.gif"> |
fe4da5cc | 69 | */ |
70 | //End_Html | |
71 | ||
b43eb0dc | 72 | const char *kPipeName = "$(ALICE_ROOT)/Euclid/bpipeb.euc"; |
73 | const char *kPumpName = "$(ALICE_ROOT)/Euclid/bpumpa.euc"; | |
fe4da5cc | 74 | char *filtmp; |
75 | char topvol[5]; | |
76 | printf("Create PIPEv0 geometry "); | |
77 | ||
78 | Int_t idrotm[2099]; | |
79 | ||
fe4da5cc | 80 | // |
81 | // The peam pipe up to the Front Absorber | |
b43eb0dc | 82 | filtmp=gSystem->ExpandPathName(kPipeName); |
fe4da5cc | 83 | FILE *file = fopen(filtmp,"r"); |
84 | delete [] filtmp; | |
85 | if(file) { | |
86 | fclose(file); | |
87 | printf(" Reading PIPE \n"); | |
b43eb0dc | 88 | ReadEuclid(kPipeName,topvol); |
fe4da5cc | 89 | } else { |
b43eb0dc | 90 | printf(" THE GEOM FILE %s DOES NOT EXIST !\n",kPipeName); |
fe4da5cc | 91 | exit(1); |
92 | } | |
93 | // | |
94 | // The Ion Pump | |
b43eb0dc | 95 | filtmp=gSystem->ExpandPathName(kPumpName); |
fe4da5cc | 96 | file = fopen(filtmp,"r"); |
97 | delete [] filtmp; | |
98 | if(file) { | |
99 | fclose(file); | |
100 | printf(" Reading PUMP \n"); | |
b43eb0dc | 101 | ReadEuclid(kPumpName,topvol); |
fe4da5cc | 102 | } else { |
b43eb0dc | 103 | printf(" THE GEOM FILE %s DOES NOT EXIST !\n",kPumpName); |
fe4da5cc | 104 | exit(1); |
105 | } | |
106 | // | |
107 | // --- Place the PIPE ghost volume (QBPM) in its mother volume (ALIC) | |
108 | // and make it invisible | |
109 | // | |
110 | AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.); | |
111 | ||
cfce8870 | 112 | gMC->Gspos("QBPM",1,"ALIC",0,0,0,idrotm[2001],"ONLY"); |
fe4da5cc | 113 | // |
114 | // PLACE ION PUMP (QIPM) AT Z=-385. | |
115 | // | |
cfce8870 | 116 | gMC->Gspos("QIPM",1,"ALIC",0,0,-385,idrotm[2001],"ONLY"); |
fe4da5cc | 117 | |
cfce8870 | 118 | gMC->Gsatt("QIPM", "SEEN", 0); |
119 | gMC->Gsatt("QBPM", "SEEN", 0); | |
120 | gMC->Gsatt("QB20", "SEEN", 0); | |
fe4da5cc | 121 | } |
122 | ||
123 | ||
124 | //___________________________________________ | |
b8032157 | 125 | void AliPIPEv0::DrawModule() |
fe4da5cc | 126 | { |
b43eb0dc | 127 | // Set drawing options |
128 | ; | |
fe4da5cc | 129 | } |
130 | ||
131 | //___________________________________________ | |
132 | void AliPIPEv0::CreateMaterials() | |
133 | { | |
b43eb0dc | 134 | // Create materials and media from Euclid file |
fe4da5cc | 135 | printf("Create PIPEv0 materials\n"); |
b43eb0dc | 136 | const char *kName = "$(ALICE_ROOT)/Euclid/pipe.tme"; |
fe4da5cc | 137 | char *filtmp; |
b43eb0dc | 138 | filtmp=gSystem->ExpandPathName(kName); |
fe4da5cc | 139 | FILE *file = fopen(filtmp,"r"); |
140 | delete [] filtmp; | |
141 | if(file) { | |
142 | fclose(file); | |
b43eb0dc | 143 | ReadEuclidMedia(kName); |
fe4da5cc | 144 | } else { |
b43eb0dc | 145 | printf(" THE MEDIA FILE %s DOES NOT EXIST !\n",kName); |
fe4da5cc | 146 | exit(1); |
147 | } | |
148 | } | |
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | ||
155 | ||
156 | ||
157 | ||
158 | ||
159 | ||
160 | ||
161 | ||
162 |