9 #include "ERGeoSubAssembly.h" 11 #include "FairLogger.h" 14 component->SetVolumeNamePrefix(TString(this->GetName()) +
"_");
15 LOG(DEBUG) <<
"Component " << component->GetVolumeName() <<
" added to " << fName << FairLogger::endl;
16 fComponents[component->GetVolumeName()] = component;
19 void ERGeoSubAssembly::AddComponent(
ERGeoComponent* component,
const TVector3& position,
20 const TVector3& rotation) {
21 component->SetPosition(position);
22 component->SetRotation(rotation);
23 AddComponent(component);
26 void ERGeoSubAssembly::ConstructGeometryVolume() {
27 fVolume =
new TGeoVolumeAssembly(fName);
28 for (
auto componentPair : fComponents) {
29 auto* component = componentPair.second;
30 component->ConstructGeometryVolume();
31 const auto* translation = component->GetPosition();
32 auto* rotation =
const_cast<TGeoRotation*
>(component->GetRotation());
33 fVolume->AddNode(component->GetVolume(), 0,
34 new TGeoCombiTrans(translation->X() ,translation->Y(), translation->Z(),
39 std::list<TString> ERGeoSubAssembly::GetComponentNames()
const {
40 std::list<TString> names;
41 for (
auto componentPair : fComponents) {
42 names.push_back(componentPair.first);