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