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