]>
Commit | Line | Data |
---|---|---|
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 | // space frame class / | |
22 | //////////////////////////////////////////////// | |
23 | ||
24 | #include <stdio.h> | |
25 | #include <TMath.h> | |
26 | #include <TRandom.h> | |
27 | #include <TVector.h> | |
28 | #include "AliFRAMEv0.h" | |
29 | #include "AliRun.h" | |
30 | #include "stdlib.h" | |
31 | #include "AliMC.h" | |
32 | #include "TSystem.h" | |
33 | ||
34 | ClassImp(AliFRAMEv0) | |
35 | ||
36 | //_____________________________________________________________________________ | |
b8032157 | 37 | AliFRAMEv0::AliFRAMEv0() |
fe4da5cc | 38 | { |
39 | } | |
40 | ||
41 | //_____________________________________________________________________________ | |
42 | AliFRAMEv0::AliFRAMEv0(const char *name, const char *title) | |
43 | : AliFRAME(name,title) | |
44 | { | |
dda5e866 | 45 | printf("Create FRAMEv0 object\n"); |
b1dfdb27 | 46 | fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame0799nobar.euc"; |
dda5e866 | 47 | fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme"; |
fe4da5cc | 48 | } |
49 | ||
50 | ||
51 | //___________________________________________ | |
52 | void AliFRAMEv0::CreateGeometry() | |
53 | { | |
fe4da5cc | 54 | //Begin_Html |
55 | /* | |
1439f98e | 56 | <img src="picts/frame.gif"> |
fe4da5cc | 57 | */ |
58 | //End_Html | |
59 | ||
60 | ||
61 | //Begin_Html | |
62 | /* | |
1439f98e | 63 | <img src="picts/tree_frame.gif"> |
fe4da5cc | 64 | */ |
65 | //End_Html | |
66 | ||
fe4da5cc | 67 | char *filetmp; |
fe4da5cc | 68 | char topvol[5]; |
fe4da5cc | 69 | |
70 | // | |
71 | // The Space frame | |
dda5e866 | 72 | filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data()); |
fe4da5cc | 73 | FILE *file = fopen(filetmp,"r"); |
74 | delete [] filetmp; | |
75 | if(file) { | |
76 | fclose(file); | |
dda5e866 | 77 | printf(" Reading FRAME geometry\n"); |
78 | gAlice->ReadEuclid(fEuclidGeometry.Data(),this,topvol); | |
fe4da5cc | 79 | } else { |
dda5e866 | 80 | Warning("CreateGeometry","The Euclid file %s does not exist!\n", |
81 | fEuclidGeometry.Data()); | |
fe4da5cc | 82 | exit(1); |
83 | } | |
84 | // | |
85 | // --- Place the FRAME ghost volume (B010) in its mother volume (ALIC) | |
86 | // and make it invisible | |
87 | // | |
88 | // AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.); | |
fe4da5cc | 89 | |
dda5e866 | 90 | gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY"); |
91 | ||
92 | gMC->Gsatt(topvol, "SEEN", 0); | |
fe4da5cc | 93 | } |
94 | ||
95 | ||
fe4da5cc | 96 | //___________________________________________ |
97 | void AliFRAMEv0::CreateMaterials() | |
98 | { | |
99 | char *filetmp; | |
dda5e866 | 100 | printf("Create FRAMEv0 materials\n"); |
101 | filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data()); | |
fe4da5cc | 102 | FILE *file = fopen(filetmp,"r"); |
103 | delete [] filetmp; | |
104 | if(file) { | |
105 | fclose(file); | |
dda5e866 | 106 | gAlice->ReadEuclidMedia(fEuclidMaterial.Data(),this); |
fe4da5cc | 107 | } else { |
dda5e866 | 108 | Warning("CreateMaterials","The material file %s does not exist!\n", |
109 | fEuclidMaterial.Data()); | |
fe4da5cc | 110 | exit(1); |
111 | } | |
112 | } | |
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | ||
126 |