Detailed composition of insulation material.
[u/mrichter/AliRoot.git] / STRUCT / AliPIPEv0.cxx
CommitLineData
4c039060 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
fe4da5cc 20////////////////////////////////////////////////
21// Beam pipe class /
22////////////////////////////////////////////////
23
fe4da5cc 24#include "AliPIPEv0.h"
25#include "AliRun.h"
fe4da5cc 26#include "TSystem.h"
27
28ClassImp(AliPIPEv0)
29
30//_____________________________________________________________________________
b8032157 31AliPIPEv0::AliPIPEv0()
fe4da5cc 32{
33}
34
35//_____________________________________________________________________________
36AliPIPEv0::AliPIPEv0(const char *name, const char *title)
37 : AliPIPE(name,title)
38{
39}
40
41
42//___________________________________________
43void AliPIPEv0::CreateGeometry()
44{
45 printf("Create PIPEv0 geometry\n ");
46//Begin_Html
47/*
1439f98e 48<img src="picts/pipe.gif">
fe4da5cc 49*/
50//End_Html
51
52
53//Begin_Html
54/*
1439f98e 55<img src="picts/tree_pipe.gif">
fe4da5cc 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
fe4da5cc 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");
02ca2762 75 gAlice->ReadEuclid(pipename,this,topvol);
fe4da5cc 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");
02ca2762 88 gAlice->ReadEuclid(pumpname,this,topvol);
fe4da5cc 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
cfce8870 99 gMC->Gspos("QBPM",1,"ALIC",0,0,0,idrotm[2001],"ONLY");
fe4da5cc 100//
101// PLACE ION PUMP (QIPM) AT Z=-385.
102//
cfce8870 103 gMC->Gspos("QIPM",1,"ALIC",0,0,-385,idrotm[2001],"ONLY");
fe4da5cc 104
cfce8870 105 gMC->Gsatt("QIPM", "SEEN", 0);
106 gMC->Gsatt("QBPM", "SEEN", 0);
107 gMC->Gsatt("QB20", "SEEN", 0);
fe4da5cc 108}
109
110
111//___________________________________________
b8032157 112void AliPIPEv0::DrawModule()
fe4da5cc 113{
114}
115
116//___________________________________________
117void 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);
02ca2762 127 gAlice->ReadEuclidMedia(name,this);
fe4da5cc 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