18 const Int_t NofDisks = 1;
20 const Double_t DiskVolInnerRadius[NofDisks] = { 4.50 };
21 const Double_t DiskVolOuterRadius[NofDisks] = { 74.06 };
22 const Double_t DiskZPosition [NofDisks] = { 188.50 };
25 const Int_t DiskNFoils [NofDisks] = { 4 };
26 const Double_t MiddleROBarHfTh[NofDisks] = { 2.35 };
27 const Double_t HalfStationThickness = 8.003;
29 const Double_t carbonRingInnerRadius[NofDisks] = { 68.97 };
30 const Double_t carbonRingOuterRadius[NofDisks] = { 69.17 };
31 const Double_t carbonRingHalfThickness = 1.50;
33 const Double_t copperRingInnerRadius[NofDisks] = { 68.47 };
34 const Double_t copperRingOuterRadius[NofDisks] = { 68.67 };
35 const Double_t copperRingHalfThickness = 3.75;
37 const Double_t AlRingInnerRadius[NofDisks] = { 68.70 };
38 const Double_t AlRingOuterRadius[NofDisks] = { 73.70 };
39 const Double_t AlRingHalfThickness = 3.75;
41 const Double_t SegmentHalfThickness = 0.25;
42 const Int_t NofSegments = 24;
44 const Double_t FirstSegmentAngle = 7.5;
45 const TString newsegment [NofSegments] = {
"seg1" ,
"seg2" ,
"seg3" ,
"seg4" ,
"seg5" ,
"seg6" ,
"seg7" ,
"seg8" ,
46 "seg9" ,
"seg10",
"seg11",
"seg12",
"seg13",
"seg14",
"seg15",
"seg16",
47 "seg17",
"seg18",
"seg19",
"seg20",
"seg21",
"seg22",
"seg23",
"seg24" };
49 const Double_t moduleRingInnerRadius[NofDisks] = { 68.70 };
50 const Double_t moduleRingOuterRadius[NofDisks] = { 73.65 };
51 const Double_t moduleRingHalfThickness = 3.75;
53 const Double_t moduleSegmentHalfThickness = 1.30;
54 const Int_t NofmoduleSegments = 24;
56 const Double_t FirstmoduleSegmentAngle = 0.0 ;
57 const TString newmodulesegment [NofmoduleSegments] = {
"moduleseg1" ,
"moduleseg2" ,
"moduleseg3" ,
"moduleseg4" ,
"moduleseg5" ,
"moduleseg6" ,
"moduleseg7" ,
"moduleseg8" ,
58 "moduleseg9" ,
"moduleseg10",
"moduleseg11",
"moduleseg12",
"moduleseg13",
"moduleseg14",
"moduleseg15",
"moduleseg16",
59 "moduleseg17",
"moduleseg18",
"moduleseg19",
"moduleseg20",
"moduleseg21",
"moduleseg22",
"moduleseg23",
"moduleseg24" };
61 const Double_t AlumiRingInnerRadius[NofDisks] = { 73.7 };
62 const Double_t AlumiRingOuterRadius[NofDisks] = { 74.0 };
63 const Double_t AlumiRingHalfThickness = 3.75;
65 const Double_t coverRingInnerRadius[NofDisks] = { 68.70 };
66 const Double_t coverRingOuterRadius[NofDisks] = { 74.00 };
67 const Double_t coverRingHalfThickness = 0.2;
71 const Double_t rcopperbarHalfThickness = 8.40;
75 const Double_t lcopperbarHalfThickness = 13.80;
78 const Int_t NofLayers = 49+48;
80 const TString LayerName [NofLayers] = {
"space",
81 "gap_air",
"window1_foil_out_aluminium",
"gap_air",
"WindowF_kapton",
"gap_air",
"window2_foil_out_aluminium",
"gap_air",
83 "gap_air",
"WindowF_aluminium",
"gap_air",
"CathodeF_kapton",
"gap_air",
"CathodeF_aluminium",
"gap_air",
88 "gap_air",
"Gem1F_copper",
"gap_air",
"Gem1_kapton",
"gap_air",
"Gem1B_copper",
"gap_air",
90 "gap_air",
"Gem2F_copper",
"gap_air",
"Gem2_kapton",
"gap_air",
"Gem2B_copper",
"gap_air",
92 "gap_air",
"Gem3F_copper",
"gap_air",
"Gem3_kapton",
"gap_air",
"Gem3B_copper",
"gap_air",
96 "gap_air",
"PadF_copper",
"gap_air",
"Pad_kapton",
"gap_air",
"PadB_copper",
"gap_air",
100 "gap_air",
"Gem4F_copper",
"gap_air",
"Gem4_kapton",
"gap_air",
"Gem4B_copper",
"gap_air",
102 "gap_air",
"Gem5F_copper",
"gap_air",
"Gem5_kapton",
"gap_air",
"Gem5B_copper",
"gap_air",
104 "gap_air",
"Gem6F_copper",
"gap_air",
"Gem6_kapton",
"gap_air",
"Gem6B_copper",
"gap_air",
109 "gap_air",
"CathodeB_aluminium",
"gap_air",
"CathodeB_kapton",
"gap_air",
"WindowB_aluminium",
"gap_air",
111 "gap_air",
"window1_foil_in_aluminium",
"gap_air",
"WindowB_kapton",
"gap_air",
"window2_foil_in_aluminium",
"gap_air",
115 const Double_t LayerThick[NofLayers] = { 1.0,
116 0.00001, 0.0001, 0.00001, 0.0007, 0.00001, 0.0001, 0.00001,
118 0.00001, 0.0001, 0.00001, 0.0007, 0.00001, 0.0001, 0.00001,
123 0.00001, 0.0005, 0.00001, 0.0050, 0.00001, 0.0005, 0.00001,
125 0.00001, 0.0005, 0.00001, 0.0050, 0.00001, 0.0005, 0.00001,
127 0.00001, 0.0005, 0.00001, 0.0050, 0.00001, 0.0005, 0.00001,
131 0.00001, 0.001, 0.00001, 0.001, 0.00001, 0.001, 0.00001,
135 0.00001, 0.0005, 0.00001, 0.0050, 0.00001, 0.0005, 0.00001,
137 0.00001, 0.0005, 0.00001, 0.0050, 0.00001, 0.0005, 0.00001,
139 0.00001, 0.0005, 0.00001, 0.0050, 0.00001, 0.0005, 0.00001,
144 0.00001, 0.0001, 0.00001, 0.0007, 0.00001, 0.0001, 0.00001,
146 0.00001, 0.0001, 0.00001, 0.0007, 0.00001, 0.0001, 0.00001,
151 const Double_t DiskOuterRadius[NofLayers][NofDisks] = { 68.90,
152 67.95, 67.95, 68.40, 68.40, 67.95, 67.95, 67.95,
154 67.45, 67.45, 68.40, 68.40, 67.45, 67.45, 67.45,
159 67.45, 67.45, 68.05, 68.05, 67.45, 67.45, 67.45,
161 67.45, 67.45, 68.05, 68.05, 67.45, 67.45, 67.45,
163 67.45, 67.45, 68.05, 68.05, 67.45, 67.45, 67.45,
167 73.90, 73.90, 73.90, 73.90, 73.90, 73.90, 68.40,
171 67.45, 67.45, 68.05, 68.05, 67.45, 67.45, 67.45,
173 67.45, 67.45, 68.05, 68.05, 67.45, 67.45, 67.45,
175 67.45, 67.45, 68.05, 68.05, 67.45, 67.45, 67.45,
180 67.45, 67.45, 68.40, 68.40, 67.45, 67.45, 67.45,
182 68.40, 68.40, 67.95, 67.95, 68.40, 68.40, 68.40,
186 const Double_t DiskInnerRadius[NofLayers][NofDisks] = { 4.50,
187 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
189 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
194 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
196 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
198 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
202 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
206 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
208 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
210 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
215 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
217 4.50, 4.50, 4.50, 4.50, 4.50, 4.50, 4.50,
226 const Int_t NofSensLayers = 2;
228 const Double_t sMiddleROBarHfTh[NofDisks] = { 2.35 };
230 const TString SensLayerName[NofSensLayers] = {
"Gem1_Sensor_GEMmixture",
231 "Gem6_Sensor_GEMmixture" };
233 const Double_t SensLayerThick[NofSensLayers] = { 0.85,
236 const Double_t SensZPosition[NofSensLayers][NofDisks] = { -0.69412,
239 const Double_t SensOuterRadius[NofSensLayers][NofDisks] = { 67.15,
242 const Double_t SensInnerRadius[NofSensLayers][NofDisks] = { 5.00,
250 const Int_t NofHLayers = 16;
252 const TString HLayersName [NofHLayers] = {
"windowF1_ring_carbon",
254 "windowF2_ring_carbon",
256 "cathodeF_ring_GlassFiber",
258 "gem_ring1_GlassFiber",
260 "gem_ring2_GlassFiber",
262 "gem_ring3_GlassFiber",
264 "gem_ring4_GlassFiber",
265 "padplaneF_support_GlassFiber",
267 "padplaneB_support_GlassFiber",
268 "gem_ring5_GlassFiber",
270 "gem_ring6_GlassFiber",
272 "gem_ring7_GlassFiber",
274 "gem_ring8_GlassFiber",
276 "cathodeB_ring_GlassFiber",
278 "windowB1_ring_carbon",
280 "windowB2_ring_carbon" };
282 const Double_t HLayersThick[NofHLayers] = { 1.00,
300 const Double_t HZPosition[NofHLayers][NofDisks] = { -2.62100,
318 const Double_t HOuterRadius[NofHLayers][NofDisks] = { 68.90,
335 const Double_t HInnerRadius[NofHLayers][NofDisks] = { 67.50,
358 const Double_t HTY[NofHLayers][NofDisks] = { 65.0,
377 const Int_t SensorStripType [2] = { 3 , 2 };
379 const Double_t SensorStripAngle[2][2] = { 0. , 0. , 0. , 0. };
380 const Double_t SensorStripPitch[2][2] = { 0.04, 0.04, 0.04, 0.04};
384 for ( Int_t ilayer = 0 ; ilayer < NofLayers ; ilayer++ ) {
385 cout << LayerName[ilayer].Data() <<
" -> " << LayerThick[ilayer] << endl;
386 firstLayerOffset += LayerThick[ilayer];
389 cout <<
"total thickness is " << firstLayerOffset << endl;
390 firstLayerOffset = firstLayerOffset/2.;
391 firstLayerOffset = -0.001*(TMath::Floor(1000.*firstLayerOffset));
392 cout <<
"first layer offset is " << firstLayerOffset << endl;
395 TString vmcWorkdir = getenv(
"VMCWORKDIR");
397 TString outfile=
"../../geometry/gem_1Station_last_realistic_v2.root";
400 TFile*
fi =
new TFile(outfile,
"RECREATE");
402 cout <<
"created output file" << endl;
403 FairGeoLoader*
geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
404 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
405 cout <<
"geoface setmediafile" << endl;
406 geoFace->setMediaFile(
"../../geometry/media_pnd.geo");
407 cout <<
"geoface readmedia" << endl;
408 geoFace->readMedia();
409 cout <<
"geoface print" << endl;
411 cout <<
"geoface done" << endl;
413 FairGeoMedia *
Media = geoFace->getMedia();
414 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
420 FairGeoMedium *CbmMediumCopper = Media->getMedium(
"copper");
421 FairGeoMedium *CbmMediumKapton = Media->getMedium(
"kapton");
422 FairGeoMedium *CbmMediumArCO2 = Media->getMedium(
"GEMmixture");
423 FairGeoMedium *CbmMediumUranium = Media->getMedium(
"uranium");
424 FairGeoMedium *CbmMediumGlassFiber= Media->getMedium(
"GlassFiber");
426 Int_t
nmed=geobuild->createMedium(CbmMediumAir);
427 nmed=geobuild->createMedium(CbmMediumPWO);
428 nmed=geobuild->createMedium(CbmMediumCarbon);
429 nmed=geobuild->createMedium(CbmMediumAluminium);
430 nmed=geobuild->createMedium(CbmMediumCopper);
431 nmed=geobuild->createMedium(CbmMediumKapton);
432 nmed=geobuild->createMedium(CbmMediumArCO2);
433 nmed=geobuild->createMedium(CbmMediumUranium);
434 nmed=geobuild->createMedium(CbmMediumGlassFiber);
437 TGeoManager*
gGeoMan = (TGeoManager*)gROOT->FindObject(
"FAIRGeom");
439 TGeoVolume *
top =
new TGeoVolumeAssembly(
"Gem");
441 gGeoMan->SetTopVolume(top);
443 cout <<
"-------------------------------------------------------------------" << endl;
444 TList* mediaList = (TList*)gGeoMan->GetListOfMedia();
446 cout <<
"media known: " << mediaList->GetEntries() <<
"." << endl;
447 for ( Int_t itemp = 0 ; itemp < mediaList->GetEntries() ; itemp++ ) {
448 TGeoMedium*
medium = (TGeoMedium*)mediaList->At(itemp);
449 cout <<
"medium " << itemp <<
" name is " << medium->GetName() << endl;
451 cout <<
"-------------------------------------------------------------------" << endl;
453 TGeoRotation*
dummyrot =
new TGeoRotation();
455 TGeoVolumeAssembly*
SubunitVol =
new TGeoVolumeAssembly(
"Gem_Disks");
458 TGeoShape *DiskShape[NofDisks];
459 TGeoVolume *DiskVol [NofDisks];
460 TGeoRotation *DiskRotat[NofDisks];
461 TGeoTranslation *DiskTrans[NofDisks];
462 TGeoCombiTrans *DiskCombi[NofDisks];
464 TGeoShape *carbonRingShape[NofDisks];
465 TGeoVolume *carbonRingVol [NofDisks];
466 TGeoTranslation *carbonRingTrans[NofDisks];
467 TGeoCombiTrans *carbonRingCombi[NofDisks];
469 TGeoShape *copperRingShape[NofDisks];
470 TGeoVolume *copperRingVol [NofDisks];
471 TGeoTranslation *copperRingTrans[NofDisks];
472 TGeoCombiTrans *copperRingCombi[NofDisks];
474 TGeoShape *coverRingShape[NofDisks];
475 TGeoVolume *coverRingVol [NofDisks];
476 TGeoTranslation *coverRingTrans[NofDisks];
477 TGeoCombiTrans *coverRingCombi[NofDisks];
479 TGeoShape *tAcopperbarShape;
480 TGeoVolume *tAcopperbarVol ;
481 TGeoTranslation *tAcopperbarTrans;
482 TGeoRotation *tAcopperbarRot;
483 TGeoCombiTrans *tAcopperbarCombi;
485 TGeoShape *tBcopperbarShape;
486 TGeoVolume *tBcopperbarVol ;
487 TGeoTranslation *tBcopperbarTrans;
488 TGeoRotation *tBcopperbarRot;
489 TGeoCombiTrans *tBcopperbarCombi;
491 TGeoShape *dAcopperbarShape;
492 TGeoVolume *dAcopperbarVol ;
493 TGeoTranslation *dAcopperbarTrans;
494 TGeoRotation *dAcopperbarRot;
495 TGeoCombiTrans *dAcopperbarCombi;
497 TGeoShape *dBcopperbarShape;
498 TGeoVolume *dBcopperbarVol ;
499 TGeoTranslation *dBcopperbarTrans;
500 TGeoRotation *dBcopperbarRot;
501 TGeoCombiTrans *dBcopperbarCombi;
503 TGeoShape *AlRingShape[NofDisks][NofSegments];
504 TGeoVolume *AlRingVol [NofDisks][NofSegments];
505 TGeoTranslation *AlRingTrans[NofDisks][NofSegments];
506 TGeoCombiTrans *AlRingCombi[NofDisks][NofSegments];
508 TGeoShape *moduleRingShape[NofDisks][NofmoduleSegments];
509 TGeoVolume *moduleRingVol [NofDisks][NofmoduleSegments];
510 TGeoTranslation *moduleRingTrans[NofDisks][NofmoduleSegments];
511 TGeoCombiTrans *moduleRingCombi[NofDisks][NofmoduleSegments];
513 TGeoShape *AlumiRingShape[NofDisks];
514 TGeoVolume *AlumiRingVol [NofDisks];
515 TGeoTranslation *AlumiRingTrans[NofDisks];
516 TGeoCombiTrans *AlumiRingCombi[NofDisks];
518 TGeoShape *DiskLayersShapeA [NofLayers][NofDisks][4];
519 TGeoShape *DiskLayersShapeB [NofLayers][NofDisks][4];
520 TGeoSubtraction *DiskLayersSubtr [NofLayers][NofDisks][4];
521 TGeoShape *DiskLayersShapeC [NofLayers][NofDisks][4];
522 TGeoShape *DiskLayersShapeHole [NofLayers][NofDisks][4];
523 TGeoCompositeShape *DiskLayersShapecompos[NofLayers][NofDisks][4];
524 TGeoVolume *DiskLayersVol [NofLayers][NofDisks][4];
525 TGeoTranslation *DiskLayersTranshA [NofLayers][NofDisks][4];
526 TGeoTranslation *DiskLayersTranshB [NofLayers][NofDisks][4];
527 TGeoTranslation *DiskLayersTrans [NofLayers][NofDisks][4];
528 TGeoCombiTrans *DiskLayersCombi [NofLayers][NofDisks][4];
530 TGeoShape *SensDiskLayersShapeA [NofSensLayers][NofDisks][4];
531 TGeoShape *SensDiskLayersShapeB [NofSensLayers][NofDisks][4];
532 TGeoSubtraction *SensDiskLayersSubtr [NofSensLayers][NofDisks][4];
533 TGeoShape *SensDiskLayersShapeC [NofSensLayers][NofDisks][4];
534 TGeoShape *SensDiskLayersShapeHole [NofSensLayers][NofDisks][4];
535 TGeoCompositeShape *SensDiskLayersShapecompos[NofSensLayers][NofDisks][4];
536 TGeoVolume *SensDiskLayersVol [NofSensLayers][NofDisks][4];
537 TGeoTranslation *SensDiskLayersTranshA [NofSensLayers][NofDisks][4];
538 TGeoTranslation *SensDiskLayersTranshB [NofSensLayers][NofDisks][4];
539 TGeoTranslation *SensDiskLayersTrans [NofSensLayers][NofDisks][4];
540 TGeoCombiTrans *SensDiskLayersCombi [NofSensLayers][NofDisks][4];
542 TGeoShape *HLayersShapeTube [NofHLayers][NofDisks];
543 TGeoShape *HLayersShapeBox [NofHLayers][NofDisks];
544 TGeoShape *HLayersShapePlate [NofHLayers][NofDisks];
545 TGeoShape *HLayersShapeHT [NofHLayers][NofDisks];
546 TGeoShape *HLayersShapeHTM [NofHLayers][NofDisks];
547 TGeoShape *HLayersShapeHTD [NofHLayers][NofDisks];
548 TGeoCompositeShape *HLayersShapecompos[NofHLayers][NofDisks];
549 TGeoVolume *HLayersVolcomp [NofHLayers][NofDisks];
550 TGeoTranslation *HLayersTranstA [NofHLayers][NofDisks];
551 TGeoTranslation *HLayersTranstB [NofHLayers][NofDisks];
552 TGeoTranslation *HLayersTranstC [NofHLayers][NofDisks];
553 TGeoTranslation *HLayersTranstD [NofHLayers][NofDisks];
554 TGeoTranslation *HLayersTranstE [NofHLayers][NofDisks];
555 TGeoTranslation *HLayersTranstF [NofHLayers][NofDisks];
556 TGeoRotation *HLayersRotrA [NofHLayers][NofDisks];
557 TGeoShape *HLayersShape [NofHLayers][NofDisks];
558 TGeoVolume *HLayersVol [NofHLayers][NofDisks];
559 TGeoTranslation *HLayersTrans [NofHLayers][NofDisks];
560 TGeoCombiTrans *HLayersCombi [NofHLayers][NofDisks];
562 TGeoShape *RiddleShapeTubeA ;
563 TGeoShape *RiddleShapeTubeB ;
564 TGeoShape *RiddleShapeCone ;
565 TGeoShape *RiddleShapeTubeC ;
566 TGeoShape *RiddleShapeTubeD ;
567 TGeoShape *RiddleShapeTubeE ;
568 TGeoShape *RiddleShapeTubeF ;
569 TGeoSubtraction *RiddleSubtr ;
570 TGeoCompositeShape *RiddleShapecompos;
571 TGeoVolume *RiddleVolcomp ;
572 TGeoTranslation *RiddleTrans ;
573 TGeoTranslation *RiddleTransTubeA ;
574 TGeoTranslation *RiddleTransCone ;
575 TGeoTranslation *RiddleTransTubeC ;
576 TGeoTranslation *RiddleTransTubeD ;
577 TGeoTranslation *RiddleTransTubeE ;
578 TGeoCombiTrans *RiddleCombi ;
579 TGeoTranslation *RiddleTransTubeF[4][100] ;
580 TGeoCombiTrans *RiddleCombiTranshole[4][100] ;
581 TGeoRotation *RiddleRothole[4][100] ;
583 TString outParFileName = Form(
"%s/macro/params/gem_1Station_last_realistic_v2.digi.par",vmcWorkdir.Data());
586 cout <<
"parameter file = \"" << outParFileName.Data() <<
"\"" << endl;
588 ofstream pout(outParFileName.Data());
589 pout.setf(ios::fixed);
591 pout <<
"#################################################################" << endl;
592 pout <<
"# Digitization parameters for GEM " << endl;
593 pout <<
"# with Station " << endl;
594 pout <<
"# Format: " << endl;
595 pout <<
"# Description of parameters: " << endl;
596 pout <<
"# [PndGemDetectors] " << endl;
597 pout <<
"# parameters:d station_number, ZPos, rotation_angle, number_of_sensors, \\" << endl;
598 pout <<
"# sensor_number, sensor_type, pos_x, pos_y, pos_z, rotAngle, inn_rad, out_rad, thick, str_ang_0, str_ang_1, barWidth, pitch_0, pitch_1, \\" << endl;
599 pout <<
"# sensor_number, ...." << endl;
600 pout <<
"# station_number, ..." << endl;
601 pout <<
"#################################################################" << endl;
602 pout <<
"[PndGemDetectors]" << setprecision(4) << endl;
604 pout <<
"parameters:Double_t \\" << endl;
606 for ( Int_t istat = 0 ; istat < NofDisks ; istat++ ) {
608 pout <<
" " << istat+1 <<
", "
609 << setw(9) << DiskZPosition[istat]
610 <<
", 0.0, " << 2 <<
", \\" << endl;
613 DiskShape[istat] =
new TGeoTube (Form(
"disk%dshape",istat+1),DiskVolInnerRadius[istat],DiskVolOuterRadius[istat],HalfStationThickness);
614 DiskVol [istat] =
new TGeoVolume(Form(
"Gem_Disk%d_Volume",istat+1),DiskShape[istat],gGeoMan->GetMedium(
"GEMmixture"));
615 DiskTrans[istat] =
new TGeoTranslation(0.,0.,DiskZPosition[istat]);
616 cout <<
"station " << DiskVolInnerRadius[istat] <<
" " << DiskVolOuterRadius[istat] <<
" at " << DiskZPosition[istat] << endl;
618 DiskCombi[istat] =
new TGeoCombiTrans(*DiskTrans[istat],*dummyrot);
621 DiskRotat[istat] =
new TGeoRotation(Form(
"disk%drotat"), 0.0, 180.0, 0.0);
622 DiskCombi[istat] =
new TGeoCombiTrans(*DiskTrans[istat],*DiskRotat[istat]);
625 DiskCombi[istat]->SetName(Form(
"Gem_Disk%d_Volume",istat+1));
626 DiskCombi[istat]->RegisterYourself();
627 DiskVol[istat]->SetLineColor(kYellow);
630 carbonRingShape[istat] =
new TGeoTube (Form(
"carbonRing%dshape",istat+1),carbonRingInnerRadius[istat],carbonRingOuterRadius[istat],carbonRingHalfThickness);
631 carbonRingVol [istat] =
new TGeoVolume(Form(
"Gem_carbonRing%d_Volume",istat+1),carbonRingShape[istat],gGeoMan->GetMedium(
"carbon"));
632 carbonRingTrans[istat] =
new TGeoTranslation(0.,0.,-1.61);
633 cout <<
"carbonRing " << carbonRingInnerRadius[istat] <<
" " << carbonRingOuterRadius[istat] << endl;
634 carbonRingCombi[istat] =
new TGeoCombiTrans(*carbonRingTrans[istat],*dummyrot);
635 carbonRingCombi[istat]->SetName(Form(
"Gem_carbonRing%d_Volume",istat+1));
636 carbonRingCombi[istat]->RegisterYourself();
637 carbonRingVol[istat]->SetLineColor(kMagenta);
639 DiskVol[istat]->AddNode(carbonRingVol[istat],0,carbonRingCombi[istat]);
642 copperRingShape[istat] =
new TGeoTube (Form(
"copperRing%dshape",istat+1),copperRingInnerRadius[istat],copperRingOuterRadius[istat],copperRingHalfThickness);
643 copperRingVol [istat] =
new TGeoVolume(Form(
"Gem_copperRing%d_Volume",istat+1),copperRingShape[istat],gGeoMan->GetMedium(
"copper"));
644 copperRingTrans[istat] =
new TGeoTranslation(0.,0.,3.853);
645 cout <<
"copperRing " << copperRingInnerRadius[istat] <<
" " << copperRingOuterRadius[istat] << endl;
646 copperRingCombi[istat] =
new TGeoCombiTrans(*copperRingTrans[istat],*dummyrot);
647 copperRingCombi[istat]->SetName(Form(
"Gem_copperRing%d_Volume",istat+1));
648 copperRingCombi[istat]->RegisterYourself();
649 copperRingVol[istat]->SetLineColor(kYellow-5);
651 DiskVol[istat]->AddNode(copperRingVol[istat],0,copperRingCombi[istat]);
654 Double_t segmentAngularSize = SegmentHalfThickness/AlRingInnerRadius[istat]*360.;
655 for ( Int_t isegm = 0 ; isegm < NofSegments ; isegm++ ) {
656 cout <<
" Segment " << isegm <<
" with name " << newsegment[isegm] <<
" will be put at " << FirstSegmentAngle+isegm*SegmentDeltaAngle <<
" (in fact from " << FirstSegmentAngle+isegm*SegmentDeltaAngle-segmentAngularSize/2. <<
" to " << FirstSegmentAngle+isegm*SegmentDeltaAngle+segmentAngularSize/2. <<
")" << endl;
657 AlRingShape[istat][isegm] =
new TGeoTubeSeg (Form(
"AlRing%dshape",istat+1,isegm+1),AlRingInnerRadius[istat],AlRingOuterRadius[istat],AlRingHalfThickness,FirstSegmentAngle+isegm*SegmentDeltaAngle-segmentAngularSize/2.,FirstSegmentAngle+isegm*SegmentDeltaAngle+segmentAngularSize/2. );
658 AlRingVol[istat][isegm] =
new TGeoVolume (Form(
"Gem_AlRing%d_Volume",istat+1,isegm+1),AlRingShape[istat][isegm],gGeoMan->GetMedium(
"aluminium"));
659 AlRingTrans[istat][isegm] =
new TGeoTranslation (0.,0.,3.853);
660 cout <<
"AlRing " << AlRingInnerRadius[istat] <<
" " << AlRingOuterRadius[istat] << endl;
661 AlRingCombi[istat][isegm] =
new TGeoCombiTrans (*AlRingTrans[istat][isegm],*dummyrot);
662 AlRingCombi[istat][isegm]->SetName(Form(
"Gem_AlRing%d_Volume",istat+1,isegm+1));
663 AlRingCombi[istat][isegm]->RegisterYourself();
664 AlRingVol[istat][isegm]->SetLineColor(kCyan-9);
666 DiskVol[istat]->AddNode(AlRingVol[istat][isegm],0,AlRingCombi[istat][isegm]);
671 Double_t modulesegmentAngularSize = moduleSegmentHalfThickness/moduleRingInnerRadius[istat]*360.;
672 for ( Int_t imodulesegm = 0 ; imodulesegm < NofmoduleSegments ; imodulesegm++ ) {
673 cout <<
" moduleSegment " << imodulesegm <<
" with name " << newmodulesegment[imodulesegm] <<
" will be put at " << FirstmoduleSegmentAngle+imodulesegm*moduleSegmentDeltaAngle <<
" (in fact from " << FirstmoduleSegmentAngle+imodulesegm*moduleSegmentDeltaAngle-modulesegmentAngularSize/2. <<
" to " << FirstmoduleSegmentAngle+imodulesegm*moduleSegmentDeltaAngle+modulesegmentAngularSize/2. <<
")" << endl;
674 moduleRingShape[istat][imodulesegm] =
new TGeoTubeSeg (Form(
"moduleRing%dshape",istat+1,imodulesegm+1),moduleRingInnerRadius[istat],moduleRingOuterRadius[istat],moduleRingHalfThickness,FirstmoduleSegmentAngle+imodulesegm*moduleSegmentDeltaAngle-modulesegmentAngularSize/2.,FirstmoduleSegmentAngle+imodulesegm*moduleSegmentDeltaAngle+modulesegmentAngularSize/2. );
675 moduleRingVol[istat][imodulesegm] =
new TGeoVolume (Form(
"Gem_moduleRing%d_Volume",istat+1,imodulesegm+1),moduleRingShape[istat][imodulesegm],gGeoMan->GetMedium(
"copper"));
676 moduleRingTrans[istat][imodulesegm] =
new TGeoTranslation (0.,0.,3.853);
677 cout <<
"moduleRing " << moduleRingInnerRadius[istat] <<
" " << moduleRingOuterRadius[istat] << endl;
678 moduleRingCombi[istat][imodulesegm] =
new TGeoCombiTrans (*moduleRingTrans[istat][imodulesegm],*dummyrot);
679 moduleRingCombi[istat][imodulesegm]->SetName(Form(
"Gem_moduleRing%d_Volume",istat+1,imodulesegm+1));
680 moduleRingCombi[istat][imodulesegm]->RegisterYourself();
681 moduleRingVol[istat][imodulesegm]->SetLineColor(kGreen);
683 DiskVol[istat]->AddNode(moduleRingVol[istat][imodulesegm],0,moduleRingCombi[istat][imodulesegm]);
687 AlumiRingShape[istat] =
new TGeoTube (Form(
"AlumiRing%dshape",istat+1),AlumiRingInnerRadius[istat],AlumiRingOuterRadius[istat],AlumiRingHalfThickness);
688 AlumiRingVol [istat] =
new TGeoVolume(Form(
"Gem_AlumiRing%d_Volume",istat+1),AlumiRingShape[istat],gGeoMan->GetMedium(
"aluminium"));
689 AlumiRingTrans[istat] =
new TGeoTranslation(0.,0.,3.853);
690 cout <<
"AlumiRing " << AlumiRingInnerRadius[istat] <<
" " << AlumiRingOuterRadius[istat] << endl;
691 AlumiRingCombi[istat] =
new TGeoCombiTrans(*AlumiRingTrans[istat],*dummyrot);
692 AlumiRingCombi[istat]->SetName(Form(
"Gem_AlumiRing%d_Volume",istat+1));
693 AlumiRingCombi[istat]->RegisterYourself();
694 AlumiRingVol[istat]->SetLineColor(kCyan-9);
696 DiskVol[istat]->AddNode(AlumiRingVol[istat],0,AlumiRingCombi[istat]);
699 coverRingShape[istat] =
new TGeoTube (Form(
"coverRing%dshape",istat+1),coverRingInnerRadius[istat],coverRingOuterRadius[istat],coverRingHalfThickness);
700 coverRingVol [istat] =
new TGeoVolume(Form(
"Gem_coverRing%d_Volume",istat+1),coverRingShape[istat],gGeoMan->GetMedium(
"GlassFiber"));
701 coverRingTrans[istat] =
new TGeoTranslation(0.,0.,7.803);
702 cout <<
"coverRing " << coverRingInnerRadius[istat] <<
" " << coverRingOuterRadius[istat] << endl;
703 coverRingCombi[istat] =
new TGeoCombiTrans(*coverRingTrans[istat],*dummyrot);
704 coverRingCombi[istat]->SetName(Form(
"Gem_coverRing%d_Volume",istat+1));
705 coverRingCombi[istat]->RegisterYourself();
706 coverRingVol[istat]->SetLineColor(kGreen+3);
708 DiskVol[istat]->AddNode(coverRingVol[istat],0,coverRingCombi[istat]);
725 for ( Int_t jlay = 0 ; jlay < NofHLayers ; jlay++ ) {
727 cout <<
"doing Hlayers " << jlay << endl;
739 cout <<
" got Hlayer " << HLayersName[jlay].Data() << endl;
741 HLayersShapeTube[jlay][istat] =
new TGeoTube (Form(
"T%dT%s",istat+1,HLayersName[jlay].Data()),HInnerRadius[jlay][istat],HOuterRadius[jlay][istat],HLayersThick[jlay]/2.);
742 HLayersShapeHT[jlay][istat] =
new TGeoTube (Form(
"H%dH%s",istat+1,HLayersName[jlay].Data()),0.0,5.00,HLayersThick[jlay]/2.);
743 HLayersShapeHTM[jlay][istat] =
new TGeoTube (Form(
"HTM%dHTM%s",istat+1,HLayersName[jlay].Data()),0.0,4.50,HLayersThick[jlay]/2.+0.0002);
744 HLayersShapeHTD[jlay][istat] =
new TGeoTube (Form(
"HTD%dHTD%s",istat+1,HLayersName[jlay].Data()),0.0,1.90,HLayersThick[jlay]/2.+0.0001);
745 cout <<
"Tube name is " << HLayersShapeTube[jlay][istat]->GetName() << endl;
747 HLayersShapeBox[jlay][istat] =
new TGeoBBox(Form(
"B%dB%s",istat+1,HLayersName[jlay].Data()),HXBoxWidth,HOuterRadius[jlay][istat],HLayersThick[jlay]/2.);
748 HLayersShapePlate[jlay][istat] =
new TGeoBBox(Form(
"P%dP%s",istat+1,HLayersName[jlay].Data()),HXPlateWidth,HYPlateWidth,HLayersThick[jlay]/2.+0.0001);
750 HLayersTranstA[jlay][istat] =
new TGeoTranslation(
"tA",HTX,HTY[jlay][istat],HTZ);
751 HLayersTranstA[jlay][istat] ->RegisterYourself();
752 HLayersTranstB[jlay][istat] =
new TGeoTranslation(
"tB",HTX,-HTY[jlay][istat],HTZ);
753 HLayersTranstB[jlay][istat] ->RegisterYourself();
754 HLayersTranstC[jlay][istat] =
new TGeoTranslation(
"tC",HTX,HTY[jlay][istat]+9.0,HTZ);
755 HLayersTranstC[jlay][istat] ->RegisterYourself();
756 HLayersTranstD[jlay][istat] =
new TGeoTranslation(
"tD",HTX,HTY[jlay][istat]-9.0,HTZ);
757 HLayersTranstD[jlay][istat] ->RegisterYourself();
758 HLayersTranstE[jlay][istat] =
new TGeoTranslation(
"tE",HTX,-HTY[jlay][istat]+9.0,HTZ);
759 HLayersTranstE[jlay][istat] ->RegisterYourself();
760 HLayersTranstF[jlay][istat] =
new TGeoTranslation(
"tF",HTX,-HTY[jlay][istat]-9.0,HTZ);
761 HLayersTranstF[jlay][istat] ->RegisterYourself();
763 HLayersShapecompos[jlay][istat] =
new TGeoCompositeShape(Form(
"compos%dcompos%s",istat+1,HLayersName[jlay].Data()),
764 Form(
"T%dT%s+B%dB%s+H%dH%s-HTM%dHTM%s-(P%dP%s:tA)-(HTD%dHTD%s:tC)-(HTD%dHTD%s:tD)-(P%dP%s:tB)-(HTD%dHTD%s:tE)-(HTD%dHTD%s:tF)",
765 istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data(),
766 istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data(),
767 istat+1,HLayersName[jlay].Data(),istat+1,HLayersName[jlay].Data()));
769 cout <<
"composite name is " << HLayersShapecompos[jlay][istat] -> GetName() << endl;
771 TString HlayersMaterial = HLayersName[jlay].Data();
772 HlayersMaterial.Remove(0,HlayersMaterial.Last(
'_')+1);
773 cout <<
"THE HMATERIAL IS \"" << HlayersMaterial.Data() <<
"\"" << endl;
774 HLayersVolcomp[jlay][istat] =
new TGeoVolume(Form(
"GEMHLayersCOMP%dGEMHLayersCOMP%s",istat+1,HLayersName[jlay].Data()),HLayersShapecompos[jlay][istat],gGeoMan->GetMedium(HlayersMaterial.Data()));
775 cout <<
"COMP name is " << HLayersVolcomp[jlay][istat] -> GetName() << endl;
776 cout <<
"Hlayersmaterial = " << HlayersMaterial.Data() << endl;
778 if ( HlayersMaterial.Contains(
"carbon" ) )
780 if ( HlayersMaterial.Contains(
"GlassFiber" ) )
783 cout <<
"STATION " << istat <<
" LAYER " << jlay <<
" POSITION " << HZPosition[jlay][istat] << endl;
785 HLayersTrans[jlay][istat] =
new TGeoTranslation(0.0,0.0,HZPosition[jlay][istat]);
786 HLayersCombi[jlay][istat] =
new TGeoCombiTrans(*HLayersTrans[jlay][istat],*dummyrot);
787 HLayersCombi[jlay][istat]->SetName(Form(
"GEMHLayersCOMP%dGEMHLayersCOMP%s",istat+1,HLayersName[jlay].Data()));
788 HLayersCombi[jlay][istat]->RegisterYourself();
789 DiskVol[istat]->AddNode( HLayersVolcomp[jlay][istat],0,HLayersCombi[jlay][istat] );
794 Int_t sensorNumber = 0;
796 for ( Int_t slay = 0 ; slay < NofSensLayers ; slay++ ) {
797 cout <<
"doing Senslayer " << slay << endl;
799 if ( SensLayerName[slay].Contains(
"space") && SensLayerThick[slay] > 0.0 ) {
800 cout <<
"***** THE THICK SPACE SensLAYER IS AT " << SensZPosition[slay][istat] << endl;
802 if ( SensLayerName[slay].Contains(
"space") && SensLayerName[slay].Length() == 5 ) {
807 cout <<
" got layer : " << SensLayerName[slay].Data() << endl;
812 cout <<
"will do loop over segments" << endl;
814 for ( Int_t iseg = 0 ; iseg < 1 ; iseg++ ) {
815 cout <<
"segment " << iseg << endl;
816 SensDiskLayersShapeA[slay][istat][iseg] =
new TGeoTube(Form(
"sdisk%dseg%d%sshape",istat+1,iseg+1,SensLayerName[slay].Data()),
817 SensInnerRadius[slay][istat],SensOuterRadius[slay][istat],
818 SensLayerThick[slay]/2.);
819 SensDiskLayersShapeB[slay][istat][iseg] =
new TGeoBBox(Form(
"srobo%dseg%d%sshape",istat+1,iseg+1,SensLayerName[slay].Data()),
820 sMiddleROBarHfTh[istat],
821 SensOuterRadius[slay][istat],
822 SensLayerThick[slay]);
823 SensDiskLayersSubtr[slay][istat][iseg] =
new TGeoSubtraction(SensDiskLayersShapeA[slay][istat][iseg],
824 SensDiskLayersShapeB[slay][istat][iseg]);
826 SensDiskLayersShapeC[slay][istat][iseg] =
new TGeoCompositeShape(Form(
"scomp%dseg%d%sshape",istat+1,iseg+1,SensLayerName[slay].Data()),
827 SensDiskLayersSubtr[slay][istat][iseg]);
828 segBegin += segPhiSpan;
829 cout <<
" segBegin " << segBegin << endl;
831 SensDiskLayersShapeHole[slay][istat][iseg] =
new TGeoTube(Form(
"sHole%dseg%d%sshape",istat+1,iseg+1,SensLayerName[slay].Data()),0.0,3.80,SensLayerThick[slay]+0.01);
833 SensDiskLayersTranshA[slay][istat][iseg] =
new TGeoTranslation(
"shA",sHoleTX,sHoleTY,sHoleTZ);
834 SensDiskLayersTranshA[slay][istat][iseg] ->RegisterYourself();
835 SensDiskLayersTranshB[slay][istat][iseg] =
new TGeoTranslation(
"shB",sHoleTX,-sHoleTY,sHoleTZ);
836 SensDiskLayersTranshB[slay][istat][iseg] ->RegisterYourself();
838 SensDiskLayersShapecompos[slay][istat][iseg] =
new TGeoCompositeShape(Form(
"scompos%dseg%d%sshape",istat+1,iseg+1,SensLayerName[slay].Data()),
839 Form(
"scomp%dseg%d%sshape-(sHole%dseg%d%sshape:shA)-(sHole%dseg%d%sshape:shB)",
840 istat+1,iseg+1,SensLayerName[slay].Data(),istat+1,iseg+1,SensLayerName[slay].Data(),istat+1,iseg+1,SensLayerName[slay].Data()));
841 TString SenslayerMaterial = SensLayerName[slay].Data();
842 SenslayerMaterial.Remove(0,SenslayerMaterial.Last(
'_')+1);
843 cout <<
"THE MATERIAL IS \"" << SenslayerMaterial.Data() <<
"\"" << endl;
844 SensDiskLayersVol[slay][istat][iseg] =
new TGeoVolume(Form(
"GemSen_Disk%d_Seg%d_%s",istat+1,iseg+1,SensLayerName[slay].Data()),
845 SensDiskLayersShapecompos[slay][istat][iseg],
846 gGeoMan->GetMedium(SenslayerMaterial.Data()));
848 cout <<
"Senslayer material = " << SenslayerMaterial.Data() << endl;
849 if ( SenslayerMaterial.Contains(
"GEMmixture" ) )
850 SensDiskLayersVol[slay][istat][iseg]->
SetLineColor(kYellow);
852 SensDiskLayersTrans[slay][istat][iseg] =
new TGeoTranslation(0.,0.,SensZPosition[slay][istat]);
853 SensDiskLayersCombi[slay][istat][iseg] =
new TGeoCombiTrans(*SensDiskLayersTrans[slay][istat][iseg],*dummyrot);
854 SensDiskLayersCombi[slay][istat][iseg]->SetName(Form(
"GemSen_Disk%d_Seg%d_%s",istat+1,iseg+1,SensLayerName[slay].Data()));
855 SensDiskLayersCombi[slay][istat][iseg]->RegisterYourself();
856 DiskVol[istat]->AddNode(SensDiskLayersVol[slay][istat][iseg],0,SensDiskLayersCombi[slay][istat][iseg]);
859 cout <<
"Svolume " << SensLayerName[slay] <<
" from "
860 << setprecision(10) << DiskZPosition[istat]+SensZPosition[slay][istat]-SensLayerThick[slay]/2. <<
" to "
861 << setprecision(10) << DiskZPosition[istat]+SensZPosition[slay][istat]+SensLayerThick[slay]/2. << endl;
863 if ( SensLayerName[slay].Contains(
"Gem") && SensLayerName[slay].Contains(
"Sensor") ) {
864 Double_t newRadius = SensInnerRadius[slay][istat];
867 cout <<
"srad = " << SensInnerRadius[slay][istat] <<
" pitch = " << SensorStripPitch[sensorNumber][0] <<
" for sensor " << sensorNumber << endl;
868 if ( SensorStripType[sensorNumber] != 2 ) {
869 nofStrips = TMath::Ceil(2.*
TMath::Pi()*SensInnerRadius[slay][istat]/SensorStripPitch[sensorNumber][0]);
870 newRadius = nofStrips*SensorStripPitch[sensorNumber][0]/2./
TMath::Pi();
872 cout <<
"!!!! " << istat <<
" " << slay <<
" > there shall be " << nofStrips <<
" strips here so the radius should be " << newRadius << endl;
873 pout <<
" " << sensorNumber+1 <<
", " << SensorStripType[sensorNumber] <<
", "
874 << setw(9) << 0. <<
", "
875 << setw(9) << 0. <<
", "
876 << setw(9) << DiskZPosition[istat]+SensZPosition[slay][istat] <<
", "
877 << setw(9) << 0. <<
", "
878 << setw(9) << newRadius <<
", "
879 << setw(9) << SensOuterRadius[slay][istat] <<
", "
880 << setw(9) << SensLayerThick[slay] <<
", "
881 << setw(9) << SensorStripAngle[sensorNumber][0] <<
", "
883 << setw(9) << sMiddleROBarHfTh[istat] <<
", "
884 << setw(9) << SensorStripPitch[sensorNumber][0] <<
", "
885 << setw(9) << SensorStripPitch[sensorNumber][1] << ((istat==NofDisks-1 && sensorNumber==1)?
"":
", \\")
890 SensZPosition[slay][istat] ++ ;
895 Double_t layerPosition = firstLayerOffset;
897 Int_t msensorNumber = 0;
899 for ( Int_t ilay = 0 ; ilay < NofLayers ; ilay++ ) {
900 cout <<
"doing layer " << ilay << endl;
901 layerPosition += LayerThick[ilay]/2.;
902 if ( LayerName[ilay].Contains(
"space") && LayerThick[ilay] > 0.0 ) {
903 cout <<
"***** THE THICK SPACE LAYER IS AT " << layerPosition << endl;
905 if ( LayerName[ilay].Contains(
"space") && LayerName[ilay].Length() == 5 ) {
906 layerPosition += LayerThick[ilay]/2.;
910 cout <<
" got layer : " << LayerName[ilay].Data() << endl;
914 cout <<
"will do loop over segments" << endl;
915 for ( Int_t miseg = 0 ; miseg < 1 ; miseg++ ) {
916 cout <<
"segment " << miseg << endl;
917 DiskLayersShapeA[ilay][istat][miseg] =
new TGeoTube(Form(
"disk%dseg%d%sshape",istat+1,miseg+1,LayerName[ilay].Data()),
918 DiskInnerRadius[ilay][istat],DiskOuterRadius[ilay][istat],
919 LayerThick[ilay]/2.);
920 DiskLayersShapeB[ilay][istat][miseg] =
new TGeoBBox (Form(
"robo%dseg%d%sshape",istat+1,miseg+1,LayerName[ilay].Data()),
921 MiddleROBarHfTh[istat],
922 DiskOuterRadius[ilay][istat],
924 DiskLayersSubtr[ilay][istat][miseg] =
new TGeoSubtraction(DiskLayersShapeA[ilay][istat][miseg],
925 DiskLayersShapeB[ilay][istat][miseg]);
927 DiskLayersShapeC[ilay][istat][miseg] =
new TGeoCompositeShape(Form(
"comp%dseg%d%sshape",istat+1,miseg+1,LayerName[ilay].Data()),
928 DiskLayersSubtr[ilay][istat][miseg]);
929 msegBegin += msegPhiSpan;
930 cout <<
" msegBegin " << msegBegin << endl;
932 DiskLayersShapeHole[ilay][istat][miseg] =
new TGeoTube(Form(
"Hole%dseg%d%sshape",istat+1,miseg+1,LayerName[ilay].Data()),0.0,3.80,LayerThick[ilay]+0.01);
934 DiskLayersTranshA[ilay][istat][miseg] =
new TGeoTranslation(
"hA",HoleTX,HoleTY,HoleTZ);
935 DiskLayersTranshA[ilay][istat][miseg] ->RegisterYourself();
936 DiskLayersTranshB[ilay][istat][miseg] =
new TGeoTranslation(
"hB",HoleTX,-HoleTY,HoleTZ);
937 DiskLayersTranshB[ilay][istat][miseg] ->RegisterYourself();
939 DiskLayersShapecompos[ilay][istat][miseg] =
new TGeoCompositeShape(Form(
"compos%dseg%d%sshape",istat+1,miseg+1,LayerName[ilay].Data()),
940 Form(
"comp%dseg%d%sshape-(Hole%dseg%d%sshape:hA)-(Hole%dseg%d%sshape:hB)",
941 istat+1,miseg+1,LayerName[ilay].Data(),istat+1,miseg+1,LayerName[ilay].Data(),istat+1,miseg+1,LayerName[ilay].Data()));
944 TString layerMaterial = LayerName[ilay].Data();
945 layerMaterial.Remove(0,layerMaterial.Last(
'_')+1);
946 cout <<
"THE MATERIAL IS \"" << layerMaterial.Data() <<
"\"" << endl;
947 DiskLayersVol[ilay][istat][miseg] =
new TGeoVolume(Form(
"Gem_Disk%d_Seg%d_%s",istat+1,miseg+1,LayerName[ilay].Data()),
948 DiskLayersShapecompos[ilay][istat][miseg],
949 gGeoMan->GetMedium(layerMaterial.Data()));
951 cout <<
"layer material = " << layerMaterial.Data() << endl;
952 if ( layerMaterial.Contains(
"air" ) )
953 DiskLayersVol[ilay][istat][miseg]->
SetLineColor(kWhite);kGray+1);
954 if ( layerMaterial.Contains(
"copper" ) )
955 DiskLayersVol[ilay][istat][miseg]->
SetLineColor(kOrange+1);
956 if ( layerMaterial.Contains(
"kapton" ) )
957 DiskLayersVol[ilay][istat][miseg]->
SetLineColor(kOrange+2);
958 if ( layerMaterial.Contains(
"aluminium" ) )
959 DiskLayersVol[ilay][istat][miseg]->
SetLineColor(kCyan-9);
960 if ( layerMaterial.Contains(
"GEMmixture" ) )
961 DiskLayersVol[ilay][istat][miseg]->
SetLineColor(kYellow);
962 if ( layerMaterial.Contains(
"carbon" ) )
964 if ( layerMaterial.Contains(
"GlassFiber" ) )
965 DiskLayersVol[ilay][istat][miseg]->
SetLineColor(kGreen+3);
967 DiskLayersTrans[ilay][istat][miseg] =
new TGeoTranslation(0.,0.,layerPosition);
968 DiskLayersCombi[ilay][istat][miseg] =
new TGeoCombiTrans(*DiskLayersTrans[ilay][istat][miseg],*dummyrot);
969 DiskLayersCombi[ilay][istat][miseg]->SetName(Form(
"Gem_Disk%d_Seg%d_%s",istat+1,miseg+1,LayerName[ilay].Data()));
970 DiskLayersCombi[ilay][istat][miseg]->RegisterYourself();
971 DiskVol[istat]->AddNode(DiskLayersVol[ilay][istat][miseg],0,DiskLayersCombi[ilay][istat][miseg]);
975 cout <<
"mvolume " << LayerName[ilay] <<
" from "
976 << setprecision(10) << DiskZPosition[istat]+layerPosition-LayerThick[ilay]/2. <<
" to "
977 << setprecision(10) << DiskZPosition[istat]+layerPosition+LayerThick[ilay]/2. << endl;
979 if ( LayerName[ilay].Contains(
"Gem") && LayerName[ilay].Contains(
"Sensor") ) {
980 Double_t mnewRadius = DiskInnerRadius[ilay][istat];
983 cout <<
"mrad = " << DiskInnerRadius[ilay][istat] <<
" pitch = " << SensorStripPitch[msensorNumber][0] <<
" for sensor " << msensorNumber << endl;
984 if ( SensorStripType[msensorNumber] != 2 ) {
985 mnofStrips = TMath::Ceil(2.*
TMath::Pi()*DiskInnerRadius[ilay][istat]/SensorStripPitch[msensorNumber][0]);
986 mnewRadius = mnofStrips*SensorStripPitch[msensorNumber][0]/2./
TMath::Pi();
988 cout <<
"!!!! " << istat <<
" " << ilay <<
" > there shall be " << mnofStrips <<
" strips here so the radius should be " << mnewRadius << endl;
989 pout <<
" " << msensorNumber+1 <<
", " << SensorStripType[msensorNumber] <<
", "
990 << setw(9) << 0. <<
", "
991 << setw(9) << 0. <<
", "
992 << setw(9) << DiskZPosition[istat]+layerPosition <<
", "
993 << setw(9) << 0. <<
", "
994 << setw(9) << mnewRadius <<
", "
995 << setw(9) << DiskOuterRadius[ilay][istat] <<
", "
996 << setw(9) << LayerThick[ilay] <<
", "
997 << setw(9) << SensorStripAngle[msensorNumber][0] <<
", "
999 << setw(9) << MiddleROBarHfTh[istat] <<
", "
1000 << setw(9) << SensorStripPitch[msensorNumber][0] <<
", "
1001 << setw(9) << SensorStripPitch[msensorNumber][1] << ((istat==NofDisks-1&&msensorNumber==1)?
"":
", \\")
1006 layerPosition += LayerThick[ilay]/2.;
1009 SubunitVol->AddNode(DiskVol[istat],0,DiskCombi[istat]);
1013 top->AddNode(SubunitVol,0,
new TGeoCombiTrans());
1028 gGeoMan->CloseGeometry();
FairGeoMedium * CbmMediumCarbon
FairGeoMedium * CbmMediumAluminium
FairGeoBuilder * geobuild
FairGeoMedium * CbmMediumAir
Int_t create1StationGem_lastStation_v2()
FairGeoMedium * CbmMediumPWO
FairGeoInterface * geoFace
vDisk SetLineColor(colYellow)