1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 ///////////////////////////////////////////////////////////////////////////////
21 // Time Projection Chamber version 3 -- detailed TPC and slow simulation //
25 <img src="picts/AliTPCv3Class.gif">
30 ///////////////////////////////////////////////////////////////////////////////
34 #include <TInterpreter.h>
35 #include <TLorentzVector.h>
37 #include <TVirtualMC.h>
44 #include "AliMathBase.h"
45 #include "AliTPCDigitsArray.h"
46 #include "AliTPCParam.h"
47 #include "AliTPCParamSR.h"
48 #include "AliTPCTrackHitsV2.h"
51 #include "TGeoManager.h"
52 #include "TGeoVolume.h"
58 #include "TGeoCompositeShape.h"
60 #include "TGeoPhysicalNode.h"
61 #include "TGeoHalfSpace.h"
62 #include "TTreeStream.h"
68 //_____________________________________________________________________________
70 AliTPCv3::AliTPCv3():AliTPC(),fIdSens(0)
77 //_____________________________________________________________________________
78 AliTPCv3::AliTPCv3(const char *name, const char *title) :
79 AliTPC(name, title), fIdSens(0)
82 // Standard constructor for Time Projection Chamber version 3
85 SetBufferSize(128000);
88 fTPCParam->Write(fTPCParam->GetTitle());
93 //_____________________________________________________________________________
94 void AliTPCv3::CreateGeometry()
97 // Creation of the TPC coarse geometry (version 3)
98 // The whole drift volume is sensitive
99 // Origin Marek Kowalski Cracow
103 <img src="picts/AliTPCgif">
108 <img src="picts/AliTPCv3Tree.gif">
111 //----------------------------------------------------------
112 // This geometry is written using TGeo class
113 // Firstly the shapes are defined, and only then the volumes
114 // What is recognized by the MC are volumes
115 //----------------------------------------------------------
117 // tpc - this will be the mother volume
121 // here I define a volume TPC
122 // retrive the medium name with "TPC_" as a leading string
124 TGeoPcon *tpc = new TGeoPcon(0.,360.,30); //30 sections
126 tpc->DefineSection(0,-289.6,77.,278.);
127 tpc->DefineSection(1,-262.1,77.,278.);
129 tpc->DefineSection(2,-262.1,83.1,278.);
130 tpc->DefineSection(3,-260.,83.1,278.);
132 tpc->DefineSection(4,-260.,70.,278.);
133 tpc->DefineSection(5,-259.6,70.,278.);
135 tpc->DefineSection(6,-259.6,68.1,278.);
136 tpc->DefineSection(7,-253.6,68.1,278.);
138 tpc->DefineSection(8,-253.6,67.88,278.);//hs
139 tpc->DefineSection(9,-74.0,60.68,278.);// hs
141 tpc->DefineSection(10,-74.0,60.1,278.);
142 tpc->DefineSection(11,-73.3,60.1,278.);
144 tpc->DefineSection(12,-73.3,56.9,278.);
145 tpc->DefineSection(13,-68.5,56.9,278.);
147 tpc->DefineSection(14,-68.5,60.,278.);
148 tpc->DefineSection(15,-64.7,60.,278.);
150 tpc->DefineSection(16,-64.7,56.9,278.);
151 tpc->DefineSection(17,73.3,56.9,278.);
153 tpc->DefineSection(18,73.3,60.1,278.);
154 tpc->DefineSection(19,74.0,60.1,278.);
156 tpc->DefineSection(20,74.0,60.68,278.);// hs
157 tpc->DefineSection(21,253.6,65.38,278.);// hs
159 tpc->DefineSection(22,253.6,65.6,278.);
160 tpc->DefineSection(23,259.6,65.6,278.);
162 tpc->DefineSection(24,259.6,70.0,278.);
163 tpc->DefineSection(25,260.,70.0,278.);
165 tpc->DefineSection(26,260.,83.1,278.);
166 tpc->DefineSection(27,262.1,83.1,278.);
168 tpc->DefineSection(28,262.1,77.,278);
169 tpc->DefineSection(29,289.6,77.,278.);
172 TGeoMedium *m1 = gGeoManager->GetMedium("TPC_Air");
173 TGeoVolume *v1 = new TGeoVolume("TPC_M",tpc,m1);
175 // drift volume - sensitive volume, extended beyond the
176 // endcaps, because of the alignment
178 TGeoPcon *dvol = new TGeoPcon(0.,360.,6);
179 dvol->DefineSection(0,-260.,74.5,264.4);
180 dvol->DefineSection(1,-253.6,74.5,264.4);
182 dvol->DefineSection(2,-253.6,76.6774,258.);
183 dvol->DefineSection(3,253.6,76.6774,258.);
185 dvol->DefineSection(4,253.6,74.5,264.4);
186 dvol->DefineSection(5,260.,74.5,264.4);
188 TGeoMedium *m5 = gGeoManager->GetMedium("TPC_DriftGas2");
189 TGeoVolume *v9 = new TGeoVolume("TPC_Drift",dvol,m5);
195 TGeoPcon *tpco = new TGeoPcon(0.,360.,6); //insulator
197 tpco->DefineSection(0,-256.6,264.8,278.);
198 tpco->DefineSection(1,-253.6,264.8,278.);
200 tpco->DefineSection(2,-253.6,258.,278.);
201 tpco->DefineSection(3,250.6,258.,278.);
203 tpco->DefineSection(4,250.6,258.,275.5);
204 tpco->DefineSection(5,253.6,258.,275.5);
206 TGeoMedium *m2 = gGeoManager->GetMedium("TPC_CO2");
207 TGeoVolume *v2 = new TGeoVolume("TPC_OI",tpco,m2);
209 // outer containment vessel
211 TGeoPcon *tocv = new TGeoPcon(0.,360.,6); // containment vessel
213 tocv->DefineSection(0,-256.6,264.8,278.);
214 tocv->DefineSection(1,-253.6,264.8,278.);
216 tocv->DefineSection(2,-253.6,274.8124,278.);
217 tocv->DefineSection(3,247.6,274.8124,278.);
219 tocv->DefineSection(4,247.6,270.4,278.);
220 tocv->DefineSection(5,250.6,270.4,278.);
222 TGeoMedium *m3 = gGeoManager->GetMedium("TPC_Al");
223 TGeoVolume *v3 = new TGeoVolume("TPC_OCV",tocv,m3);
225 TGeoTube *to1 = new TGeoTube(274.8174,277.995,252.1); //epoxy
226 TGeoTube *to2 = new TGeoTube(274.8274,277.985,252.1); //tedlar
227 TGeoTube *to3 = new TGeoTube(274.8312,277.9812,252.1);//prepreg2
228 TGeoTube *to4 = new TGeoTube(274.9062,277.9062,252.1);//nomex
230 TGeoMedium *sm1 = gGeoManager->GetMedium("TPC_Epoxy");
231 TGeoMedium *sm2 = gGeoManager->GetMedium("TPC_Tedlar");
232 TGeoMedium *sm3 = gGeoManager->GetMedium("TPC_Prepreg2");
233 TGeoMedium *sm4 = gGeoManager->GetMedium("TPC_Nomex");
235 TGeoVolume *tov1 = new TGeoVolume("TPC_OCV1",to1,sm1);
236 TGeoVolume *tov2 = new TGeoVolume("TPC_OCV2",to2,sm2);
237 TGeoVolume *tov3 = new TGeoVolume("TPC_OCV3",to3,sm3);
238 TGeoVolume *tov4 = new TGeoVolume("TPC_OCV4",to4,sm4);
240 TGeoMedium *mhs = gGeoManager->GetMedium("TPC_Steel");
241 TGeoMedium *m12 = gGeoManager->GetMedium("TPC_Water");
242 //-------------------------------------------------------
243 // Tpc Outer Field Cage
244 // daughters - composite (sandwich)
245 //-------------------------------------------------------
247 TGeoPcon *tofc = new TGeoPcon(0.,360.,6);
249 tofc->DefineSection(0,-253.6,258.,269.6);
250 tofc->DefineSection(1,-250.6,258.,269.6);
252 tofc->DefineSection(2,-250.6,258.,260.0676);
253 tofc->DefineSection(3,250.6,258.,260.0676);
255 tofc->DefineSection(4,250.6,258.,275.5);
256 tofc->DefineSection(5,253.6,258.,275.5);
258 TGeoVolume *v4 = new TGeoVolume("TPC_TOFC",tofc,m3);
260 TGeoTube *tf1 = new TGeoTube(258.0,260.0676,252.1); //tedlar
261 TGeoTube *tf2 = new TGeoTube(258.0038,260.0638,252.1); //prepreg3
262 TGeoTube *tf3 = new TGeoTube(258.0338,260.0338,252.1);//nomex
264 TGeoMedium *sm5 = gGeoManager->GetMedium("TPC_Prepreg3");
266 TGeoVolume *tf1v = new TGeoVolume("TPC_OFC1",tf1,sm2);
267 TGeoVolume *tf2v = new TGeoVolume("TPC_OFC2",tf2,sm5);
268 TGeoVolume *tf3v = new TGeoVolume("TPC_OFC3",tf3,sm4);
270 // outer part - positioning
272 tov1->AddNode(tov2,1); tov2->AddNode(tov3,1); tov3->AddNode(tov4,1);
274 tf1v->AddNode(tf2v,1); tf2v->AddNode(tf3v,1);
276 v3->AddNode(tov1,1,new TGeoTranslation(0.,0.,-1.5)); v4->AddNode(tf1v,1);
278 v2->AddNode(v3,1); v2->AddNode(v4,1);
281 //-----------------------------------------------------------
288 //--------------------------------------------------------------------
289 // Tpc Inner INsulator (CO2)
290 // the cones, the central drum and the inner f.c. sandwich with a piece
291 // of the flane will be placed in the TPC
292 //--------------------------------------------------------------------
293 TGeoPcon *tpci = new TGeoPcon(0.,360.,4);
295 tpci->DefineSection(0,-253.6,68.4,76.6774);
296 tpci->DefineSection(1,-74.0,61.2,76.6774);
298 tpci->DefineSection(2,74.0,61.2,76.6774);
300 tpci->DefineSection(3,253.6,65.9,76.6774);
302 TGeoVolume *v5 = new TGeoVolume("TPC_INI",tpci,m2);
304 // now the inner field cage - only part of flanges (2 copies)
306 TGeoTube *tif1 = new TGeoTube(69.9,76.6774,1.5);
307 TGeoVolume *v6 = new TGeoVolume("TPC_IFC1",tif1,m3);
309 //---------------------------------------------------------
310 // Tpc Inner Containment vessel - Muon side
311 //---------------------------------------------------------
312 TGeoPcon *tcms = new TGeoPcon(0.,360.,10);
314 tcms->DefineSection(0,-259.1,68.1,74.2);
315 tcms->DefineSection(1,-253.6,68.1,74.2);
317 tcms->DefineSection(2,-253.6,68.1,68.4);
318 tcms->DefineSection(3,-74.0,60.9,61.2);
320 tcms->DefineSection(4,-74.0,60.1,61.2);
321 tcms->DefineSection(5,-73.3,60.1,61.2);
323 tcms->DefineSection(6,-73.3,56.9,61.2);
324 tcms->DefineSection(7,-73.0,56.9,61.2);
326 tcms->DefineSection(8,-73.0,56.9,58.8);
327 tcms->DefineSection(9,-71.3,56.9,58.8);
329 TGeoVolume *v7 = new TGeoVolume("TPC_ICVM",tcms,m3);
330 //------------------------------------------------
331 // Heat screen muon side
332 //------------------------------------------------
334 TGeoCone *thsm = new TGeoCone(89.8,67.88,68.1,60.68,60.9);
335 TGeoCone *thsmw = new TGeoCone(89.8,67.94,68.04,60.74,60.84);
336 TGeoVolume *hvsm = new TGeoVolume("TPC_HSM",thsm,mhs); //steel
337 TGeoVolume *hvsmw = new TGeoVolume("TPC_HSMW",thsmw,m12); //water
338 // assembly heat screen muon
339 hvsm->AddNode(hvsmw,1);
340 //-----------------------------------------------
341 // inner containment vessel - shaft side
342 //-----------------------------------------------
343 TGeoPcon *tcss = new TGeoPcon(0.,360.,10);
345 tcss->DefineSection(0,71.3,56.9,58.8);
346 tcss->DefineSection(1,73.0,56.9,58.8);
348 tcss->DefineSection(2,73.0,56.9,61.2);
349 tcss->DefineSection(3,73.3,56.9,61.2);
351 tcss->DefineSection(4,73.3,60.1,61.2);
352 tcss->DefineSection(5,74.0,60.1,61.2);
354 tcss->DefineSection(6,74.0,60.9,61.2);
355 tcss->DefineSection(7,253.6,65.6,65.9);
357 tcss->DefineSection(8,253.6,65.6,74.2);
358 tcss->DefineSection(9,258.1,65.6,74.2);
360 TGeoVolume *v8 = new TGeoVolume("TPC_ICVS",tcss,m3);
361 //-------------------------------------------------
362 // Heat screen shaft side
363 //--------------------------------------------------
364 TGeoCone *thss = new TGeoCone(89.8,60.68,60.9,65.38,65.6);
365 TGeoCone *thssw = new TGeoCone(89.8,60.74,60.84,65.44,65.54);
366 TGeoVolume *hvss = new TGeoVolume("TPC_HSS",thss,mhs); //steel
367 TGeoVolume *hvssw = new TGeoVolume("TPC_HSSW",thssw,m12); //water
368 //assembly heat screen shaft
369 hvss->AddNode(hvssw,1);
370 //-----------------------------------------------
372 // define 4 parts and make an assembly
373 //-----------------------------------------------
374 // part1 - Al - 2 copies
375 TGeoTube *t1 = new TGeoTube(76.6774,78.845,0.75);
376 TGeoVolume *tv1 = new TGeoVolume("TPC_IFC2",t1,m3);
377 // sandwich - outermost parts - 2 copies
378 TGeoTube *t2 = new TGeoTube(76.6774,78.845,74.175); // tedlar 38 microns
379 TGeoTube *t3 = new TGeoTube(76.6812,78.8412,74.175); // prepreg2 500 microns
380 TGeoTube *t4 = new TGeoTube(76.7312,78.7912,74.175); // prepreg3 300 microns
381 TGeoTube *t5 = new TGeoTube(76.7612,78.7612,74.175); // nomex 2 cm
383 TGeoVolume *tv2 = new TGeoVolume("TPC_IFC3",t2,sm2);
384 TGeoVolume *tv3 = new TGeoVolume("TPC_IFC4",t3,sm3);
385 TGeoVolume *tv4 = new TGeoVolume("TPC_IFC5",t4,sm5);
386 TGeoVolume *tv5 = new TGeoVolume("TPC_IFC6",t5,sm4);
388 // middle parts - 2 copies
389 TGeoTube *t6 = new TGeoTube(76.6774,78.795,5.); // tedlar 38 microns
390 TGeoTube *t7 = new TGeoTube(76.6812,78.7912,5.); // prepreg2 250 microns
391 TGeoTube *t8 = new TGeoTube(76.7062,78.7662,5.); // prepreg3 300 microns
392 TGeoTube *t9 = new TGeoTube(76.7362,78.7362,5.); // nomex 2 cm
394 TGeoVolume *tv6 = new TGeoVolume("TPC_IFC7",t6,sm2);
395 TGeoVolume *tv7 = new TGeoVolume("TPC_IFC8",t7,sm3);
396 TGeoVolume *tv8 = new TGeoVolume("TPC_IFC9",t8,sm5);
397 TGeoVolume *tv9 = new TGeoVolume("TPC_IFC10",t9,sm4);
398 // central part - 1 copy
399 TGeoTube *t10 = new TGeoTube(76.6774,78.745,93.75); // tedlar 38 microns
400 TGeoTube *t11 = new TGeoTube(76.6812,78.7412,93.75); // prepreg3 300 microns
401 TGeoTube *t12 = new TGeoTube(76.7112,78.7112,93.75); // nomex 2 cm
403 TGeoVolume *tv10 = new TGeoVolume("TPC_IFC11",t10,sm2);
404 TGeoVolume *tv11 = new TGeoVolume("TPC_IFC12",t11,sm5);
405 TGeoVolume *tv12 = new TGeoVolume("TPC_IFC13",t12,sm4);
407 // inner part - positioning
409 // creating a sandwich
410 tv2->AddNode(tv3,1); tv3->AddNode(tv4,1); tv4->AddNode(tv5,1);
412 tv6->AddNode(tv7,1); tv7->AddNode(tv8,1); tv8->AddNode(tv9,1);
414 tv10->AddNode(tv11,1); tv11->AddNode(tv12,1);
416 TGeoVolumeAssembly *tv100 = new TGeoVolumeAssembly("TPC_IFC");
418 tv100->AddNode(tv10,1);
419 tv100->AddNode(tv6,1,new TGeoTranslation(0.,0.,-98.75));
420 tv100->AddNode(tv6,2,new TGeoTranslation(0.,0.,98.75));
421 tv100->AddNode(tv2,1,new TGeoTranslation(0.,0.,-177.925));
422 tv100->AddNode(tv2,2,new TGeoTranslation(0.,0.,177.925));
423 tv100->AddNode(tv1,1,new TGeoTranslation(0.,0.,-252.85));
424 tv100->AddNode(tv1,2,new TGeoTranslation(0.,0.,252.85));
426 v5->AddNode(v6,1, new TGeoTranslation(0.,0.,-252.1));
427 v5->AddNode(v6,2, new TGeoTranslation(0.,0.,252.1));
428 v1->AddNode(v5,1); v1->AddNode(v7,1); v1->AddNode(v8,1);
429 v1->AddNode(hvsm,1,new TGeoTranslation(0.,0.,-163.8));
430 v1->AddNode(hvss,1,new TGeoTranslation(0.,0.,163.8));
431 v9->AddNode(tv100,1);
437 TGeoPcon *cfl = new TGeoPcon(0.,360.,6);
438 cfl->DefineSection(0,-71.1,59.7,61.2);
439 cfl->DefineSection(1,-68.6,59.7,61.2);
441 cfl->DefineSection(2,-68.6,60.6324,61.2);
442 cfl->DefineSection(3,68.6,60.6324,61.2);
444 cfl->DefineSection(4,68.6,59.7,61.2);
445 cfl->DefineSection(5,71.1,59.7,61.2);
447 TGeoVolume *cflv = new TGeoVolume("TPC_CDR",cfl,m3);
449 TGeoTube *cd1 = new TGeoTube(60.6424,61.19,71.1);
450 TGeoTube *cd2 = new TGeoTube(60.6462,61.1862,71.1);
451 TGeoTube *cd3 = new TGeoTube(60.6662,61.1662,71.1);
453 TGeoMedium *sm6 = gGeoManager->GetMedium("TPC_Prepreg1");
454 TGeoVolume *cd1v = new TGeoVolume("TPC_CDR1",cd1,sm2); //tedlar
455 TGeoVolume *cd2v = new TGeoVolume("TPC_CDR2",cd2,sm6);// prepreg1
456 TGeoVolume *cd3v = new TGeoVolume("TPC_CDR3",cd3,sm4); //nomex
458 // seals for central drum 2 copies
460 TGeoTube *cs = new TGeoTube(56.9,61.2,0.1);
461 TGeoMedium *sm7 = gGeoManager->GetMedium("TPC_Mylar");
462 TGeoVolume *csv = new TGeoVolume("TPC_CDRS",cs,sm7);
463 v1->AddNode(csv,1,new TGeoTranslation(0.,0.,-71.2));
464 v1->AddNode(csv,2,new TGeoTranslation(0.,0.,71.2));
467 TGeoPcon *se = new TGeoPcon(0.,360.,6);
468 se->DefineSection(0,-72.8,59.7,61.2);
469 se->DefineSection(1,-72.3,59.7,61.2);
471 se->DefineSection(2,-72.3,58.85,61.2);
472 se->DefineSection(3,-71.6,58.85,61.2);
474 se->DefineSection(4,-71.6,59.7,61.2);
475 se->DefineSection(5,-71.3,59.7,61.2);
477 TGeoVolume *sev = new TGeoVolume("TPC_CDCE",se,m3);
479 TGeoTube *si = new TGeoTube(56.9,58.8,1.);
480 TGeoVolume *siv = new TGeoVolume("TPC_CDCI",si,m3);
482 // define reflection matrix
484 TGeoRotation *ref = new TGeoRotation("ref",90.,0.,90.,90.,180.,0.);
486 cd1v->AddNode(cd2v,1); cd2v->AddNode(cd3v,1); cflv->AddNode(cd1v,1);
488 v1->AddNode(siv,1,new TGeoTranslation(0.,0.,-69.9));
489 v1->AddNode(siv,2,new TGeoTranslation(0.,0.,69.9));
490 v1->AddNode(sev,1); v1->AddNode(sev,2,ref); v1->AddNode(cflv,1);
492 // central membrane - 2 rings and a mylar membrane - assembly
494 TGeoTube *ih = new TGeoTube(81.05,84.05,0.3);
495 TGeoTube *oh = new TGeoTube(250.,256.,.5);
496 TGeoTube *mem = new TGeoTube(84.05,250,0.01);
497 TGeoVolume *ihv = new TGeoVolume("TPC_IHVH",ih,m3);
498 TGeoVolume *ohv = new TGeoVolume("TPC_OHVH",oh,m3);
499 TGeoVolume *memv = new TGeoVolume("TPC_HV",mem,sm7);
501 TGeoVolumeAssembly *cm = new TGeoVolumeAssembly("TPC_HVMEM");
507 // end caps - they are make as an assembly of single segments
508 // containing both readout chambers
510 Double_t openingAngle = 10.*TMath::DegToRad();
511 Double_t thick=1.5; // rib
512 Double_t shift = thick/TMath::Sin(openingAngle);
514 Double_t lowEdge = 86.3; // hole in the wheel
515 Double_t upEdge = 240.4; // hole in the wheel
517 new TGeoTubeSeg("sec",74.5,264.4,3.,0.,20.);
519 TGeoPgon *hole = new TGeoPgon("hole",0.,20.,1,4);
521 hole->DefineSection(0,-3.5,lowEdge-shift,upEdge-shift);
522 hole->DefineSection(1,-1.5,lowEdge-shift,upEdge-shift);
524 hole->DefineSection(2,-1.5,lowEdge-shift,upEdge+3.-shift);
525 hole->DefineSection(3,3.5,lowEdge-shift,upEdge+3.-shift);
527 Double_t ys = shift*TMath::Sin(openingAngle);
528 Double_t xs = shift*TMath::Cos(openingAngle);
529 TGeoTranslation *tr = new TGeoTranslation("tr",xs,ys,0.);
530 tr->RegisterYourself();
531 TGeoCompositeShape *chamber = new TGeoCompositeShape("sec-hole:tr");
532 TGeoVolume *sv = new TGeoVolume("TPC_WSEG",chamber,m3);
533 TGeoPgon *bar = new TGeoPgon("bar",0.,20.,1,2);
534 bar->DefineSection(0,-3.,131.5-shift,136.5-shift);
535 bar->DefineSection(1,1.5,131.5-shift,136.5-shift);
536 TGeoVolume *barv = new TGeoVolume("TPC_WBAR",bar,m3);
537 TGeoVolumeAssembly *ch = new TGeoVolumeAssembly("TPC_WCH");//empty segment
539 ch->AddNode(sv,1); ch->AddNode(barv,1,tr);
545 TGeoTrd1 *ibody = new TGeoTrd1(13.8742,21.3328,4.29,21.15);
546 TGeoVolume *ibdv = new TGeoVolume("TPC_IROCB",ibody,m3);
548 TGeoTrd1 *emp = new TGeoTrd1(12.3742,19.8328,3.99,19.65);
549 TGeoVolume *empv = new TGeoVolume("TPC_IROCE",emp,m1);
550 ibdv->AddNode(empv,1,new TGeoTranslation(0.,-0.3,0.));
552 Double_t tga = (19.8328-12.3742)/39.3;
554 xmin = 9.55*tga+12.3742;
555 xmax = 9.95*tga+12.3742;
556 TGeoTrd1 *ib1 = new TGeoTrd1(xmin,xmax,3.29,0.2);
557 TGeoVolume *ib1v = new TGeoVolume("TPC_IRB1",ib1,m3);
558 empv->AddNode(ib1v,1,new TGeoTranslation("tt1",0.,0.7,-9.9));
559 xmin=19.4*tga+12.3742;
560 xmax=19.9*tga+12.3742;
561 TGeoTrd1 *ib2 = new TGeoTrd1(xmin,xmax,3.29,0.25);
562 TGeoVolume *ib2v = new TGeoVolume("TPC_TRB2",ib2,m3);
563 empv->AddNode(ib2v,1,new TGeoTranslation(0.,0.7,0.));
564 xmin=29.35*tga+12.3742;
565 xmax=29.75*tga+12.3742;
566 TGeoTrd1 *ib3 = new TGeoTrd1(xmin,xmax,3.29,0.2);
567 TGeoVolume *ib3v = new TGeoVolume("TPC_IRB3",ib3,m3);
568 empv->AddNode(ib3v,1,new TGeoTranslation(0.,0.7,9.9));
570 // holes for connectors
572 TGeoBBox *conn = new TGeoBBox(0.4,0.3,4.675); // identical for iroc and oroc
573 TGeoVolume *connv = new TGeoVolume("TPC_RCCON",conn,m1);
574 TString fileName(gSystem->Getenv("ALICE_ROOT"));
575 fileName += "/TPC/conn_iroc.dat";
577 in.open(fileName.Data(), ios_base::in); // asci file
578 for(Int_t i =0;i<86;i++){
583 TGeoRotation *rrr = new TGeoRotation();
585 TGeoCombiTrans *trans = new TGeoCombiTrans("trans",x,y,z,rrr);
586 ibdv->AddNode(connv,i+1,trans);
590 new TGeoTrd1("icap",14.5974,23.3521,1.19,24.825);
592 new TGeoTrd1("ihole",13.8742,21.3328,1.2,21.15);
593 TGeoTranslation *tr1 = new TGeoTranslation("tr1",0.,0.,1.725);
594 tr1->RegisterYourself();
595 TGeoCompositeShape *ic = new TGeoCompositeShape("icap-ihole:tr1");
596 TGeoVolume *icv = new TGeoVolume("TPC_IRCAP",ic,m3);
598 // pad plane and wire fixations
600 TGeoTrd1 *pp = new TGeoTrd1(14.5974,23.3521,0.3,24.825); //pad+iso
601 TGeoMedium *m4 = gGeoManager->GetMedium("TPC_G10");
602 TGeoVolume *ppv = new TGeoVolume("TPC_IRPP",pp,m4);
603 TGeoPara *f1 = new TGeoPara(.6,.5,24.825,0.,-10.,0.);
604 TGeoVolume *f1v = new TGeoVolume("TPC_IRF1",f1,m4);
605 TGeoPara *f2 = new TGeoPara(.6,.5,24.825,0.,10.,0.);
606 TGeoVolume *f2v = new TGeoVolume("TPC_IRF2",f2,m4);
608 TGeoVolumeAssembly *iroc = new TGeoVolumeAssembly("TPC_IROC");
610 iroc->AddNode(ibdv,1);
611 iroc->AddNode(icv,1,new TGeoTranslation(0.,3.1,-1.725));
612 iroc->AddNode(ppv,1,new TGeoTranslation(0.,4.59,-1.725));
613 tga =(23.3521-14.5974)/49.65;
614 Double_t xx = 24.825*tga+14.5974-0.6;
615 iroc->AddNode(f1v,1,new TGeoTranslation(-xx,5.39,-1.725));
616 iroc->AddNode(f2v,1,new TGeoTranslation(xx,5.39,-1.725));
620 TGeoTrd1 *obody = new TGeoTrd1(22.2938,40.5084,4.19,51.65);
621 TGeoVolume *obdv = new TGeoVolume("TPC_OROCB",obody,m3);
622 TGeoTrd1 *oemp = new TGeoTrd1(20.2938,38.5084,3.89,49.65);
623 TGeoVolume *oempv = new TGeoVolume("TPC_OROCE",oemp,m1);
624 obdv->AddNode(oempv,1,new TGeoTranslation(0.,-0.3,0.));
626 tga=(38.5084-20.2938)/99.3;
627 xmin=tga*10.2+20.2938;
628 xmax=tga*10.6+20.2938;
629 TGeoTrd1 *ob1 = new TGeoTrd1(xmin,xmax,2.915,0.2);
630 TGeoVolume *ob1v = new TGeoVolume("TPC_ORB1",ob1,m3);
632 xmin=22.55*tga+20.2938;
633 xmax=24.15*tga+20.2938;
634 TGeoTrd1 *ob2 = new TGeoTrd1(xmin,xmax,2.915,0.8);
635 TGeoVolume *ob2v = new TGeoVolume("TPC_ORB2",ob2,m3);
637 xmin=36.1*tga+20.2938;
638 xmax=36.5*tga+20.2938;
639 TGeoTrd1 *ob3 = new TGeoTrd1(xmin,xmax,2.915,0.2);
640 TGeoVolume *ob3v = new TGeoVolume("TPC_ORB3",ob3,m3);
642 xmin=49.0*tga+20.2938;
643 xmax=50.6*tga+20.2938;
644 TGeoTrd1 *ob4 = new TGeoTrd1(xmin,xmax,2.915,0.8);
645 TGeoVolume *ob4v = new TGeoVolume("TPC_ORB4",ob4,m3);
647 xmin=63.6*tga+20.2938;
648 xmax=64.0*tga+20.2938;
649 TGeoTrd1 *ob5 = new TGeoTrd1(xmin,xmax,2.915,0.2);
650 TGeoVolume *ob5v = new TGeoVolume("TPC_ORB5",ob5,m3);
652 xmin=75.5*tga+20.2938;
653 xmax=77.15*tga+20.2938;
654 TGeoTrd1 *ob6 = new TGeoTrd1(xmin,xmax,2.915,0.8);
655 TGeoVolume *ob6v = new TGeoVolume("TPC_ORB6",ob6,m3);
657 xmin=88.7*tga+20.2938;
658 xmax=89.1*tga+20.2938;
659 TGeoTrd1 *ob7 = new TGeoTrd1(xmin,xmax,2.915,0.2);
660 TGeoVolume *ob7v = new TGeoVolume("TPC_ORB7",ob7,m3);
662 oempv->AddNode(ob1v,1,new TGeoTranslation(0.,0.975,-39.25));
663 oempv->AddNode(ob2v,1,new TGeoTranslation(0.,0.975,-26.3));
664 oempv->AddNode(ob3v,1,new TGeoTranslation(0.,0.975,-13.35));
665 oempv->AddNode(ob4v,1,new TGeoTranslation(0.,0.975,0.15));
666 oempv->AddNode(ob5v,1,new TGeoTranslation(0.,0.975,14.15));
667 oempv->AddNode(ob6v,1,new TGeoTranslation(0.,0.975,26.7));
668 oempv->AddNode(ob7v,1,new TGeoTranslation(0.,0.975,39.25));
670 TGeoBBox *ob8 = new TGeoBBox(0.8,2.915,5.1);
671 TGeoBBox *ob9 = new TGeoBBox(0.8,2.915,5.975);
672 TGeoBBox *ob10 = new TGeoBBox(0.8,2.915,5.775);
673 TGeoBBox *ob11 = new TGeoBBox(0.8,2.915,6.25);
674 TGeoBBox *ob12 = new TGeoBBox(0.8,2.915,6.5);
676 TGeoVolume *ob8v = new TGeoVolume("TPC_ORB8",ob8,m3);
677 TGeoVolume *ob9v = new TGeoVolume("TPC_ORB9",ob9,m3);
678 TGeoVolume *ob10v = new TGeoVolume("TPC_ORB10",ob10,m3);
679 TGeoVolume *ob11v = new TGeoVolume("TPC_ORB11",ob11,m3);
680 TGeoVolume *ob12v = new TGeoVolume("TPC_ORB12",ob12,m3);
682 oempv->AddNode(ob8v,1,new TGeoTranslation(0.,0.975,-44.55));
683 oempv->AddNode(ob8v,2,new TGeoTranslation(0.,0.975,44.55));
684 oempv->AddNode(ob9v,1,new TGeoTranslation(0.,0.975,-33.075));
685 oempv->AddNode(ob9v,2,new TGeoTranslation(0.,0.975,-19.525));
686 oempv->AddNode(ob10v,1,new TGeoTranslation(0.,0.975,20.125));
687 oempv->AddNode(ob10v,2,new TGeoTranslation(0.,0.975,33.275));
688 oempv->AddNode(ob11v,1,new TGeoTranslation(0.,0.975,-6.9));
689 oempv->AddNode(ob12v,1,new TGeoTranslation(0.,0.975,7.45));
691 // holes for connectors
693 fileName = gSystem->Getenv("ALICE_ROOT");
694 fileName += "/TPC/conn_oroc.dat";
695 in.open(fileName.Data(), ios_base::in); // asci file
696 for(Int_t i =0;i<78;i++){
699 Double_t x1,z1,x2,z2;
701 Double_t xr = 4.7*TMath::Sin(ang*TMath::DegToRad());
702 Double_t zr = 4.7*TMath::Cos(ang*TMath::DegToRad());
704 x1=xr+x; x2=-xr+x; z1=zr+z; z2 = -zr+z;
706 TGeoRotation *rr = new TGeoRotation();
710 TGeoCombiTrans *trans1 = new TGeoCombiTrans("trans1",x1,y,z1,rr);
711 TGeoCombiTrans *trans2 = new TGeoCombiTrans("trans2",x2,y,z2,rr);
712 obdv->AddNode(connv,i+1,trans1);
713 obdv->AddNode(connv,i+79,trans2);
717 new TGeoTrd1("ocap",23.3874,43.5239,1.09,57.1);
718 new TGeoTrd1("ohole",22.2938,40.5084,1.09,51.65);
719 TGeoTranslation *tr5 = new TGeoTranslation("tr5",0.,0.,-2.15);
720 tr5->RegisterYourself();
721 TGeoCompositeShape *oc = new TGeoCompositeShape("ocap-ohole:tr5");
722 TGeoVolume *ocv = new TGeoVolume("TPC_ORCAP",oc,m3);
724 // pad plane and wire fixations
726 TGeoTrd1 *opp = new TGeoTrd1(23.3874,43.5239,0.3,57.1);
727 TGeoVolume *oppv = new TGeoVolume("TPC_ORPP",opp,m4);
729 tga=(43.5239-23.3874)/114.2;
730 TGeoPara *f3 = new TGeoPara(.7,.6,57.1,0.,-10.,0.);
731 TGeoPara *f4 = new TGeoPara(.7,.6,57.1,0.,10.,0.);
732 xx = 57.1*tga+23.3874-0.7;
733 TGeoVolume *f3v = new TGeoVolume("TPC_ORF1",f3,m4);
734 TGeoVolume *f4v = new TGeoVolume("TPC_ORF2",f4,m4);
736 TGeoVolumeAssembly *oroc = new TGeoVolumeAssembly("TPC_OROC");
738 oroc->AddNode(obdv,1);
739 oroc->AddNode(ocv,1,new TGeoTranslation(0.,3.1,2.15));
740 oroc->AddNode(oppv,1,new TGeoTranslation(0.,4.49,2.15));
741 oroc->AddNode(f3v,1,new TGeoTranslation(-xx,5.39,2.15));
742 oroc->AddNode(f4v,1,new TGeoTranslation(xx,5.39,2.15));
744 // now iroc and oroc are placed into a sector...
746 TGeoVolumeAssembly *secta = new TGeoVolumeAssembly("TPC_SECT"); // a-side
747 TGeoVolumeAssembly *sectc = new TGeoVolumeAssembly("TPC_SECT"); // c-side
748 TGeoRotation rot1("rot1",90.,90.,0.);
749 TGeoRotation rot2("rot2");
751 TGeoRotation *rot = new TGeoRotation("rot");
755 x0=110.2*TMath::Cos(openingAngle);
756 y0=110.2*TMath::Sin(openingAngle);
757 TGeoCombiTrans *combi1a = new TGeoCombiTrans("combi1",x0,y0,1.09+0.195,rot); //a-side
758 TGeoCombiTrans *combi1c = new TGeoCombiTrans("combi1",x0,y0,1.09+0.222,rot); //c-side
759 x0=188.45*TMath::Cos(openingAngle);
760 y0=188.45*TMath::Sin(openingAngle);
761 TGeoCombiTrans *combi2a = new TGeoCombiTrans("combi2",x0,y0,0.99+0.195,rot); //a-side
762 TGeoCombiTrans *combi2c = new TGeoCombiTrans("combi2",x0,y0,0.99+0.222,rot); //c-side
766 secta->AddNode(ch,1);
767 secta->AddNode(iroc,1,combi1a);
768 secta->AddNode(oroc,1,combi2a);
772 sectc->AddNode(ch,1);
773 sectc->AddNode(iroc,1,combi1c);
774 sectc->AddNode(oroc,1,combi2c);
776 // now I try to make wheels...
778 TGeoVolumeAssembly *wheela = new TGeoVolumeAssembly("TPC_ENDCAP");
779 TGeoVolumeAssembly *wheelc = new TGeoVolumeAssembly("TPC_ENDCAP");
781 for(Int_t i =0;i<18;i++){
782 Double_t phi = (20.*i);
783 TGeoRotation *r = new TGeoRotation();
785 wheela->AddNode(secta,i+1,r);
786 wheelc->AddNode(sectc,i+1,r);
789 // wheels in the drift volume!
790 TGeoCombiTrans *combi3 = new TGeoCombiTrans("combi3",0.,0.,256.6,ref);
791 v9->AddNode(wheela,1,combi3);
792 v9->AddNode(wheelc,2,new TGeoTranslation(0.,0.,-256.6));
794 //_____________________________________________________________
795 // service support wheel
796 //_____________________________________________________________
797 TGeoPgon *sw = new TGeoPgon(0.,20.,1,2);
798 sw->DefineSection(0,-4.,80.5,251.75);
799 sw->DefineSection(1,4.,80.5,251.75);
800 TGeoVolume *swv = new TGeoVolume("TPC_SWSEG",sw,m3); //Al
803 shift = thick/TMath::Sin(openingAngle);
804 TGeoPgon *sh = new TGeoPgon(0.,20.,1,2);
805 sh->DefineSection(0,-4.,81.5-shift,250.75-shift);
806 sh->DefineSection(1,4.,81.5-shift,250.75-shift);
807 TGeoVolume *shv = new TGeoVolume("TPC_SWS1",sh,m1); //Air
809 TGeoMedium *m9 = gGeoManager->GetMedium("TPC_Si");
810 TGeoPgon *el = new TGeoPgon(0.,20.,1,2);
811 el->DefineSection(0,-1.872,81.5-shift,250.75-shift);
812 el->DefineSection(1,1.872,81.5-shift,250.75-shift);
813 TGeoVolume *elv = new TGeoVolume("TPC_ELEC",el,m9); //Si
817 ys = shift*TMath::Sin(openingAngle);
818 xs = shift*TMath::Cos(openingAngle);
819 swv->AddNode(shv,1,new TGeoTranslation(xs,ys,0.));
821 TGeoPgon *co = new TGeoPgon(0.,20.,1,2);
822 co->DefineSection(0,-0.5,77.,255.25);
823 co->DefineSection(1,0.5,77.,255.25);
824 TGeoVolume *cov = new TGeoVolume("TPC_SWC1",co,m3);//Al
826 TGeoPgon *coh = new TGeoPgon(0.,20.,1,2);
827 shift=4./TMath::Sin(openingAngle);
828 coh->DefineSection(0,-0.5,85.-shift,247.25-shift);
829 coh->DefineSection(1,0.5,85.-shift,247.25-shift);
831 TGeoVolume *cohv = new TGeoVolume("TPC_SWC2",coh,m1);
833 ys = shift*TMath::Sin(openingAngle);
834 xs = shift*TMath::Cos(openingAngle);
835 cov->AddNode(cohv,1,new TGeoTranslation(xs,ys,0.));
837 // Sector as an Assembly
839 TGeoVolumeAssembly *swhs = new TGeoVolumeAssembly("TPC_SSWSEC");
840 swhs->AddNode(swv,1);
841 swhs->AddNode(cov,1,new TGeoTranslation(0.,0.,-4.5));
842 swhs->AddNode(cov,2,new TGeoTranslation(0.,0.,4.5));
844 // SSW as an Assembly of sectors
846 TGeoVolumeAssembly *swheel = new TGeoVolumeAssembly("TPC_SSWHEEL");
847 for(Int_t i =0;i<18;i++){
848 Double_t phi = (20.*i);
849 TGeoRotation *r = new TGeoRotation();
851 swheel->AddNode(swhs,i+1,r);
853 v1->AddNode(swheel,1,new TGeoTranslation(0.,0.,-284.6));
854 v1->AddNode(swheel,2,new TGeoTranslation(0.,0.,284.6));
856 //----------------------------------------------------------
857 // TPc Support Rods - MAKROLON
858 //----------------------------------------------------------
859 TGeoMedium *m6=gGeoManager->GetMedium("TPC_Makrolon");
860 TGeoMedium *m7=gGeoManager->GetMedium("TPC_Cu");
861 TGeoMedium *m10 = gGeoManager->GetMedium("TPC_Alumina");
862 TGeoMedium *m11 = gGeoManager->GetMedium("TPC_Peek");
863 TGeoMedium *m13 = gGeoManager->GetMedium("TPC_Brass");
865 // tpc rod is an assembly of 10 long parts and 2 short parts
866 // connected with alu rings and plagged on both sides.
871 TGeoPcon *rod = new TGeoPcon("rod",0.,360.,6);
872 rod->DefineSection(0,-10.43,1.92,2.08);
873 rod->DefineSection(1,-9.75,1.92,2.08);
875 rod->DefineSection(2,-9.75,1.8,2.2);
876 rod->DefineSection(3,9.75,1.8,2.2);
878 rod->DefineSection(4,9.75,1.92,2.08);
879 rod->DefineSection(5,10.43,1.92,2.08);
881 TGeoVolume *mrodl = new TGeoVolume("TPC_mrodl",rod,m6);
885 TGeoPcon *rod1 = new TGeoPcon("rod1",0.,360.,6);
886 rod1->DefineSection(0,-8.93,1.92,2.08);
887 rod1->DefineSection(1,-8.25,1.92,2.08);
889 rod1->DefineSection(2,-8.25,1.8,2.2);
890 rod1->DefineSection(3,8.25,1.8,2.2);
892 rod1->DefineSection(4,8.25,1.92,2.08);
893 rod1->DefineSection(5,8.93,1.92,2.08);
895 TGeoVolume *mrods = new TGeoVolume("TPC_mrods",rod1,m6);
897 // below is for the resistor rod
899 // hole for the brass connectors
902 new TGeoTube("hhole",0.,0.3,0.3);
904 //transformations for holes - initialy they
905 // are placed at x=0 and negative y
907 TGeoRotation *rhole = new TGeoRotation();
909 TGeoCombiTrans *transf[13];
911 for(Int_t i=0;i<13;i++){
912 //sprintf(name,"transf%d",i);
913 snprintf(name,30,"transf%d",i);
914 transf[i]= new TGeoCombiTrans(name,0.,-2.,-9.+i*1.5,rhole);
915 transf[i]->RegisterYourself();
917 // union expression for holes
918 TString operl("hhole:transf0");
919 for (Int_t i=1;i<13;i++){
920 //sprintf(name,"+hhole:transf%d",i);
921 snprintf(name,30,"+hhole:transf%d",i);
925 TString opers("hhole:transf1");
926 for (Int_t i=2;i<12;i++){
927 //sprintf(name,"+hhole:transf%d",i);
928 snprintf(name,30,"+hhole:transf%d",i);
932 new TGeoCompositeShape("hlv",operl.Data());
933 new TGeoCompositeShape("hsv",opers.Data());
935 TGeoCompositeShape *rodl = new TGeoCompositeShape("rodl","rod-hlv");
936 TGeoCompositeShape *rods = new TGeoCompositeShape("rods","rod1-hsv");
937 //rods - volumes - makrolon rods with holes
938 TGeoVolume *rodlv = new TGeoVolume("TPC_rodl",rodl,m6);
939 TGeoVolume *rodsv = new TGeoVolume("TPC_rods",rods,m6);
942 TGeoTube *bcon = new TGeoTube(0.,0.3,0.3);//connectors
943 TGeoVolume *bconv = new TGeoVolume("TPC_bcon",bcon,m13);
945 // hooks holding strips
947 new TGeoBBox("hk1",0.625,0.015,0.75);
948 new TGeoBBox("hk2",0.625,0.015,0.15);
949 TGeoTranslation *tr21 = new TGeoTranslation("tr21",0.,-0.03,-0.6);
950 TGeoTranslation *tr12 = new TGeoTranslation("tr12",0.,-0.03,0.6);
951 tr21->RegisterYourself();
952 tr12->RegisterYourself();
954 TGeoCompositeShape *hook = new TGeoCompositeShape("hook","hk1+hk2:tr21+hk2:tr12");
955 TGeoVolume *hookv = new TGeoVolume("TPC_hook",hook,m13);
957 // assembly of the short rod with connectors and hooks
962 TGeoVolumeAssembly *spart = new TGeoVolumeAssembly("TPC_spart");
964 spart->AddNode( rodsv,1);
965 for(Int_t i=1;i<12;i++){
966 spart->AddNode(bconv,i,transf[i]);
968 for(Int_t i =0;i<11;i++){
969 spart->AddNode(hookv,i+1,new TGeoTranslation(0.,-2.315,-7.5+i*1.5));
974 TGeoVolumeAssembly *lpart = new TGeoVolumeAssembly("TPC_lpart");
976 lpart->AddNode( rodlv,1);
977 for(Int_t i=0;i<13;i++){
978 lpart->AddNode(bconv,i+12,transf[i]);
980 for(Int_t i =0;i<13;i++){
981 lpart->AddNode(hookv,i+12,new TGeoTranslation(0.,-2.315,-9.+i*1.5));
986 new TGeoTube("ring1",2.1075,2.235,0.53);
987 new TGeoTube("ring2",1.7925,1.89,0.43);
988 new TGeoTube("ring3",1.89,2.1075,0.05);
989 TGeoCompositeShape *ring = new TGeoCompositeShape("ring","ring1+ring2+ring3");
990 TGeoVolume *ringv = new TGeoVolume("TPC_ring",ring,m3);
994 TGeoVolumeAssembly *tpcrrod = new TGeoVolumeAssembly("TPC_rrod");//rrod
995 TGeoVolumeAssembly *tpcmrod = new TGeoVolumeAssembly("TPC_mrod");//makrolon rod
997 for(Int_t i=0;i<11;i++){
998 tpcrrod->AddNode(ringv,i+1,new TGeoTranslation(0.,0.,-105.+i*21));
999 tpcmrod->AddNode(ringv,i+12,new TGeoTranslation(0.,0.,-105.+i*21));
1001 for(Int_t i=0;i<10;i++){
1002 tpcrrod->AddNode(lpart,i+1,new TGeoTranslation(0.,0.,-94.5+i*21));//resistor rod
1003 tpcmrod->AddNode(mrodl,i+1,new TGeoTranslation(0.,0.,-94.5+i*21));//makrolon rod
1006 // right plug - identical for all rods
1008 TGeoPcon *tpcrp = new TGeoPcon(0.,360.,6);
1010 tpcrp->DefineSection(0,123.05,1.89,2.1075);
1011 tpcrp->DefineSection(1,123.59,1.89,2.1075);
1013 tpcrp->DefineSection(2,123.59,1.8,2.2);
1014 tpcrp->DefineSection(3,127.,1.8,2.2);
1016 tpcrp->DefineSection(4,127.,0.,2.2);
1017 tpcrp->DefineSection(5,127.5,0.,2.2);
1019 TGeoVolume *tpcrpv = new TGeoVolume("TPC_RP",tpcrp,m6);
1021 // adding short pieces and right plug
1023 tpcrrod->AddNode(spart,1,new TGeoTranslation(0.,0.,-114.));
1024 tpcrrod->AddNode(spart,2,new TGeoTranslation(0.,0.,114.));
1025 tpcrrod->AddNode(ringv,23,new TGeoTranslation(0.,0.,-123.));
1026 tpcrrod->AddNode(ringv,24,new TGeoTranslation(0.,0.,123.));
1027 tpcrrod->AddNode(tpcrpv,1);
1029 tpcmrod->AddNode(mrods,1,new TGeoTranslation(0.,0.,-114.));
1030 tpcmrod->AddNode(mrods,2,new TGeoTranslation(0.,0.,114.));
1031 tpcmrod->AddNode(ringv,25,new TGeoTranslation(0.,0.,-123.));
1032 tpcmrod->AddNode(ringv,26,new TGeoTranslation(0.,0.,123.));
1033 tpcmrod->AddNode(tpcrpv,2);
1035 // from the ringv position to the CM is 3.0 cm!
1036 //----------------------------------------
1039 //HV rods - makrolon + 0.58cm (diameter) Cu ->check the length
1040 TGeoTube *hvr = new TGeoTube(0.,1.465,123.);
1041 TGeoTube *hvc = new TGeoTube(0.,0.29,123.);
1043 TGeoVolume *hvrv = new TGeoVolume("TPC_HV_Rod",hvr,m6);
1044 TGeoVolume *hvcv = new TGeoVolume("TPC_HV_Cable",hvc,m7);
1045 hvrv->AddNode(hvcv,1);
1049 TGeoTube *cr = new TGeoTube(0.,0.45,123.);
1050 TGeoTube *cw = new TGeoTube(0.,0.15,123.);
1051 TGeoVolume *crv = new TGeoVolume("TPC_CR",cr,m10);
1052 TGeoVolume *cwv = new TGeoVolume("TPC_W",cw,m12);
1054 // ceramic rod with water
1056 crv->AddNode(cwv,1);
1060 TGeoTube *pr =new TGeoTube(0.2,0.35,123.);
1061 TGeoVolume *prv = new TGeoVolume("TPC_PR",pr,m11);
1063 // copper plates with connectors
1065 new TGeoTube("tub",0.,1.7,0.025);
1067 // half space - points on the plane and a normal vector
1070 Double_t slope = TMath::Tan(22.*TMath::DegToRad());
1071 Double_t intp = 1.245;
1073 Double_t b = slope*slope+1.;
1082 norm=TMath::Sqrt(n[0]*n[0]+n[1]*n[1]);
1086 new TGeoHalfSpace("sp1",p,n);
1095 norm=TMath::Sqrt(n[0]*n[0]+n[1]*n[1]);
1099 new TGeoHalfSpace("sp2",p,n);
1102 new TGeoTube("h1",0.,0.5,0.025);
1103 new TGeoTube("h2",0.,0.35,0.025);
1105 TGeoTranslation *ttr11 = new TGeoTranslation("ttr11",-0.866,0.5,0.);
1106 TGeoTranslation *ttr22 = new TGeoTranslation("ttr22",0.866,0.5,0.);
1107 ttr11->RegisterYourself();
1108 ttr22->RegisterYourself();
1109 // elastic connector
1110 new TGeoBBox("elcon",0.72,0.005,0.3);
1111 TGeoRotation *crr1 = new TGeoRotation();
1112 crr1->RotateZ(-22.);
1113 TGeoCombiTrans *ctr1 = new TGeoCombiTrans("ctr1",-0.36011, -1.09951,-0.325,crr1);
1114 ctr1->RegisterYourself();
1115 TGeoCompositeShape *cs1 = new TGeoCompositeShape("cs1",
1116 "(((((tub-h1:ttr11)-h1:ttr22)-sp1)-sp2)-h2)+elcon:ctr1");
1118 TGeoVolume *csvv = new TGeoVolume("TPC_RR_CU",cs1,m7);
1120 // resistor rod assembly 2 ceramic rods, peak rod, Cu plates
1123 TGeoVolumeAssembly *rrod = new TGeoVolumeAssembly("TPC_RRIN");
1125 rrod->AddNode(crv,1,ttr11);
1126 rrod->AddNode(crv,2,ttr22);
1127 rrod->AddNode(prv,1);
1129 for(Int_t i=0;i<165;i++){
1130 rrod->AddNode(csvv,i+1,new TGeoTranslation(0.,0.,-122.675+i*1.5));
1133 TGeoTube *res = new TGeoTube(0.,0.15,0.5);
1134 TGeoVolume *resv = new TGeoVolume("TPC_RES",res,m10);
1135 TGeoVolumeAssembly *ress = new TGeoVolumeAssembly("TPC_RES_CH");
1136 ress->AddNode(resv,1,new TGeoTranslation(0.2,0.,0.));
1137 ress->AddNode(resv,2,new TGeoTranslation(-0.2,0.,0.));
1139 TGeoRotation *crr2 = new TGeoRotation();
1141 TGeoRotation *crr3 = new TGeoRotation();
1142 crr3->RotateY(-30.);
1144 for(Int_t i=0;i<164;i+=2){
1145 rrod->AddNode(ress,i+1, new TGeoCombiTrans(0.,1.2,-121.925+i*1.5,crr2));
1146 rrod->AddNode(ress,i+2, new TGeoCombiTrans(0.,1.2,-121.925+(i+1)*1.5,crr3));
1149 tpcrrod->AddNode(rrod,1,new TGeoCombiTrans(0.,0.,0.5,crr1));
1151 // rod left head with holders - inner
1153 // first element - support for inner holder TPC_IHS
1154 Double_t shift1[3] = {0.0,-0.175,0.0};
1156 new TGeoBBox("tpcihs1", 4.7, 0.66, 2.35);
1157 new TGeoBBox("tpcihs2", 4.7, 0.485, 1.0, shift1);
1158 new TGeoBBox("tpcihs3", 1.5, 0.485, 2.35, shift1);
1159 new TGeoTube("tpcihs4", 0.0, 2.38, 0.1);
1161 Double_t pointstrap[16];
1165 pointstrap[3]= 1.08;
1167 pointstrap[5]= 1.08;
1168 pointstrap[6]= 3.38;
1172 pointstrap[10]= 0.0;
1173 pointstrap[11]= 1.08;
1174 pointstrap[12]= 2.3;
1175 pointstrap[13]= 1.08;
1176 pointstrap[14]= 3.38;
1177 pointstrap[15]= 0.0;
1179 TGeoArb8 *tpcihs5 = new TGeoArb8("tpcihs5", 0.6, pointstrap);
1181 // half space - cutting "legs"
1191 new TGeoHalfSpace("cutil1", p, n);
1196 TGeoTranslation *trans2 = new TGeoTranslation("trans2", 0.0, 2.84, 2.25);
1197 trans2->RegisterYourself();
1198 TGeoTranslation*trans3= new TGeoTranslation("trans3", 0.0, 2.84, -2.25);
1199 trans3->RegisterYourself();
1200 //support - composite volume
1202 TGeoCompositeShape *tpcihs6 = new TGeoCompositeShape("tpcihs6", "tpcihs1-(tpcihs2+tpcihs3)-(tpcihs4:trans2)-(tpcihs4:trans3)-cutil1");
1204 // volumes - all makrolon
1206 TGeoVolume *tpcihss = new TGeoVolume("TPC_IHSS", tpcihs6, m6); //support
1207 TGeoVolume *tpcihst = new TGeoVolume("TPC_IHSTR",tpcihs5 , m6); //trapesoid
1209 TGeoRotation *rot111 = new TGeoRotation();
1210 rot111->RotateY(180.0);
1212 TGeoVolumeAssembly *tpcihs = new TGeoVolumeAssembly("TPC_IHS"); // assembly of the support
1213 tpcihs->AddNode(tpcihss, 1);
1214 tpcihs->AddNode(tpcihst, 1, new TGeoTranslation(-4.7, 0.66, 0.0));
1215 tpcihs->AddNode(tpcihst, 2, new TGeoCombiTrans(4.7, 0.66, 0.0, rot111));
1217 // two rod holders (TPC_IRH) assembled with the support
1219 new TGeoBBox("tpcirh1", 4.7, 1.33, 0.5);
1223 new TGeoBBox("tpcirh2", 1.05, 0.8, 0.5, shift1);
1227 new TGeoBBox("tpcirh3", 1.05, 0.8, 0.5, shift1);
1231 new TGeoBBox("tpcirh4", 1.9, 0.25, 0.5, shift1);
1232 new TGeoTube("tpcirh5", 0, 1.9, 5);
1234 TGeoTranslation *trans4 = new TGeoTranslation("trans4", 0, 0.83, 0.0);
1235 trans4->RegisterYourself();
1237 TGeoCompositeShape *tpcirh6 = new TGeoCompositeShape("tpcirh6", "tpcirh1-tpcirh2-tpcirh3-(tpcirh5:trans4)-tpcirh4");
1241 TGeoVolume *tpcirh = new TGeoVolume("TPC_IRH", tpcirh6, m6);
1243 // and all together...
1245 TGeoVolume *tpciclamp = new TGeoVolumeAssembly("TPC_ICLP");
1246 tpciclamp->AddNode(tpcihs, 1);
1247 tpciclamp->AddNode(tpcirh, 1, new TGeoTranslation(0, 1.99, 1.1));
1248 tpciclamp->AddNode(tpcirh, 2, new TGeoTranslation(0, 1.99, -1.1));
1250 // and now left inner "head"
1252 TGeoPcon *inplug = new TGeoPcon("inplug", 0.0, 360.0, 14);
1254 inplug->DefineSection(0, 0.3, 0.0, 2.2);
1255 inplug->DefineSection(1, 0.6, 0.0, 2.2);
1257 inplug->DefineSection(2, 0.6, 0.0, 1.75);
1258 inplug->DefineSection(3, 0.7, 0.0, 1.75);
1260 inplug->DefineSection(4, 0.7, 1.55, 1.75);
1261 inplug->DefineSection(5, 1.6, 1.55, 1.75);
1263 inplug->DefineSection(6, 1.6, 1.55, 2.2);
1264 inplug->DefineSection(7, 1.875, 1.55, 2.2);
1266 inplug->DefineSection(8, 1.875, 1.55, 2.2);
1267 inplug->DefineSection(9, 2.47, 1.75, 2.2);
1269 inplug->DefineSection(10, 2.47, 1.75, 2.08);
1270 inplug->DefineSection(11, 2.57, 1.8, 2.08);
1272 inplug->DefineSection(12, 2.57, 1.92, 2.08);
1273 inplug->DefineSection(13, 2.95, 1.92, 2.08);
1279 new TGeoBBox("pcuti", 1.5, 0.11, 1.075, shift1);
1281 TGeoCompositeShape *inplleft = new TGeoCompositeShape("inplleft", "inplug-pcuti");
1282 TGeoVolume *tpcinlplug = new TGeoVolume("TPC_INPLL", inplleft, m6);
1286 TGeoVolume *tpcihpl = new TGeoVolumeAssembly("TPC_IHPL"); //holder+2 plugs (reflected)
1287 tpcihpl->AddNode(tpcinlplug, 1);
1288 tpcihpl->AddNode(tpcinlplug, 2,ref);
1289 tpcihpl->AddNode(tpciclamp,1,new TGeoTranslation(0.0, -2.765, 0.0));
1291 // outer holders and clamps
1294 // outer membrane holder (between rods)
1300 pointstrap[5]= 2.8-3.1*TMath::Tan(15.*TMath::DegToRad());
1305 pointstrap[10]= 0.0;
1306 pointstrap[11]= 2.8;
1307 pointstrap[12]= 3.1;
1308 pointstrap[13]= 2.8-3.1*TMath::Tan(15.*TMath::DegToRad());
1309 pointstrap[14]= 3.1;
1310 pointstrap[15]= 0.0;
1312 TGeoArb8 *tpcomh1 = new TGeoArb8("tpcomh1", 1.05, pointstrap);
1313 TGeoBBox *tpcomh2 = new TGeoBBox("tpcomh2", 0.8, 1.4, 6);
1315 TGeoVolume *tpcomh1v = new TGeoVolume("TPC_OMH1", tpcomh1, m7);
1316 TGeoVolume *tpcomh2v = new TGeoVolume("TPC_OMH2", tpcomh2, m7);
1318 TGeoVolume *tpcomh3v = new TGeoVolumeAssembly("TPC_OMH3"); // assembly1
1319 tpcomh3v->AddNode(tpcomh1v, 1, new TGeoTranslation(0.8, -1.4, 4.95));
1320 tpcomh3v->AddNode(tpcomh1v, 2, new TGeoTranslation(0.8, -1.4, -4.95));
1321 tpcomh3v->AddNode(tpcomh2v, 1);
1327 new TGeoBBox("tpcomh3", 1.65, 1.15, 3.4);
1328 TGeoBBox *tpcomh4 = new TGeoBBox("tpcomh4", 0.75, 0.7, 3.4, shift1);
1337 n[1] = -1.0*TMath::Tan(30.*TMath::DegToRad());
1340 new TGeoHalfSpace("cutomh1", p, n);
1349 n[1] = -1.0*TMath::Tan(30.*TMath::DegToRad());
1352 new TGeoHalfSpace("cutomh2", p, n);
1360 n[0] = 1.0*TMath::Tan(75.*TMath::DegToRad());
1364 new TGeoHalfSpace("cutomh3", p, n);
1372 n[0] = 1.0*TMath::Tan(75*TMath::DegToRad());
1376 new TGeoHalfSpace("cutomh4", p, n);
1385 n[1] = -1.0*TMath::Tan(20.*TMath::DegToRad());
1388 new TGeoHalfSpace("cutomh5", p, n);
1390 TGeoCompositeShape *tpcomh5 = new TGeoCompositeShape("tpcomh5", "tpcomh3-cutomh1-cutomh2-cutomh3-cutomh4-cutomh5");
1392 TGeoVolume *tpcomh5v = new TGeoVolume("TPC_OMH5",tpcomh5,m6);
1393 TGeoVolume *tpcomh4v = new TGeoVolume("TPC_OMH6",tpcomh4,m6);
1395 TGeoVolumeAssembly *tpcomh7v = new TGeoVolumeAssembly("TPC_OMH7");
1396 tpcomh7v->AddNode(tpcomh5v,1);
1397 tpcomh7v->AddNode(tpcomh4v,1);
1399 // full membrane holder - tpcomh3v + tpcomh7v
1401 TGeoVolumeAssembly *tpcomh = new TGeoVolumeAssembly("TPC_OMH");
1402 tpcomh->AddNode(tpcomh3v,1,new TGeoTranslation(1.5,0.,0.));
1403 tpcomh->AddNode(tpcomh3v,2,new TGeoCombiTrans(-1.5,0.,0.,rot111));
1404 tpcomh->AddNode(tpcomh7v,1,new TGeoTranslation(0.65+1.5, 2.55, 0.0));
1405 tpcomh->AddNode(tpcomh7v,2,new TGeoCombiTrans(-0.65-1.5, 2.55, 0.0,rot111));
1407 // outer rod holder support
1409 new TGeoBBox("tpcohs1", 3.8, 0.675, 2.35);
1415 new TGeoBBox("tpcohs2", 1.5, 0.5, 2.35, shift1);
1416 new TGeoBBox("tpcohs3", 3.8, 0.5, 0.85, shift1);
1422 TGeoBBox *tpcohs4 = new TGeoBBox("tpsohs4", 3.1, 0.5, 0.7, shift1);
1424 TGeoVolume *tpcohs4v = new TGeoVolume("TPC_OHS4", tpcohs4, m6);
1434 new TGeoHalfSpace("cutohs1", p, n);
1436 TGeoCompositeShape *tpcohs5 = new TGeoCompositeShape("tpcohs5", "tpcohs1-tpcohs2-tpcohs3-cutohs1");
1437 TGeoVolume *tpcohs5v = new TGeoVolume("TPC_OHS5", tpcohs5, m6);
1439 TGeoVolumeAssembly *tpcohs = new TGeoVolumeAssembly("TPC_OHS");
1440 tpcohs->AddNode(tpcohs5v, 1);
1441 tpcohs->AddNode(tpcohs4v, 1);
1443 // outer rod holder itself
1448 new TGeoBBox("tpcorh1", 3.1, 1.825, 0.55); //from this box we cut pieces...
1454 new TGeoBBox("tpcorh2", 0.5, 2.75, 1.1, shift1);
1460 new TGeoBBox("tpcorh3", 0.5, 2.75, 1.1, shift1);
1466 new TGeoBBox("tpcorh4", 3.9, 2.75, 0.5, shift1);
1472 new TGeoBBox("tpcorh5", 1.95, 0.5, 1.1, shift1);
1478 new TGeoBBox("tpcorh6", 2.4, 0.5, 0.6, shift1);
1480 new TGeoTube("tpcorh7", 0, 1.95, 0.85);
1481 new TGeoTube("tpcorh8", 0, 2.4, 0.6);
1483 TGeoTranslation *trans33 = new TGeoTranslation("trans33", 0.0, 0.0, 0.55);
1484 trans33->RegisterYourself();
1486 TGeoCompositeShape *tpcorh9 = new TGeoCompositeShape("tpcorh9", "tpcorh1-tpcorh2-tpcorh3-tpcorh4-tpcorh5-tpcorh6-(tpcorh8:trans33)-tpcorh7");
1488 TGeoVolume *tpcorh9v = new TGeoVolume("TPC_ORH",tpcorh9,m6); //outer rod holder
1490 // now 2 holders together
1492 TGeoVolumeAssembly *tpcorh = new TGeoVolumeAssembly("TPC_ORH2");
1494 tpcorh->AddNode(tpcorh9v,1,new TGeoTranslation(0.0, 0.0, 1.25));
1495 tpcorh->AddNode(tpcorh9v,2,new TGeoCombiTrans(0.0, 0.0, -1.25,rot111));
1497 // outer rod plug left
1499 TGeoPcon *outplug = new TGeoPcon("outplug", 0.0, 360.0, 14);
1501 outplug->DefineSection(0, 0.5, 0.0, 2.2);
1502 outplug->DefineSection(1, 0.7, 0.0, 2.2);
1504 outplug->DefineSection(2, 0.7, 1.55, 2.2);
1505 outplug->DefineSection(3, 0.8, 1.55, 2.2);
1507 outplug->DefineSection(4, 0.8, 1.55, 1.75);
1508 outplug->DefineSection(5, 1.2, 1.55, 1.75);
1510 outplug->DefineSection(6, 1.2, 1.55, 2.2);
1511 outplug->DefineSection(7, 1.875, 1.55, 2.2);
1513 outplug->DefineSection(8, 1.875, 1.55, 2.2);
1514 outplug->DefineSection(9, 2.47, 1.75, 2.2);
1516 outplug->DefineSection(10, 2.47, 1.75, 2.08);
1517 outplug->DefineSection(11, 2.57, 1.8, 2.08);
1519 outplug->DefineSection(12, 2.57, 1.92, 2.08);
1520 outplug->DefineSection(13, 2.95, 1.92, 2.08);
1526 new TGeoBBox("cutout", 2.5, 0.11, 1.01, shift1);
1529 TGeoCompositeShape *outplleft = new TGeoCompositeShape("outplleft", "outplug-cutout");
1530 TGeoVolume *outplleftv = new TGeoVolume("TPC_OPLL", outplleft, m6);
1532 // support + holder + plug
1536 TGeoVolumeAssembly *tpcohpl = new TGeoVolumeAssembly("TPC_OHPL");
1538 tpcohpl->AddNode(outplleftv,1); //plug
1539 tpcohpl->AddNode(outplleftv,2,ref); //plug reflected
1540 tpcohpl->AddNode(tpcorh,1); //rod holder
1541 tpcohpl->AddNode(tpcohs,1,new TGeoTranslation(0.0, 3.925, 0)); // support
1545 // main membrane holder
1552 pointstrap[5]= 1.96;
1557 pointstrap[10]= 0.0;
1558 pointstrap[11]= 2.8;
1559 pointstrap[12]= 3.1;
1560 pointstrap[13]= 1.96;
1561 pointstrap[14]= 3.1;
1562 pointstrap[15]= 0.0;
1564 TGeoArb8 *tpcmmh1 = new TGeoArb8("tpcmmh1", 1.75, pointstrap);
1565 TGeoBBox *tpcmmh2 = new TGeoBBox("tpcmmh2", 0.8, 1.4, 12.5);
1567 TGeoVolume *tpcmmh1v = new TGeoVolume("TPC_MMH1", tpcmmh1, m6);
1568 TGeoVolume *tpcmmh2v = new TGeoVolume("TPC_MMH2", tpcmmh2, m6);
1570 TGeoVolumeAssembly *tpcmmhs = new TGeoVolumeAssembly("TPC_MMHS");
1571 tpcmmhs->AddNode(tpcmmh1v,1,new TGeoTranslation(0.8, -1.4, 10.75));
1572 tpcmmhs->AddNode(tpcmmh1v,2,new TGeoTranslation(0.8, -1.4, -10.75));
1573 tpcmmhs->AddNode(tpcmmh2v,1);
1575 // main membrahe holder clamp
1581 new TGeoBBox("tpcmmhc1", 1.65, 1.85, 8.9);
1582 new TGeoBBox("tpcmmhc2", 0.9, 0.7, 8.9, shift1);
1584 // half spaces - cuts
1592 n[2] = 8.0*TMath::Tan(13.*TMath::DegToRad());
1594 new TGeoHalfSpace("cutmmh1", p, n);
1602 n[2] = -8.0*TMath::Tan(13.*TMath::DegToRad());
1604 new TGeoHalfSpace("cutmmh2", p, n);
1612 n[2] = 6.1*TMath::Tan(20.*TMath::DegToRad());
1614 new TGeoHalfSpace("cutmmh3", p, n);
1622 n[2] = -6.1*TMath::Tan(20*TMath::DegToRad());
1624 new TGeoHalfSpace("cutmmh4", p, n);
1630 n[0] = 2.4*TMath::Tan(30*TMath::DegToRad());
1634 new TGeoHalfSpace("cutmmh5", p, n);
1640 n[0] = 2.4*TMath::Tan(30*TMath::DegToRad());
1644 new TGeoHalfSpace("cutmmh6", p, n);
1646 TGeoCompositeShape *tpcmmhc = new TGeoCompositeShape("TPC_MMHC", "tpcmmhc1-tpcmmhc2-cutmmh1-cutmmh2-cutmmh3-cutmmh4-cutmmh5-cutmmh6");
1648 TGeoVolume *tpcmmhcv = new TGeoVolume("TPC_MMHC",tpcmmhc,m6);
1650 TGeoVolume *tpcmmh = new TGeoVolumeAssembly("TPC_MMH");
1652 tpcmmh->AddNode(tpcmmhcv,1,new TGeoTranslation(0.65+1.5, 1.85, 0.0));
1653 tpcmmh->AddNode(tpcmmhcv,2,new TGeoCombiTrans(-0.65-1.5, 1.85, 0.0,rot111));
1654 tpcmmh->AddNode(tpcmmhs,1,new TGeoTranslation(1.5, 0.0, 0.0));
1655 tpcmmh->AddNode(tpcmmhs,2,new TGeoCombiTrans(-1.5, 0.0, 0.0,rot111));
1660 //--------------------------------------------
1662 // guard ring resistor chain
1665 TGeoTube *gres1 = new TGeoTube(0.,0.375,125.);// inside ifc
1667 TGeoVolume *vgres1 = new TGeoVolume("TPC_GRES1",gres1,m10);
1672 xrc=79.3*TMath::Cos(350.*TMath::DegToRad());
1673 yrc=79.3*TMath::Sin(350.*TMath::DegToRad());
1675 v9->AddNode(vgres1,1,new TGeoTranslation(xrc,yrc,126.9));
1676 v9->AddNode(vgres1,2,new TGeoTranslation(xrc,yrc,-126.9));
1678 xrc=79.3*TMath::Cos(190.*TMath::DegToRad());
1679 yrc=79.3*TMath::Sin(190.*TMath::DegToRad());
1681 v9->AddNode(vgres1,3,new TGeoTranslation(xrc,yrc,126.9));
1682 v9->AddNode(vgres1,4,new TGeoTranslation(xrc,yrc,-126.9));
1683 //------------------------------------------------------------------
1684 TGeoRotation refl("refl",90.,0.,90.,90.,180.,0.);
1685 TGeoRotation rotrod("rotrod");
1687 TGeoRotation *rotpos[2];
1689 TGeoRotation *rotrod1[2];
1694 TGeoRotation rot102("rot102");
1695 rot102.RotateY(-90.);
1697 for(Int_t i=0;i<18;i++){
1700 angle=TMath::DegToRad()*20.*(Double_t)i;
1703 x=r * TMath::Cos(angle);
1704 y=r * TMath::Sin(angle);
1706 TGeoRotation *rot12 = new TGeoRotation();
1707 rot12->RotateZ(-90.0+i*20.);
1708 v9->AddNode(tpcihpl,i+1,new TGeoCombiTrans(x, y, 0., rot12));
1710 if(i==11){//resistor rod inner
1711 rotrod.RotateZ(-90.+angle);
1712 rotrod1[0]= new TGeoRotation();
1713 rotpos[0]= new TGeoRotation();
1715 rotrod1[0]->RotateZ(-90.+angle);
1716 *rotpos[0] = refl*rotrod; //rotation+reflection
1717 v9->AddNode(tpcrrod,1,new TGeoCombiTrans(x,y, z, rotrod1[0])); //A
1718 v9->AddNode(tpcrrod,2,new TGeoCombiTrans(x,y,-z, rotpos[0])); //C
1721 v9->AddNode(tpcmrod,i+1,new TGeoTranslation(x,y,z));//shaft
1722 v9->AddNode(tpcmrod,i+19,new TGeoCombiTrans(x,y,-z,ref));//muon
1726 x=r * TMath::Cos(angle);
1727 y=r * TMath::Sin(angle);
1730 // outer rod holder + outer left plug
1732 TGeoRotation *rot33 = new TGeoRotation();
1733 rot33->RotateZ(-90+i*20.);
1735 v9->AddNode(tpcohpl,i+1,new TGeoCombiTrans(x, y, 0., rot33));
1737 Double_t xxx = 256.297*TMath::Cos((i*20.+10.)*TMath::DegToRad());
1738 Double_t yyy = 256.297*TMath::Sin((i*20.+10.)*TMath::DegToRad());
1740 TGeoRotation rot101("rot101");
1741 rot101.RotateZ(90.+i*20.+10.);
1742 TGeoRotation *rot103 = new TGeoRotation("rot103");
1743 *rot103 = rot101*rot102;
1745 TGeoCombiTrans *trh100 = new TGeoCombiTrans(xxx,yyy,0.,rot103);
1748 //main membrane holder
1749 v9->AddNode(tpcmmh,1,trh100);
1752 // "normal" membrane holder
1753 v9->AddNode(tpcomh,i+1,trh100);
1757 if(i==3){//resistor rod outer
1758 rotrod.RotateZ(90.+angle);
1759 rotrod1[1]= new TGeoRotation();
1760 rotpos[1]= new TGeoRotation();
1761 rotrod1[1]->RotateZ(90.+angle);
1762 *rotpos[1] = refl*rotrod;//rotation+reflection
1763 v9->AddNode(tpcrrod,3,new TGeoCombiTrans(x,y, z, rotrod1[1])); //A
1764 v9->AddNode(tpcrrod,4,new TGeoCombiTrans(x,y, -z, rotpos[1])); //C
1767 v9->AddNode(tpcmrod,i+37,new TGeoTranslation(x,y,z));//shaft
1768 v9->AddNode(tpcmrod,i+55,new TGeoCombiTrans(x,y,-z,ref));//muon
1771 v9->AddNode(hvrv,1,new TGeoTranslation(x,y,z+0.7)); //hv->A-side only
1775 } //end of rods positioning
1778 TGeoVolume *alice = gGeoManager->GetVolume("ALIC");
1779 alice->AddNode(v1,1);
1783 } // end of function
1787 //_____________________________________________________________________________
1788 void AliTPCv3::CreateMaterials()
1791 // Define materials for version 2 of the Time Projection Chamber
1796 AliTPC::CreateMaterials();
1799 //_____________________________________________________________________________
1800 void AliTPCv3::Init()
1803 // Initialises version 3 of the TPC after that it has been built
1805 //Int_t *idtmed = fIdtmed->GetArray();
1809 fIdSens=gMC->VolId("TPC_Drift"); // drift gas as a sensitive volume
1811 gMC->SetMaxNStep(-30000); // max. number of steps increased
1813 // specific energy loss is now set in galice.cuts
1815 printf("%s: *** TPC version 3 initialized***\n",ClassName());
1817 printf("%s: Maximum number of steps = %d\n",ClassName(),gMC->GetMaxNStep());
1819 // printf("*** TPC version 3 initialized ***\n");
1820 // printf("Maximum number of steps = %d\n",gMC->GetMaxNStep());
1826 //_____________________________________________________________________________
1827 void AliTPCv3::StepManager()
1830 // Called for every step in the Time Projection Chamber
1834 // parameters used for the energy loss calculations
1836 const Float_t kprim = 14.35; // number of primary collisions per 1 cm
1837 const Float_t kpoti = 20.77e-9; // first ionization potential for Ne/CO2
1838 const Float_t kwIon = 35.97e-9; // energy for the ion-electron pair creation
1841 const Float_t kbig = 1.e10;
1853 gMC->SetMaxStep(kbig);
1855 if(!gMC->IsTrackAlive()) return; // particle has disappeared
1857 Float_t charge = gMC->TrackCharge();
1859 if(TMath::Abs(charge)<=0.) return; // take only charged particles
1862 id=gMC->CurrentVolID(copy);
1865 if (id != fIdSens) return;
1868 // charged particle is in the sensitive volume
1871 if(gMC->TrackStep() > 0) {
1874 Int_t nel = (Int_t)(((gMC->Edep())-kpoti)/kwIon) + 1;
1875 nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV
1877 gMC->TrackPosition(pos);
1882 // Get also the track time for pileup simulation
1883 hits[4]=gMC->TrackTime();
1886 // check the selected side of the TPC
1889 if(fSide && fSide*hits[2]<=0.) return;
1891 hits[3]=(Float_t)nel;
1895 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); //MI change
1899 // Stemax calculation for the next step
1903 gMC->TrackMomentum(mom);
1904 Float_t ptot=mom.Rho();
1905 Float_t betaGamma = ptot/gMC->TrackMass();
1907 Int_t pid=gMC->TrackPid();
1908 if((pid==kElectron || pid==kPositron) && ptot > 0.002)
1910 pp = kprim*1.58; // electrons above 20 MeV/c are on the plateau!
1914 betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3);
1915 pp=kprim*AliMathBase::BetheBlochAleph(betaGamma);
1916 if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
1919 Double_t rnd = gMC->GetRandom()->Rndm();
1921 gMC->SetMaxStep(-TMath::Log(rnd)/pp);