diff --git a/graphics/VP1/VP1Algs/share/vp1.py b/graphics/VP1/VP1Algs/share/vp1.py index 200ee5d554bf0a2d03dbc828b6705873f7d97a32..bbbdea853a74f3aac4016adecbd33a4dfbe82c8f 100644 --- a/graphics/VP1/VP1Algs/share/vp1.py +++ b/graphics/VP1/VP1Algs/share/vp1.py @@ -89,9 +89,14 @@ if (vp1InputFiles == []): # Set geometry version if (not "DetDescrVersion" in dir()): - #DetDescrVersion = "ATLAS-GEO-20-00-01" # old - DetDescrVersion = "ATLAS-R2-2015-03-01-00" # for the new Rel. 21 - globalflags.DetDescrVersion = DetDescrVersion + if (vp1NSW): + print("You set the '-nsw' flag, so the Geometry Tag 'ATLAS-R3-2021-00-00-00' will be used...") + DetDescrVersion="ATLAS-R3-2021-00-00-00" + globalflags.DetDescrVersion.set_Value_and_Lock(DetDescrVersion) + else: + #DetDescrVersion = "ATLAS-GEO-20-00-01" # old + DetDescrVersion = "ATLAS-R2-2015-03-01-00" # for the new Rel. 21 + globalflags.DetDescrVersion = DetDescrVersion # Set conditions tag if not 'vp1GlobCond' in dir(): @@ -139,7 +144,6 @@ else: # Set geometry version if (not "DetDescrVersion" in dir()): DetDescrVersion = "ATLAS-GEO-10-00-02" - globalflags.DetDescrVersion = DetDescrVersion # Set conditions tag @@ -182,7 +186,8 @@ else: # Override geometry tag from command line if("DetDescrVersion" in dir()): from AthenaCommon.GlobalFlags import globalflags - globalflags.DetDescrVersion.set_Value_and_Lock(DetDescrVersion) + globalflags.DetDescrVersion = DetDescrVersion + #globalflags.DetDescrVersion.set_Value_and_Lock(DetDescrVersion) athenaCommonFlags.EvtMax=-1 include('RecExCond/RecExCommon_flags.py') @@ -259,6 +264,7 @@ else: DetFlags.ZDC_setOff() if (vp1NSW): DetFlags.Micromegas_setOn() DetFlags.sTGC_setOn() + DetFlags.CSC_setOff() DetFlags.Print() @@ -274,60 +280,17 @@ if vp1Cavern: svcMgr.GeoModelSvc.DetectorTools += [ CavernInfraDetectorTool() ] # --- AGDD2Geo -# Switch it on if +# Switch it ON if # - Muon is ON # - Major geometry version is greater than 10 if (vp1Muon): - if (vp1NSW): - #DetDescrVersion="ATLAS-GEO-21-00-01" - # include('MuonGeoModelTest/NSWGeoSetup.py') - from GeoModelSvc.GeoModelSvcConf import GeoModelSvc - GeoModelSvc = GeoModelSvc() - GeoModelSvc.MuonVersionOverride="MuonSpectrometer-R.08.01-NSW" - - from MuonAGDD.MuonAGDDConf import NSWAGDDTool - nTool=NSWAGDDTool('NewSmallWheel') - nTool.ReadAGDD=False - nTool.XMLFiles += ["stations.v2.03.xml"] - nTool.DefaultDetector="Muon" - nTool.Locked=False - nTool.Volumes += ["NewSmallWheel"] - ToolSvc+=nTool - - from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc - Agdd2Geo=AGDDtoGeoSvc() - Agdd2Geo.Builders += ["NSWAGDDTool/NewSmallWheel"] - theApp.CreateSvc += ["AGDDtoGeoSvc"] - svcMgr += Agdd2Geo - from AtlasGeoModel import Agdd2Geo - # if(vp1FullToroids or vp1NSW): - # from AtlasGeoModel import Agdd2Geo - # else: - # from AthenaCommon.GlobalFlags import globalflags - # DDV = globalflags.DetDescrVersion() - # if(DDV.__contains__('ATLAS-GEO')): - # seconddash = DDV.find('-',8); - # majorddversstr = DDV[seconddash+1:seconddash+3]; - # majorddversint = int(majorddversstr); - # if(majorddversint>10): - # # Additional material in the muon system - # from AGDD2Geo.AGDD2GeoConf import AGDD2GeoSvc - # AGDD2GeoSvc=AGDD2GeoSvc() - # AGDD2GeoSvc.PrintSections=False - # AGDD2GeoSvc.Sections += ["ATLAS Feet"] - # AGDD2GeoSvc.Sections += ["Atlas Barrel Toroidal Magnets"] - # AGDD2GeoSvc.Sections += ["Atlas ECT Toroidal Magnets"] - # AGDD2GeoSvc.DisableSections = False - # AGDD2GeoSvc.Locked = False - # theApp.CreateSvc += ["AGDD2GeoSvc"] - # svcMgr += AGDD2GeoSvc #MagneticField: -#include("BFieldAth/BFieldAth_jobOptions.py") # OLD -import MagFieldServices.SetupField # NEW +import MagFieldServices.SetupField +# Fatras if (vp1Fatras): from FatrasExample.FatrasJobProperties import FatrasFlags FatrasFlags.SingleTrackSimulation.set_Value(vp1InputFiles==[]) @@ -336,6 +299,7 @@ if (vp1Fatras): jobproperties.FastSimulation.doFatrasMuon.set_Value(vp1FatrasMuon) FatrasFlags.FastCaloSim.set_Value(vp1FatrasCalo) + if (vp1InputFiles != []): import AthenaPoolCnvSvc.ReadAthenaPool diff --git a/graphics/VP1/VP1Base/src/IVP13DStandardChannelWidget.cxx b/graphics/VP1/VP1Base/src/IVP13DStandardChannelWidget.cxx index 32da32c5ca33be49675bae6ea4f10bfebb22abd8..1314da09f31f8fa4e287a67c8d9c8d6ff92a9911 100644 --- a/graphics/VP1/VP1Base/src/IVP13DStandardChannelWidget.cxx +++ b/graphics/VP1/VP1Base/src/IVP13DStandardChannelWidget.cxx @@ -27,6 +27,7 @@ #include <Inventor/C/errors/debugerror.h> #include <Inventor/actions/SoLineHighlightRenderAction.h> +#include <Inventor/actions/SoBoxHighlightRenderAction.h> #include <Inventor/nodes/SoPerspectiveCamera.h> #include <Inventor/SoOffscreenRenderer.h> @@ -243,10 +244,11 @@ void IVP13DStandardChannelWidget::create() { m_d->viewer->setSceneGraph(m_d->root); m_d->viewer->setGLRenderAction(new SoLineHighlightRenderAction()); + //m_d->viewer->setGLRenderAction(new SoBoxHighlightRenderAction()); // Default Transparency Type // m_d->viewer->setTransparencyType( SoGLRenderAction::DELAYED_BLEND ); // old - m_d->viewer->setTransparencyType( SoGLRenderAction::BLEND ); // this looks better + m_d->viewer->setTransparencyType( SoGLRenderAction::BLEND ); // this looks better for geometry volumes //Setup camera info: foreach(IVP13DSystem*sys,m_d->systemsAllowedCameraList) diff --git a/graphics/VP1/VP1Base/src/IVP13DSystemSimple.cxx b/graphics/VP1/VP1Base/src/IVP13DSystemSimple.cxx index 5283ac3ad8e0b9094682384b9d7a7187c77099eb..0e7aefb7c0e8bc98c1204bce5b2ae625b7d4ca2d 100644 --- a/graphics/VP1/VP1Base/src/IVP13DSystemSimple.cxx +++ b/graphics/VP1/VP1Base/src/IVP13DSystemSimple.cxx @@ -119,9 +119,8 @@ void IVP13DSystemSimple::Imp::made_selection( void * userdata, SoPath * path ) if (!selectedNode) return; -// std::cout << "calling system->userPickedNode()..." << std::endl; system->userPickedNode(selectedNode, path); -// std::cout << "called system->userPickedNode()." << std::endl; + std::cout << "selected nodes: " << system->m_d->root->getNumSelected() << ", " << system->m_d->root->getPath(0) << std::endl; } //___________________________________________________________ diff --git a/graphics/VP1/VP1Base/src/VP1ExaminerViewer.cxx b/graphics/VP1/VP1Base/src/VP1ExaminerViewer.cxx index cdf5f25ef019fe4e0b58ee00c382111aba3becb6..f26fba8ef6b6868d1fc4acad06cfdce987244ed3 100644 --- a/graphics/VP1/VP1Base/src/VP1ExaminerViewer.cxx +++ b/graphics/VP1/VP1Base/src/VP1ExaminerViewer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -11,7 +11,7 @@ // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) // // Initial version: March 2008 // // // -// Updates: // +// Major updates: // // Sep 2013, Riccardo-Maria BIANCHI rbianchi@cern.ch // // Sep 2017, Riccardo-Maria BIANCHI rbianchi@cern.ch // // // diff --git a/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx b/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx index bdcd76b75f3f628e35fe63a2cebd1804559f42bc..632ee96b095bef25add2132c9bc92e42f4eda41f 100644 --- a/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx +++ b/graphics/VP1/VP1Gui/src/VP1ExecutionScheduler.cxx @@ -385,6 +385,18 @@ VP1ExecutionScheduler* VP1ExecutionScheduler::init( StoreGateSvc* eventStore, VP1QtUtils::setEnvironmentVariable("DISPLAY",alternative); } + + + QCoreApplication::setOrganizationName("ATLAS"); + #if defined BUILDVP1LIGHT + QCoreApplication::setApplicationName("VP1Light"); + #else + QCoreApplication::setApplicationName("VP1"); + #endif + QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); + + + // here we check if the main (and unique!) Qt application has been initialized already. If not we initialize it. if (qApp) { VP1Msg::message("VP1ExecutionScheduler::init ERROR: QApplication already initialized. Expect problems!!!"); @@ -404,12 +416,6 @@ VP1ExecutionScheduler* VP1ExecutionScheduler::init( StoreGateSvc* eventStore, //new QApplication(argc, argv); new VP1QtApplication(argc, argv); } - QCoreApplication::setOrganizationName("ATLAS"); - #if defined BUILDVP1LIGHT - QCoreApplication::setApplicationName("VP1Light"); - #else - QCoreApplication::setApplicationName("VP1"); - #endif VP1AvailEvents * availEvents(0); if (!singleEventSource.isEmpty()&&!singleEventLocalTmpDir.isEmpty()) { diff --git a/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx b/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx index 95e7b0b30fa37c63ff03a4035b9456f4a784ccc8..7ff375982e1679e01a19c25edada5b09f5715d85 100644 --- a/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx +++ b/graphics/VP1/VP1Gui/src/VP1MainWindow.cxx @@ -9,6 +9,9 @@ // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> // // // // Initial version: April 2007 // +// +// Updates: +// - Riccardo.Maria.Bianchi@cern.ch // // ///////////////////////////////////////////////////////////// diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/GeoSysController.h b/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/GeoSysController.h index 372b53f9bba5fc2a7274b35433ca1635a47d9ce6..c3dd4ba80a4f0a384be75ac3d0b714f529c95afa 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/GeoSysController.h +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/GeoSysController.h @@ -102,6 +102,7 @@ signals: //Signals without state: void adaptMuonChambersToEventData(); void autoAdaptPixelsOrSCT(bool,bool,bool,bool,bool,bool);//pixel,brl,ecA,ecC,bcmA,bcmC + void autoAdaptMuonNSW(bool,bool,bool); // reset to full NSW geo, sTGC, MicroMegas void resetSubSystems(VP1GeoFlags::SubSystemFlags); void autoExpandByVolumeOrMaterialName(bool,QString);//volname: (false,namestr), matname: (true,namestr) void actionOnAllNonStandardVolumes(bool);//true: zap, false: expand. @@ -125,6 +126,7 @@ private slots: void loadMaterialsRequested(); void emit_adaptMuonChambersToEventData(); void emit_autoAdaptPixelsOrSCT(); + void emit_autoAdaptMuonNSW(); void emit_autoExpandByVolumeOrMaterialName(); void emit_actionOnAllNonStandardVolumes(); void emit_resetSubSystems(); diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeoFlags.h b/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeoFlags.h index 841c551ecf6d5934c84c68c38a8860bda67c957f..375f8607ebd77f72472193c09fedbffdd409b264 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeoFlags.h +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeoFlags.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -23,35 +23,50 @@ class VP1GeoFlags { public: - enum SubSystemFlag { - None = 0x000000, - Pixel = 0x000001, - SCT = 0x000002, - TRT = 0x000004, - InDetServMat = 0x000008, - LAr = 0x000010, - Tile = 0x000020, - BarrelToroid = 0x000040, // FIXME - make barrel - MuonBarrelStationInner = 0x000080, - MuonBarrelStationMiddle = 0x000100, - MuonBarrelStationOuter = 0x000200, - MuonEndcapStationCSC = 0x000400, - MuonEndcapStationTGC = 0x000800, - MuonEndcapStationMDT = 0x001000, - AllMuonChambers = 0x001F80, - CavernInfra = 0x002000, - BeamPipe = 0x004000, - LUCID = 0x010000, - ZDC = 0x020000,//, - ALFA = 0x040000, // bit 18 - ToroidECA = 0x80000, //bit 19 - ToroidECC = 0x100000, //bit 20 FIXME! Remove and cleanup nomenclature - MuonFeet = 0x200000, //bit 21 - MuonShielding = 0x400000, //bit 22 - MuonToroidsEtc = 0x800000, //bit 23 - MuonNSW = 0x1000000, //bit 24 - ForwardRegion = 0x2000000, // bit 25 - AllUnrecognisedVolumes = 0x80000000 // bit 31 + enum SubSystemFlag { // 32-bits hexadecimal bitmask + + None = 0x00000000, + + Pixel = 0x00000001, // bit 0 + SCT = 0x00000002, // 1 + TRT = 0x00000004, // 2 + InDetServMat = 0x00000008, // 3 + + LAr = 0x00000010, // 4 + Tile = 0x00000020, // 5 + BarrelToroid = 0x00000040, // 6 - FIXME - make barrel + MuonBarrelStationInner = 0x00000080, // 7 + + MuonBarrelStationMiddle = 0x00000100, // 8 + MuonBarrelStationOuter = 0x00000200, // 9 + MuonEndcapStationCSC = 0x00000400, // 10 + MuonEndcapStationTGC = 0x00000800, // 11 + + MuonEndcapStationMDT = 0x00001000, // 12 + AllMuonChambers = 0x00001F80, // == all bits occupied by the Muon chambers (80+100+200+400+800+1000) + CavernInfra = 0x00002000, // 13 + BeamPipe = 0x00004000, // 14 + // free = 0x00008000, // 15 + + LUCID = 0x00010000, // 16 + ZDC = 0x00020000, // 17 + ALFA = 0x00040000, // 18 + ToroidECA = 0x00080000, // 19 + + ToroidECC = 0x00100000, // 20 FIXME! Remove and cleanup nomenclature + MuonFeet = 0x00200000, // 21 + MuonShielding = 0x00400000, // 22 + MuonToroidsEtc = 0x00800000, // 23 + + MuonEndcapStationNSW = 0x01000000, // 24 + ForwardRegion = 0x02000000, // 25 + // free = 0x04000000, // 26 + // free = 0x08000000, // 27 + + // free = 0x10000000, // 28 + // free = 0x20000000, // 29 + // free = 0x40000000, // 30 + AllUnrecognisedVolumes = 0x80000000 // bit 31 }; Q_DECLARE_FLAGS(SubSystemFlags, SubSystemFlag) diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeometrySystem.h b/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeometrySystem.h index 117be6550224ca0829615fb1b572fb6526eeeddb..2727b48e1e000f1fe6f9c5cabcb4b9d9853d4b77 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeometrySystem.h +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/VP1GeometrySystems/VP1GeometrySystem.h @@ -59,7 +59,7 @@ public: signals: void appropriateMDTProjectionsChanged(int);//To give hints to prd/track/segment systems about //0: No projections, 1: Project to end of tubes, 2: Project to end of chamber volume. - void plotSpectrum(QStack<QString>&, int copyNumber=-1); // Send information oabout selected volume to the PartSpectSystem + void plotSpectrum(QStack<QString>&, int copyNumber=-1); // Send information about selected volume to the VP1UtilitySystems::PartSpectSystem //The stack represents the path to the selected volume. The entries of this patch have form Volname::CopyNo //The Volname is either physical volume name, or, in case the former is absent, the logical volume name //The ::CopyNo suffix is added only when CopyNo is applicable @@ -78,6 +78,7 @@ protected slots: void emit_appropriateMDTProjectionsChanged(); void autoAdaptPixelsOrSCT(bool,bool,bool,bool,bool,bool);//pixel,brl,ecA,ecC,bcmA,bcmC + void autoAdaptMuonNSW(bool reset, bool stgc, bool mm); // reset to full NSW geo, sTGC, MicroMegas void resetSubSystems(VP1GeoFlags::SubSystemFlags); void autoExpandByVolumeOrMaterialName(bool,QString);//volname: (false,namestr), matname: (true,namestr) void actionOnAllNonStandardVolumes(bool);//true: zap, false: expand. diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/GeoSysController.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/GeoSysController.cxx index 4cbb3eeaced4760bc6781431c821adc2a43c6014..db7fc79f125c613ffe62f17a4988b4c782aa3cbe 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/GeoSysController.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/GeoSysController.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -100,6 +100,7 @@ GeoSysController::GeoSysController(IVP1System * sys) m_d->ui_misc.groupBox_sctactivemodules->setVisible(false); m_d->ui.groupBox_misc->setVisible(false); m_d->ui_muon.groupBox_muonchamberconfig->setVisible(false); + m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(false); m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(false); message("GeoModel not properly initialised."); } else { @@ -115,6 +116,7 @@ GeoSysController::GeoSysController(IVP1System * sys) m_d->ui.pushButton_settings_muonchambers->setEnabled(VP1JobConfigInfo::hasMuonGeometry()); m_d->ui_int.checkBox_print_muonstationinfo->setVisible(VP1JobConfigInfo::hasMuonGeometry()); m_d->ui_muon.groupBox_muonchamberconfig->setVisible(VP1JobConfigInfo::hasMuonGeometry()); + m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(VP1JobConfigInfo::hasMuonNSWGeometry()); m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(VP1JobConfigInfo::hasMuonGeometry()); } #endif @@ -169,6 +171,9 @@ GeoSysController::GeoSysController(IVP1System * sys) connect(m_d->ui_misc.toolButton_pixelmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT())); connect(m_d->ui_misc.toolButton_sctmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT())); + + connect(m_d->ui_misc.toolButton_nswchambers_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW())); + connect(m_d->ui_misc.toolButton_nswchambers_reset,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW())); connect(m_d->ui_misc.toolButton_pixelmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems())); connect(m_d->ui_misc.toolButton_sctmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems())); @@ -198,7 +203,7 @@ GeoSysController::GeoSysController(IVP1System * sys) m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationCSC] = m_d->ui.checkBox_MuonEndcapStationCSC; m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationTGC] = m_d->ui.checkBox_MuonEndcapStationTGC; m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationMDT] = m_d->ui.checkBox_MuonEndcapStationMDT; - m_d->subSysCheckBoxMap[VP1GeoFlags::MuonNSW] = m_d->ui.checkBox_NSW; + m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationNSW] = m_d->ui.checkBox_NSW; m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationInner] = m_d->ui.checkBox_MuonBarrelStationInner; m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationMiddle] = m_d->ui.checkBox_MuonBarrelStationMiddle; m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationOuter] = m_d->ui.checkBox_MuonBarrelStationOuter; @@ -548,6 +553,23 @@ void GeoSysController::emit_autoAdaptPixelsOrSCT() emit autoAdaptPixelsOrSCT(pixel,brl,ecA,ecC,bcmA,bcmC); } + +//____________________________________________________________________ +void GeoSysController::emit_autoAdaptMuonNSW() +{ + bool reset = false; + if (sender()==m_d->ui_misc.toolButton_nswchambers_reset) { + reset = true; + } + bool stgc = m_d->ui_misc.checkBox_NSW_sTGC->isChecked(); + bool mm = m_d->ui_misc.checkBox_NSW_MM->isChecked(); + + messageVerbose ("Emitting autoAdaptPixelsOrSCT("+str(reset)+","+str(stgc)+","+str(mm)+")"); + emit autoAdaptMuonNSW(reset, stgc, mm); +} + + + //____________________________________________________________________ void GeoSysController::emit_autoExpandByVolumeOrMaterialName() { @@ -569,6 +591,22 @@ void GeoSysController::emit_actionOnAllNonStandardVolumes() { } //____________________________________________________________________ +//! Reset to the sub-system top volume. +/*! + The method reset the view to the whole sub-system + by contracting all children to the mother volume. + It does work properly only if the top sub-system + volume has a concrete shape. If, instead, it is a + mere container, then this method does not work + because it will hide the children of the top + container volume. In that case, you should implement + a custom method. + + Note: for an example of a custom solution, + please refer to the 'VP1GeometrySystem::autoAdaptMuonNSW()' + method, triggered by the emission of the 'autoAdaptMuonNSW()' + signal in the 'emit_autoAdaptMuonNSW()' of this class. +*/ void GeoSysController::emit_resetSubSystems() { VP1GeoFlags::SubSystemFlags f(0); @@ -585,7 +623,7 @@ void GeoSysController::emit_resetSubSystems() //____________________________________________________________________ int GeoSysController::currentSettingsVersion() const { - return 5; + return 6; } //____________________________________________________________________ @@ -632,6 +670,10 @@ void GeoSysController::actualSaveSettings(VP1Serialise&s) const s.save(m_d->ui_disp.checkBox_labels_mboyt0s); s.save(m_d->ui_disp.checkBox_labels_mooret0s); s.save(m_d->ui_disp.checkBox_labels_hits); + // version >=6 + s.save(m_d->ui_misc.checkBox_NSW_MM); + s.save(m_d->ui_misc.checkBox_NSW_sTGC); + s.ignoreWidget(m_d->ui_disp.matButton_lastSel); std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it,itE(m_d->subSysCheckBoxMap.end()); @@ -700,6 +742,10 @@ void GeoSysController::actualRestoreSettings(VP1Deserialise& s) s.restore(m_d->ui_disp.checkBox_labels_mooret0s); s.restore(m_d->ui_disp.checkBox_labels_hits); } + if (s.version()>=6){ + s.restore(m_d->ui_misc.checkBox_NSW_MM); + s.restore(m_d->ui_misc.checkBox_NSW_sTGC); + } s.ignoreWidget(m_d->ui_disp.matButton_lastSel); std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it,itE(m_d->subSysCheckBoxMap.end()); diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx index 1f7c680abfc32b0e39621e74d6d35e70f1a90cdf..6ad4fd6fb2d913d9bbc4e345fc2b073e91c21bc4 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ ///////////////////////////////////////////////////////////////////////// @@ -12,6 +12,8 @@ // Origins of initial version dates back to ~1996, initial VP1 // // version by TK (May 2007) and almost entirely rewritten Oct 2007. // // Major refactoring october 2008. // +// Updates: // +// - Aug 2019, Riccardo.Maria.Bianchi@cern.ch // // // ///////////////////////////////////////////////////////////////////////// @@ -122,12 +124,11 @@ public: class SubSystemInfo { public: - // "geomodellocation" contains name of tree tops, or possible a - // bit more complex info in case of muons. + // "geomodellocation" contains name of tree tops, + // or possible a bit more complex info in case of muons. 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& _geomodelgrandchildrenregexp=QRegExp(""), bool _negategrandchildrenregexp=false) const QRegExp& the_geomodelgrandchildrenregexp, bool the_negategrandchildrenregexp=false) : isbuilt(false), checkbox(cb), geomodeltreetopregexp(the_geomodeltreetopregexp), @@ -154,24 +155,24 @@ public: VolumeHandle::VolumeHandleList vollist; QCheckBox* checkbox; - /* Reg Exprs for three levels of filtering: treetop, children and grandchildren + /* Regular Expressions for three levels of filtering: treetop, children, and grandchildren * * For example: * - * - Muon - * - ANON - * - BAR_Toroid + * - Muon --> treetop volume + * - ANON --> child volume + * - BAR_Toroid --> granchild volume * */ - QRegExp geomodeltreetopregexp;//For picking the geomodel treetops - QRegExp geomodelchildrenregexp;//If instead of the treetops, this system consists of volumes below the treetop, this is non-empty. + QRegExp geomodeltreetopregexp; //For picking the geomodel treetops + QRegExp geomodelchildrenregexp; //If instead of the treetops, this system consists of volumes below the treetop, this is non-empty. QRegExp geomodelgrandchildrenregexp;//If instead of the treetops, this system consists of volumes below the child of a treetop, this is non-empty. bool negatetreetopregexp; bool negatechildrenregexp; bool negategrandchildrenregexp; - std::string matname;//if nonempty, use this from detvisattr instead of the top volname. + std::string matname; //if nonempty, use this from detvisattr instead of the top volname. VP1GeoFlags::SubSystemFlag flag; @@ -244,7 +245,7 @@ public: PhiSectorManager * phisectormanager; VolumeTreeModel * volumetreemodel; - //Helpers used for printouts://Fixme: To VolumeHandle!! + //Helpers used for printouts://FIXME: To VolumeHandle!! static double exclusiveMass(const PVConstLink& pv); static double inclusiveMass(const PVConstLink& pv); static double volume(const PVConstLink& pv); @@ -297,7 +298,7 @@ public: //_____________________________________________________________________________________ VP1GeometrySystem::VP1GeometrySystem( const VP1GeoFlags::SubSystemFlags& SubSystemsTurnedOn, QString name ) : IVP13DSystemSimple(name, - "This system displays the geometry as defined by GeoModel.", + "This system displays the geometry as defined in the GeoModel tree.", "Riccardo.Maria.Bianchi@cern.ch"), m_d(new Imp(this,SubSystemsTurnedOn)) { @@ -401,6 +402,7 @@ QWidget * VP1GeometrySystem::buildController() connect(m_d->controller,SIGNAL(autoExpandByVolumeOrMaterialName(bool,QString)),this,SLOT(autoExpandByVolumeOrMaterialName(bool,QString))); connect(m_d->controller,SIGNAL(actionOnAllNonStandardVolumes(bool)),this,SLOT(actionOnAllNonStandardVolumes(bool))); connect(m_d->controller,SIGNAL(autoAdaptPixelsOrSCT(bool,bool,bool,bool,bool,bool)),this,SLOT(autoAdaptPixelsOrSCT(bool,bool,bool,bool,bool,bool))); + connect(m_d->controller,SIGNAL(autoAdaptMuonNSW(bool, bool,bool)),this,SLOT(autoAdaptMuonNSW(bool, bool,bool))); connect(m_d->controller,SIGNAL(resetSubSystems(VP1GeoFlags::SubSystemFlags)),this,SLOT(resetSubSystems(VP1GeoFlags::SubSystemFlags))); connect(m_d->controller,SIGNAL(labelsChanged(int)),this,SLOT(setLabels(int))); @@ -413,11 +415,13 @@ QWidget * VP1GeometrySystem::buildController() * if the reg expr does not match any volume, the corresponding subsystem checkbox in the Geo GUI gets disabled. * * syntax: addSubSystem(VP1GeoFlags::SubSystemFlag&, // the associated system flag - QString& treetopregexp, // the regular expr for the top/root name of the main detector system - QString& childrenregexp="", // the reg expr for the children of the main detector - std::string& matname="", // a name we choose for displaying in VP1 - bool negatetreetopregexp = false, // if we want to negate the top reg expr - bool negatechildrenregexp = false); // if we want to negate the children reg expr + QString& treetopregexp, // the regular expr for the top/root name of the main sub-detector system + QString& childrenregexp="", // the reg expr for the children of the main sub-detector + std::string& matname="", // a name we choose for displaying in VP1 + bool negatetreetopregexp = false, // if we want to negate the top reg expr + bool negatechildrenregexp = false); // if we want to negate the children reg expr + const QString& grandchildrenregexp="", // the regex for granchildren of the main sub-detector + bool negategrandchildrenregexp = false // wheter we want to negate teh granchildren regex */ m_d->addSubSystem( VP1GeoFlags::Pixel,"Pixel"); @@ -439,6 +443,8 @@ QWidget * VP1GeometrySystem::buildController() m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationCSC,"Muon","CS.*","CSC"); m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationTGC,"Muon","T(1|2|3|4).*","TGC"); m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationMDT,"Muon","(EI|EM|EO|EE).*","EndcapMdt"); + m_d->addSubSystem( VP1GeoFlags::MuonEndcapStationNSW,"Muon",".*ANON.*","MuonNSW",false, false, "NewSmallWheel.*"); + m_d->addSubSystem( VP1GeoFlags::MuonBarrelStationInner,"Muon","(BI|BEE).*","BarrelInner"); m_d->addSubSystem( VP1GeoFlags::MuonBarrelStationMiddle,"Muon","BM.*","BarrelMiddle"); m_d->addSubSystem( VP1GeoFlags::MuonBarrelStationOuter,"Muon","BO.*","BarrelOuter"); @@ -446,11 +452,6 @@ QWidget * VP1GeometrySystem::buildController() //This last one is even more horrible. We want everything from the Muon treetop that is NOT included elsewhere: // m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*","Muon",false,true); - // Muon NSW - m_d->addSubSystem( VP1GeoFlags::MuonNSW,"Muon",".*ANON.*","MuonNSW",false, false, "NewSmallWheel.*"); - // m_d->addSubSystem( VP1GeoFlags::MuonMM, "Muon",".*ANON.*","MM",false,false,"MM.*"); - // m_d->addSubSystem( VP1GeoFlags::MuonsTGC,"Muon",".*ANON.*","sTGC",false,false,"sTGC.*"); - // Toroid m_d->addSubSystem( VP1GeoFlags::BarrelToroid,"Muon",".*ANON.*","BarrelToroid", false, false, "BAR_Toroid.*"); m_d->addSubSystem( VP1GeoFlags::ToroidECA,"Muon",".*ANON.*","ToroidECA", false, false, "ECT_Toroids.*"); @@ -464,7 +465,7 @@ QWidget * VP1GeometrySystem::buildController() // All muon stuff --> this will be linked to the "Services" checkbox in the GUI -// m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*","MuonEtc",false,true); + // m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","(CS|T1|T2|T3|T4|EI|EM|EO|EE|BI|BEE|BM|BO).*","MuonEtc",false,true); 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); // m_d->addSubSystem( VP1GeoFlags::MuonToroidsEtc,"Muon","*.Feet.*","MuonEtc"); @@ -529,7 +530,7 @@ void VP1GeometrySystem::buildPermanentSceneGraph(StoreGateSvc*/*detstore*/, SoSe } m_d->sceneroot->addChild(m_d->m_textSep); - // Fixme - what if font is missing? + // FIXME - what if font is missing? SoFont *myFont = new SoFont; myFont->name.setValue("Arial"); myFont->size.setValue(12.0); @@ -694,7 +695,7 @@ GeoModelExperiment* VP1GeometrySystem::Imp::getDummyGeometry() // // SimplestToyDetectorFactory factory(NULL); // more complex geometry example // factory.create(world); // std::cout << "treetop numbers: " << factory.getDetectorManager()->getNumTreeTops() << std::endl; - VP1Msg::messageDebug("Method VP1GeometrySystem::Imp::getDummyGeometry() has to be ported to the new GeoModel structure."); + VP1Msg::messageDebug("Method VP1GeometrySystem::Imp::getDummyGeometry() has to be ported to the new standalone GeoModel."); return theExperiment; } @@ -836,16 +837,20 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) SoSeparator * nodesep(0); if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId() - &&pickedPath->getNodeFromTail(2)->getTypeId()==SoSwitch::getClassTypeId() - &&pickedPath->getNodeFromTail(3)->getTypeId()==SoSeparator::getClassTypeId()) { + && pickedPath->getNodeFromTail(2)->getTypeId()==SoSwitch::getClassTypeId() + && pickedPath->getNodeFromTail(3)->getTypeId()==SoSeparator::getClassTypeId()) + { //Scenario 3: nodesep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(3)); pickedPath->pop();//To get highlighting of siblings also. - } else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSwitch::getClassTypeId() - &&pickedPath->getNodeFromTail(2)->getTypeId()==SoSeparator::getClassTypeId()) { + } + else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSwitch::getClassTypeId() + && pickedPath->getNodeFromTail(2)->getTypeId()==SoSeparator::getClassTypeId()) + { //Scenario 2: nodesep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(2)); - } else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId()) { + } + else if (pickedPath->getNodeFromTail(1)->getTypeId()==SoSeparator::getClassTypeId()) { //Scenario 1 (normal): nodesep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(1)); } @@ -853,7 +858,7 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) message("Unexpected picked path"); return; } - if (!nodesep||m_d->sonodesep2volhandle.find(nodesep)==m_d->sonodesep2volhandle.end()) { + if ( (!(nodesep)) || (m_d->sonodesep2volhandle.find(nodesep) == m_d->sonodesep2volhandle.end()) ) { message("Problems finding volume handle"); return; } @@ -905,7 +910,7 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) //Volume should be put in ZAPPED state. deselectAll(); volhandle->setState(VP1GeoFlags::ZAPPED); - message("===> Zapping Node: "+volhandle->getName()); + message("===> Zapping Node: "+volhandle->getName()); // std::cout<<"Zapped VH="<<volhandle<<std::endl; return; } @@ -940,7 +945,7 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) std::set<SoCamera*> cameras = getCameraList(); std::set<SoCamera*>::iterator it,itE = cameras.end(); for (it=cameras.begin();it!=itE;++it) { - VP1CameraHelper::animatedZoomToSubTree(*it,m_d->sceneroot,volhandle->nodeSoSeparator(),2.0,1.0); + VP1CameraHelper::animatedZoomToSubTree(*it,m_d->sceneroot,volhandle->nodeSoSeparator(),2.0,1.0); } } } @@ -956,7 +961,7 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) // OK, time to print some information for the volume // ///////////////////////////////////////////////////////// - message("===> Selected Node: "+volhandle->getName()); + message("===> Selected Node: "+volhandle->getName()); // std::cout<<"VolHandle = "<<volhandle<<std::endl; if (m_d->controller->printInfoOnClick_Shape()) { foreach (QString str, DumpShape::shapeToStringList(volhandle->geoPVConstLink()->getLogVol()->getShape())) @@ -964,14 +969,14 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) } if (m_d->controller->printInfoOnClick_Material()) { - message("===> Material:"); + message("===> Material:"); foreach (QString line, VP1GeomUtils::geoMaterialToStringList(volhandle->geoMaterial())) message(" "+line); } if ( m_d->controller->printInfoOnClick_CopyNumber() ) { int cn = volhandle->copyNumber(); - message("===> CopyNo : "+(cn>=0?QString::number(cn):QString(cn==-1?"Invalid":"Error reconstructing copynumber"))); + message("===> CopyNo : "+(cn>=0?QString::number(cn):QString(cn==-1?"Invalid":"Error reconstructing copynumber"))); } if ( m_d->controller->printInfoOnClick_Transform() ) { @@ -980,11 +985,11 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) VP1LinAlgUtils::decodeTransformation( volhandle->getLocalTransformToVolume(), translation_x, translation_y, translation_z, rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians ); - message("===> Local Translation:"); + message("===> Local Translation:"); message(" x = "+QString::number(translation_x/CLHEP::mm)+" mm"); message(" y = "+QString::number(translation_y/CLHEP::mm)+" mm"); message(" z = "+QString::number(translation_z/CLHEP::mm)+" mm"); - message("===> Local Rotation:"); + message("===> Local Rotation:"); message(" axis x = "+QString::number(rotaxis_x)); message(" axis y = "+QString::number(rotaxis_y)); message(" axis z = "+QString::number(rotaxis_z)); @@ -992,11 +997,11 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) VP1LinAlgUtils::decodeTransformation( volhandle->getGlobalTransformToVolume(), translation_x, translation_y, translation_z, rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians ); - message("===> Global Translation:"); + message("===> Global Translation:"); message(" x = "+QString::number(translation_x/CLHEP::mm)+" mm"); message(" y = "+QString::number(translation_y/CLHEP::mm)+" mm"); message(" z = "+QString::number(translation_z/CLHEP::mm)+" mm"); - message("===> Global Rotation:"); + message("===> Global Rotation:"); message(" axis x = "+QString::number(rotaxis_x)); message(" axis y = "+QString::number(rotaxis_y)); message(" axis z = "+QString::number(rotaxis_z)); @@ -1007,16 +1012,16 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) std::ostringstream str; GeoPrintGraphAction pg(str); volhandle->geoPVConstLink()->exec(&pg); - message("===> Tree:"); + message("===> Tree:"); foreach (QString line, QString(str.str().c_str()).split("\n")) message(" "+line); } if (m_d->controller->printInfoOnClick_Mass()) { - //Fixme: Move the mass calculations to the volume handles, and let + //FIXME: Move the mass calculations to the volume handles, and let //the common data cache some of the volume information by //logVolume). - message("===> Total Mass <==="); + message("===> Total Mass <==="); message("Inclusive "+QString::number(Imp::inclusiveMass(volhandle->geoPVConstLink())/CLHEP::kilogram)+" kg"); message("Exclusive "+QString::number(Imp::exclusiveMass(volhandle->geoPVConstLink())/CLHEP::kilogram)+" kg"); } @@ -1029,16 +1034,16 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) m_d->ensureInitPV2MuonStationMap(); std::map<GeoPVConstLink,const MuonGM::MuonStation*>::const_iterator itStation(m_d->pv2MuonStation.find(pvlink)); if (itStation!=m_d->pv2MuonStation.end()) { - message("===> Muon station <==="); + message("===> Muon station <==="); message(" ",m_d->stationInfo(itStation->second)); } } #endif } - ////////////////////////////////////////////// - // Emit a signal for the PartSpect system // - ////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////// + // Emit a signal for the VP1UtilitySystems::PartSpect system // + ///////////////////////////////////////////////////////////////// QStack<QString> partspectPath, extras; QString detFactoryName; @@ -1056,9 +1061,9 @@ void VP1GeometrySystem::userPickedNode(SoNode* , SoPath *pickedPath) Query<int> childCopyNo = parentPVLink->getIdOfChildVol(indexOfChild); if(childCopyNo.isValid()) { - QString strCopyNo; - strCopyNo.setNum(childCopyNo); - pathEntry += ("::"+strCopyNo); + QString strCopyNo; + strCopyNo.setNum(childCopyNo); + pathEntry += ("::"+strCopyNo); } partspectPath.push(pathEntry); childVH = parentVH; @@ -1494,16 +1499,21 @@ void VP1GeometrySystem::updateTransparency() //_____________________________________________________________________________________ void VP1GeometrySystem::resetSubSystems(VP1GeoFlags::SubSystemFlags f) { - if (!f) - return; + if (!f) { + return; + } + deselectAll(); foreach(Imp::SubSystemInfo*si,m_d->subsysInfoList) { if (si->flag & f) { - if (!si->isbuilt) - continue; - VolumeHandle::VolumeHandleListItr it(si->vollist.begin()),itE(si->vollist.end()); - for (;it!=itE;++it) - (*it)->reset(); + if (!si->isbuilt) { + continue; + } + VolumeHandle::VolumeHandleListItr it(si->vollist.begin()),itE(si->vollist.end()); + for (;it!=itE;++it) { + messageDebug("resetting volume --> " + (*it)->getName() ); + (*it)->reset(); + } } } } @@ -2237,6 +2247,90 @@ void VP1GeometrySystem::autoAdaptPixelsOrSCT(bool pixel,bool brl, bool ecA, bool } } + +//_____________________________________________________________________________________ +void VP1GeometrySystem::autoAdaptMuonNSW(bool reset, bool stgc, bool mm) +{ + VP1Msg::messageDebug("VP1GeometrySystem::autoAdaptMuonNSW()"); + + #ifndef BUILDVP1LIGHT + // return if Muon and MuonNSW are not configured/present/ON + if ( !( VP1JobConfigInfo::hasMuonGeometry() && VP1JobConfigInfo::hasMuonNSWGeometry() ) ) + return; + #endif + + if( reset ) + VP1Msg::messageDebug("resetting to full NSW..."); + + VP1GeoFlags::SubSystemFlag subSysFlag(VP1GeoFlags::MuonEndcapStationNSW); + + //////////////////////////////////////////////////////////////// + //Find subsystem: + Imp::SubSystemInfo* subsys(0); + foreach(Imp::SubSystemInfo*si,m_d->subsysInfoList) { + if (si->flag == subSysFlag) { + subsys = si; + break; + } + } + if (!subsys) { + message("autoAdaptMuonNSW Error: Could not find subsystem"); + return; + } + + + //////////////////////////////////////////////////////////////// + //Abort if corresponding subsystem is not built: + if (!subsys->isbuilt) { + VP1Msg::messageDebug("autoAdaptMuonNSW: Aborting since subsystem geometry not built yet"); + return;//Disabling now due to phi-sector problems if "click some phi sectors"->"adapt pixel"->"turn on pixel" + } + bool save = m_d->sceneroot->enableNotify(false); + m_d->phisectormanager->largeChangesBegin(); + + VolumeHandle::VolumeHandleListItr it(subsys->vollist.begin()),itE(subsys->vollist.end()); + + // loop over first level children (i.e., 'NewSmallWheel') + for (;it!=itE;++it) { + + (*it)->initialiseChildren(); + (*it)->setState(VP1GeoFlags::CONTRACTED); + VolumeHandle::VolumeHandleListItr itChl((*it)->childrenBegin()),itChlE((*it)->childrenEnd()); + + // loop over second level children (i.e., 'NSW_sTGC', 'NSW_MM') + for (;itChl!=itChlE;++itChl) { + + bool unzap( reset? true : false ); + + if ( !reset ) { + (*itChl)->setState(VP1GeoFlags::ZAPPED); + if ( (stgc) && (*itChl)->hasName("NSW_sTGC") ) { + unzap = true; + //m_d->showPixelModules(*itChl); + } else if ( (mm) && (*itChl)->hasName("NSW_MM") ) { + unzap = true; + //m_d->showPixelModules(*itChl); + } + } + if (unzap) { + (*itChl)->setState(VP1GeoFlags::EXPANDED); + } + } + (*it)->setState(VP1GeoFlags::EXPANDED); + } + + m_d->phisectormanager->updateRepresentationsOfVolsAroundZAxis(); + m_d->phisectormanager->largeChangesEnd(); + + if (save) { + m_d->sceneroot->enableNotify(true); + m_d->sceneroot->touch(); + } +} + + + + //_____________________________________________________________________________________ void VP1GeometrySystem::Imp::showPixelModules(VolumeHandle* h) { diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VisAttributes.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VisAttributes.cxx index d2cf2d841af06f115d3ba4745915579da52b7384..566983cb26e0e6caaa92bb17ddf5fdf8c42986c8 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VisAttributes.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VisAttributes.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "VP1GeometrySystems/VisAttributes.h" @@ -493,6 +493,7 @@ MatVisAttributes::MatVisAttributes() { } { + // Carbon SoMaterial *m = new SoMaterial; m->diffuseColor.setValue (0.2, 0.2, 0.2); m->ambientColor.setValue (0.07, 0.07, 0.07); @@ -1014,6 +1015,37 @@ MatVisAttributes::MatVisAttributes() { add("sct::FwdFibres",m); } + { + // NSW - sTGC + SoMaterial * m = new SoMaterial; + m->ambientColor.setValue(0.2, 0.2, 0.2); + m->diffuseColor.setValue(0, 0.6667, 1.0); + m->specularColor.setValue(0,0,0); + m->shininess.setValue(0.2); + add("Honeycomb",m); + } + { + // NSW - MicroMegas (MM) + SoMaterial *m = new SoMaterial; + m->diffuseColor.setValue (0.765, 0.718, 0.541); + m->specularColor.setValue (0.5, 0.5, 0.5); + //m->ambientColor.setValue(0, .157811, .187004); + //m->diffuseColor.setValue(.98, .8, .21); + //m->specularColor.setValue(.915152, .915152, .915152); + m->shininess.setValue(0.2); + add("PCB",m); + } + { + // NSW - Shield Steel + SoMaterial *m = new SoMaterial; + m->diffuseColor.setValue (0.424238, 0.424238, 0.424238); + m->specularColor.setValue(0.168, 0.168, 0.168); + m->shininess.setValue(0.153696); + add("ShieldSteel",m); + } + + + ////////////// init(); } diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx index d33eba63d6eede998590ed5fe8dcc7e42b4b48e0..31b6216de47db6b6520d7bb7dcdd97b8342d2d54 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx @@ -47,7 +47,7 @@ public: VolumeHandleSharedData * commondata; GeoPVConstLink pV; - const SbMatrix accumTrans;//Fixme: Use pointer - and free once children are created AND nodesep has been build. Or just construct on the fly! + const SbMatrix accumTrans;//FIXME: Use pointer - and free once children are created AND nodesep has been build. Or just construct on the fly! VP1ExtraSepLayerHelper * attachsepHelper; VP1ExtraSepLayerHelper * attachlabelSepHelper; @@ -239,7 +239,7 @@ void VolumeHandle::ensureBuildNodeSep() m_d->label_sep = new SoSeparator; m_d->label_sep->ref(); - m_d->nodesep = new SoSeparator;//Fixme: rendercaching?? + m_d->nodesep = new SoSeparator;//FIXME: rendercaching?? // m_d->nodesep->renderCaching.setValue(SoSeparator::ON); // m_d->nodesep->boundingBoxCaching.setValue(SoSeparator::ON); m_d->nodesep->ref();//Since we are keeping it around irrespective of whether it is attached or not. @@ -258,7 +258,7 @@ void VolumeHandle::ensureBuildNodeSep() //What phi sector do we belong in? int iphi = m_d->commondata->phiSectorManager()->getVolumeType(m_d->accumTrans, shape); - if (iphi>=-1 ) { + if (iphi >= -1 ) { //VP1Msg::messageDebug("Cylinders [iphi >= -1]..."); //Substitute shapes that are essentially cylinders with such. This //can be done safely since this tube won't need @@ -285,7 +285,7 @@ void VolumeHandle::ensureBuildNodeSep() m_d->nodesep->addChild(VP1LinAlgUtils::toSoTransform(Amg::EigenTransformToCLHEP(dynamic_cast<const GeoShapeShift*>(m_d->pV->getLogVol()->getShape())->getX()))); //Add shape child(ren) and get the separator (helper) where we attach the nodesep when volume is visible: - if (iphi>=-1) { + if (iphi >= -1) { m_d->nodesep->addChild(shape); m_d->attachsepHelper = m_d->commondata->phiSectorManager()->getSepHelperForNode(m_d->commondata->subSystemFlag(), iphi); m_d->attachlabelSepHelper = m_d->commondata->phiSectorManager()->getLabelSepHelperForNode(m_d->commondata->subSystemFlag(), iphi); diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeTreeModel.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeTreeModel.cxx index bccfe9b2fd0b6a015462fd2ea3cc58b3ed4cff8e..c0878db4e09885692413a300533ae52209032ea2 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeTreeModel.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeTreeModel.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "VP1GeometrySystems/VolumeTreeModel.h" @@ -111,30 +111,37 @@ VolumeTreeModel::VolumeTreeModel( QObject * parent ) } if (Imp::subsysflag2section.empty()) { Imp::defineSubSystem(VP1GeoFlags::None,"None",Imp::UNKNOWN); + // Inner Detector Imp::defineSubSystem(VP1GeoFlags::Pixel,"Pixel",Imp::INDET); Imp::defineSubSystem(VP1GeoFlags::SCT,"SCT",Imp::INDET); Imp::defineSubSystem(VP1GeoFlags::TRT,"TRT",Imp::INDET); Imp::defineSubSystem(VP1GeoFlags::InDetServMat,"Services",Imp::INDET); + // Calorimeters Imp::defineSubSystem(VP1GeoFlags::LAr,"LAr",Imp::CALO); Imp::defineSubSystem(VP1GeoFlags::Tile,"Tile",Imp::CALO); //Toroids Imp::defineSubSystem(VP1GeoFlags::BarrelToroid,"Toroid Barrel",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::ToroidECA,"Toroid EndCap side A",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::ToroidECC,"Toroid EndCap side C",Imp::MUON); + // Structure Imp::defineSubSystem(VP1GeoFlags::MuonFeet,"Feets",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonShielding,"Shields, etc.",Imp::MUON); - Imp::defineSubSystem(VP1GeoFlags::MuonNSW,"Muon NSW",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonToroidsEtc,"Muon etc.",Imp::MUON); + // Muon chambers Imp::defineSubSystem(VP1GeoFlags::MuonBarrelStationInner,"Inner Barrel Stations",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonBarrelStationMiddle,"Middle Barrel Stations",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonBarrelStationOuter,"Outer Barrel Stations",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonEndcapStationCSC,"Endcap CSC",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonEndcapStationTGC,"Endcap TGC",Imp::MUON); Imp::defineSubSystem(VP1GeoFlags::MuonEndcapStationMDT,"Endcap MDT",Imp::MUON); + Imp::defineSubSystem(VP1GeoFlags::MuonEndcapStationNSW,"Endcap NSW",Imp::MUON); + // Beam Pipe Imp::defineSubSystem(VP1GeoFlags::BeamPipe,"Beam Pipe",Imp::MISC); + // FWD detectors Imp::defineSubSystem(VP1GeoFlags::LUCID,"LUCID",Imp::MISC); Imp::defineSubSystem(VP1GeoFlags::ZDC,"ZDC",Imp::MISC); Imp::defineSubSystem(VP1GeoFlags::ForwardRegion,"ForwardRegion",Imp::MISC); + // Cavern Imp::defineSubSystem(VP1GeoFlags::CavernInfra,"Cavern Infrastructure",Imp::MISC); } } diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/settings_misc_form.ui b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/settings_misc_form.ui index dd1dce175c828c63e8d0b142ea7cef3dcb432d2b..4edd079c8b84eca2b87c31c28fe53def4250c261 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/settings_misc_form.ui +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/settings_misc_form.ui @@ -1,78 +1,79 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>GeoSysSettingsMiscForm</class> - <widget class="QWidget" name="GeoSysSettingsMiscForm" > - <property name="geometry" > + <widget class="QWidget" name="GeoSysSettingsMiscForm"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>319</width> + <width>370</width> <height>360</height> </rect> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Form</string> </property> - <layout class="QVBoxLayout" name="verticalLayout_2" > + <layout class="QVBoxLayout" name="verticalLayout_2"> <item> - <widget class="QGroupBox" name="groupBox_pixelactivemodules" > - <property name="title" > - <string>Pixel active modules</string> + <widget class="QGroupBox" name="groupBox_pixelactivemodules"> + <property name="title"> + <string>ID - Pixel active modules</string> </property> - <layout class="QHBoxLayout" name="horizontalLayout_3" > + <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> - <layout class="QVBoxLayout" name="verticalLayout" > + <layout class="QVBoxLayout" name="verticalLayout"> <item> - <layout class="QHBoxLayout" name="_2" > + <layout class="QHBoxLayout" name="_2"> <item> - <widget class="QCheckBox" name="checkBox_pixelmod_barrel" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_pixelmod_barrel"> + <property name="text"> <string>Brl</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_pixelmod_endcapA" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_pixelmod_endcapA"> + <property name="text"> <string>ecA</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_pixelmod_endcapC" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_pixelmod_endcapC"> + <property name="text"> <string>ecC</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QToolButton" name="toolButton_pixelmod_adapt" > - <property name="text" > + <widget class="QToolButton" name="toolButton_pixelmod_adapt"> + <property name="text"> <string>Adapt</string> </property> </widget> </item> <item> - <widget class="QToolButton" name="toolButton_pixelmod_reset" > - <property name="text" > + <widget class="QToolButton" name="toolButton_pixelmod_reset"> + <property name="text"> <string>Reset</string> </property> </widget> </item> <item> - <spacer name="horizontalSpacer" > - <property name="orientation" > + <spacer name="horizontalSpacer"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> @@ -83,34 +84,34 @@ </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_2" > + <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> - <widget class="QLabel" name="label_bcmmods" > - <property name="text" > + <widget class="QLabel" name="label_bcmmods"> + <property name="text"> <string>Also show BCM mods:</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_bcmMod_Aside" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_bcmMod_Aside"> + <property name="text"> <string>A side</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_bcmMod_Cside" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_bcmMod_Cside"> + <property name="text"> <string>C side</string> </property> </widget> </item> <item> - <spacer name="horizontalSpacer_2" > - <property name="orientation" > + <spacer name="horizontalSpacer_2"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>1</height> @@ -124,10 +125,10 @@ </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>1</width> <height>20</height> @@ -139,56 +140,65 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_sctactivemodules" > - <property name="title" > - <string>SCT active modules</string> + <widget class="QGroupBox" name="groupBox_sctactivemodules"> + <property name="title"> + <string>ID - SCT active modules</string> </property> - <layout class="QHBoxLayout" name="_3" > - <property name="margin" > + <layout class="QHBoxLayout" name="_3"> + <property name="leftMargin"> + <number>4</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> <number>4</number> </property> <item> - <layout class="QHBoxLayout" name="_4" > + <layout class="QHBoxLayout" name="_4"> <item> - <widget class="QCheckBox" name="checkBox_sctmod_barrel" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_sctmod_barrel"> + <property name="text"> <string>Brl</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_sctmod_endcapA" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_sctmod_endcapA"> + <property name="text"> <string>ecA</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QCheckBox" name="checkBox_sctmod_endcapC" > - <property name="text" > + <widget class="QCheckBox" name="checkBox_sctmod_endcapC"> + <property name="text"> <string>ecC</string> </property> - <property name="checked" > + <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> - <widget class="QToolButton" name="toolButton_sctmod_adapt" > - <property name="text" > + <widget class="QToolButton" name="toolButton_sctmod_adapt"> + <property name="text"> <string>Adapt</string> </property> </widget> </item> <item> - <widget class="QToolButton" name="toolButton_sctmod_reset" > - <property name="text" > + <widget class="QToolButton" name="toolButton_sctmod_reset"> + <property name="text"> <string>Reset</string> </property> </widget> @@ -197,10 +207,10 @@ </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>1</width> <height>20</height> @@ -212,105 +222,180 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox" > - <property name="title" > + <widget class="QGroupBox" name="groupBox_show_NSW_chambers"> + <property name="title"> + <string>Muons - NSW chambers</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QCheckBox" name="checkBox_NSW_sTGC"> + <property name="toolTip"> + <string>Show the NSW sTGC chambers</string> + </property> + <property name="text"> + <string>sTGC</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_NSW_MM"> + <property name="toolTip"> + <string>Show the NSW MicroMegas chambers</string> + </property> + <property name="text"> + <string>MM</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="toolButton_nswchambers_adapt"> + <property name="text"> + <string>Adapt</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="toolButton_nswchambers_reset"> + <property name="text"> + <string>Reset</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> <string>Actions on visible volumes</string> </property> - <layout class="QGridLayout" name="_5" > - <property name="horizontalSpacing" > - <number>2</number> + <layout class="QGridLayout" name="_5"> + <property name="leftMargin"> + <number>4</number> </property> - <property name="margin" > + <property name="topMargin"> <number>4</number> </property> - <item row="0" column="0" colspan="2" > - <widget class="QLabel" name="label_7" > - <property name="text" > + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> + <number>4</number> + </property> + <property name="horizontalSpacing"> + <number>2</number> + </property> + <item row="0" column="0" colspan="2"> + <widget class="QLabel" name="label_7"> + <property name="text"> <string>Vols. with mat:</string> </property> </widget> </item> - <item row="0" column="2" > - <widget class="QLineEdit" name="lineEdit_expand_vols_matname" > - <property name="minimumSize" > + <item row="0" column="2"> + <widget class="QLineEdit" name="lineEdit_expand_vols_matname"> + <property name="minimumSize"> <size> <width>50</width> <height>0</height> </size> </property> - <property name="toolTip" > - <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <property name="toolTip"> + <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Matching is case-sensitive and wildcards are allowed.</p></body></html></string> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Matching is case-sensitive and wildcards are allowed.</p></body></html></string> </property> - <property name="text" > + <property name="text"> <string>Air</string> </property> </widget> </item> - <item row="0" column="3" > - <widget class="QPushButton" name="pushButton_expand_vols_matname" > - <property name="text" > + <item row="0" column="3"> + <widget class="QPushButton" name="pushButton_expand_vols_matname"> + <property name="text"> <string>Expand</string> </property> </widget> </item> - <item row="1" column="0" > - <widget class="QLabel" name="label_8" > - <property name="text" > + <item row="1" column="0"> + <widget class="QLabel" name="label_8"> + <property name="text"> <string>Vols. named:</string> </property> </widget> </item> - <item row="1" column="1" colspan="2" > - <widget class="QLineEdit" name="lineEdit_expand_vols_volname" > - <property name="toolTip" > - <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> + <item row="1" column="1" colspan="2"> + <widget class="QLineEdit" name="lineEdit_expand_vols_volname"> + <property name="toolTip"> + <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Matching is case-insensitive and wildcards are allowed.</p></body></html></string> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Matching is case-insensitive and wildcards are allowed.</p></body></html></string> </property> - <property name="text" > + <property name="text"> <string/> </property> </widget> </item> - <item row="1" column="3" > - <widget class="QPushButton" name="pushButton_expand_vols_volname" > - <property name="text" > + <item row="1" column="3"> + <widget class="QPushButton" name="pushButton_expand_vols_volname"> + <property name="text"> <string>Expand</string> </property> </widget> </item> - <item row="2" column="0" > - <widget class="QLabel" name="label" > - <property name="toolTip" > + <item row="2" column="0"> + <widget class="QLabel" name="label"> + <property name="toolTip"> <string>Actions on all shapes with 3D representations that are not standard VRML. Useful if you intend to dump the scene to a portable file.</string> </property> - <property name="text" > + <property name="text"> <string>Non-standard shapes:</string> </property> </widget> </item> - <item row="2" column="2" colspan="2" > - <layout class="QHBoxLayout" name="horizontalLayout" > + <item row="2" column="2" colspan="2"> + <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QPushButton" name="pushButton_nonStandardShapes_Iconify" > - <property name="toolTip" > + <widget class="QPushButton" name="pushButton_nonStandardShapes_Iconify"> + <property name="toolTip"> <string>Actions on all shapes with 3D representations that are not standard VRML. Useful if you intend to dump the scene to a portable file.</string> </property> - <property name="text" > + <property name="text"> <string>Iconify</string> </property> </widget> </item> <item> - <widget class="QPushButton" name="pushButton_nonStandardShapes_Expand" > - <property name="toolTip" > + <widget class="QPushButton" name="pushButton_nonStandardShapes_Expand"> + <property name="toolTip"> <string>Actions on all shapes with 3D representations that are not standard VRML. Useful if you intend to dump the scene to a portable file.</string> </property> - <property name="text" > + <property name="text"> <string>Expand</string> </property> </widget> @@ -321,13 +406,13 @@ p, li { white-space: pre-wrap; } </widget> </item> <item> - <layout class="QHBoxLayout" name="_10" > + <layout class="QHBoxLayout" name="_10"> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" stdset="0" > + <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> @@ -336,8 +421,8 @@ p, li { white-space: pre-wrap; } </spacer> </item> <item> - <widget class="QPushButton" name="pushButton_close" > - <property name="text" > + <widget class="QPushButton" name="pushButton_close"> + <property name="text"> <string>&Close</string> </property> </widget> diff --git a/graphics/VP1/VP1Utils/src/VP1DetInfo.cxx b/graphics/VP1/VP1Utils/src/VP1DetInfo.cxx index 88ea7227afbe051ecbb4845f47c955a5916770c9..3e02f9e0bb41f516adf0cbfb3abb31de7bea0410 100644 --- a/graphics/VP1/VP1Utils/src/VP1DetInfo.cxx +++ b/graphics/VP1/VP1Utils/src/VP1DetInfo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -128,7 +128,7 @@ const T * VP1DetInfo::Imp::cachedRetrieve(const T*& cachedPtr, const char* prefe return ( cachedPtr==bad? 0 : cachedPtr ); QString key(preferredKey); if (!configallows) { - VP1Msg::messageDebug("VP1DetInfo WARNING: Will not attempt to get (type="+QString(typeid(T).name())+", key="+key+") due to missing features in job!"); + VP1Msg::messageDebug("VP1DetInfo WARNING: Will not attempt to get (type="+QString(typeid(T).name())+", key="+key+") due to missing/disabled features in job!"); cachedPtr = bad; return 0; } diff --git a/graphics/VP1/VP1Utils/src/VP1JobConfigInfo.cxx b/graphics/VP1/VP1Utils/src/VP1JobConfigInfo.cxx index a728ee3e67a1aa9bb9f3c1d32787467be6cd71d8..7e0c872013390bfc0fc1280dcdda0eea4d7e1b37 100644 --- a/graphics/VP1/VP1Utils/src/VP1JobConfigInfo.cxx +++ b/graphics/VP1/VP1Utils/src/VP1JobConfigInfo.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -52,6 +52,7 @@ public: }; GeoPVConstLink VP1JobConfigInfo::Imp::geoModelWorld; +// init default values bool VP1JobConfigInfo::Imp::initialised = false; bool VP1JobConfigInfo::Imp::hasGeoModelExperiment = false; bool VP1JobConfigInfo::Imp::hasPixelGeometry = false; @@ -62,7 +63,7 @@ bool VP1JobConfigInfo::Imp::hasBeamPipeGeometry = false; bool VP1JobConfigInfo::Imp::hasLArGeometry = false; bool VP1JobConfigInfo::Imp::hasTileGeometry = false; bool VP1JobConfigInfo::Imp::hasMuonGeometry = false; -bool VP1JobConfigInfo::Imp::hasMuonNSWGeometry = true; //FIXME!!! +bool VP1JobConfigInfo::Imp::hasMuonNSWGeometry = false; bool VP1JobConfigInfo::Imp::hasLUCIDGeometry = false; bool VP1JobConfigInfo::Imp::hasBCMGeometry = false; bool VP1JobConfigInfo::Imp::hasCavernInfraGeometry = false; @@ -179,17 +180,17 @@ bool VP1JobConfigInfo::Imp::actualInit( StoreGateSvc* detStore ) std::string name = av.getName(); if ( !hasPixelGeometry && name=="Pixel") { hasPixelGeometry = true; - if ( !hasBCMGeometry) { - //Loop under the pixel volume to check if there is BCM volumes - //present in the current config: - GeoVolumeCursor pv(av.getVolume()); - while (!pv.atEnd()) { - if (pv.getVolume()->getLogVol()->getName()=="bcmModLog") { - hasBCMGeometry = true; - break; - } - pv.next(); - } + if ( !hasBCMGeometry ) { + //Loop under the top Pixel volume to check if there are BCM volumes + //present in the current config: + GeoVolumeCursor pv(av.getVolume()); + while (!pv.atEnd()) { + if (pv.getVolume()->getLogVol()->getName()=="bcmModLog") { + hasBCMGeometry = true; + break; + } + pv.next(); + } } } if ( !hasSCTGeometry && name=="SCT") hasSCTGeometry = true; @@ -200,7 +201,21 @@ bool VP1JobConfigInfo::Imp::actualInit( StoreGateSvc* detStore ) if ( !hasLArGeometry && name=="LArEndcapPos") hasLArGeometry = true; if ( !hasLArGeometry && name=="LArEndcapNeg") hasLArGeometry = true; if ( !hasTileGeometry && name=="Tile") hasTileGeometry = true; - if ( !hasMuonGeometry && name=="Muon") hasMuonGeometry = true; + if ( !hasMuonGeometry && name=="Muon") { + hasMuonGeometry = true; + if ( !hasMuonNSWGeometry ) { + //Loop under the top Muon volume to check if there are NSW volumes + //present in the current config: + GeoVolumeCursor pv(av.getVolume()); + while (!pv.atEnd()) { + if (pv.getVolume()->getLogVol()->getName()=="NewSmallWheel") { + hasMuonNSWGeometry = true; + break; + } + pv.next(); + } + } + } if ( !hasLUCIDGeometry && (name=="LucidSideA"||name=="LucidSideC")) hasLUCIDGeometry = true; //FIXME: Look for CavernInfra as well!!!