polish
[u/mrichter/AliRoot.git] / STRUCT / AliFRAMEv1.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$
94de3818 18Revision 1.9 2000/06/11 12:35:02 morsch
19Coding rule violations corrected
20
b43eb0dc 21Revision 1.8 2000/02/23 16:25:24 fca
22AliVMC and AliGeant3 classes introduced
23ReadEuclid moved from AliRun to AliModule
24
b13db077 25Revision 1.7 1999/11/01 20:42:42 fca
26FRAME version 1 is now the symmetric one.
27
ba25f477 28Revision 1.6 1999/09/29 09:24:30 fca
29Introduction of the Copyright and cvs Log
4c039060 30
fe4da5cc 31*/
ba25f477 32
33////////////////////////////////////////////////
34// space frame class /
35////////////////////////////////////////////////
fe4da5cc 36
37#include "AliFRAMEv1.h"
38#include "AliRun.h"
94de3818 39#include "AliMC.h"
ba25f477 40#include "TSystem.h"
fe4da5cc 41
42ClassImp(AliFRAMEv1)
43
44//_____________________________________________________________________________
b8032157 45AliFRAMEv1::AliFRAMEv1()
fe4da5cc 46{
b43eb0dc 47// Constructor
fe4da5cc 48}
ba25f477 49
fe4da5cc 50//_____________________________________________________________________________
51AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
ba25f477 52 : AliFRAME(name,title)
fe4da5cc 53{
b43eb0dc 54// Constructor
ba25f477 55 printf("Create FRAMEv1 object\n");
56 fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099i.euc";
57 fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme";
fe4da5cc 58}
ba25f477 59
fe4da5cc 60
ba25f477 61//___________________________________________
fe4da5cc 62void AliFRAMEv1::CreateGeometry()
63{
ba25f477 64//Begin_Html
65/*
66<img src="picts/frame.gif">
67*/
68//End_Html
cfce8870 69
fe4da5cc 70
ba25f477 71//Begin_Html
72/*
73<img src="picts/tree_frame.gif">
74*/
75//End_Html
fe4da5cc 76
ba25f477 77 char *filetmp;
78 char topvol[5];
79
80//
81// The Space frame
82 filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data());
83 FILE *file = fopen(filetmp,"r");
84 delete [] filetmp;
85 if(file) {
86 fclose(file);
87 printf(" Reading FRAME geometry\n");
b13db077 88 ReadEuclid(fEuclidGeometry.Data(),topvol);
ba25f477 89 } else {
90 Warning("CreateGeometry","The Euclid file %s does not exist!\n",
91 fEuclidGeometry.Data());
92 exit(1);
93 }
94//
95// --- Place the FRAME ghost volume (B010) in its mother volume (ALIC)
96// and make it invisible
97//
98// AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.);
99
100 gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY");
101
102 gMC->Gsatt(topvol, "SEEN", 0);
fe4da5cc 103}
104
ba25f477 105
106//___________________________________________
107void AliFRAMEv1::CreateMaterials()
fe4da5cc 108{
b43eb0dc 109// Create materials and media (from Euclid file)
ba25f477 110 char *filetmp;
111 printf("Create FRAMEv1 materials\n");
112 filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data());
113 FILE *file = fopen(filetmp,"r");
114 delete [] filetmp;
115 if(file) {
116 fclose(file);
b13db077 117 ReadEuclidMedia(fEuclidMaterial.Data());
ba25f477 118 } else {
119 Warning("CreateMaterials","The material file %s does not exist!\n",
120 fEuclidMaterial.Data());
121 exit(1);
122 }
fe4da5cc 123}
124
125//_____________________________________________________________________________
ba25f477 126void AliFRAMEv1::Init()
fe4da5cc 127{
fe4da5cc 128 //
ba25f477 129 // Initialise the module after the geometry has been defined
fe4da5cc 130 //
fe4da5cc 131
ba25f477 132 printf("**************************************"
133 " FRAME "
134 "**************************************\n");
135 printf("\n Version 1 of FRAME initialised, symmetric FRAME\n\n");
136 printf("**************************************"
137 " FRAME "
138 "**************************************\n");
fe4da5cc 139
fe4da5cc 140}