]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliFRAMEv0.cxx
Introducing Copyright include file
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv0.cxx
1 ////////////////////////////////////////////////
2 //  space frame class                            /
3 ////////////////////////////////////////////////
4
5 #include <stdio.h> 
6 #include <TMath.h>
7 #include <TRandom.h>
8 #include <TVector.h>
9 #include "AliFRAMEv0.h"
10 #include "AliRun.h"
11 #include "stdlib.h"
12 #include "AliMC.h"
13 #include "TSystem.h"
14  
15 ClassImp(AliFRAMEv0)
16  
17 //_____________________________________________________________________________
18 AliFRAMEv0::AliFRAMEv0()
19 {
20 }
21
22 //_____________________________________________________________________________
23 AliFRAMEv0::AliFRAMEv0(const char *name, const char *title)
24   : AliFRAME(name,title)
25 {
26   printf("Create FRAMEv0 object\n");  
27   fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame0799nobar.euc";
28   fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme";
29 }
30
31  
32 //___________________________________________
33 void AliFRAMEv0::CreateGeometry()
34 {
35 //Begin_Html
36 /*
37 <img src="picts/frame.gif">
38 */
39 //End_Html
40
41
42 //Begin_Html
43 /*
44 <img src="picts/tree_frame.gif">
45 */
46 //End_Html
47
48   char *filetmp;
49   char topvol[5];
50   
51 //
52 // The Space frame
53   filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data());
54   FILE *file = fopen(filetmp,"r");
55   delete [] filetmp;
56   if(file) {
57     fclose(file);
58     printf(" Reading FRAME geometry\n");
59     gAlice->ReadEuclid(fEuclidGeometry.Data(),this,topvol);
60   } else {
61     Warning("CreateGeometry","The Euclid file %s does not exist!\n",
62             fEuclidGeometry.Data());
63     exit(1);
64   }
65 //
66 // --- Place the FRAME ghost volume (B010) in its mother volume (ALIC)
67 //    and make it invisible
68 // 
69 //  AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.);
70
71   gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY");
72
73   gMC->Gsatt(topvol, "SEEN", 0);
74 }
75
76  
77 //___________________________________________
78 void AliFRAMEv0::CreateMaterials()
79 {
80   char *filetmp;
81   printf("Create FRAMEv0 materials\n");
82   filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data());
83   FILE *file = fopen(filetmp,"r");
84   delete [] filetmp;
85   if(file) {
86     fclose(file);
87     gAlice->ReadEuclidMedia(fEuclidMaterial.Data(),this);
88   } else {
89     Warning("CreateMaterials","The material file %s does not exist!\n",
90             fEuclidMaterial.Data());
91     exit(1);
92   }
93 }
94
95
96
97
98
99
100
101
102
103
104
105
106
107