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