Some rationalisation of the documentation. In particular pictures are all now in...
[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   AliMC* pMC = AliMC::GetMC();
49   
50 //
51 // The peam pipe up to the Front Absorber
52   filtmp=gSystem->ExpandPathName(pipename);
53   FILE *file = fopen(filtmp,"r");
54   delete [] filtmp;
55   if(file) {
56     fclose(file);
57     printf(" Reading PIPE \n");
58     gAlice->ReadEuclid(pipename,20,topvol);
59   } else {
60     printf(" THE GEOM FILE %s DOES NOT EXIST !\n",pipename);
61     exit(1);
62   }
63 //
64 // The Ion Pump
65   filtmp=gSystem->ExpandPathName(pumpname);
66   file = fopen(filtmp,"r");
67   delete [] filtmp;
68   if(file) {
69     fclose(file);
70     printf(" Reading PUMP \n");
71     gAlice->ReadEuclid(pumpname,20,topvol);
72   } else {
73     printf(" THE GEOM FILE %s DOES NOT EXIST !\n",pumpname);
74     exit(1);
75   }
76 //
77 // --- Place the PIPE ghost volume (QBPM) in its mother volume (ALIC)
78 //    and make it invisible
79 // 
80   AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.);
81   
82   pMC->Gspos("QBPM",1,"ALIC",0,0,0,idrotm[2001],"ONLY");
83 //
84 //    PLACE ION PUMP (QIPM) AT Z=-385.
85 //
86   pMC->Gspos("QIPM",1,"ALIC",0,0,-385,idrotm[2001],"ONLY");
87
88   pMC->Gsatt("QIPM", "SEEN", 0);
89   pMC->Gsatt("QBPM", "SEEN", 0);
90   pMC->Gsatt("QB20", "SEEN", 0);
91 }
92
93  
94 //___________________________________________
95 void AliPIPEv0::DrawModule()
96 {
97 }
98
99 //___________________________________________
100 void AliPIPEv0::CreateMaterials()
101 {
102   printf("Create PIPEv0 materials\n");
103   const char *name = "$(ALICE_ROOT)/Euclid/pipe.tme";
104   char *filtmp;
105   filtmp=gSystem->ExpandPathName(name);
106   FILE *file = fopen(filtmp,"r");
107   delete [] filtmp;
108   if(file) {
109     fclose(file);
110     gAlice->ReadEuclidMedia(name,20);
111   } else {
112     printf(" THE MEDIA FILE %s DOES NOT EXIST !\n",name);
113     exit(1);
114   }
115 }
116
117
118
119
120
121
122
123
124
125
126
127
128
129