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