26 #include <TGeoManager.h>
27 #include <TGeoMaterial.h>
28 #include <TGeoMatrix.h>
29 #include <TGeoMedium.h>
30 #include <TGeoVolume.h>
59 TString nodeName = volu->GetName();
62 nodeName = nodeName(0, 4);
64 nodeName = (volu->GetName());
65 Ssiz_t l = nodeName.Last(
'#');
67 nodeName = nodeName(0, l);
73 Error(
"createNode",
"Mother volume of %s not found\n", volu->GetName());
96 if (volu->
getShape().Contains(
"TORUS")) {
98 TGeoMedium* medium =
geoManager->GetMedium(lnMed);
100 nodeName.Data(), medium, par->At(0), par->At(1), par->At(2), par->At(3), par->At(4));
102 }
else if (volu->
getShape().Contains(
"ASSEMBLY")) {
103 rv =
geoManager->MakeVolumeAssembly(nodeName.Data());
106 rv =
geoManager->Volume(nodeName.Data(), volu->
getShape().Data(), lnMed, par->GetArray(), par->GetSize());
126 if ((const_cast<FairGeoRotation&>(rot)).isUnitMatrix()) {
127 tr =
new TGeoTranslation(pos.
getX(), pos.
getY(), pos.
getZ());
131 sprintf(b,
"R%i",
nRot);
132 TGeoRotation* r =
new TGeoRotation(b);
134 for (Int_t i = 0; i < 9; i++) {
138 tr =
new TGeoCombiTrans(pos.
getX(), pos.
getY(), pos.
getZ(), r);
157 TGeoMaterial* material = 0;
164 material =
new TGeoMixture(med->GetName(), nComp, med->
getDensity());
165 Double_t sumWeights = 0.;
167 for (Int_t i = 0; i < nComp; i++) {
169 sumWeights += p[0] * p[2];
172 for (Int_t i = 0; i < nComp; i++) {
175 (
static_cast<TGeoMixture*
>(material))->DefineElement(i, p[0], p[1], p[2]);
177 (
static_cast<TGeoMixture*
>(material))->DefineElement(i, p[0], p[1], p[0] * p[2] / sumWeights);
185 TGeoMedium* medium =
new TGeoMedium(med->GetName(),
nMed, material, mp);
FairGeoNode * getMotherNode()
Double_t getRadiationLength()
TArrayD * getParameters()
virtual void setHadFormat(Int_t i)
TGeoVolume * getRootVolume()
ClassImp(FairEventBuilder)
void getMediumPar(Double_t *)
void setRootVolume(TGeoVolume *p)
FairGeoNode * getCopyNode()
void checkOverlaps(Double_t ovlp=0.0001)
Int_t createMedium(FairGeoMedium *)
FairGeoTransform * getPosition()
FairMQExParamsParOne * par
void setMediumIndex(Int_t i)
FairGeoMedium * getMedium()
void getComponent(Int_t, Double_t *)
const TString & getShape() const
Bool_t createNode(FairGeoNode *, Int_t hadFormat=0)