Task update (Andrea)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALWsuCosmicRaySetUp.cxx
CommitLineData
1963b290 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/* $Id$ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// Wsu Cosmic Ray SetUp //
21// This class contains the description of the Wsu Cosmic Ray SetUp //
22// external volume //
23// //
24//Begin_Html
25/*
26<img src="picts/AliEMCALWsuCosmicRaySetUpClass.gif">
27</pre>
28<br clear=left>
29<font size=+2 color=red>
30<p>The responsible person for this module is
31<a href="mailto:pavlinov@physics.wayne.edu">Aleksei Pavlino, WSU</a>.
32</font>
33<pre>
34*/
35//End_Html
36// //
37// //
38///////////////////////////////////////////////////////////////////////////////
39
40#include <TVirtualMC.h>
41
42#include "AliEMCALWsuCosmicRaySetUp.h"
43//#include "AliMagF.h"
44#include "AliRun.h"
45
46ClassImp(AliEMCALWsuCosmicRaySetUp)
47
48//_____________________________________________________________________________
49AliEMCALWsuCosmicRaySetUp::AliEMCALWsuCosmicRaySetUp()
50{
51 //
52 // Default constructor
53 //
54}
55
56//_____________________________________________________________________________
57AliEMCALWsuCosmicRaySetUp::AliEMCALWsuCosmicRaySetUp(const char *name, const char *title)
58 : AliModule(name,title)
59{
60 //
61 // Standard constructor of the Wsu Cosmic Ray SetUp external volume
62 //
e939a978 63 //PH SetMarkerColor(7);
64 //PH SetMarkerStyle(2);
65 //PH SetMarkerSize(0.4);
1963b290 66}
67
68//_____________________________________________________________________________
69void AliEMCALWsuCosmicRaySetUp::CreateGeometry()
70{
71 //
72 // Create the geometry of the Alice external body
73 //
74 //Begin_Html
75 /*
76 <img src="picts/AliEMCALWsuCosmicRaySetUpTree.gif">
77 */
78 //End_Html
79
ce540969 80 // Master Volume
81 fMasterVolume[0] = fMasterVolume[1] = 25.0;
82 fMasterVolume[2] = 300.;
83
1963b290 84 Int_t *idtmed = fIdtmed->GetArray()+1;
ce540969 85 int idAir = idtmed[0];
86 gMC->Gsvolu(GetName(),"BOX",idAir, fMasterVolume,3); // Master volume
87 //
88 // Sc counters
1963b290 89 //
ce540969 90 Float_t sc[3]; // tube
91 sc[0] = 0.0;
92 sc[1] = 5.0;
93 sc[2] = 0.5;
94 Float_t zsc[3]={10.,110., 310.};
95 int idSC = idtmed[1];
96 gMC->Gsvolu("SCOU","TUBE",idSC, sc,3); // Master volume
97 Int_t idRot=0; // no rotation
98 for(Int_t i=0; i<3; i++) {
99 Float_t zpos = zsc[i] - fMasterVolume[2];
100 gMC->Gspos("SCOU", i+1, "WSUC", 0.0, 0.0, zpos, idRot, "ONLY");
101 }
1963b290 102}
103
104//_____________________________________________________________________________
105void AliEMCALWsuCosmicRaySetUp::CreateMaterials()
106{
107// Create materials and media
108 Int_t isxfld = 0;
ce540969 109 Float_t sxmgmx = 0., deemax = 0.1;
1963b290 110 // AIR
111 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
112 Float_t zAir[4]={6.,7.,8.,18.};
113 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
114 Float_t dAir = 1.20479E-3;
1963b290 115 AliMixture(1,"Air $",aAir,zAir,dAir,4,wAir);
ce540969 116
117 // --- The polysterene scintillator (CH) ---
118 Float_t aP[2] = {12.011, 1.00794} ;
119 Float_t zP[2] = {6.0, 1.0} ;
120 Float_t wP[2] = {1.0, 1.0} ;
121 Float_t dP = 1.032 ;
122 AliMixture(2, "Polystyrene$", aP, zP, dP, -2, wP) ;
123
1963b290 124 //
125 AliMedium(1,"Air $",1,0,isxfld,sxmgmx,10,-1,-0.1,0.1 ,-10);
ce540969 126 AliMedium(2, "Scintillator$", 2, 1,
127 isxfld, sxmgmx, 10.0, 0.001, deemax, 0.001, 0.001, 0, 0) ;
128
1963b290 129}
130
131//_____________________________________________________________________________
132void AliEMCALWsuCosmicRaySetUp::DrawWSUC(float cxy) const
133{
134 //
135 // Draw a view of the Wsu Cosmic Ray SetUp
136 //
137 // Set everything unseen
138 gMC->Gsatt("*", "seen", -1);
139 //
140 // Set WSUC mother visible
141 gMC->Gsatt("WSUC","SEEN",1);
142 //
143 // Set the volumes visible
144 //
145 gMC->Gdopt("hide","off");
146
147 gMC->Gdraw("WSUC", 40, 30, 0, 10, 9, cxy, cxy);
148 gMC->Gdhead(1111, "WSU Cosmic Ray Setup ");
149
150 gMC->Gdman(18, 4, "MAN");
151}
152
153