39#include <Inventor/nodes/SoSeparator.h>
40#include <Inventor/nodes/SoSwitch.h>
41#include <Inventor/events/SoKeyboardEvent.h>
42#include <Inventor/nodes/SoPickStyle.h>
43#include <Inventor/nodes/SoEventCallback.h>
44#include <Inventor/nodes/SoCamera.h>
45#include <Inventor/nodes/SoCylinder.h>
46#include <Inventor/nodes/SoFont.h>
48#include "GeoModelKernel/GeoVolumeCursor.h"
49#include "GeoModelKernel/GeoPrintGraphAction.h"
67#include "GeoModelKernel/GeoBox.h"
68#include "GeoModelKernel/GeoCountVolAction.h"
69#include "GeoModelKernel/GeoAccessVolumeAction.h"
70#include "GeoModelDBManager/GMDBManager.h"
71#include "GeoRead/GReadIn.h"
87#include <QApplication>
92#include <initializer_list>
104 #ifndef BUILDVP1LIGHT
108 const unsigned n_chamber_t0_sources=2;
109 for (
unsigned i=0;i<n_chamber_t0_sources;++i)
131 SubSystemInfo( QCheckBox* cb,
const QRegExp& the_geomodeltreetopregexp,
bool the_negatetreetopregexp,
133 const std::string& the_matname,
134 const QRegExp& the_geomodelgrandchildrenregexp,
bool the_negategrandchildrenregexp=
false)
149 muonchambers = ( matname==
"CSC"||matname==
"TGC"||matname==
"EndcapMdt"||matname==
"MM"||matname==
"sTGC"
150 ||matname==
"BarrelInner"||matname==
"BarrelMiddle"||matname==
"BarrelOuter" );
185 HepGeom::Transform3D
xf;
212 std::cout<<
" SubSystemInfo @ "<<
this<<
"\n"
213 <<(
isbuilt?
"Is built.\n":
"Is not built.\n")
214 <<(
muonchambers?
"Has muon chambers.\n":
"No muon chambers.\n");
215 std::cout<<
"Contains following volhandles: [";
216 for (
auto vol :
vollist) std::cout<<&vol<<
",";
217 std::cout<<
"]"<<std::endl;
218 std::cout<<
"Matname = "<<
matname<<std::endl;
219 std::cout<<
"Contains following TreetopInfo: [";
220 for (
const auto& tt :
treetopinfo) std::cout<<tt.volname<<
",";
221 std::cout<<
"]"<<std::endl;
229 const QString& treetopregexp,
const QString& childrenregexp=
"",
230 const std::string& matname=
"",
bool negatetreetopregexp =
false,
bool negatechildrenregexp =
false,
231 const QString& grandchildrenregexp=
"",
bool negategrandchildrenregexp =
false);
253 static double volume(
const PVConstLink& pv);
256 static void catchKbdState(
void *userData, SoEventCallback *CB);
278 #ifndef BUILDVP1LIGHT
290 bool selectITkComponent(
VolumeHandle*,
bool isPixel,
bool pixelModules,
bool pixelServices,
bool pixelSupports,
bool stripSensors,
bool stripElectronics,
bool stripServices,
bool stripSupports,
unsigned inheritedCategory = 0);
295 void applyTopVolStates(
const QMap<quint32,QByteArray>&,
bool disablenotif =
false);
308 "This system displays the geometry as defined in the GeoModel tree.",
309 "Riccardo.Maria.Bianchi@cern.ch"),
310 m_d(new
Imp(this,SubSystemsTurnedOn))
319 m_d->volumetreemodel->cleanup();
320 delete m_d->matVisAttributes;
m_d->matVisAttributes = 0;
321 delete m_d->detVisAttributes;
m_d->detVisAttributes = 0;
322 delete m_d->volVisAttributes;
m_d->volVisAttributes = 0;
326 m_d->subsysInfoList.clear();
340 m_d->controller->setGeometrySelectable(b);
346 m_d->controller->setZoomToVolumeOnClick(b);
353 m_d->controller->setOrientViewToMuonChambersOnClick(b);
360 if (
m_d->controller->autoAdaptMuonChambersToEventData()!=b) {
361 m_d->controller->setAutoAdaptMuonChambersToEventData(b);
369 const QString& treetopregexp,
const QString& childrenregexp,
370 const std::string& matname,
bool negatetreetopregexp,
bool negatechildrenregexp,
371 const QString& grandchildrenregexp,
bool negategrandchildrenregexp)
373 theclass->messageDebug(
"VP1GeometrySystem::Imp::addSubSystem - flag: '" + QString(f) +
"' - matName: '" +
str(matname.c_str()) +
"'." );
375 QCheckBox * cb =
controller->subSystemCheckBox(f);
377 theclass->message(
"Error: Problems retrieving checkbox for subsystem "+
str(f));
381 QRegExp(childrenregexp),negatechildrenregexp,f,matname,
382 QRegExp(grandchildrenregexp), negategrandchildrenregexp);
389 message(
"VP1GeometrySystem::buildController");
407 connect(
m_d->controller,SIGNAL(muonChamberAdaptionStyleChanged(VP1GeoFlags::MuonChamberAdaptionStyleFlags)),
412 connect(
m_d->controller,SIGNAL(
autoAdaptPixelsOrSCT(
bool,
bool,
bool,
bool,
bool,
bool)),
this,SLOT(
autoAdaptPixelsOrSCT(
bool,
bool,
bool,
bool,
bool,
bool)));
413 connect(
m_d->controller,SIGNAL(
autoAdaptMuonNSW(
bool,
bool,
bool,
bool,
bool,
bool)),
this,SLOT(
autoAdaptMuonNSW(
bool,
bool,
bool,
bool,
bool,
bool)));
414 connect(
m_d->controller,SIGNAL(
autoAdaptHGTD(
bool,
bool,
bool,
bool,
bool,
bool,
bool)),
this,SLOT(
autoAdaptHGTD(
bool,
bool,
bool,
bool,
bool,
bool,
bool)));
415 connect(
m_d->controller,SIGNAL(
autoAdaptITk(
bool,
bool,
bool,
bool,
bool,
bool,
bool,
bool)),
this,SLOT(
autoAdaptITk(
bool,
bool,
bool,
bool,
bool,
bool,
bool,
bool)));
418 connect(
m_d->controller,SIGNAL(labelsChanged(
int)),
this,SLOT(
setLabels(
int)));
419 connect(
m_d->controller,SIGNAL(labelPosOffsetChanged(QList<int>)),
this,SLOT(
setLabelPosOffsets(QList<int>)));
488 m_d->addSubSystem(
VP1GeoFlags::MuonToroidsEtc,
"Muon",
".*(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*",
"MuonEtc",
false,
true,
"(ECT_Toroids|BAR_Toroid|Feet|NewSmallWheel|JDSH|JTSH|JFSH).*",
true);
498 m_d->controller->volumeTreeBrowser()->header()->hide();
499 m_d->controller->volumeTreeBrowser()->uniformRowHeights();
500 m_d->controller->volumeTreeBrowser()->setModel(
m_d->volumetreemodel);
502 return m_d->controller;
509 m_d->ensureInitVisAttributes();
516 This->
kbEvent =
static_cast<const SoKeyboardEvent *
>(CB->getEvent());
522 m_d->sceneroot = root;
524 #ifndef BUILDVP1LIGHT
526 message(
"Error: GeoModel not configured properly in job.");
533 message(
"Error: Could not retrieve the ATLAS GeoModelExperiment from detector store");
543 if (!
m_d->m_textSep) {
546 m_d->m_textSep =
new SoSeparator;
547 m_d->m_textSep->setName(
"TextSep");
548 m_d->m_textSep->ref();
550 m_d->sceneroot->addChild(
m_d->m_textSep);
553 SoFont *myFont =
new SoFont;
554 myFont->name.setValue(
"Arial");
555 myFont->size.setValue(12.0);
556 m_d->m_textSep->addChild(myFont);
558 bool save = root->enableNotify(
false);
561 SoEventCallback *catchEvents =
new SoEventCallback();
563 root->addChild(catchEvents);
565 root->addChild(
m_d->controller->drawOptions());
566 root->addChild(
m_d->controller->pickStyle());
569 qDebug() <<
"Configuring the default systems... - subsysInfoList len:" << (
m_d->subsysInfoList).
length();
575 bool on(
m_d->initialSubSystemsTurnedOn & subsys->
flag);
577 subsys->
checkbox->setEnabled(
false);
578 subsys->
checkbox->setToolTip(
"This sub-system is not available");
587 qDebug() <<
"Looping on volumes from the input GeoModel...";
589 GeoVolumeCursor av(world);
590 while (!av.atEnd()) {
592 std::string
name = av.getName();
594 qDebug() <<
"volume name:" << QString::fromStdString(
name);
605 if (subsys->
checkbox==checkBoxOther&&found) {
621 SoSwitch * sw =
new SoSwitch();
624 if (sw->whichChild.getValue() != SO_SWITCH_NONE)
625 sw->whichChild = SO_SWITCH_NONE;
626 SoSeparator * sep =
new SoSeparator;
631 subsys->
checkbox->setToolTip(
"Toggle the display of the "+subsys->
checkbox->text()+
" sub system");
637 message(
"Warning: Found unexpected GeoModel treetop: "+QString(
name.c_str()));
644 if (!checkBoxOther->isEnabled())
645 checkBoxOther->setVisible(
false);
651 m_d->buildSystem(subsys);
653 if (subsys->
soswitch->whichChild.getValue() != SO_SWITCH_ALL)
654 subsys->
soswitch->whichChild = SO_SWITCH_ALL;
656 m_d->volumetreemodel->enableSubSystem(subsys->
flag);
659 if (!
m_d->restoredTopvolstates.isEmpty()) {
660 m_d->applyTopVolStates(
m_d->restoredTopvolstates,
false);
661 m_d->restoredTopvolstates.clear();
663 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
664 root->enableNotify(save);
669 if (
m_d->controller->autoAdaptMuonChambersToEventData())
681 return getGeometryFromLocalDB();
687GeoModelExperiment* VP1GeometrySystem::Imp::createTheExperiment(GeoPhysVol* world)
689 if (world ==
nullptr)
692 double densityOfAir=0.1;
693 const GeoMaterial* worldMat =
new GeoMaterial(
"std::Air", densityOfAir);
694 const GeoBox* worldBox =
new GeoBox(1000*CLHEP::cm, 1000*CLHEP::cm, 1000*CLHEP::cm);
695 const GeoLogVol* worldLog =
new GeoLogVol(
"WorldLog", worldBox, worldMat);
697 world =
new GeoPhysVol(worldLog);
700 GeoModelExperiment* theExperiment =
new GeoModelExperiment(world);
701 return theExperiment;
706GeoModelExperiment* VP1GeometrySystem::Imp::getDummyGeometry()
709 GeoModelExperiment* theExperiment = createTheExperiment();
717 VP1Msg::messageDebug(
"Method VP1GeometrySystem::Imp::getDummyGeometry() has to be ported to the new standalone GeoModel.");
719 return theExperiment;
724GeoModelExperiment* VP1GeometrySystem::Imp::getGeometryFromLocalDB()
730 QSettings settings(
"ATLAS",
"VP1Light");
731 QString
path = settings.value(
"db/path").toString();
733 qDebug() <<
"Using this DB file:" <<
path;
738 if (! QFileInfo(path).
exists() ) {
739 qWarning() <<
"ERROR!! DB '" <<
path <<
"' does not exist!!";
740 qWarning() <<
"Returning..." <<
"\n";
745 GMDBManager*
db =
new GMDBManager(path);
749 qDebug() <<
"OK! Database is open!";
754 qDebug() <<
"Database is not open!";
761 GeoModelPers::GReadIn readInGeo = GeoModelPers::GReadIn(db);
763 qDebug() <<
"GReadIn set.";
767 GeoPhysVol* dbPhys = readInGeo.buildGeoModel();
770 qDebug() <<
"GReadIn::buildGeoModel() done.";
773 GeoModelExperiment* theExperiment = createTheExperiment(dbPhys);
776 return theExperiment;
784 QCheckBox * cb =
static_cast<QCheckBox*
>(sender());
787 if (cb==
ss->checkbox) {
793 message(
"ERROR: Unknown checkbox");
799 if (cb->isChecked()) {
800 SbBool save = sw->enableNotify(
false);
801 if (sw->getNumChildren()==0) {
802 m_d->buildSystem(subsys);
803 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
805 if (sw->whichChild.getValue() != SO_SWITCH_ALL)
806 sw->whichChild = SO_SWITCH_ALL;
807 sw->enableNotify(save);
809 m_d->volumetreemodel->enableSubSystem(subsys->
flag);
814 if (sw->whichChild.getValue() != SO_SWITCH_NONE)
815 sw->whichChild = SO_SWITCH_NONE;
816 m_d->volumetreemodel->disableSubSystem(subsys->
flag);
849 if (pickedPath->getNodeFromTail(0)->getTypeId()==SoCylinder::getClassTypeId())
852 if (pickedPath->getLength()<5) {
857 SoSeparator * nodesep(0);
859 if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId()
860 && pickedPath->getNodeFromTail(2)->getTypeId()==SoSwitch::getClassTypeId()
861 && pickedPath->getNodeFromTail(3)->getTypeId()==SoSeparator::getClassTypeId())
864 nodesep =
static_cast<SoSeparator*
>(pickedPath->getNodeFromTail(3));
867 else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSwitch::getClassTypeId()
868 && pickedPath->getNodeFromTail(2)->getTypeId()==SoSeparator::getClassTypeId())
871 nodesep =
static_cast<SoSeparator*
>(pickedPath->getNodeFromTail(2));
873 else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId()) {
875 nodesep =
static_cast<SoSeparator*
>(pickedPath->getNodeFromTail(1));
878 message(
"Unexpected picked path");
881 if ( (!(nodesep)) || (
m_d->sonodesep2volhandle.find(nodesep) ==
m_d->sonodesep2volhandle.end()) ) {
882 message(
"Problems finding volume handle");
887 message(
"Found NULL volume handle");
901 bool shift_isdown = (Qt::ShiftModifier & QApplication::keyboardModifiers());
910 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
914 bool ctrl_isdown = (Qt::ControlModifier & QApplication::keyboardModifiers());
924 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
928 bool z_isdown =
m_d->kbEvent && SO_KEY_PRESS_EVENT(
m_d->kbEvent,SoKeyboardEvent::Z);
943 bool orientedView(
false);
944 if (
m_d->controller->orientViewToMuonChambersOnClick() && volhandle->
isInMuonChamber()) {
953 message(
"Warning: Failed to relocate picked node.");
963 if (!orientedView&&
m_d->controller->zoomToVolumeOnClick()) {
966 std::set<SoCamera*>::iterator it,itE = cameras.end();
967 for (it=cameras.begin();it!=itE;++it) {
978 m_d->controller->setLastSelectedVolume(volhandle);
986 if (
m_d->controller->printInfoOnClick_Shape()) {
991 if (
m_d->controller->printInfoOnClick_Material()) {
997 if (
m_d->controller->printInfoOnClick_CopyNumber() ) {
999 message(
"===> CopyNo : "+(cn>=0?QString::number(cn):QString(cn==-1?
"Invalid":
"Error reconstructing copynumber")));
1002 if (
m_d->controller->printInfoOnClick_Transform() ) {
1004 float translation_x, translation_y, translation_z, rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians;
1006 translation_x, translation_y, translation_z,
1007 rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians );
1008 message(
"===> Local Translation:");
1009 message(
" x = "+QString::number(translation_x/CLHEP::mm)+
" mm");
1010 message(
" y = "+QString::number(translation_y/CLHEP::mm)+
" mm");
1011 message(
" z = "+QString::number(translation_z/CLHEP::mm)+
" mm");
1012 message(
"===> Local Rotation:");
1013 message(
" axis x = "+QString::number(rotaxis_x));
1014 message(
" axis y = "+QString::number(rotaxis_y));
1015 message(
" axis z = "+QString::number(rotaxis_z));
1016 message(
" angle = "+QString::number(rotangle_radians*180.0/
M_PI)+
" deg");
1018 translation_x, translation_y, translation_z,
1019 rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians );
1020 message(
"===> Global Translation:");
1021 message(
" x = "+QString::number(translation_x/CLHEP::mm)+
" mm");
1022 message(
" y = "+QString::number(translation_y/CLHEP::mm)+
" mm");
1023 message(
" z = "+QString::number(translation_z/CLHEP::mm)+
" mm");
1024 message(
"===> Global Rotation:");
1025 message(
" axis x = "+QString::number(rotaxis_x));
1026 message(
" axis y = "+QString::number(rotaxis_y));
1027 message(
" axis z = "+QString::number(rotaxis_z));
1028 message(
" angle = "+QString::number(rotangle_radians*180.0/
M_PI)+
" deg");
1031 if (
m_d->controller->printInfoOnClick_Tree()) {
1032 std::ostringstream
str;
1033 GeoPrintGraphAction pg(
str);
1036 for (
const QString& line : QString(
str.str().c_str()).split(
"\n"))
1040 if (
m_d->controller->printInfoOnClick_Mass()) {
1044 message(
"===> Total Mass <===");
1049 if (
m_d->controller->printInfoOnClick_MuonStationInfo()&&volhandle->
isInMuonChamber()) {
1051 std::map<PVConstLink,VolumeHandle*>::const_iterator itChamber =
m_d->muonchambers_pv2handles.find(pvlink);
1052 #ifndef BUILDVP1LIGHT
1053 if (itChamber!=
m_d->muonchambers_pv2handles.end()) {
1054 m_d->ensureInitPV2MuonStationMap();
1055 std::map<GeoPVConstLink,const MuonGM::MuonStation*>::const_iterator itStation(
m_d->pv2MuonStation.find(pvlink));
1056 if (itStation!=
m_d->pv2MuonStation.end()) {
1057 message(
"===> Muon station <===");
1058 message(
" ",
m_d->stationInfo(itStation->second));
1067 QStack<QString> partspectPath, extras;
1068 QString detFactoryName;
1070 VolumeHandle *parentVH(volhandle), *childVH(volhandle);
1071 m_d->createPathExtras(volhandle,detFactoryName,extras);
1074 parentVH = parentVH->parent();
1075 PVConstLink parentPVLink = parentVH ? parentVH->geoPVConstLink() : childVH->
geoPVConstLink()->getParent();
1079 std::string childPVName = parentPVLink->getNameOfChildVol(indexOfChild);
1080 QString pathEntry = childPVName==
"ANON" ? detFactoryName+childVH->
getName() : QString(childPVName.c_str());
1082 std::optional<int> childCopyNo = parentPVLink->getIdOfChildVol(indexOfChild);
1085 strCopyNo.setNum(*childCopyNo);
1086 pathEntry += (
"::"+strCopyNo);
1088 partspectPath.push(pathEntry);
1093 while(!extras.isEmpty())
1094 partspectPath.push(extras.pop());
1096 partspectPath.push(
"Atlas::Atlas");
1116 #ifndef BUILDVP1LIGHT
1126 SoSeparator * subsystemsep =
new SoSeparator;
1130 SbBool save = si->
soswitch->enableNotify(
false);
1134 std::vector<SubSystemInfo::TreetopInfo>::const_iterator it, itE = si->
treetopinfo.end();
1142 theclass->message(
"Warning: Did not find a predefined material for volume: "+QString(it->volname.c_str()));
1156 std::vector<SubSystemInfo::TreetopInfo>::const_iterator it, itE = si->
treetopinfo.end();
1164 SoMaterial*mat_top(0);
1172 volhandle_subsysdata->
ref();
1176 GeoVolumeCursor av(it->pV);
1178 while (!av.atEnd()) {
1185 PVConstLink pVD = av.getVolume();
1192 if (hasMuonChambers){
1193 #ifndef BUILDVP1LIGHT
1196 #ifdef BUILDVP1LIGHT
1201 std::cout<<
"Has muon chamber VH="<<vh<<std::endl;
1206 vh =
new VolumeHandle(volhandle_subsysdata,0,pVD,ichild++,
1235 volhandle_subsysdata->
unref();
1250 VP1Msg::messageDebug(
"Perform auto expansion of all ether volumes (needed for muon dead material)");
1253 for (it = si->
vollist.begin(); it!=itE; ++it){
1255 (*it)->expandMothersRecursivelyToNonEther();
1263 si->
soswitch->addChild(subsystemsep);
1272 const GeoLogVol* lv = pv->getLogVol();
1273 const GeoMaterial *material = lv->getMaterial();
1274 double density = material->getDensity();
1275 return density*
volume(pv);
1281 const GeoLogVol * lv = pv->getLogVol();
1282 const GeoShape *shape = lv->getShape();
1283 return shape->volume();
1290 const GeoLogVol* lv = pv->getLogVol();
1291 const GeoMaterial *material = lv->getMaterial();
1292 double density = material->getDensity();
1296 GeoVolumeCursor av(pv);
1297 while (!av.atEnd()) {
1299 mass -=
volume(av.getVolume())*density;
1315 serialise.save(
m_d->controller->saveSettings());
1318 QMap<QString,bool> subsysstate;
1320 serialise.widgetHandled(subsys->
checkbox);
1321 subsysstate.insert(subsys->
checkbox->text(),subsys->
checkbox->isChecked());
1323 serialise.save(subsysstate);
1326 QMap<quint32,QByteArray> topvolstates;
1332 topvolstates.insert((*it)->hashID(),(*it)->getPersistifiableState());
1334 serialise.save(topvolstates);
1336 m_d->ensureInitVisAttributes();
1337 serialise.save(
m_d->detVisAttributes->getState());
1338 serialise.save(
m_d->matVisAttributes->getState());
1339 serialise.save(
m_d->volVisAttributes->getState());
1341 serialise.disableUnsavedChecks();
1342 return serialise.result();
1349 message(
"Warning: State data in .vp1 file is in wrong format - ignoring!");
1352 if (
state.version()<=5) {
1353 message(
"Warning: State data in .vp1 file is in obsolete format - ignoring!");
1361 m_d->controller->restoreSettings(
state.restoreByteArray());
1364 VP1GeoFlags::SubSystemFlags flags;
1365 QMap<QString,bool> subsysstate =
state.restore<QMap<QString,bool> >();
1368 if (subsysstate.contains(subsys->
checkbox->text())&&subsysstate[subsys->
checkbox->text()])
1369 flags |= subsys->
flag;
1371 m_d->initialSubSystemsTurnedOn = flags;
1374 QMap<quint32,QByteArray> topvolstates;
1375 topvolstates =
state.restore<QMap<quint32,QByteArray> >();
1377 m_d->applyTopVolStates(topvolstates,
true);
1379 m_d->restoredTopvolstates = topvolstates;
1381 if (
state.version()>=7) {
1382 m_d->ensureInitVisAttributes();
1383 m_d->detVisAttributes->applyState(
state.restoreByteArray());
1384 m_d->matVisAttributes->applyState(
state.restoreByteArray());
1385 m_d->volVisAttributes->applyState(
state.restoreByteArray());
1388 state.disableUnrestoredChecks();
1391 if (
m_d->controller->autoAdaptMuonChambersToEventData())
1400 QMap<quint32,QByteArray>::const_iterator topvolstatesItr;
1403 for (;it!=itE;++it) {
1404 topvolstatesItr = topvolstates.find((*it)->hashID());
1405 if (topvolstatesItr!=topvolstates.end())
1406 (*it)->applyPersistifiableState(topvolstatesItr.value());
1420 prefix = QString(
"Pixel::");
1423 entries.push(
"ITkPixel::ITkPixel");
1429 prefix = QString(
"SCT::");
1432 entries.push(
"ITkStrip::ITkStrip");
1438 prefix = QString(
"HGTD::");
1444 prefix = QString(
"TRT::");
1450 prefix = QString(
"InDetServMat::");
1455 prefix = QString(
"LArMgr::");
1457 entries.push(
"LArMgr::LArMgr");
1461 prefix = QString(
"Tile::");
1479 prefix = QString(
"Muon::");
1480 entries.push(
"MUONQ02::MUONQ02");
1481 entries.push(
"Muon::MuonSys");
1485 prefix = QString(
"BeamPipe::");
1486 entries.push(
"BeamPipe::BeamPipe");
1507 if (val<0||val>100) {
1508 message(
"setCurvedSurfaceRealism Error: Value "+
str(val)+
"out of range!");
1511 m_d->controller->setComplexity(val==100?1.0:(val==0?0.0:val/100.0));
1521 float transparency =
m_d->controller->transparency();
1524 m_d->controller->setLastSelectedVolume(0);
1525 m_d->ensureInitVisAttributes();
1526 m_d->detVisAttributes->overrideTransparencies(transparency);
1527 m_d->matVisAttributes->overrideTransparencies(transparency);
1528 m_d->volVisAttributes->overrideTransparencies(transparency);
1529 m_d->controller->setLastSelectedVolume(lastSelVol);
1546 for (;it!=itE;++it) {
1547 messageDebug(
"resetting volume --> " + (*it)->getName() );
1557 if (
m_d->muonchambers_pv2handles.empty())
1560 std::set<GeoPVConstLink> allchambers;
1561 if (!
m_d->sender2ChamberList.empty()) {
1562 allchambers = (
m_d->sender2ChamberList.begin())->second;
1563 std::map<QObject*,std::set<GeoPVConstLink> >
::iterator itLists,itListsE(
m_d->sender2ChamberList.end());
1564 for (itLists =
m_d->sender2ChamberList.begin(),++itLists;itLists != itListsE;++itLists) {
1565 allchambers.insert(itLists->second.begin(),itLists->second.end());
1570 bool save =
m_d->sceneroot->enableNotify(
false);
1571 m_d->phisectormanager->largeChangesBegin();
1574 std::map<PVConstLink,VolumeHandle*>::iterator it, itE=
m_d->muonchambers_pv2handles.end();
1575 std::set<GeoPVConstLink>::iterator itchambersE = allchambers.end();
1576 for (it=
m_d->muonchambers_pv2handles.begin();it!=itE;++it) {
1577 if (allchambers.find(it->first)==itchambersE)
1580 if (it->second->muonChamberDirty())
1581 m_d->updateTouchedMuonChamber(it->second);
1584 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
1585 m_d->phisectormanager->largeChangesEnd();
1587 m_d->sceneroot->enableNotify(
true);
1588 m_d->sceneroot->touch();
1596 std::map<PVConstLink,VolumeHandle*>::iterator it, itE=
m_d->muonchambers_pv2handles.end();
1597 for (it=
m_d->muonchambers_pv2handles.begin();it!=itE;++it)
1598 it->second->setMuonChamberDirty(
true);
1601 if (
m_d->controller->autoAdaptMuonChambersToEventData())
1609 if (!
m_d->controller) {
1610 message(
"emit_appropriateMDTProjectionsChanged called before controller built.");
1613 VP1GeoFlags::MuonChamberAdaptionStyleFlags f(
m_d->controller->muonChamberAdaptionStyle());
1616 int i (option_openmdtchambers?(option_hidetubes?0:1):2);
1617 if (
m_d->last_appropriatemdtprojections != i ) {
1618 m_d->last_appropriatemdtprojections = i;
1627 bool listChanged(
m_d->sender2ChamberList.find(sender())!=
m_d->sender2ChamberList.end()?
1628 (chambers !=
m_d->sender2ChamberList[sender()]):
true);
1629 m_d->sender2ChamberList[sender()] = chambers;
1632 if ( listChanged &&
m_d->controller->autoAdaptMuonChambersToEventData() )
1640 if (stationname.empty()) {
1641 theclass->message(
"Warning: Asked to handle muon chamber (station) with empty name!");
1649 VP1GeoFlags::MuonChamberAdaptionStyleFlags f(
controller->muonChamberAdaptionStyle());
1656 char firstletter = stationname[0];
1657 std::string name1,name2;
1658 if (firstletter==
'E' || firstletter ==
'B') {
1662 if (option_openmdtchambers) {
1667 for (;itch!=itchE;++itch) {
1671 name1 = (*itch)->getNameStdString();
1672 if (name1.size()>2&&name1[0]==
'D'&&name1[1]==
'e'&&name1[2]==
'd')
1675 (*itch)->initialiseChildren();
1677 for (;itch2!=itch2E;++itch2) {
1681 name2 = (*itch2)->getNameStdString();
1683 if (option_hidetubes&&name2==
"MDTDriftWall") {
1685 }
else if (name2.size()>2&&name2[0]==
'R'&&((name2[1]==
'p'&&name2[2]==
'c')||(name2[1]==
'P'&&name2[2]==
'C'))) {
1686 zap = (option_hiderpcvolumes||name2!=
"Rpclayer");
1687 }
else if (name2.size()>2&&name2[0]==
'D'&&name2[1]==
'e'&&name2[2]==
'd') {
1696 chamberhandle->
reset();
1699 if (firstletter==
'C') {
1703 if (option_opencscchambers) {
1707 for (;itch!=itchE;++itch) {
1708 if ((*itch)->hasName(
"CSCspacer")) {
1712 if ((*itch)->nChildren()<1)
1714 (*itch)->initialiseChildren();
1716 for (;itch2!=itch2E;++itch2) {
1717 if ((*itch2)->nChildren()<1)
1719 (*itch2)->initialiseChildren();
1721 for (;itch3!=itch3E;++itch3) {
1722 if ((*itch3)->getNameStdString()==
"CscArCO2")
1737 if (option_opentgcchambers) {
1741 for (;itch!=itchE;++itch) {
1742 if ((*itch)->nChildren()<1)
1744 (*itch)->initialiseChildren();
1746 for (;itch2!=itch2E;++itch2) {
1747 if ((*itch2)->getNameStdString()==
"muo::TGCGas")
1766 std::string
name = chamberPV->getLogVol()->getName();
1771 if (!subsys->hasMuonChambers())
1773 if (subsys->childrenRegExpNameCompatible(
name)) {
1785 if (!
m_d->sceneroot)
1791 message(
"Error: Asked to orient view to chamber volume '"
1792 +QString(chamberPV->getLogVol()->getName().c_str())
1793 +
"', which doesn't fit the known format of any chamber!");
1799 message(
"Warning: Asked to orient view to muon chamber volume which is not available. Perhaps muon geometry was not built?");
1804 std::map<PVConstLink,VolumeHandle*>::iterator itChamber =
m_d->muonchambers_pv2handles.find(chamberPV);
1805 if (itChamber==
m_d->muonchambers_pv2handles.end()) {
1807 m_d->buildSystem(subsys);
1808 itChamber =
m_d->muonchambers_pv2handles.find(chamberPV);
1809 if (itChamber==
m_d->muonchambers_pv2handles.end()) {
1810 message(
"Error: Asked to orient view to chamber volume '"
1811 +QString(chamberPV->getLogVol()->getName().c_str())
1812 +
"', but could not find chamber handle!");
1822 bool isCSCOrTGC =
name.size()>=2 && ( (
name[0]==
'C' &&
name[1]==
'S') || (
name[0]==
'T') );
1823 if (!isCSCOrTGC&&!(
name.size()>=1&&(
name[0]==
'E'||
name[0]==
'B'))) {
1825 message(
"orientViewToMuonChamber Warning: Not CSC, TGC or MDT station!");
1829 bool save = subsys->
soswitch->enableNotify(
false);
1832 int32_t soswitch_val = subsys->
soswitch->whichChild.getValue();
1833 if (soswitch_val!=SO_SWITCH_ALL)
1834 subsys->
soswitch->whichChild = SO_SWITCH_ALL;
1842 std::set<SoCamera*>::iterator it,itE = cameras.end();
1843 for (it=cameras.begin();it!=itE;++it) {
1849 SbRotation camrot = (*it)->orientation.getValue();
1850 SbVec3f cameraDir(0, 0, -1);
1851 camrot.multVec(cameraDir, cameraDir);
1852 SbVec3f cameraUpVec(0, 1, 0);
1853 camrot.multVec(cameraUpVec, cameraUpVec);
1855 std::pair<SbVec3f,SbVec3f> chamberdirections;
1858 chamberdirections =
m_d->getClosestCSCOrTGCEdgeDirections(cameraDir,chamberHandle);
1861 chamberdirections =
m_d->getClosestMuonDriftTubeDirections(cameraDir,cameraUpVec,chamberHandle);
1863 SbVec3f newdirection = - chamberdirections.first;
1864 SbVec3f newup(cameraUpVec);
1865 const float epsilon(0.00001f);
1866 if (
m_d->previousAlignedChamberHandle==chamberHandle&&cameraDir.equals(newdirection,epsilon)) {
1870 SbRotation rot(cameraDir,0.5*
M_PI);
1871 SbVec3f chambdir1 = chamberdirections.second;
1872 SbVec3f chambdir2,chambdir3,chambdir4;
1873 rot.multVec(chambdir1,chambdir2);
1874 rot.multVec(chambdir2,chambdir3);
1875 rot.multVec(chambdir3,chambdir4);
1876 if (cameraUpVec.equals(chambdir1,epsilon)) {
1878 }
else if (cameraUpVec.equals(chambdir2,epsilon)) {
1880 }
else if (cameraUpVec.equals(chambdir3,epsilon)) {
1882 }
else if (cameraUpVec.equals(chambdir4,epsilon)) {
1886 float cos1 = chambdir1.dot(cameraUpVec);
1887 float cos2 = chambdir2.dot(cameraUpVec);
1888 float cos3 = chambdir3.dot(cameraUpVec);
1889 float cos4 = chambdir4.dot(cameraUpVec);
1890 float maxcos = std::max(std::max(cos1,cos2),std::max(cos3,cos4));
1893 else if (cos2==maxcos)
1895 else if (cos3==maxcos)
1909 chamberHandle->
setState(oldChamberState);
1910 if (soswitch_val!=SO_SWITCH_ALL)
1911 subsys->
soswitch->whichChild.setValue(soswitch_val);
1913 subsys->
soswitch->enableNotify(
true);
1916 m_d->previousAlignedChamberHandle=chamberHandle;
1923 const SbVec3f& cameraUpDirection,
1927 SbVec3f closesttubedir(cameraDirection);
1928 SbVec3f closesttubeupvec(cameraUpDirection);
1929 float smallestcosangle(1.1);
1934 for (;itch!=itchE;++itch) {
1936 std::string name1 = (*itch)->getNameStdString();
1937 if (name1.size()>2&&name1[0]==
'D'&&name1[1]==
'e'&&name1[2]==
'd')
1940 (*itch)->initialiseChildren();
1943 const SbVec3f unitz(0.0f,0.0f,1.0f);
1944 const SbVec3f unity(0.0f,1.0f,0.0f);
1946 SbVec3f translation, scale;
1947 SbRotation rotation, scalerotation;
1949 for (;itch2!=itch2E;++itch2) {
1950 if ((*itch2)->getNameStdString()==
"MDTDriftWall") {
1954 (*itch2)->getGlobalTransformToVolume().getTransform(translation,rotation,scale,scalerotation);
1955 rotation.multVec (unitz, tubeglob);
1956 if (tubeglob.dot(cameraDirection)<smallestcosangle) {
1957 smallestcosangle = tubeglob.dot(cameraDirection);
1958 closesttubedir = tubeglob;
1959 rotation.multVec(unity, closesttubeupvec);
1961 if (tubeglob.dot(-cameraDirection)<smallestcosangle) {
1962 smallestcosangle = tubeglob.dot(-cameraDirection);
1963 closesttubedir = -tubeglob;
1964 rotation.multVec(unity, closesttubeupvec);
1969 return std::pair<SbVec3f,SbVec3f>(closesttubedir,closesttubeupvec);
1977 std::vector<SbVec3f> directions;
1978 directions.push_back(SbVec3f(0.0f,1.0f,0.0f));
1979 directions.push_back(SbVec3f(0.0f,-1.0f,0.0f));
1980 directions.push_back(SbVec3f(0.0f,0.0f,1.0f));
1981 directions.push_back(SbVec3f(0.0f,0.0f,-1.0f));
1983 directions.push_back(SbVec3f(1.0f,0.0f,0.0f));
1984 directions.push_back(SbVec3f(-1.0f,0.0f,0.0f));
1987 SbVec3f translation, scale;
1988 SbRotation rotation, scalerotation;
1992 for (
unsigned i = 0; i<directions.size();++i)
1993 rotation.multVec(directions[i],directions[i]);
1996 SbVec3f chamberDir(-cameraDirection);
1997 float smallestcosangle(1.1);
1998 for (
unsigned i = 0; i<directions.size();++i) {
1999 if (directions.at(i).dot(cameraDirection)<smallestcosangle) {
2000 smallestcosangle = directions.at(i).dot(cameraDirection);
2001 chamberDir = directions.at(i);
2009 chamberDir.getValue(
x,
y,
z);
2011 rotation.multVec(SbVec3f(0.0f,1.0f,0.0f),chamberUp);
2013 rotation.multVec(SbVec3f(1.0f,0.0f,0.0f),chamberUp);
2017 return std::pair<SbVec3f,SbVec3f>(chamberDir,chamberUp);
2024 if (handle->isAttached()) {
2026 if (handle->isInitialisedAndHasNonStandardShape()) {
2028 handle->setState(target);
2034 if (handle->nChildren()==0||!handle->childrenAreInitialised())
2048 std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> > roothandles;
2049 m_d->volumetreemodel->getRootHandles(roothandles);
2052 bool save =
m_d->sceneroot->enableNotify(
false);
2053 m_d->phisectormanager->largeChangesBegin();
2057 for (
unsigned i = 0; i<roothandles.size();++i) {
2058 it = roothandles.at(i).first;
2059 itE = roothandles.at(i).second;
2060 for(;it!=itE;++it) {
2061 m_d->changeStateOfVisibleNonStandardVolumesRecursively(*it,target);
2065 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2066 m_d->phisectormanager->largeChangesEnd();
2068 m_d->sceneroot->enableNotify(
true);
2069 m_d->sceneroot->touch();
2076 if (targetname.isEmpty()) {
2081 messageVerbose(
"Auto expansions of visible volumes requested. Target all volumes with "
2082 +
str(bymatname?
"material name":
"name")+
" matching "+targetname);
2084 QRegExp selregexp(targetname,Qt::CaseSensitive,QRegExp::Wildcard);
2086 std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> > roothandles;
2087 m_d->volumetreemodel->getRootHandles(roothandles);
2090 bool save =
m_d->sceneroot->enableNotify(
false);
2091 m_d->phisectormanager->largeChangesBegin();
2095 for (
unsigned i = 0; i<roothandles.size();++i) {
2096 it = roothandles.at(i).first;
2097 itE = roothandles.at(i).second;
2099 m_d->expandVisibleVolumesRecursively(*it,selregexp,bymatname);
2102 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2103 m_d->phisectormanager->largeChangesEnd();
2105 m_d->sceneroot->enableNotify(
true);
2106 m_d->sceneroot->touch();
2117 if (handle->nChildren()>0
2118 && selregexp.exactMatch(bymatname?QString(handle->geoMaterial()->getName().c_str()):handle->getName())) {
2124 if (handle->nChildren()==0||!handle->childrenAreInitialised())
2139 if( selregexp.exactMatch(bymatname?QString(handle->geoMaterial()->getName().c_str()):handle->getName())) {
2145 if (handle->nChildren()==0||!handle->childrenAreInitialised())
2156 if (targetname.isEmpty()) {
2161 messageVerbose(
"Auto iconification/zapping of visible volumes requested. Target all volumes with "
2162 +
str(bymatname?
"material name":
"name")+
" matching "+targetname);
2164 QRegExp selregexp(targetname,Qt::CaseSensitive,QRegExp::Wildcard);
2166 std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> > roothandles;
2167 m_d->volumetreemodel->getRootHandles(roothandles);
2170 bool save =
m_d->sceneroot->enableNotify(
false);
2171 m_d->phisectormanager->largeChangesBegin();
2175 for (
unsigned i = 0; i<roothandles.size();++i) {
2176 it = roothandles.at(i).first;
2177 itE = roothandles.at(i).second;
2179 m_d->iconifyVisibleVolumesRecursively(*it,selregexp,bymatname);
2182 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2183 m_d->phisectormanager->largeChangesEnd();
2185 m_d->sceneroot->enableNotify(
true);
2186 m_d->sceneroot->touch();
2189#ifndef BUILDVP1LIGHT
2195 GeoPVConstLink pvlink = elem->getMaterialGeom()->getParent();
2198 theclass->message(
"WARNING: Ignored null station pointer");
2212 theclass->messageVerbose(
"Initializing physical volume link -> MuonStation map.");
2216 VP1Msg::message(
"WARNING: Could not get muon detector manager to construct volume -> muon station map!");
2219 if (mgr->nMdtRE()) {
2220 for (
auto det_el = mgr->mdtIdHelper()->detectorElement_begin();
2221 det_el != mgr->mdtIdHelper()->detectorElement_end(); ++det_el) {
2225 if (mgr->nRpcRE()) {
2226 for (
auto det_el = mgr->rpcIdHelper()->detectorElement_begin();
2227 det_el != mgr->rpcIdHelper()->detectorElement_end(); ++det_el) {
2231 if (mgr->nCscRE()) {
2232 for (
auto det_el = mgr->cscIdHelper()->detectorElement_begin();
2233 det_el != mgr->cscIdHelper()->detectorElement_end(); ++det_el) {
2237 if (mgr->nTgcRE()) {
2238 for (
auto det_el = mgr->tgcIdHelper()->detectorElement_begin();
2239 det_el != mgr->tgcIdHelper()->detectorElement_end(); ++det_el) {
2265 #ifndef BUILDVP1LIGHT
2272 bool bcm(bcmA||bcmC);
2279 if (si->
flag == subSysFlag) {
2285 message(
"AutoAdaptPixelsOrSCT Error: Could not find subsystem");
2296 bool save =
m_d->sceneroot->enableNotify(
false);
2297 m_d->phisectormanager->largeChangesBegin();
2302 for (;it!=itE;++it) {
2303 (*it)->initialiseChildren();
2306 for (;itChl!=itChlE;++itChl) {
2310 if (brl&&(*itChl)->hasName(
"barrelLog")) {
2312 m_d->showPixelModules(*itChl);
2313 }
else if ((ec)&&(*itChl)->hasName(
"EndCapLog")) {
2314 if (((*itChl)->isPositiveZ()?ecA:ecC)) {
2315 m_d->showPixelModules(*itChl);
2318 }
else if (bcm&&(*itChl)->hasName(
"bcmModLog")) {
2319 if (((*itChl)->isPositiveZ()?bcmA:bcmC)) {
2325 if ((*itChl)->hasName(
"ITkPixelDetector")) {
2326 m_d->showITkPixelModules(*itChl, brl, ecA, ecC);
2337 for (;it!=itE;++it) {
2338 (*it)->initialiseChildren();
2343 if (brl&&(*it)->hasName(
"SCT_Barrel")) {
2345 m_d->showSCTBarrelModules(*it);
2346 }
else if (ecA&&(*it)->hasName(
"SCT_ForwardA")) {
2348 m_d->showSCTEndcapModules(*it);
2349 }
else if (ecC&&(*it)->hasName(
"SCT_ForwardC")) {
2351 m_d->showSCTEndcapModules(*it);
2354 m_d->showITkStripModules(*it, brl, ecA, ecC);
2361 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2362 m_d->phisectormanager->largeChangesEnd();
2364 m_d->sceneroot->enableNotify(
true);
2365 m_d->sceneroot->touch();
2375 #ifndef BUILDVP1LIGHT
2390 if (si->
flag == subSysFlag) {
2396 message(
"autoAdaptMuonNSW Error: Could not find subsystem");
2407 bool save =
m_d->sceneroot->enableNotify(
false);
2408 m_d->phisectormanager->largeChangesBegin();
2413 for (;it!=itE;++it) {
2415 (*it)->initialiseChildren();
2420 for (;itChl!=itChlE;++itChl) {
2422 bool unzap(
reset?
true :
false );
2426 if ( (stgc) && (*itChl)->hasName(
"NSW_sTGC") ) {
2429 }
else if ( (mm) && (*itChl)->hasName(
"NSW_MM") ) {
2432 }
else if ( (passiveSpacer) && (*itChl)->hasName(
"NSW_Spacer") ) {
2434 }
else if ( (passiveStructure) && (*itChl)->hasName(
"NSW_Aluminum_Structure_and_HUB") ) {
2436 }
else if ( (passiveAPlate) && (*itChl)->hasName(
"A_Plate") ) {
2447 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2448 m_d->phisectormanager->largeChangesEnd();
2451 m_d->sceneroot->enableNotify(
true);
2452 m_d->sceneroot->touch();
2462 #ifndef BUILDVP1LIGHT
2476 if (si->
flag == subSysFlag) {
2482 message(
"autoAdaptHGTD Error: Could not find subsystem");
2493 bool save =
m_d->sceneroot->enableNotify(
false);
2494 m_d->phisectormanager->largeChangesBegin();
2502 handles.push_back(volume);
2504 for (
unsigned i = 0; i < handles.size(); ++i) {
2505 handles.at(i)->initialiseChildren();
2507 handles.at(i)->childrenBegin(), handles.at(i)->childrenEnd()))
2508 handles.push_back(child);
2516 const QString
name = handle->getName();
2517 bool selected(
false);
2518 if (modules && (
name==
"HGTDFlexPackage" ||
2519 name.startsWith(
"HGTDFlexTube") ||
2520 name==
"HGTDHybrid" ||
2521 name==
"HGTDGlueSensor" ||
2522 name==
"HGTDGlueAsic" ||
2523 name.startsWith(
"HGTDSiSensor") ||
2524 name==
"HGTDLGADInactive" ||
2525 name==
"HGTDASIC")) {
2527 }
else if (supportStructure && (
name==
"HGTDSupportPlate" ||
name==
"HGTDCoolingPlate")) {
2529 }
else if (coolingLines &&
name==
"HGTDPeripheralCoolingLines") {
2531 }
else if (covers && (
name==
"HGTDFrontCover" ||
2532 name==
"HGTDBackCover" ||
2533 name==
"HGTDOuterRCover" ||
2534 name==
"HGTDInnerRCover1" ||
2535 name==
"HGTDInnerRCover2" ||
2536 name==
"HGTDInnerRCover3")) {
2538 }
else if (moderator && (
name==
"HGTDModeratorIn" ||
name==
"HGTDModeratorOut")) {
2540 }
else if (servicesElectronics && (
name==
"support_F_vol" ||
2541 name==
"support_B_vol" ||
2542 name.startsWith(
"PowerBlock_") ||
2543 name.startsWith(
"VTRx_"))) {
2553 parent = parent->parent();
2562 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2563 m_d->phisectormanager->largeChangesEnd();
2566 m_d->sceneroot->enableNotify(
true);
2567 m_d->sceneroot->touch();
2578 #ifndef BUILDVP1LIGHT
2583 bool save =
m_d->sceneroot->enableNotify(
false);
2584 m_d->phisectormanager->largeChangesBegin();
2590 if (si->
flag == subSysFlag) {
2596 message(
"autoAdaptITk Error: Could not find subsystem");
2606 for (;it!=itE;++it) {
2607 (*it)->initialiseChildren();
2612 m_d->selectITkComponent(*it, isPixel, pixelModules, pixelServices, pixelSupports, stripSensors, stripElectronics, stripServices, stripSupports);
2617 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
2618 m_d->phisectormanager->largeChangesEnd();
2621 m_d->sceneroot->enableNotify(
true);
2622 m_d->sceneroot->touch();
2630 h->initialiseChildren();
2632 for (;it!=itE;++it) {
2633 if ((*it)->hasName(
"moduleLog")) {
2635 (*it)->contractDaughtersRecursively();
2636 (*it)->initialiseChildren();
2638 for (;itMod!=itModE;++itMod) {
2639 if ((*itMod)->getName().startsWith(
"si"))
2647 if ((*it)->hasName(
"pigtailLog")||(*it)->hasName(
"omegaLog")) {
2649 (*it)->contractDaughtersRecursively();
2652 if ((*it)->nChildren()<1) {
2664 if (
h->nChildren()==0) {
2665 if (isPixel and (ecA or ecC)) {
2666 float translation_x, translation_y, translation_z, rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians;
2668 translation_x, translation_y, translation_z,
2669 rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians );
2670 if ((!ecA || !ecC) && ((ecA and (translation_z<0.)) or (ecC and (translation_z>0.) ))) {
2677 std::vector< std::string > selected_volumes = {};
2680 selected_volumes.push_back(
"InnerBarrelSingleMod_Sensor");
2681 selected_volumes.push_back(
"InnerBarrelQuadMod_Sensor");
2682 selected_volumes.push_back(
"OuterBarrelQuadMod_Sensor");
2683 selected_volumes.push_back(
"LongeronCoolingTube");
2684 selected_volumes.push_back(
"InnerPixBarrelSupport_Stave");
2685 selected_volumes.push_back(
"InnerPixBarrelSupport_Stave1");
2686 selected_volumes.push_back(
"LongeronCornerBase");
2687 selected_volumes.push_back(
"LongeronCornerEnd");
2688 selected_volumes.push_back(
"LongeronTrussWall");
2689 selected_volumes.push_back(
"LongeronCapBase");
2690 selected_volumes.push_back(
"LongeronTopCap");
2693 selected_volumes.push_back(
"BRLSensorSS");
2694 selected_volumes.push_back(
"BRLSensorMS");
2695 selected_volumes.push_back(
"B_HybridPCB");
2696 selected_volumes.push_back(
"DCDC_PCB");
2697 selected_volumes.push_back(
"DCDC_Box");
2698 selected_volumes.push_back(
"Bex_HybridPCB_near");
2699 selected_volumes.push_back(
"Bex_HybridPCB_far");
2704 selected_volumes.push_back(
"InclinedQuadMod_Sensor");
2705 selected_volumes.push_back(
"InnerRingSingleMod_Sensor");
2706 selected_volumes.push_back(
"InnerEndcapQuadMod_Sensor");
2707 selected_volumes.push_back(
"OuterEndcapQuadMod_Sensor");
2708 selected_volumes.push_back(
"L2HalfRingCoolingPipe");
2709 selected_volumes.push_back(
"L3HalfRingCoolingPipe");
2710 selected_volumes.push_back(
"L4endcapcoolingpipe");
2711 selected_volumes.push_back(
"InclL2HalfShell");
2712 selected_volumes.push_back(
"InclL2Support");
2713 selected_volumes.push_back(
"InclL3HalfShell");
2714 selected_volumes.push_back(
"InclL3Support");
2715 selected_volumes.push_back(
"InclL4HalfShell");
2716 selected_volumes.push_back(
"InclL4Support");
2717 selected_volumes.push_back(
"InnerPixEndcap_CoupledRingSupport");
2718 selected_volumes.push_back(
"InnerPixEndcap_IntermediateRingSupport");
2719 selected_volumes.push_back(
"InnerPixEndcap_L1RingSupport");
2720 selected_volumes.push_back(
"L2HalfRingCarbonFoamInner");
2721 selected_volumes.push_back(
"L2HalfRingCarbonFoamOuter");
2722 selected_volumes.push_back(
"L2HalfRingFaceSheet");
2723 selected_volumes.push_back(
"L3HalfRingCarbonFoamInner");
2724 selected_volumes.push_back(
"L3HalfRingCarbonFoamOuter");
2725 selected_volumes.push_back(
"L3HalfRingFaceSheet");
2726 selected_volumes.push_back(
"L4endcapinnerCarbonFoam");
2727 selected_volumes.push_back(
"L4endcapouterCarbonFoam");
2728 selected_volumes.push_back(
"L4endcapFaceSheet");
2729 selected_volumes.push_back(
"L2HalfShell");
2730 selected_volumes.push_back(
"L3HalfShell");
2731 selected_volumes.push_back(
"L4HalfShell");
2733 selected_volumes.push_back(
"ECSensor0");
2734 selected_volumes.push_back(
"ECSensor1");
2735 selected_volumes.push_back(
"ECSensor2");
2736 selected_volumes.push_back(
"ECSensor3");
2737 selected_volumes.push_back(
"ECSensor4");
2738 selected_volumes.push_back(
"ECSensor5");
2739 selected_volumes.push_back(
"ECSensorBack0");
2740 selected_volumes.push_back(
"ECSensorBack1");
2741 selected_volumes.push_back(
"ECSensorBack2");
2742 selected_volumes.push_back(
"ECSensorBack3");
2743 selected_volumes.push_back(
"ECSensorBack4");
2744 selected_volumes.push_back(
"ECSensorBack5");
2748 std::string
name =
h->getName().toStdString();
2750 if (not isPixel and (ecA or ecC)) {
2752 if (
name.starts_with(
"ECHybrid") or
name.starts_with(
"DCDC_EC"))
2756 if (std::find(selected_volumes.begin(), selected_volumes.end(),
name) == selected_volumes.end()) {
2761 }
else if (not isPixel and (
h->getName().toStdString()==
"PetalCore" or
2762 h->getName().toStdString()==
"StaveCoreSS" or
2763 h->getName().toStdString() ==
"StaveCoreMS")) {
2766 h->initialiseChildren();
2770 for (;it!=itE;++it) {
2778 h->initialiseChildren();
2781 for (;it!=itE;++it) {
2790 h->initialiseChildren();
2793 for (;it!=itE;++it) {
2794 if (brl and (*it)->hasName(
"ITkStrip_Barrel")) {
2797 else if (ecA and (*it)->hasName(
"ITkStrip_ForwardPlus")) {
2800 else if (ecC and (*it)->hasName(
"ITkStrip_ForwardMinus")) {
2808bool itkNameIsOneOf(
const QString&
name, std::initializer_list<const char*> candidates)
2810 for (
const char* candidate : candidates) {
2811 if (
name==candidate)
2817bool itkNameStartsWithOneOf(
const QString&
name, std::initializer_list<const char*> prefixes)
2819 for (
const char* prefix : prefixes) {
2820 if (
name.startsWith(prefix))
2831 unsigned category = 0;
2832 const QString names[] = {
h->getName(),
h->getNameTag()};
2833 for (
const QString&
name : names) {
2835 if (
name.endsWith(
"_Sensor") ||
name.endsWith(
"_Chip") ||
name.endsWith(
"_Bonding") ||
name.endsWith(
"_DeadVolume"))
2837 if (
name.contains(
"Svc") ||
name.contains(
"Service") ||
name.contains(
"Cooling") ||
name.contains(
"Pigtail") ||
name.contains(
"Flex") ||
name.contains(
"BusTape") ||
name.endsWith(
"_Cell") ||
name.startsWith(
"Pixel__ModuleSvc"))
2839 if (
name.contains(
"Support") ||
name.contains(
"HalfShell") ||
name.contains(
"HalfRing") ||
name.contains(
"CarbonFoam") ||
name.contains(
"FaceSheet") ||
name.contains(
"Longeron") ||
name.contains(
"QuarterShell") ||
name.contains(
"Stave") || itkNameIsOneOf(
name, {
"IPTvol",
"ISTvol",
"FrontSupportFacing",
"FrontSupportCore",
"RearSupport"}))
2842 if (
name.startsWith(
"BRLSensor") ||
name.startsWith(
"ECSensor"))
2844 if (
name.contains(
"Hybrid") ||
name.contains(
"DCDC") ||
name.contains(
"Bus") || itkNameIsOneOf(
name, {
"StaveSignalSS",
"StaveGround"}))
2846 if (
name.startsWith(
"SV") ||
name.contains(
"Service"))
2848 if (
name.contains(
"Support") ||
name.contains(
"Stave") ||
name.contains(
"Petal") ||
name.contains(
"Core") ||
name.contains(
"Flange") ||
name.contains(
"Interlink") ||
name.contains(
"Wheel") ||
name.contains(
"Shell") ||
name.contains(
"Brace") ||
name.contains(
"Tube") ||
name.contains(
"Cyl") ||
name.contains(
"Hat") ||
name.contains(
"Bulkhead") ||
name.contains(
"Rail") ||
name.contains(
"Blade") ||
name.contains(
"Lock") ||
name.contains(
"Mount") ||
name.contains(
"Face") ||
name.contains(
"EOS") || itkNameStartsWithOneOf(
name, {
"StripB_",
"OC",
"EC_",
"Ztube",
"StiffDisc"}))
2855 if (category & 1) category = 1;
2856 else if (category & 2) category = 2;
2858 if (category & 1) category = 1;
2859 else if (category & 2) category = 2;
2860 else if (category & 4) category = 4;
2863 category = inheritedCategory;
2864 const unsigned selected = isPixel
2865 ? (pixelModules ? 1u : 0u) | (pixelServices ? 2u : 0u) | (pixelSupports ? 4u : 0u)
2866 : (stripSensors ? 1u : 0u) | (stripElectronics ? 2u : 0u) |
2867 (stripServices ? 4u : 0u) | (stripSupports ? 8u : 0u);
2871 if (
h->nChildren() && !
h->childrenAreInitialised())
2872 h->initialiseChildren();
2873 bool showChildren =
false;
2874 for (
auto it=
h->childrenBegin(); it!=
h->childrenEnd(); ++it) {
2876 stripSensors, stripElectronics, stripServices, stripSupports, category))
2877 showChildren =
true;
2879 const bool showThis = !
h->isEther() && (category & selected);
2882 return showChildren || showThis;
2889 h->initialiseChildren();
2891 for (;it!=itE;++it) {
2892 if ((*it)->getName().startsWith(
"Layer")) {
2894 (*it)->initialiseChildren();
2896 for (;itLay!=itLayE;++itLay) {
2897 if ((*itLay)->getName().endsWith(
"Active")&&(*itLay)->getName().startsWith(
"Layer")) {
2899 (*itLay)->initialiseChildren();
2901 for (;itActLay!=itActLayE;++itActLay) {
2902 if ((*itActLay)->getName().startsWith(
"Ski")) {
2904 (*itActLay)->initialiseChildren();
2906 for (;itSki!=itSkiE;++itSki) {
2908 if ((*itSki)->hasName(
"Module")) {
2911 (*itSki)->initialiseChildren();
2913 for (;itMod!=itModE;++itMod) {
2914 if ((*itMod)->getName().contains(
"Envelope")) {
2916 (*itMod)->initialiseChildren();
2918 for(;itEnv!=itEnvE;++itEnv) {
2919 if ((*itEnv)->getName().contains(
"Sensor"))
2942 (*itLay)->contractDaughtersRecursively();
2948 (*it)->contractDaughtersRecursively();
2957 h->initialiseChildren();
2959 for (;it!=itE;++it) {
2960 if ((*it)->getName().startsWith(
"Wheel")) {
2962 (*it)->initialiseChildren();
2964 for (;itWhl!=itWhlE;++itWhl) {
2965 if ((*itWhl)->getName().startsWith(
"Ring")) {
2967 (*itWhl)->initialiseChildren();
2969 for (;itRng!=itRngE;++itRng) {
2970 if ((*itRng)->getName().startsWith(
"FwdModule")) {
2972 (*itRng)->initialiseChildren();
2974 for(;itMod!=itModE;++itMod) {
2975 if ((*itMod)->getName().startsWith(
"ECSensor")) {
2989 (*itWhl)->contractDaughtersRecursively();
2995 (*it)->contractDaughtersRecursively();
3008 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
3018 m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis();
3024 std::map<SoSeparator*,VolumeHandle*>::iterator it,itE(
m_d->sonodesep2volhandle.end());
3025 for (it =
m_d->sonodesep2volhandle.begin();it!=itE;++it)
3033 if (filename.isEmpty())
3037 QFileInfo fi(filename);
3039 if (!fi.isWritable()) {
3040 QMessageBox::critical(0,
"Error - could not save to file "+filename,
3041 "Could not save to file: <i>"+filename+
"</i>"
3042 +
"<br/><br/>Reason: File exists already and is write protected",QMessageBox::Ok,QMessageBox::Ok);
3047 QFile
file(filename);
3048 if (!
file.open(QIODevice::WriteOnly)) {
3049 QMessageBox::critical(0,
"Error - problems writing to file "+filename,
3050 "Problems writing to file: <i>"+filename+
"</i>",QMessageBox::Ok,QMessageBox::Ok);
3054 m_d->ensureInitVisAttributes();
3057 s.save(QString(
"VP1GeoMaterialsBegin"));
3058 s.save(
m_d->detVisAttributes->getState(onlyChangedMaterials));
3059 s.save(
m_d->matVisAttributes->getState(onlyChangedMaterials));
3060 s.save(
m_d->volVisAttributes->getState(onlyChangedMaterials));
3061 s.save(QString(
"VP1GeoMaterialsEnd"));
3062 s.disableUnsavedChecks();
3064 QDataStream outfile(&
file);
3065 outfile<<qCompress(s.result()).toBase64();
3072 if (filename.isEmpty())
3074 QFileInfo fi(filename);
3076 QMessageBox::critical(0,
"Error - file does not exists: "+filename,
3077 "File does not exists: <i>"+filename+
"</i>",QMessageBox::Ok,QMessageBox::Ok);
3080 if (!fi.isReadable()) {
3081 QMessageBox::critical(0,
"Error - file is not readable: "+filename,
3082 "File is not readable: <i>"+filename+
"</i>",QMessageBox::Ok,QMessageBox::Ok);
3086 QFile
file(filename);
3087 if (!
file.open(QIODevice::ReadOnly)) {
3088 QMessageBox::critical(0,
"Error - problems opening file "+filename,
3089 "Problems opening file: <i>"+filename+
"</i>",QMessageBox::Ok,QMessageBox::Ok);
3092 QByteArray byteArray64;
3093 QDataStream infile(&
file);
3094 infile >> byteArray64;
3095 QByteArray byteArray = qUncompress(QByteArray::fromBase64(byteArray64));
3098 if (s.version()!=0) {
3099 QMessageBox::critical(0,
"Error - File in wrong format "+filename,
3100 "File in wrong format: <i>"+filename+
"</i>",QMessageBox::Ok,QMessageBox::Ok);
3103 QString txtbegin, txtend;
3104 QByteArray baDet, baMat, baVol;
3105 txtbegin = s.restoreString();
3106 baDet = s.restoreByteArray();
3107 baMat = s.restoreByteArray();
3108 baVol = s.restoreByteArray();
3109 txtend = s.restoreString();
3110 s.disableUnrestoredChecks();
3111 if (txtbegin!=
"VP1GeoMaterialsBegin"||txtend!=
"VP1GeoMaterialsEnd") {
3112 QMessageBox::critical(0,
"Error - File in wrong format "+filename,
3113 "File in wrong format: <i>"+filename+
"</i>",QMessageBox::Ok,QMessageBox::Ok);
3117 m_d->ensureInitVisAttributes();
3118 m_d->detVisAttributes->applyState(baDet);
3119 m_d->matVisAttributes->applyState(baMat);
3120 m_d->volVisAttributes->applyState(baVol);
3123 m_d->controller->setLastSelectedVolume(0);
3124 m_d->controller->setLastSelectedVolume(lastsel);
3138 std::map<PVConstLink,VolumeHandle*>::const_iterator it =
m_d->muonchambers_pv2handles.begin(), itEnd =
m_d->muonchambers_pv2handles.end();
3139 for (; it!=itEnd ; ++it){
3140 if (it->second->isInMuonChamber()) it->second->updateLabels();
3145 m_d->controller->setLabelsEnabled(t0s,hits);
3149 messageVerbose(
"muonChamberT0sChanged for this many chambers:"+
str(t0s.size()));
3151 message(
"ERROR: chamber t0 index out of bounds!");
Header file for AthHistogramAlgorithm.
static QStringList shapeToStringList(const GeoShape *shape)
GeoPhysVol * getPhysVol()
Destructor.
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
void ensureBuildController()
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
void messageVerbose(const QString &) const
virtual void restoreFromState(QByteArray)
void messageDebug(const QString &) const
const QString & name() const
void message(const QString &) const
virtual QByteArray saveState()
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Base class for the XxxReadoutElement, with Xxx = Mdt, Rpc, Tgc, Csc.
int getEtaIndex() const
a la AMDB
int getPhiIndex() const
a la AMDB
const std::string & getStationName() const
like BMS5, T1F1, CSL1
The Athena Transient Store API.
static VP1CameraHelper * animatedZoomToSubTree(SoCamera *camera, SoGroup *sceneroot, SoNode *subtreeroot, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, double slack=1.0, const SbVec3f &lookat=SbVec3f(999, 999, 999), const SbVec3f &upvec=SbVec3f(999, 999, 999), bool varySpeed=true, bool forceCircular=false)
static const MuonGM::MuonDetectorManager * muonDetMgr()
@ MuonBarrelStationMiddle
static QString toString(const VOLSTATE &)
static QStringList geoMaterialToStringList(const GeoMaterial *)
bool negatechildrenregexp
std::vector< TreetopInfo > treetopinfo
bool hasMuonChambers() const
SubSystemInfo(QCheckBox *cb, const QRegExp &the_geomodeltreetopregexp, bool the_negatetreetopregexp, const QRegExp &the_geomodelchildrenregexp, bool the_negatechildrenregexp, VP1GeoFlags::SubSystemFlag the_flag, const std::string &the_matname, const QRegExp &the_geomodelgrandchildrenregexp, bool the_negategrandchildrenregexp=false)
bool grandchildrenRegExpNameCompatible(const std::string &volname) const
bool negategrandchildrenregexp
QRegExp geomodeltreetopregexp
bool childrenRegExpNameCompatible(const std::string &volname) const
VolumeHandle::VolumeHandleList vollist
VP1GeoFlags::SubSystemFlag flag
QRegExp geomodelgrandchildrenregexp
QRegExp geomodelchildrenregexp
void createPathExtras(const VolumeHandle *, QString &, QStack< QString > &)
void expandAllChildren(VolumeHandle *, bool isPixel, bool brl, bool ecA, bool ecC)
VP1GeometrySystem * theclass
void showSCTEndcapModules(VolumeHandle *)
void expandVisibleVolumesRecursively(VolumeHandle *, const QRegExp &, bool bymatname)
void showITkStripModules(VolumeHandle *, bool brl, bool ecA, bool ecC)
QStringList stationInfo(const MuonGM::MuonStation *)
SubSystemInfo * chamberPVToMuonSubSystemInfo(const GeoPVConstLink &chamberPV)
void addSubSystem(const VP1GeoFlags::SubSystemFlag &, const QString &treetopregexp, const QString &childrenregexp="", const std::string &matname="", bool negatetreetopregexp=false, bool negatechildrenregexp=false, const QString &grandchildrenregexp="", bool negategrandchildrenregexp=false)
QList< SubSystemInfo * > subsysInfoList
VP1GeoFlags::SubSystemFlags initialSubSystemsTurnedOn
void showSCTBarrelModules(VolumeHandle *)
void showPixelModules(VolumeHandle *)
static void catchKbdState(void *userData, SoEventCallback *CB)
void showITkPixelModules(VolumeHandle *, bool brl, bool ecA, bool ecC)
void updateTouchedMuonChamber(VolumeHandle *chamberhandle)
std::map< PVConstLink, VolumeHandle * > muonchambers_pv2handles
SoSeparator * m_textSep
Separator used to hold all visible labels.
PhiSectorManager * phisectormanager
std::pair< SbVec3f, SbVec3f > getClosestMuonDriftTubeDirections(const SbVec3f &cameraDirection, const SbVec3f &cameraUpDirection, VolumeHandle *chamberhandle)
VolumeHandle * previousAlignedChamberHandle
static double volume(const PVConstLink &pv)
void ensureInitPV2MuonStationMap()
void changeStateOfVisibleNonStandardVolumesRecursively(VolumeHandle *, VP1GeoFlags::VOLSTATE)
void buildSystem(SubSystemInfo *)
DetVisAttributes * detVisAttributes
void ensureInitVisAttributes()
std::map< GeoPVConstLink, const MuonGM::MuonStation * > pv2MuonStation
void updatePV2MuonStationMap(const MuonGM::MuonReadoutElement *elem)
std::map< SoSeparator *, VolumeHandle * > sonodesep2volhandle
static double inclusiveMass(const PVConstLink &pv)
VolVisAttributes * volVisAttributes
void iconifyVisibleVolumesRecursively(VolumeHandle *, const QRegExp &, bool bymatname)
GeoSysController * controller
void applyTopVolStates(const QMap< quint32, QByteArray > &, bool disablenotif=false)
Imp(VP1GeometrySystem *gs, const VP1GeoFlags::SubSystemFlags &ssf)
std::map< QObject *, std::set< GeoPVConstLink > > sender2ChamberList
int last_appropriatemdtprojections
const SoKeyboardEvent * kbEvent
QList< const std::map< GeoPVConstLink, float > * > chamberT0s
std::pair< SbVec3f, SbVec3f > getClosestCSCOrTGCEdgeDirections(const SbVec3f &cameraDirection, VolumeHandle *chamberhandle)
MatVisAttributes * matVisAttributes
bool selectITkComponent(VolumeHandle *, bool isPixel, bool pixelModules, bool pixelServices, bool pixelSupports, bool stripSensors, bool stripElectronics, bool stripServices, bool stripSupports, unsigned inheritedCategory=0)
VolumeTreeModel * volumetreemodel
static double exclusiveMass(const PVConstLink &pv)
QMap< quint32, QByteArray > restoredTopvolstates
void buildPermanentSceneGraph(StoreGateSvc *detstore, SoSeparator *root)
void setShowVolumeOutLines(bool)
void loadMaterialsFromFile(const QString &)
void muonChamberT0sChanged(const std::map< GeoPVConstLink, float > &, int)
The map is the dt0 per chamber, plus a label identifier, which by convention (!) is 0=Moore,...
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
void setOrientViewToMuonChambersOnClick(bool)
void autoAdaptMuonNSW(bool reset, bool stgc, bool mm, bool passiveSpacer, bool passiveStructure, bool passiveAPlate)
void autoAdaptITk(bool reset, bool pixelModules, bool pixelServices, bool pixelSupports, bool stripSensors, bool stripElectronics, bool stripServices, bool stripSupports)
QWidget * buildController()
void setZoomToVolumeOnClick(bool)
void setCurvedSurfaceRealism(int)
virtual ~VP1GeometrySystem()
void emit_appropriateMDTProjectionsChanged()
void autoAdaptHGTD(bool reset, bool modules, bool supportStructure, bool coolingLines, bool covers, bool moderator, bool servicesElectronics)
void enableMuonChamberLabels(bool, bool)
first is t0s, 2nd is hits
VP1GeometrySystem(const VP1GeoFlags::SubSystemFlags &SubSystemsTurnedOn=VP1GeoFlags::None, const QString &name="Geo")
void orientViewToMuonChamber(const GeoPVConstLink &chamberPV)
void resetSubSystems(VP1GeoFlags::SubSystemFlags)
void autoIconifyByVolumeOrMaterialName(bool, const QString &)
void volumeResetRequested(VolumeHandle *)
void plotSpectrum(QStack< QString > &, int copyNumber=-1)
void adaptMuonChambersStyleChanged()
void autoAdaptPixelsOrSCT(bool, bool, bool, bool, bool, bool)
void setGeometrySelectable(bool)
void volumeStateChangeRequested(VolumeHandle *, VP1GeoFlags::VOLSTATE)
void setLabelPosOffsets(const QList< int > &)
void systemcreate(StoreGateSvc *detstore)
void updateTransparency()
void autoExpandByVolumeOrMaterialName(bool, const QString &)
void appropriateMDTProjectionsChanged(int)
void actionOnAllNonStandardVolumes(bool)
void setAutoAdaptMuonChambersToEventData(bool)
void adaptMuonChambersToEventData()
void reiconizeToShowSpecificMuonChambers(const std::set< GeoPVConstLink > &)
void saveMaterialsToFile(const QString &, bool)
void restoreFromState(QByteArray)
static bool hasMuonNSWGeometry()
static bool hasGeoModelExperiment()
static bool hasPixelGeometry()
static bool hasSCTGeometry()
static bool hasHGTDGeometry()
static bool hasITkGeometry()
static bool hasMuonGeometry()
static void decodeTransformation(const SbMatrix &, float &translation_x, float &translation_y, float &translation_z, float &rotaxis_x, float &rotaxis_y, float &rotaxis_z, float &rotangle_radians)
static void transformToMatrix(SoTransform *xf, SbMatrix &result)
static void messageDebug(const QString &)
static void message(const QString &, IVP1System *sys=0)
static bool changePathTail(SoPath *path, SoNode *commonBranchPoint, SoNode *newtail)
static void setShowVolumeOutlines(SoGroup *nodesep, bool showvol)
const SbMatrix & getGlobalTransformToVolume() const
std::string getNameStdString() const
VP1GeoFlags::VOLSTATE state() const
const GeoMaterial * geoMaterial() const
void initialiseChildren()
VolumeHandleListItr childrenBegin()
SbMatrix getLocalTransformToVolume() const
VolumeHandleListItr childrenEnd()
VolumeHandle * topLevelParent()
void contractDaughtersRecursively()
SoSeparator * nodeSoSeparator() const
std::vector< VolumeHandle * > VolumeHandleList
GeoPVConstLink geoPVConstLink() const
bool isInMuonChamber() const
void setMuonChamberDirty(bool)
virtual QString getDescriptiveName() const
void setState(const VP1GeoFlags::VOLSTATE &state, bool autoExpandEther=true)
VolumeHandleList::iterator VolumeHandleListItr
VP1GeoFlags::SubSystemFlag subsystem() const
unsigned nChildren() const
bool exists(const std::string &filename)
does a file exist
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
path
python interpreter configuration --------------------------------------—