]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCv0.cxx
AliTPCCalibPulser.cxx.diff check if channel has data
[u/mrichter/AliRoot.git] / TPC / AliTPCv0.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
88cb7938 16/* $Id$ */
73042f01 17//
4c039060 18
fe4da5cc 19///////////////////////////////////////////////////////////////////////////////
20// //
21// Time Projection Chamber version 0 -- "coarse" TPC //
22// //
23//Begin_Html
24/*
1439f98e 25<img src="picts/AliTPCv0Class.gif">
fe4da5cc 26*/
27//End_Html
28// //
29// //
30///////////////////////////////////////////////////////////////////////////////
31
88cb7938 32#include <Riostream.h>
33
88cb7938 34#include <TMath.h>
88cb7938 35#include <TVirtualMC.h>
d9e80aca 36#include <TString.h>
37#include <TSystem.h>
fe4da5cc 38
88cb7938 39#include "AliConst.h"
40#include "AliRun.h"
cc80f89e 41#include "AliTPCDigitsArray.h"
88cb7938 42#include "AliTPCParamSR.h"
43#include "AliTPCv0.h"
c1637e41 44#include "TGeoManager.h"
45#include "TGeoVolume.h"
46#include "TGeoPcon.h"
47#include "TGeoTube.h"
48#include "TGeoPgon.h"
49#include "TGeoTrd1.h"
50#include "TGeoCompositeShape.h"
51#include "TGeoPara.h"
fe4da5cc 52ClassImp(AliTPCv0)
53
54//_____________________________________________________________________________
55AliTPCv0::AliTPCv0(const char *name, const char *title)
56 :AliTPC(name, title)
57{
58 //
59 // Standard creator for TPC version 0
60 //
73042f01 61
73042f01 62
63 if (fTPCParam)
64 fTPCParam->Write(fTPCParam->GetTitle());
fe4da5cc 65}
66
67//_____________________________________________________________________________
68void AliTPCv0::CreateGeometry()
69{
79575d04 70
fe4da5cc 71 //
37831078 72 // Creation of the TPC version 0, i.e. no sensitive volumes,
73 // only the material distribution
fe4da5cc 74 //
75 //Begin_Html
76 /*
37831078 77 <img src="picts/AliTPC.gif">
fe4da5cc 78 */
79 //End_Html
80 //Begin_Html
81 /*
1439f98e 82 <img src="picts/AliTPCv0Tree.gif">
fe4da5cc 83 */
84 //End_Html
85
c1637e41 86 //----------------------------------------------------------
87 // This geometry is written using TGeo class
88 // Firstly the shapes are defined, and only then the volumes
89 // What is recognized by the MC are volumes
90 //----------------------------------------------------------
91 //
92 // tpc - this will be the mother volume
37831078 93 //
1283eee5 94
37831078 95 //
c1637e41 96 // here I define a volume TPC
97 // retrive the medium name with "TPC_" as a leading string
37831078 98 //
4fb9bd37 99 TGeoPcon *tpc = new TGeoPcon(0.,360.,28); //28 sections
37831078 100 //
78134e48 101 tpc->DefineSection(0,-291.,77.,278.);
102 tpc->DefineSection(1,-270,77.,278.);
37831078 103 //
78134e48 104 tpc->DefineSection(2,-270.,77.,278.);
4fb9bd37 105 tpc->DefineSection(3,-262.1,77.,278.);
37831078 106 //
4fb9bd37 107 tpc->DefineSection(4,-262.1,83.1,278.);
108 tpc->DefineSection(5,-260.,83.1,278.);
37831078 109 //
4fb9bd37 110 tpc->DefineSection(6,-260.,70.,278.);
111 tpc->DefineSection(7,-259.6,70.,278.);
37831078 112 //
4fb9bd37 113 tpc->DefineSection(8,-259.6,68.1,278.);
114 tpc->DefineSection(9,-253.6,68.1,278.);
37831078 115 //
4fb9bd37 116 tpc->DefineSection(10,-253.6,68.,278.);
117 tpc->DefineSection(11,-74.0,60.8,278.);
37831078 118 //
4fb9bd37 119 tpc->DefineSection(12,-74.0,60.1,278.);
120 tpc->DefineSection(13,-73.3,60.1,278.);
37831078 121 //
4fb9bd37 122 tpc->DefineSection(14,-73.3,56.9,278.);
123 tpc->DefineSection(15,-68.5,56.9,278.);
78134e48 124 //
4fb9bd37 125 tpc->DefineSection(16,-68.5,60.,278.);
126 tpc->DefineSection(17,-65.,60.,278.);
78134e48 127 //
4fb9bd37 128 tpc->DefineSection(18,-65.,56.9,278.);
129 tpc->DefineSection(19,73.3,56.9,278.);
130 //
131 tpc->DefineSection(20,73.3,60.1,278.);
132 tpc->DefineSection(21,74.0,60.1,278.);
133 //
134 tpc->DefineSection(22,74.0,60.8,278.);
135 tpc->DefineSection(23,253.6,65.5,278.);
136 //
137 tpc->DefineSection(24,253.6,65.6,278.);
138 tpc->DefineSection(25,259.6,65.6,278.);
139 //
140 tpc->DefineSection(26,259.6,70.0,278.);
141 tpc->DefineSection(27,291.,77.,278.);
37831078 142 //
c1637e41 143 TGeoMedium *m1 = gGeoManager->GetMedium("TPC_Air");
144 TGeoVolume *v1 = new TGeoVolume("TPC_M",tpc,m1);
37831078 145 //
c1637e41 146 // drift volume - sensitive volume, extended beyond the
147 // endcaps, because of the alignment
37831078 148 //
c1637e41 149 TGeoPcon *dvol = new TGeoPcon(0.,360.,6);
150 dvol->DefineSection(0,-260.,74.5,264.4);
151 dvol->DefineSection(1,-253.6,74.5,264.4);
79575d04 152 //
c1637e41 153 dvol->DefineSection(2,-253.6,76.6774,258.);
154 dvol->DefineSection(3,253.6,76.6774,258.);
37831078 155 //
c1637e41 156 dvol->DefineSection(4,253.6,74.5,264.4);
157 dvol->DefineSection(5,260.,74.5,264.4);
37831078 158 //
f3d601a5 159 TGeoMedium *m5 = gGeoManager->GetMedium("TPC_Ne-CO2-1");
c1637e41 160 TGeoVolume *v9 = new TGeoVolume("TPC_Drift",dvol,m5);
37831078 161 //
c1637e41 162 v1->AddNode(v9,1);
37831078 163 //
c1637e41 164 // outer insulator
37831078 165 //
c1637e41 166 TGeoPcon *tpco = new TGeoPcon(0.,360.,6); //insulator
37831078 167 //
c1637e41 168 tpco->DefineSection(0,-256.6,264.8,278.);
169 tpco->DefineSection(1,-253.6,264.8,278.);
720b23b8 170 //
c1637e41 171 tpco->DefineSection(2,-253.6,258.,278.);
172 tpco->DefineSection(3,250.6,258.,278.);
79575d04 173 //
c1637e41 174 tpco->DefineSection(4,250.6,258.,275.5);
175 tpco->DefineSection(5,253.6,258.,275.5);
176 //
177 TGeoMedium *m2 = gGeoManager->GetMedium("TPC_CO2");
178 TGeoVolume *v2 = new TGeoVolume("TPC_OI",tpco,m2);
179 //
180 // outer containment vessel
181 //
182 TGeoPcon *tocv = new TGeoPcon(0.,360.,6); // containment vessel
183 //
184 tocv->DefineSection(0,-256.6,264.8,278.);
185 tocv->DefineSection(1,-253.6,264.8,278.);
186 //
187 tocv->DefineSection(2,-253.6,274.8124,278.);
188 tocv->DefineSection(3,247.6,274.8124,278.);
189 //
190 tocv->DefineSection(4,247.6,270.4,278.);
191 tocv->DefineSection(5,250.6,270.4,278.);
192 //
193 TGeoMedium *m3 = gGeoManager->GetMedium("TPC_Al");
194 TGeoVolume *v3 = new TGeoVolume("TPC_OCV",tocv,m3);
195 //
196 TGeoTube *to1 = new TGeoTube(274.8174,277.995,252.1); //epoxy
197 TGeoTube *to2 = new TGeoTube(274.8274,277.985,252.1); //tedlar
198 TGeoTube *to3 = new TGeoTube(274.8312,277.9812,252.1);//prepreg2
199 TGeoTube *to4 = new TGeoTube(274.9062,277.9062,252.1);//nomex
200 //
201 TGeoMedium *sm1 = gGeoManager->GetMedium("TPC_Epoxy");
202 TGeoMedium *sm2 = gGeoManager->GetMedium("TPC_Tedlar");
203 TGeoMedium *sm3 = gGeoManager->GetMedium("TPC_Prepreg2");
204 TGeoMedium *sm4 = gGeoManager->GetMedium("TPC_Nomex");
205 //
206 TGeoVolume *tov1 = new TGeoVolume("TPC_OCV1",to1,sm1);
207 TGeoVolume *tov2 = new TGeoVolume("TPC_OCV2",to2,sm2);
208 TGeoVolume *tov3 = new TGeoVolume("TPC_OCV3",to3,sm3);
209 TGeoVolume *tov4 = new TGeoVolume("TPC_OCV4",to4,sm4);
37831078 210 //-------------------------------------------------------
211 // Tpc Outer Field Cage
c1637e41 212 // daughters - composite (sandwich)
37831078 213 //-------------------------------------------------------
214
c1637e41 215 TGeoPcon *tofc = new TGeoPcon(0.,360.,6);
79575d04 216 //
c1637e41 217 tofc->DefineSection(0,-253.6,258.,269.6);
218 tofc->DefineSection(1,-250.6,258.,269.6);
37831078 219 //
c1637e41 220 tofc->DefineSection(2,-250.6,258.,260.0676);
221 tofc->DefineSection(3,250.6,258.,260.0676);
37831078 222 //
c1637e41 223 tofc->DefineSection(4,250.6,258.,275.5);
224 tofc->DefineSection(5,253.6,258.,275.5);
37831078 225 //
c1637e41 226 TGeoVolume *v4 = new TGeoVolume("TPC_TOFC",tofc,m3);
227 //sandwich
228 TGeoTube *tf1 = new TGeoTube(258.0,260.0676,252.1); //tedlar
229 TGeoTube *tf2 = new TGeoTube(258.0038,260.0638,252.1); //prepreg3
230 TGeoTube *tf3 = new TGeoTube(258.0338,260.0338,252.1);//nomex
37831078 231 //
c1637e41 232 TGeoMedium *sm5 = gGeoManager->GetMedium("TPC_Prepreg3");
37831078 233 //
c1637e41 234 TGeoVolume *tf1v = new TGeoVolume("TPC_OFC1",tf1,sm2);
235 TGeoVolume *tf2v = new TGeoVolume("TPC_OFC2",tf2,sm5);
236 TGeoVolume *tf3v = new TGeoVolume("TPC_OFC3",tf3,sm4);
1283eee5 237 //
c1637e41 238 // outer part - positioning
37831078 239 //
c1637e41 240 tov1->AddNode(tov2,1); tov2->AddNode(tov3,1); tov3->AddNode(tov4,1);
37831078 241 //
c1637e41 242 tf1v->AddNode(tf2v,1); tf2v->AddNode(tf3v,1);
1283eee5 243 //
456cb019 244 v3->AddNode(tov1,1,new TGeoTranslation(0.,0.,-1.5)); v4->AddNode(tf1v,1);
1283eee5 245 //
c1637e41 246 v2->AddNode(v3,1); v2->AddNode(v4,1);
37831078 247 //
c1637e41 248 v1->AddNode(v2,1);
249 //-----------------------------------------------------------
250 //--------------------------------------------------------------------
251 // Tpc Inner INsulator (CO2)
252 // the cones, the central drum and the inner f.c. sandwich with a piece
253 // of the flane will be placed in the TPC
254 //--------------------------------------------------------------------
255 TGeoPcon *tpci = new TGeoPcon(0.,360.,4);
37831078 256 //
c1637e41 257 tpci->DefineSection(0,-253.6,68.4,76.6774);
258 tpci->DefineSection(1,-74.0,61.2,76.6774);
37831078 259 //
c1637e41 260 tpci->DefineSection(2,74.0,61.2,76.6774);
37831078 261 //
c1637e41 262 tpci->DefineSection(3,253.6,65.9,76.6774);
37831078 263 //
c1637e41 264 TGeoVolume *v5 = new TGeoVolume("TPC_INI",tpci,m2);
37831078 265 //
c1637e41 266 // now the inner field cage - only part of flanges (2 copies)
37831078 267 //
c1637e41 268 TGeoTube *tif1 = new TGeoTube(69.9,76.6774,1.5);
269 TGeoVolume *v6 = new TGeoVolume("TPC_IFC1",tif1,m3);
37831078 270 //
c1637e41 271 //---------------------------------------------------------
272 // Tpc Inner Containment vessel - Muon side
79575d04 273 //---------------------------------------------------------
c1637e41 274 TGeoPcon *tcms = new TGeoPcon(0.,360.,10);
37831078 275 //
c1637e41 276 tcms->DefineSection(0,-259.1,68.1,74.2);
277 tcms->DefineSection(1,-253.6,68.1,74.2);
37831078 278 //
c1637e41 279 tcms->DefineSection(2,-253.6,68.1,68.4);
280 tcms->DefineSection(3,-74.0,60.9,61.2);
37831078 281 //
c1637e41 282 tcms->DefineSection(4,-74.0,60.1,61.2);
283 tcms->DefineSection(5,-73.3,60.1,61.2);
37831078 284 //
c1637e41 285 tcms->DefineSection(6,-73.3,56.9,61.2);
286 tcms->DefineSection(7,-73.0,56.9,61.2);
37831078 287 //
c1637e41 288 tcms->DefineSection(8,-73.0,56.9,58.8);
289 tcms->DefineSection(9,-71.3,56.9,58.8);
37831078 290 //
c1637e41 291 TGeoVolume *v7 = new TGeoVolume("TPC_ICVM",tcms,m3);
292 //-----------------------------------------------
293 // inner containment vessel - shaft side
294 //-----------------------------------------------
295 TGeoPcon *tcss = new TGeoPcon(0.,360.,10);
37831078 296 //
c1637e41 297 tcss->DefineSection(0,71.3,56.9,58.8);
298 tcss->DefineSection(1,73.0,56.9,58.8);
37831078 299 //
c1637e41 300 tcss->DefineSection(2,73.0,56.9,61.2);
301 tcss->DefineSection(3,73.3,56.9,61.2);
302 //
303 tcss->DefineSection(4,73.3,60.1,61.2);
304 tcss->DefineSection(5,74.0,60.1,61.2);
37831078 305 //
c1637e41 306 tcss->DefineSection(6,74.0,60.9,61.2);
307 tcss->DefineSection(7,253.6,65.6,65.9);
37831078 308 //
c1637e41 309 tcss->DefineSection(8,253.6,65.6,74.2);
310 tcss->DefineSection(9,258.1,65.6,74.2);
37831078 311 //
c1637e41 312 TGeoVolume *v8 = new TGeoVolume("TPC_ICVS",tcss,m3);
313 //-----------------------------------------------
314 // Inner field cage
315 // define 4 parts and make an assembly
316 //-----------------------------------------------
317 // part1 - Al - 2 copies
318 TGeoTube *t1 = new TGeoTube(76.6774,78.845,0.75);
319 TGeoVolume *tv1 = new TGeoVolume("TPC_IFC2",t1,m3);
320 // sandwich - outermost parts - 2 copies
321 TGeoTube *t2 = new TGeoTube(76.6774,78.845,74.175); // tedlar 38 microns
322 TGeoTube *t3 = new TGeoTube(76.6812,78.8412,74.175); // prepreg2 500 microns
323 TGeoTube *t4 = new TGeoTube(76.7312,78.7912,74.175); // prepreg3 300 microns
324 TGeoTube *t5 = new TGeoTube(76.7612,78.7612,74.175); // nomex 2 cm
37831078 325 //
c1637e41 326 TGeoVolume *tv2 = new TGeoVolume("TPC_IFC3",t2,sm2);
327 TGeoVolume *tv3 = new TGeoVolume("TPC_IFC4",t3,sm3);
328 TGeoVolume *tv4 = new TGeoVolume("TPC_IFC5",t4,sm5);
329 TGeoVolume *tv5 = new TGeoVolume("TPC_IFC6",t5,sm4);
37831078 330 //
c1637e41 331 // middle parts - 2 copies
332 TGeoTube *t6 = new TGeoTube(76.6774,78.795,5.); // tedlar 38 microns
333 TGeoTube *t7 = new TGeoTube(76.6812,78.7912,5.); // prepreg2 250 microns
334 TGeoTube *t8 = new TGeoTube(76.7062,78.7662,5.); // prepreg3 300 microns
335 TGeoTube *t9 = new TGeoTube(76.7362,78.7362,5.); // nomex 2 cm
79575d04 336 //
c1637e41 337 TGeoVolume *tv6 = new TGeoVolume("TPC_IFC7",t6,sm2);
338 TGeoVolume *tv7 = new TGeoVolume("TPC_IFC8",t7,sm3);
339 TGeoVolume *tv8 = new TGeoVolume("TPC_IFC9",t8,sm5);
340 TGeoVolume *tv9 = new TGeoVolume("TPC_IFC10",t9,sm4);
341 // central part - 1 copy
342 TGeoTube *t10 = new TGeoTube(76.6774,78.745,93.75); // tedlar 38 microns
343 TGeoTube *t11 = new TGeoTube(76.6812,78.7412,93.75); // prepreg3 300 microns
344 TGeoTube *t12 = new TGeoTube(76.7112,78.7112,93.75); // nomex 2 cm
79575d04 345 //
c1637e41 346 TGeoVolume *tv10 = new TGeoVolume("TPC_IFC11",t10,sm2);
347 TGeoVolume *tv11 = new TGeoVolume("TPC_IFC12",t11,sm5);
348 TGeoVolume *tv12 = new TGeoVolume("TPC_IFC13",t12,sm4);
79575d04 349 //
c1637e41 350 // inner part - positioning
79575d04 351 //
c1637e41 352 // creating a sandwich
353 tv2->AddNode(tv3,1); tv3->AddNode(tv4,1); tv4->AddNode(tv5,1);
79575d04 354 //
c1637e41 355 tv6->AddNode(tv7,1); tv7->AddNode(tv8,1); tv8->AddNode(tv9,1);
79575d04 356 //
c1637e41 357 tv10->AddNode(tv11,1); tv11->AddNode(tv12,1);
37831078 358 //
c1637e41 359 TGeoVolumeAssembly *tv100 = new TGeoVolumeAssembly("TPC_IFC");
37831078 360 //
c1637e41 361 tv100->AddNode(tv10,1);
362 tv100->AddNode(tv6,1,new TGeoTranslation(0.,0.,-98.75));
363 tv100->AddNode(tv6,2,new TGeoTranslation(0.,0.,98.75));
364 tv100->AddNode(tv2,1,new TGeoTranslation(0.,0.,-177.925));
365 tv100->AddNode(tv2,2,new TGeoTranslation(0.,0.,177.925));
366 tv100->AddNode(tv1,1,new TGeoTranslation(0.,0.,-252.85));
367 tv100->AddNode(tv1,2,new TGeoTranslation(0.,0.,252.85));
368 //
369 v5->AddNode(v6,1, new TGeoTranslation(0.,0.,-252.1));
370 v5->AddNode(v6,2, new TGeoTranslation(0.,0.,252.1));
371 v1->AddNode(v5,1); v1->AddNode(v7,1); v1->AddNode(v8,1);
372 v9->AddNode(tv100,1);
373 //
374 // central drum
375 //
376 // flange + sandwich
377 //
378 TGeoPcon *cfl = new TGeoPcon(0.,360.,6);
379 cfl->DefineSection(0,-71.1,59.7,61.2);
380 cfl->DefineSection(1,-68.6,59.7,61.2);
381 //
382 cfl->DefineSection(2,-68.6,60.6324,61.2);
383 cfl->DefineSection(3,68.6,60.6324,61.2);
384 //
385 cfl->DefineSection(4,68.6,59.7,61.2);
386 cfl->DefineSection(5,71.1,59.7,61.2);
387 //
388 TGeoVolume *cflv = new TGeoVolume("TPC_CDR",cfl,m3);
389 // sandwich
390 TGeoTube *cd1 = new TGeoTube(60.6424,61.19,71.1);
391 TGeoTube *cd2 = new TGeoTube(60.6462,61.1862,71.1);
392 TGeoTube *cd3 = new TGeoTube(60.6662,61.1662,71.1);
393 //
394 TGeoMedium *sm6 = gGeoManager->GetMedium("TPC_Prepreg1");
395 TGeoVolume *cd1v = new TGeoVolume("TPC_CDR1",cd1,sm2); //tedlar
396 TGeoVolume *cd2v = new TGeoVolume("TPC_CDR2",cd2,sm6);// prepreg1
397 TGeoVolume *cd3v = new TGeoVolume("TPC_CDR3",cd3,sm4); //nomex
398 //
399 // seals for central drum 2 copies
400 //
401 TGeoTube *cs = new TGeoTube(56.9,61.2,0.1);
402 TGeoMedium *sm7 = gGeoManager->GetMedium("TPC_Mylar");
403 TGeoVolume *csv = new TGeoVolume("TPC_CDRS",cs,sm7);
78134e48 404 v1->AddNode(csv,1,new TGeoTranslation(0.,0.,-71.2));
405 v1->AddNode(csv,2,new TGeoTranslation(0.,0.,71.2));
c1637e41 406 //
407 // seal collars
408 TGeoPcon *se = new TGeoPcon(0.,360.,6);
409 se->DefineSection(0,-72.8,59.7,61.2);
410 se->DefineSection(1,-72.3,59.7,61.2);
411 //
412 se->DefineSection(2,-72.3,58.85,61.2);
413 se->DefineSection(3,-71.6,58.85,61.2);
414 //
415 se->DefineSection(4,-71.6,59.7,61.2);
416 se->DefineSection(5,-71.3,59.7,61.2);
417 //
418 TGeoVolume *sev = new TGeoVolume("TPC_CDCE",se,m3);
419 //
420 TGeoTube *si = new TGeoTube(56.9,58.8,1.);
421 TGeoVolume *siv = new TGeoVolume("TPC_CDCI",si,m3);
422 //
423 // define reflection matrix
424 //
4fa47888 425 TGeoRotation *ref = new TGeoRotation("ref",90.,0.,90.,90.,180.,0.);
c1637e41 426 //
427 cd1v->AddNode(cd2v,1); cd2v->AddNode(cd3v,1); cflv->AddNode(cd1v,1);
428 //
a1ec4d07 429 v1->AddNode(siv,1,new TGeoTranslation(0.,0.,-69.9));
430 v1->AddNode(siv,2,new TGeoTranslation(0.,0.,69.9));
c1637e41 431 v1->AddNode(sev,1); v1->AddNode(sev,2,ref); v1->AddNode(cflv,1);
432 //
433 // central membrane - 2 rings and a mylar membrane - assembly
434 //
435 TGeoTube *ih = new TGeoTube(81.05,84.05,0.3);
436 TGeoTube *oh = new TGeoTube(250.,256.,.5);
437 TGeoTube *mem = new TGeoTube(84.05,250,0.01);
438 TGeoVolume *ihv = new TGeoVolume("TPC_IHVH",ih,m3);
439 TGeoVolume *ohv = new TGeoVolume("TPC_OHVH",oh,m3);
440 TGeoVolume *memv = new TGeoVolume("TPC_HV",mem,sm7);
441 //
442 TGeoVolumeAssembly *cm = new TGeoVolumeAssembly("TPC_HVMEM");
443 cm->AddNode(ihv,1);
444 cm->AddNode(ohv,1);
445 cm->AddNode(memv,1);
446 v9->AddNode(cm,1);
447 //
448 // end caps - they are make as an assembly of single segments
449 // containing both readout chambers
450 //
d899e254 451 Double_t openingAngle = 10.*TMath::DegToRad();
c1637e41 452 Double_t thick=1.5; // rib
d899e254 453 Double_t shift = thick/TMath::Sin(openingAngle);
c1637e41 454 //
d899e254 455 Double_t lowEdge = 86.3; // hole in the wheel
456 Double_t upEdge = 240.4; // hole in the wheel
c1637e41 457 //
458 new TGeoTubeSeg("sec",74.5,264.4,3.,0.,20.);
459 //
460 TGeoPgon *hole = new TGeoPgon("hole",0.,20.,1,4);
461 //
d899e254 462 hole->DefineSection(0,-3.5,lowEdge-shift,upEdge-shift);
463 hole->DefineSection(1,-1.5,lowEdge-shift,upEdge-shift);
c1637e41 464 //
d899e254 465 hole->DefineSection(2,-1.5,lowEdge-shift,upEdge+3.-shift);
466 hole->DefineSection(3,3.5,lowEdge-shift,upEdge+3.-shift);
c1637e41 467 //
d899e254 468 Double_t ys = shift*TMath::Sin(openingAngle);
469 Double_t xs = shift*TMath::Cos(openingAngle);
c1637e41 470 TGeoTranslation *tr = new TGeoTranslation("tr",xs,ys,0.);
471 tr->RegisterYourself();
472 TGeoCompositeShape *chamber = new TGeoCompositeShape("sec-hole:tr");
473 TGeoVolume *sv = new TGeoVolume("TPC_WSEG",chamber,m3);
474 TGeoPgon *bar = new TGeoPgon("bar",0.,20.,1,2);
475 bar->DefineSection(0,-3.,131.5-shift,136.5-shift);
476 bar->DefineSection(1,1.5,131.5-shift,136.5-shift);
477 TGeoVolume *barv = new TGeoVolume("TPC_WBAR",bar,m3);
478 TGeoVolumeAssembly *ch = new TGeoVolumeAssembly("TPC_WCH");//empty segment
479 //
480 ch->AddNode(sv,1); ch->AddNode(barv,1,tr);
481 //
482 // readout chambers
483 //
484 // IROC first
485 //
486 TGeoTrd1 *ibody = new TGeoTrd1(13.8742,21.3328,4.29,21.15);
487 TGeoVolume *ibdv = new TGeoVolume("TPC_IROCB",ibody,m3);
37831078 488 // empty space
c1637e41 489 TGeoTrd1 *emp = new TGeoTrd1(12.3742,19.8328,3.99,19.65);
490 TGeoVolume *empv = new TGeoVolume("TPC_IROCE",emp,m1);
491 ibdv->AddNode(empv,1,new TGeoTranslation(0.,-0.3,0.));
492 //bars
493 Double_t tga = (19.8328-12.3742)/39.3;
494 Double_t xmin,xmax;
495 xmin = 9.55*tga+12.3742;
496 xmax = 9.95*tga+12.3742;
497 TGeoTrd1 *ib1 = new TGeoTrd1(xmin,xmax,3.29,0.2);
498 TGeoVolume *ib1v = new TGeoVolume("TPC_IRB1",ib1,m3);
499 empv->AddNode(ib1v,1,new TGeoTranslation("tt1",0.,0.7,-9.9));
500 xmin=19.4*tga+12.3742;
501 xmax=19.9*tga+12.3742;
502 TGeoTrd1 *ib2 = new TGeoTrd1(xmin,xmax,3.29,0.25);
503 TGeoVolume *ib2v = new TGeoVolume("TPC_TRB2",ib2,m3);
504 empv->AddNode(ib2v,1,new TGeoTranslation(0.,0.7,0.));
505 xmin=29.35*tga+12.3742;
506 xmax=29.75*tga+12.3742;
507 TGeoTrd1 *ib3 = new TGeoTrd1(xmin,xmax,3.29,0.2);
508 TGeoVolume *ib3v = new TGeoVolume("TPC_IRB3",ib3,m3);
509 empv->AddNode(ib3v,1,new TGeoTranslation(0.,0.7,9.9));
510 //
511 // holes for connectors
512 //
513 TGeoBBox *conn = new TGeoBBox(0.4,0.3,4.675); // identical for iroc and oroc
514 TGeoVolume *connv = new TGeoVolume("TPC_RCCON",conn,m1);
d9e80aca 515 TString fileName(gSystem->Getenv("ALICE_ROOT"));
516 fileName += "/TPC/conn_iroc.dat";
c1637e41 517 ifstream in;
d9e80aca 518 in.open(fileName.Data(), ios_base::in); // asci file
c1637e41 519 for(Int_t i =0;i<86;i++){
456cb019 520 Double_t y = 3.99;
c1637e41 521 Double_t x,z,ang;
522 in>>x>>z>>ang;
456cb019 523 z-=26.5;
c1637e41 524 TGeoRotation *rrr = new TGeoRotation();
525 rrr->RotateY(ang);
526 TGeoCombiTrans *trans = new TGeoCombiTrans("trans",x,y,z,rrr);
527 ibdv->AddNode(connv,i+1,trans);
528 }
529 in.close();
530 // "cap"
531 new TGeoTrd1("icap",14.5974,23.3521,1.19,24.825);
532 // "hole"
533 new TGeoTrd1("ihole",13.8742,21.3328,1.2,21.15);
534 TGeoTranslation *tr1 = new TGeoTranslation("tr1",0.,0.,1.725);
535 tr1->RegisterYourself();
536 TGeoCompositeShape *ic = new TGeoCompositeShape("icap-ihole:tr1");
537 TGeoVolume *icv = new TGeoVolume("TPC_IRCAP",ic,m3);
538 //
539 // pad plane and wire fixations
540 //
541 TGeoTrd1 *pp = new TGeoTrd1(14.5974,23.3521,0.3,24.825); //pad+iso
542 TGeoMedium *m4 = gGeoManager->GetMedium("TPC_G10");
543 TGeoVolume *ppv = new TGeoVolume("TPC_IRPP",pp,m4);
544 TGeoPara *f1 = new TGeoPara(.6,.5,24.825,0.,-10.,0.);
545 TGeoVolume *f1v = new TGeoVolume("TPC_IRF1",f1,m4);
546 TGeoPara *f2 = new TGeoPara(.6,.5,24.825,0.,10.,0.);
547 TGeoVolume *f2v = new TGeoVolume("TPC_IRF2",f2,m4);
548 //
549 TGeoVolumeAssembly *iroc = new TGeoVolumeAssembly("TPC_IROC");
550 //
551 iroc->AddNode(ibdv,1);
552 iroc->AddNode(icv,1,new TGeoTranslation(0.,3.1,-1.725));
553 iroc->AddNode(ppv,1,new TGeoTranslation(0.,4.59,-1.725));
554 tga =(23.3521-14.5974)/49.65;
555 Double_t xx = 24.825*tga+14.5974-0.6;
556 iroc->AddNode(f1v,1,new TGeoTranslation(-xx,5.39,-1.725));
557 iroc->AddNode(f2v,1,new TGeoTranslation(xx,5.39,-1.725));
558 //
559 // OROC
560 //
561 TGeoTrd1 *obody = new TGeoTrd1(22.2938,40.5084,4.19,51.65);
562 TGeoVolume *obdv = new TGeoVolume("TPC_OROCB",obody,m3);
563 TGeoTrd1 *oemp = new TGeoTrd1(20.2938,38.5084,3.89,49.65);
564 TGeoVolume *oempv = new TGeoVolume("TPC_OROCE",oemp,m1);
565 obdv->AddNode(oempv,1,new TGeoTranslation(0.,-0.3,0.));
566 //horizontal bars
567 tga=(38.5084-20.2938)/99.3;
568 xmin=tga*10.2+20.2938;
569 xmax=tga*10.6+20.2938;
570 TGeoTrd1 *ob1 = new TGeoTrd1(xmin,xmax,2.915,0.2);
571 TGeoVolume *ob1v = new TGeoVolume("TPC_ORB1",ob1,m3);
572 //
573 xmin=22.55*tga+20.2938;
574 xmax=24.15*tga+20.2938;
575 TGeoTrd1 *ob2 = new TGeoTrd1(xmin,xmax,2.915,0.8);
576 TGeoVolume *ob2v = new TGeoVolume("TPC_ORB2",ob2,m3);
577 //
578 xmin=36.1*tga+20.2938;
579 xmax=36.5*tga+20.2938;
580 TGeoTrd1 *ob3 = new TGeoTrd1(xmin,xmax,2.915,0.2);
581 TGeoVolume *ob3v = new TGeoVolume("TPC_ORB3",ob3,m3);
582 //
583 xmin=49.0*tga+20.2938;
584 xmax=50.6*tga+20.2938;
585 TGeoTrd1 *ob4 = new TGeoTrd1(xmin,xmax,2.915,0.8);
586 TGeoVolume *ob4v = new TGeoVolume("TPC_ORB4",ob4,m3);
587 //
588 xmin=63.6*tga+20.2938;
589 xmax=64.0*tga+20.2938;
590 TGeoTrd1 *ob5 = new TGeoTrd1(xmin,xmax,2.915,0.2);
591 TGeoVolume *ob5v = new TGeoVolume("TPC_ORB5",ob5,m3);
592 //
593 xmin=75.5*tga+20.2938;
594 xmax=77.15*tga+20.2938;
595 TGeoTrd1 *ob6 = new TGeoTrd1(xmin,xmax,2.915,0.8);
596 TGeoVolume *ob6v = new TGeoVolume("TPC_ORB6",ob6,m3);
597 //
598 xmin=88.7*tga+20.2938;
599 xmax=89.1*tga+20.2938;
600 TGeoTrd1 *ob7 = new TGeoTrd1(xmin,xmax,2.915,0.2);
601 TGeoVolume *ob7v = new TGeoVolume("TPC_ORB7",ob7,m3);
602 //
603 oempv->AddNode(ob1v,1,new TGeoTranslation(0.,0.975,-39.25));
604 oempv->AddNode(ob2v,1,new TGeoTranslation(0.,0.975,-26.3));
605 oempv->AddNode(ob3v,1,new TGeoTranslation(0.,0.975,-13.35));
606 oempv->AddNode(ob4v,1,new TGeoTranslation(0.,0.975,0.15));
607 oempv->AddNode(ob5v,1,new TGeoTranslation(0.,0.975,14.15));
608 oempv->AddNode(ob6v,1,new TGeoTranslation(0.,0.975,26.7));
609 oempv->AddNode(ob7v,1,new TGeoTranslation(0.,0.975,39.25));
610 // vertical bars
611 TGeoBBox *ob8 = new TGeoBBox(0.8,2.915,5.1);
612 TGeoBBox *ob9 = new TGeoBBox(0.8,2.915,5.975);
613 TGeoBBox *ob10 = new TGeoBBox(0.8,2.915,5.775);
614 TGeoBBox *ob11 = new TGeoBBox(0.8,2.915,6.25);
615 TGeoBBox *ob12 = new TGeoBBox(0.8,2.915,6.5);
616 //
617 TGeoVolume *ob8v = new TGeoVolume("TPC_ORB8",ob8,m3);
618 TGeoVolume *ob9v = new TGeoVolume("TPC_ORB9",ob9,m3);
619 TGeoVolume *ob10v = new TGeoVolume("TPC_ORB10",ob10,m3);
620 TGeoVolume *ob11v = new TGeoVolume("TPC_ORB11",ob11,m3);
621 TGeoVolume *ob12v = new TGeoVolume("TPC_ORB12",ob12,m3);
622 //
623 oempv->AddNode(ob8v,1,new TGeoTranslation(0.,0.975,-44.55));
624 oempv->AddNode(ob8v,2,new TGeoTranslation(0.,0.975,44.55));
625 oempv->AddNode(ob9v,1,new TGeoTranslation(0.,0.975,-33.075));
626 oempv->AddNode(ob9v,2,new TGeoTranslation(0.,0.975,-19.525));
627 oempv->AddNode(ob10v,1,new TGeoTranslation(0.,0.975,20.125));
628 oempv->AddNode(ob10v,2,new TGeoTranslation(0.,0.975,33.275));
629 oempv->AddNode(ob11v,1,new TGeoTranslation(0.,0.975,-6.9));
630 oempv->AddNode(ob12v,1,new TGeoTranslation(0.,0.975,7.45));
631 //
632 // holes for connectors
633 //
d9e80aca 634 fileName = gSystem->Getenv("ALICE_ROOT");
635 fileName += "/TPC/conn_oroc.dat";
636 in.open(fileName.Data(), ios_base::in); // asci file
c1637e41 637 for(Int_t i =0;i<78;i++){
638 Double_t y =3.89;
639 Double_t x,z,ang;
640 Double_t x1,z1,x2,z2;
641 in>>x>>z>>ang;
642 Double_t xr = 4.7*TMath::Sin(ang*TMath::DegToRad());
643 Double_t zr = 4.7*TMath::Cos(ang*TMath::DegToRad());
644 //
645 x1=xr+x; x2=-xr+x; z1=zr+z; z2 = -zr+z;
646 //
647 TGeoRotation *rr = new TGeoRotation();
648 rr->RotateY(ang);
649 z1-=54.95;
650 z2-=54.95;
651 TGeoCombiTrans *trans1 = new TGeoCombiTrans("trans1",x1,y,z1,rr);
652 TGeoCombiTrans *trans2 = new TGeoCombiTrans("trans2",x2,y,z2,rr);
653 obdv->AddNode(connv,i+1,trans1);
654 obdv->AddNode(connv,i+79,trans2);
655 }
656 in.close();
657 // cap
658 new TGeoTrd1("ocap",23.3874,43.5239,1.09,57.1);
659 new TGeoTrd1("ohole",22.2938,40.5084,1.09,51.65);
660 TGeoTranslation *tr5 = new TGeoTranslation("tr5",0.,0.,-2.15);
661 tr5->RegisterYourself();
662 TGeoCompositeShape *oc = new TGeoCompositeShape("ocap-ohole:tr5");
663 TGeoVolume *ocv = new TGeoVolume("TPC_ORCAP",oc,m3);
664 //
665 // pad plane and wire fixations
666 //
667 TGeoTrd1 *opp = new TGeoTrd1(23.3874,43.5239,0.3,57.1);
668 TGeoVolume *oppv = new TGeoVolume("TPC_ORPP",opp,m4);
669 //
670 tga=(43.5239-23.3874)/114.2;
671 TGeoPara *f3 = new TGeoPara(.7,.6,57.1,0.,-10.,0.);
672 TGeoPara *f4 = new TGeoPara(.7,.6,57.1,0.,10.,0.);
673 xx = 57.1*tga+23.3874-0.7;
674 TGeoVolume *f3v = new TGeoVolume("TPC_ORF1",f3,m4);
675 TGeoVolume *f4v = new TGeoVolume("TPC_ORF2",f4,m4);
676 //
677 TGeoVolumeAssembly *oroc = new TGeoVolumeAssembly("TPC_OROC");
678 //
679 oroc->AddNode(obdv,1);
680 oroc->AddNode(ocv,1,new TGeoTranslation(0.,3.1,2.15));
681 oroc->AddNode(oppv,1,new TGeoTranslation(0.,4.49,2.15));
682 oroc->AddNode(f3v,1,new TGeoTranslation(-xx,5.39,2.15));
683 oroc->AddNode(f4v,1,new TGeoTranslation(xx,5.39,2.15));
684 //
685 // now iroc and oroc are placed into a sector...
686 //
a1ec4d07 687 TGeoVolumeAssembly *secta = new TGeoVolumeAssembly("TPC_SECT"); // a-side
688 TGeoVolumeAssembly *sectc = new TGeoVolumeAssembly("TPC_SECT"); // c-side
689 //
1fba9945 690
c1637e41 691 TGeoRotation rot1("rot1",90.,90.,0.);
692 TGeoRotation rot2("rot2");
693 rot2.RotateY(10.);
694 TGeoRotation *rot = new TGeoRotation("rot");
695 *rot=rot1*rot2;
696 //
697 Double_t x0,y0;
d899e254 698 x0=110.2*TMath::Cos(openingAngle);
699 y0=110.2*TMath::Sin(openingAngle);
20527578 700 TGeoCombiTrans *combi1a = new TGeoCombiTrans("combi1",x0,y0,1.09+0.195,rot); //a-side
701 TGeoCombiTrans *combi1c = new TGeoCombiTrans("combi1",x0,y0,1.09+0.222,rot); //c-side
d899e254 702 x0=188.45*TMath::Cos(openingAngle);
703 y0=188.45*TMath::Sin(openingAngle);
20527578 704 TGeoCombiTrans *combi2a = new TGeoCombiTrans("combi2",x0,y0,0.99+0.195,rot); //a-side
705 TGeoCombiTrans *combi2c = new TGeoCombiTrans("combi2",x0,y0,0.99+0.222,rot); //c-side
a1ec4d07 706 //
707 // A-side
708 //
709 secta->AddNode(ch,1);
710 secta->AddNode(iroc,1,combi1a);
711 secta->AddNode(oroc,1,combi2a);
712 //
713 // C-side
c1637e41 714 //
a1ec4d07 715 sectc->AddNode(ch,1);
716 sectc->AddNode(iroc,1,combi1c);
717 sectc->AddNode(oroc,1,combi2c);
c1637e41 718 //
a1ec4d07 719 // now I try to make wheels...
c1637e41 720 //
a1ec4d07 721 TGeoVolumeAssembly *wheela = new TGeoVolumeAssembly("TPC_ENDCAP");
722 TGeoVolumeAssembly *wheelc = new TGeoVolumeAssembly("TPC_ENDCAP");
c1637e41 723 //
724 for(Int_t i =0;i<18;i++){
725 Double_t phi = (20.*i);
726 TGeoRotation *r = new TGeoRotation();
727 r->RotateZ(phi);
a1ec4d07 728 wheela->AddNode(secta,i+1,r);
729 wheelc->AddNode(sectc,i+1,r);
c1637e41 730 }
731 // wheels in the drift volume!
c1637e41 732 TGeoCombiTrans *combi3 = new TGeoCombiTrans("combi3",0.,0.,256.6,ref);
a1ec4d07 733 v9->AddNode(wheela,1,combi3);
734 v9->AddNode(wheelc,2,new TGeoTranslation(0.,0.,-256.6));
c1637e41 735 //_____________________________________________________________
736 // service support wheel
737 //_____________________________________________________________
738 TGeoPgon *sw = new TGeoPgon(0.,20.,1,2);
739 sw->DefineSection(0,-4.,80.5,251.75);
740 sw->DefineSection(1,4.,80.5,251.75);
741 TGeoVolume *swv = new TGeoVolume("TPC_SWSEG",sw,m3); //Al
742 //
743 thick=1.;
d899e254 744 shift = thick/TMath::Sin(openingAngle);
c1637e41 745 TGeoPgon *sh = new TGeoPgon(0.,20.,1,2);
746 sh->DefineSection(0,-4.,81.5-shift,250.75-shift);
747 sh->DefineSection(1,4.,81.5-shift,250.75-shift);
748 TGeoVolume *shv = new TGeoVolume("TPC_SWS1",sh,m1); //Air
749 //
74518339 750 TGeoMedium *m9 = gGeoManager->GetMedium("TPC_Si");
751 TGeoPgon *el = new TGeoPgon(0.,20.,1,2);
752 el->DefineSection(0,-1.872,81.5-shift,250.75-shift);
753 el->DefineSection(1,1.872,81.5-shift,250.75-shift);
754 TGeoVolume *elv = new TGeoVolume("TPC_ELEC",el,m9); //Si
755 //
756 shv->AddNode(elv,1);
757 //
758 //
d899e254 759 ys = shift*TMath::Sin(openingAngle);
760 xs = shift*TMath::Cos(openingAngle);
c1637e41 761 swv->AddNode(shv,1,new TGeoTranslation(xs,ys,0.));
762 // cover
763 TGeoPgon *co = new TGeoPgon(0.,20.,1,2);
764 co->DefineSection(0,-0.5,77.,255.25);
765 co->DefineSection(1,0.5,77.,255.25);
766 TGeoVolume *cov = new TGeoVolume("TPC_SWC1",co,m3);//Al
767 // hole in a cover
768 TGeoPgon *coh = new TGeoPgon(0.,20.,1,2);
d899e254 769 shift=4./TMath::Sin(openingAngle);
c1637e41 770 coh->DefineSection(0,-0.5,85.-shift,247.25-shift);
771 coh->DefineSection(1,0.5,85.-shift,247.25-shift);
772 //
773 TGeoVolume *cohv = new TGeoVolume("TPC_SWC2",coh,m1);
774 //
d899e254 775 ys = shift*TMath::Sin(openingAngle);
776 xs = shift*TMath::Cos(openingAngle);
c1637e41 777 cov->AddNode(cohv,1,new TGeoTranslation(xs,ys,0.));
778 //
779 // Sector as an Assembly
780 //
781 TGeoVolumeAssembly *swhs = new TGeoVolumeAssembly("TPC_SSWSEC");
782 swhs->AddNode(swv,1);
783 swhs->AddNode(cov,1,new TGeoTranslation(0.,0.,-4.5));
784 swhs->AddNode(cov,2,new TGeoTranslation(0.,0.,4.5));
785 //
786 // SSW as an Assembly of sectors
787 //
788 TGeoVolumeAssembly *swheel = new TGeoVolumeAssembly("TPC_SSWHEEL");
789 for(Int_t i =0;i<18;i++){
790 Double_t phi = (20.*i);
791 TGeoRotation *r = new TGeoRotation();
792 r->RotateZ(phi);
793 swheel->AddNode(swhs,i+1,r);
794 }
795 v1->AddNode(swheel,1,new TGeoTranslation(0.,0.,-284.6));
796 v1->AddNode(swheel,2,new TGeoTranslation(0.,0.,284.6));
797 //
37831078 798 //----------------------------------------------------------
799 // TPc Support Rods - MAKROLON
800 //----------------------------------------------------------
c1637e41 801 TGeoMedium *m6=gGeoManager->GetMedium("TPC_Makrolon");
802 TGeoMedium *m7=gGeoManager->GetMedium("TPC_Cu");
78134e48 803 TGeoMedium *m10 = gGeoManager->GetMedium("TPC_Alumina");
804 TGeoMedium *m11 = gGeoManager->GetMedium("TPC_Peek");
805 TGeoMedium *m12 = gGeoManager->GetMedium("TPC_Water");
c1637e41 806 // upper and lower rods differ in length!
807 Double_t *upar;
808 upar=NULL;
809 gGeoManager->Volume("TPC_Rod","TUBE",m6->GetId(),upar);
810 upar=new Double_t [3];
811 upar[0]=1.8;
812 upar[1]=2.2;
813
814 //
815 //HV rods - makrolon + 0.58cm (diameter) Cu
ae4806ca 816 TGeoTube *hvr = new TGeoTube(0.,2.2,126.64);
c1637e41 817 TGeoTube *hvc = new TGeoTube(0.,0.29,126.64);
818 //
819 TGeoVolume *hvrv = new TGeoVolume("TPC_HV_Rod",hvr,m6);
820 TGeoVolume *hvcv = new TGeoVolume("TPC_HV_Cable",hvc,m7);
821 hvrv->AddNode(hvcv,1);
78134e48 822 //
823 // resistor rods
824 //
825 TGeoTube *cri = new TGeoTube(0.,0.45,126.64); //inner
826 TGeoTube *cro = new TGeoTube(0.,0.45,126.54); //outer
827 TGeoTube *cwi = new TGeoTube(0.,0.15,126.64); // water inner
828 TGeoTube *cwo = new TGeoTube(0.,0.15,126.54); // water outer
829 //
830 TGeoVolume *criv = new TGeoVolume("TPC_CR_I",cri,m10);
831 TGeoVolume *crov = new TGeoVolume("TPC_CR_O",cro,m10);
832 TGeoVolume *cwiv = new TGeoVolume("TPC_W_I",cwi,m11);
833 TGeoVolume *cwov = new TGeoVolume("TPC_W_O",cwo,m11);
834 //
835 // ceramic rod with water
836 //
837 criv->AddNode(cwiv,1);
838 crov->AddNode(cwov,1);
839 //
840 TGeoTube *pri =new TGeoTube(0.2,0.35,126.64); //inner
841 TGeoTube *pro = new TGeoTube(0.2,0.35,126.54); //outer
842 //
843 // peek rod
844 //
845 TGeoVolume *priv = new TGeoVolume("TPC_PR_I",pri,m12);
846 TGeoVolume *prov = new TGeoVolume("TPC_PR_O",pro,m12);
847 //
848 // resistor rods assembly
849 //
be53328e 850 TGeoRotation *rotr = new TGeoRotation("rotr");
851 rotr->RotateZ(-21.);
78134e48 852 TGeoTube *rri = new TGeoTube(1.8,2.2,126.64);//inner
853 TGeoTube *rro = new TGeoTube(1.8,2.2,126.54);//inner
854 //
855 TGeoVolume *rriv = new TGeoVolume("TPC_RR_I",rri,m6);
856 TGeoVolume *rrov = new TGeoVolume("TPC_RR_O",rro,m6);
857 //
a3d2be59 858 TGeoVolumeAssembly *rrin = new TGeoVolumeAssembly("TPC_RROD_I");
859 TGeoVolumeAssembly *rrou = new TGeoVolumeAssembly("TPC_RROD_O");
860 rrin->AddNode(rriv,1);
861 rrin->AddNode(criv,1,new TGeoTranslation(0.5,0.866, 0.));
862 rrin->AddNode(criv,2,new TGeoTranslation(0.5,-0.866, 0.));
863 rrin->AddNode(priv,1);
864 //
865 rrou->AddNode(rrov,1);
866 rrou->AddNode(crov,1,new TGeoTranslation(0.5,0.866, 0.));
867 rrou->AddNode(crov,2,new TGeoTranslation(0.5,-0.866, 0.));
868 rrou->AddNode(prov,1);
7281dc07 869 for(Int_t i=0;i<18;i++){
c1637e41 870 Double_t angle,x,y;
871 Double_t z,r;
872 angle=TMath::DegToRad()*20.*(Double_t)i;
873 r=81.5;
874 x=r * TMath::Cos(angle);
875 y=r * TMath::Sin(angle);
876 upar[2]=126.64; //lower
877 z= 126.96;
78134e48 878 if(i==3){
be53328e 879 v9->AddNode(rrin,1,new TGeoCombiTrans(x,y,z,rotr)); //A
880 v9->AddNode(rrin,2,new TGeoCombiTrans(x,y,-z,rotr)); //C
78134e48 881 }
882 else {
883 gGeoManager->Node("TPC_Rod",i+1,"TPC_Drift",x,y,z,0,kTRUE,upar,3);//shaft
884 gGeoManager->Node("TPC_Rod",i+19,"TPC_Drift",x,y,-z,0,kTRUE,upar,3);//muon
c1637e41 885 }
78134e48 886
887
888 //
c1637e41 889 r=254.25;
890 x=r * TMath::Cos(angle);
891 y=r * TMath::Sin(angle);
892 upar[2]=126.54; //upper
893 z=127.06;
78134e48 894 //
895 if(i==15){
5042ab7d 896 //v9->AddNode(hvrv,1,new TGeoTranslation(x,y,z));//A-side only
897 v9->AddNode(hvrv,1,new TGeoTranslation(x,y,127.14));//A-side only
78134e48 898 gGeoManager->Node("TPC_Rod",i+55,"TPC_Drift",x,y,-z,0,kTRUE,upar,3);
899 }
900 else if(i==11){
be53328e 901 v9->AddNode(rrou,1,new TGeoCombiTrans(x,y,z,rotr)); //A
902 v9->AddNode(rrou,2,new TGeoCombiTrans(x,y,-z,rotr)); //C
78134e48 903 }
904 else{
905 //
906 gGeoManager->Node("TPC_Rod",i+37,"TPC_Drift",x,y,z,0,kTRUE,upar,3);
907 gGeoManager->Node("TPC_Rod",i+55,"TPC_Drift",x,y,-z,0,kTRUE,upar,3);
908 }
909
37831078 910 }
911
bde68ab0 912 TGeoVolume *alice = gGeoManager->GetVolume("ALIC");
913 alice->AddNode(v1,1);
914
79575d04 915
1283eee5 916} // end of function
917
fe4da5cc 918
919//_____________________________________________________________________________
920void AliTPCv0::CreateMaterials()
921{
922 //
923 // Define materials for the TPC
924 //
925 AliTPC::CreateMaterials();
926}
927
fe4da5cc 928
929//_____________________________________________________________________________
930void AliTPCv0::Init()
931{
932 //
933 // Initialise Time Projection Chamber version 0
934 //
13a8c8d7 935
936 printf("%s: *** TPC version 0 initialized***\n",ClassName());
937
938 // printf("TPC version 0 initialized\n");
fe4da5cc 939}
940
941//_____________________________________________________________________________
942void AliTPCv0::StepManager()
943{
944 //
945 // Procedure called at each step in the TPC
946 //
947}