260 TGeoVolume *top=gGeoManager->GetTopVolume();
261 TGeoVolume *tSplitCal =
new TGeoVolumeAssembly(
"SplitCalDetector");
269 TGeoMedium *A2 =gGeoManager->GetMedium(
"iron");
270 TGeoMedium *A3 =gGeoManager->GetMedium(
"lead");
271 TGeoMedium *A4 =gGeoManager->GetMedium(
"GEMmixture");
272 TGeoMedium *A1 =gGeoManager->GetMedium(
"Scintillator");
276 Double_t zStartSplitCal =
fZStart;
278 TGeoVolume *newECALfilter_first;
279 TGeoVolume *newECALfilter;
280 TGeoVolume *newECALdet_gas;
281 TGeoVolume *stripGivingX;
282 TGeoVolume *stripGivingY;
284 TGeoVolume *newHCALfilter[100];
285 TGeoVolume *newHCALdet[100];
286 const char* char_labelHCALfilter[100];
287 TString labelHCALfilter;
288 const char* char_labelHCALdet[100];
289 TString labelHCALdet;
292 Double_t z_splitcal=0;
293 Int_t i_nlayECAL_gas;
298 newECALfilter_first->SetLineColor(kGray);
300 newECALfilter->SetLineColor(kGray);
303 stripGivingX->SetVisibility(kTRUE);
304 AddSensitiveVolume(stripGivingX);
305 stripGivingX->SetLineColor(kGreen);
308 stripGivingY->SetVisibility(kTRUE);
309 AddSensitiveVolume(stripGivingY);
310 stripGivingY->SetLineColor(kGreen);
314 AddSensitiveVolume(newECALdet_gas);
315 newECALdet_gas->SetLineColor(kRed);
325 tSplitCal->AddNode(newECALfilter_first, i_nlayECAL*1e5,
new TGeoTranslation(0, 0, z_splitcal));
329 tSplitCal->AddNode(newECALfilter, i_nlayECAL*1e5,
new TGeoTranslation(0, 0, z_splitcal));
334 if(i_nlayECAL==0) z_splitcal+=
fEmpty;
335 if(i_nlayECAL==7) z_splitcal+=
fBigGap;
338 i_nlayECAL_gas=-1000;
344 else i_nlayECAL_gas=1;
348 else i_nlayECAL_gas=2;
351 tSplitCal->AddNode(newECALdet_gas, 1e8+(i_nlayECAL+1)*1e5 ,
new TGeoTranslation(0, 0, z_splitcal));
358 tSplitCal->AddNode(newECALdet_gas, 1e8+(i_nlayECAL+1)*1e5 ,
new TGeoTranslation(0, 0, z_splitcal));
366 if (i_nlayECAL%2==0) {
371 int index = (i_nlayECAL+1)*1e5 + (mx+1)*1e4 + (my+1)*1e3 + j+1 ;
374 tSplitCal->AddNode(stripGivingX, index,
new TGeoTranslation(xCoordinate, yCoordinate, z_splitcal));
385 int index = (i_nlayECAL+1)*1e5 + (mx+1)*1e4 + (my+1)*1e3 + j+1 ;
388 tSplitCal->AddNode(stripGivingY, index,
new TGeoTranslation(xCoordinate, yCoordinate, z_splitcal));
400 for (Int_t i_nlayHCAL=0; i_nlayHCAL<1; i_nlayHCAL++){
401 labelHCALfilter=
"HCALfilter_";
402 labelHCALfilter+=i_nlayHCAL;
403 char_labelHCALfilter[i_nlayHCAL]=labelHCALfilter;
404 labelHCALdet=
"HCAL_det";
405 labelHCALdet+=i_nlayHCAL;
406 char_labelHCALdet[i_nlayHCAL]=labelHCALdet;
411 AddSensitiveVolume(newHCALdet[i_nlayHCAL]);
413 newHCALdet[i_nlayHCAL]->SetLineColor(kRed);
415 newHCALfilter[i_nlayHCAL]->SetLineColor(kBlue);
419 tSplitCal->AddNode(newHCALfilter[i_nlayHCAL], 1,
new TGeoTranslation(0, 0, z_splitcal));
423 if(
fActiveHCAL) tSplitCal->AddNode(newHCALdet[i_nlayHCAL], 1,
new TGeoTranslation(0, 0, z_splitcal));
433 TGeoShapeAssembly* asmb =
dynamic_cast<TGeoShapeAssembly*
>(tSplitCal->GetShape());
434 Double_t totLength = asmb->GetDZ();
435 top->AddNode(tSplitCal, 1,
new TGeoTranslation(0, 0,zStartSplitCal+totLength));