]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STRUCT/AliFRAMEv1.cxx
Adaption to new fluka common blocks (E. Futo)
[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
eeacf08b 16/* $Id$ */
43ea1292 17
eeacf08b 18//-------------------------------------------------------------------------
19// AliFRAMEv1.cxx
20// symmetric space frame without holes
21// Author:
22//-------------------------------------------------------------------------
fe4da5cc 23
24#include "AliFRAMEv1.h"
25#include "AliRun.h"
ba25f477 26#include "TSystem.h"
fe4da5cc 27
28ClassImp(AliFRAMEv1)
29
30//_____________________________________________________________________________
b8032157 31AliFRAMEv1::AliFRAMEv1()
fe4da5cc 32{
b43eb0dc 33// Constructor
fe4da5cc 34}
ba25f477 35
fe4da5cc 36//_____________________________________________________________________________
37AliFRAMEv1::AliFRAMEv1(const char *name, const char *title)
ba25f477 38 : AliFRAME(name,title)
fe4da5cc 39{
b43eb0dc 40// Constructor
9e1a0ddb 41 if(fDebug>1) printf("%s: Create FRAMEv1 object\n",ClassName());
ba25f477 42 fEuclidGeometry="$(ALICE_ROOT)/Euclid/frame1099i.euc";
43 fEuclidMaterial="$(ALICE_ROOT)/Euclid/frame.tme";
fe4da5cc 44}
ba25f477 45
fe4da5cc 46
ba25f477 47//___________________________________________
fe4da5cc 48void AliFRAMEv1::CreateGeometry()
49{
ba25f477 50//Begin_Html
51/*
52<img src="picts/frame.gif">
53*/
54//End_Html
cfce8870 55
fe4da5cc 56
ba25f477 57//Begin_Html
58/*
59<img src="picts/tree_frame.gif">
60*/
61//End_Html
fe4da5cc 62
ba25f477 63 char *filetmp;
64 char topvol[5];
65
66//
67// The Space frame
68 filetmp = gSystem->ExpandPathName(fEuclidGeometry.Data());
69 FILE *file = fopen(filetmp,"r");
70 delete [] filetmp;
71 if(file) {
72 fclose(file);
9e1a0ddb 73 if(fDebug) printf("%s: Reading FRAME geometry\n",ClassName());
b13db077 74 ReadEuclid(fEuclidGeometry.Data(),topvol);
9e1a0ddb 75 } else
76 Fatal("CreateGeometry","The Euclid file %s does not exist!\n",
77 fEuclidGeometry.Data());
ba25f477 78//
79// --- Place the FRAME ghost volume (B010) in its mother volume (ALIC)
80// and make it invisible
81//
82// AliMatrix(idrotm[2001],90.,0.,90.,90.,180.,0.);
83
84 gMC->Gspos(topvol,1,"ALIC",0,0,0,0,"ONLY");
85
86 gMC->Gsatt(topvol, "SEEN", 0);
fe4da5cc 87}
88
ba25f477 89
90//___________________________________________
91void AliFRAMEv1::CreateMaterials()
fe4da5cc 92{
b43eb0dc 93// Create materials and media (from Euclid file)
ba25f477 94 char *filetmp;
9e1a0ddb 95 if(fDebug) printf("%s: Create FRAMEv1 materials\n",ClassName());
ba25f477 96 filetmp = gSystem->ExpandPathName(fEuclidMaterial.Data());
97 FILE *file = fopen(filetmp,"r");
98 delete [] filetmp;
99 if(file) {
100 fclose(file);
b13db077 101 ReadEuclidMedia(fEuclidMaterial.Data());
ba25f477 102 } else {
103 Warning("CreateMaterials","The material file %s does not exist!\n",
104 fEuclidMaterial.Data());
105 exit(1);
106 }
fe4da5cc 107}
108
109//_____________________________________________________________________________
ba25f477 110void AliFRAMEv1::Init()
fe4da5cc 111{
fe4da5cc 112 //
ba25f477 113 // Initialise the module after the geometry has been defined
fe4da5cc 114 //
fe4da5cc 115
9e1a0ddb 116 if(fDebug) {
117 printf("%s: **************************************"
118 " FRAME "
119 "**************************************\n",ClassName());
120 printf("\n%s: Version 1 of FRAME initialised, symmetric FRAME\n\n",ClassName());
121 printf("%s: **************************************"
122 " FRAME "
123 "**************************************\n",ClassName());
124 }
fe4da5cc 125}