166 TGeoVolume* top = gGeoManager->Volume(
"EXPH",
"BOX",
fImedAr, expHall, 3);
167 gGeoManager->SetTopVolume(top);
171 Double_t trackerTube[3];
173 trackerTube[1] = 60.;
174 trackerTube[2] = 50.;
175 gGeoManager->Volume(
"TRTU",
"TUBE",
fImedAl, trackerTube, 3);
177 Double_t posX = -100.;
180 gGeoManager->Node(
"TRTU", 1,
"EXPH", posX, posY, posZ, 0, kTRUE, ubuf);
188 gGeoManager->Volume(
"CALB",
"BOX",
fImedPb, calBox, 3);
193 gGeoManager->Node(
"CALB", 1,
"EXPH", posX, posY, posZ, 0, kTRUE, ubuf);
197 Double_t layerBox[3];
201 gGeoManager->Volume(
"LAYB",
"BOX",
fImedAl, layerBox, 3);
203 for (Int_t i = 0; i < 19; i++) {
204 posX = (i - 9) * 10.;
207 gGeoManager->Node(
"LAYB", i,
"CALB", posX, posY, posZ, 0, kTRUE, ubuf);
211 gGeoManager->CloseGeometry();
214 gMC->SetRootGeometry();
335 Double_t px, py, pz, e;
342 fStack->PushTrack(toBeDone, -1, pdg, px, py, pz, e, vx, vy, vz, tof, polx,
343 poly, polz, kPPrimary, ntr, 1., 0);
349 fStack->PushTrack(toBeDone, -1, pdg, px, py, pz, e, vx, vy, vz, tof, polx,
350 poly, polz, kPPrimary, ntr, 1., 0);
356 fStack->PushTrack(toBeDone, -1, pdg, px, py, pz, e, vx, vy, vz, tof, polx,
357 poly, polz, kPPrimary, ntr, 1., 0);
443 TString volPath =
"/EXPH_1/CALB_1/LAYB_9";
445 Bool_t result = gMC->GetTransformation(volPath, matrix);
447 cout <<
"Transformation for " << volPath.Data() <<
": " << endl;
451 cerr <<
"Volume path " << volPath.Data() <<
" not found" << endl;
455 volPath =
"/EXPH_1/CALB_1/LAYB_100";
456 result = gMC->GetTransformation(volPath, matrix);
458 cout <<
"Transformation for " << volPath.Data() <<
": " << endl;
462 cerr <<
"Volume path " << volPath.Data() <<
" not found" << endl;
466 volPath =
"/EXPH_1/CALB_1/LAYB_9";
467 result = gMC->GetTransformation(volPath, matrix);
469 cout <<
"Transformation for " << volPath.Data() <<
": " << endl;
473 cerr <<
"Volume path " << volPath.Data() <<
" not found" << endl;
479 volPath =
"/EXPH_1/CALB_1/LAYB_9";
482 result = gMC->GetShape(volPath, shapeType, par);
484 cout <<
"Shape for " << volPath.Data() <<
": " << endl;
485 cout << shapeType.Data() <<
" parameters: ";
486 for (Int_t ipar = 0; ipar < par.GetSize(); ipar++)
487 cout << par.At(ipar) <<
", ";
491 cerr <<
"Volume path " << volPath.Data() <<
" not found" << endl;
499 Double_t a, z, density, radl, inter;
501#if ROOT_VERSION_CODE >= ROOT_VERSION(5, 30, 0)
502 result = gMC->GetMaterial(imat, matName, a, z, density, radl, inter, mpar);
504 cout <<
"Material with ID " << imat <<
": " << endl;
505 cout << matName.Data() <<
" Aeff = " << a <<
" Zeff = " << z
506 <<
" density = " << density <<
" radl = " << radl
507 <<
" inter = " << inter << endl;
508 if (mpar.GetSize() > 0) {
509 cout <<
" User defined parameters: ";
510 for (Int_t ipar = 0; ipar < par.GetSize(); ipar++)
511 cout << mpar.At(ipar) <<
", ";
516 cerr <<
"Material with ID " << imat <<
" not found" << endl;
523 TString volName =
"LAYB";
526 gMC->GetMaterial(volName, matName, imat, a, z, density, radl, inter, mpar);
528 cout <<
"Material for " << volName.Data() <<
" volume: " << endl;
529 cout << matName.Data() <<
" " << imat <<
" Aeff = " << a
530 <<
" Zeff = " << z <<
" density = " << density <<
" radl = " << radl
531 <<
" inter = " << inter << endl;
532 if (mpar.GetSize() > 0) {
533 cout <<
" User defined parameters: ";
534 for (Int_t ipar = 0; ipar < par.GetSize(); ipar++)
535 cout << mpar.At(ipar) <<
", ";
540 cerr <<
"Volume " << volName.Data() <<
" not found" << endl;
547 Int_t imed, nmat, isvol, ifield;
548 Double_t fieldm, tmaxfd, stemax, deemax, epsil, stmin;
549 result = gMC->GetMedium(volName, medName, imed, nmat, isvol, ifield, fieldm,
550 tmaxfd, stemax, deemax, epsil, stmin, mpar);
552 cout <<
"Medium for " << volName.Data() <<
" volume: " << endl;
553 cout << medName.Data() <<
" " << imed <<
" nmat = " << nmat
554 <<
" isvol = " << isvol <<
" ifield = " << ifield
555 <<
" fieldm = " << fieldm <<
" tmaxfd = " << tmaxfd
556 <<
" stemax = " << stemax <<
" deemax = " << deemax
557 <<
" epsil = " << epsil <<
" stmin = " << stmin << endl;
558 if (mpar.GetSize() > 0) {
559 cout <<
" User defined parameters: ";
560 for (Int_t ipar = 0; ipar < par.GetSize(); ipar++)
561 cout << mpar.At(ipar) <<
", ";
566 cerr <<
"Volume " << volName.Data() <<
" not found" << endl;
574 volPath =
"/EXPH_1/CALB_1/LAYB_100";
575 result = gMC->GetTransformation(volPath, matrix);
576 cout <<
"GetTransformation: Volume path " << volPath.Data();
578 cout <<
" not found" << endl;
580 cout <<
" found" << endl;
583 result = gMC->GetShape(volPath, shapeType, par);
584 cout <<
"GetShape: Volume path " << volPath.Data();
586 cout <<
" not found" << endl;
588 cout <<
" found" << endl;
593 gMC->GetMaterial(volName, matName, imat, a, z, density, radl, inter, mpar);
594 cout <<
"GetMaterial: Volume name " << volName.Data();
596 cout <<
" not found" << endl;
598 cout <<
" found" << endl;
601 result = gMC->GetMedium(volName, medName, imed, nmat, isvol, ifield, fieldm,
602 tmaxfd, stemax, deemax, epsil, stmin, mpar);
603 cout <<
"GetMedium: Volume name " << volName.Data();
605 cout <<
" not found" << endl;
607 cout <<
" found" << endl;