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