]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliPIPEv0.cxx
Use gMC and not pMC everywhere
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv0.cxx
CommitLineData
fe4da5cc 1////////////////////////////////////////////////
2// Beam pipe class /
3////////////////////////////////////////////////
4
fe4da5cc 5#include "AliPIPEv0.h"
6#include "AliRun.h"
fe4da5cc 7#include "TSystem.h"
8
9ClassImp(AliPIPEv0)
10
11//_____________________________________________________________________________
b8032157 12AliPIPEv0::AliPIPEv0()
fe4da5cc 13{
14}
15
16//_____________________________________________________________________________
17AliPIPEv0::AliPIPEv0(const char *name, const char *title)
18 : AliPIPE(name,title)
19{
20}
21
22
23//___________________________________________
24void AliPIPEv0::CreateGeometry()
25{
26 printf("Create PIPEv0 geometry\n ");
27//Begin_Html
28/*
1439f98e 29<img src="picts/pipe.gif">
fe4da5cc 30*/
31//End_Html
32
33
34//Begin_Html
35/*
1439f98e 36<img src="picts/tree_pipe.gif">
fe4da5cc 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
fe4da5cc 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");
02ca2762 56 gAlice->ReadEuclid(pipename,this,topvol);
fe4da5cc 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");
02ca2762 69 gAlice->ReadEuclid(pumpname,this,topvol);
fe4da5cc 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
cfce8870 80 gMC->Gspos("QBPM",1,"ALIC",0,0,0,idrotm[2001],"ONLY");
fe4da5cc 81//
82// PLACE ION PUMP (QIPM) AT Z=-385.
83//
cfce8870 84 gMC->Gspos("QIPM",1,"ALIC",0,0,-385,idrotm[2001],"ONLY");
fe4da5cc 85
cfce8870 86 gMC->Gsatt("QIPM", "SEEN", 0);
87 gMC->Gsatt("QBPM", "SEEN", 0);
88 gMC->Gsatt("QB20", "SEEN", 0);
fe4da5cc 89}
90
91
92//___________________________________________
b8032157 93void AliPIPEv0::DrawModule()
fe4da5cc 94{
95}
96
97//___________________________________________
98void 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);
02ca2762 108 gAlice->ReadEuclidMedia(name,this);
fe4da5cc 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