From 0cde33519057152e751f5105d1fd37e05c1f07a9 Mon Sep 17 00:00:00 2001 From: Dave Casper <dcasper@uci.edu> Date: Fri, 3 Apr 2020 10:09:21 +0000 Subject: [PATCH] Revert "Merge branch 'master' of https://gitlab.cern.ch:8443/faser/calypso" This reverts commit 4c9e84aa6660762727103731dfdac6e1161b962c --- .../RDOReadExample/src/RDOReadAlg.cxx | 2 +- .../RDOReadExample/src/RDOReadAlg.h | 2 +- .../GeoModel/FaserGeoEditor/CMakeLists.txt | 3 +- .../GeoModel/GeoModelSvc/src/GeoModelSvc.cxx | 5 +- .../G4FaserAlg/python/G4FaserAlgConfigNew.py | 14 ++- .../python/FaserISF_ServicesConfigNew.py | 2 + .../python/FaserISF_HepMC_ToolsConfigNew.py | 5 ++ .../src/TrackerAlignDBTool.cxx | 2 +- .../VTI12Utils/VTI12Utils/SoVisualizeAction.h | 4 - .../VTI12Utils/src/SoVisualizeAction.cxx | 89 ------------------- 10 files changed, 28 insertions(+), 100 deletions(-) diff --git a/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.cxx b/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.cxx index b7c2ef90..3332ef84 100644 --- a/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.cxx +++ b/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.cxx @@ -39,7 +39,7 @@ StatusCode RDOReadAlg::execute() SG::ReadHandle<McEventCollection> h_mcEvents(m_mcEventKey); ATH_MSG_INFO("Read McEventContainer with " << h_mcEvents->size() << " events"); if (h_mcEvents->size() == 0) return StatusCode::FAILURE; - + // h_mcEvents->at(0)->print( msg().stream() ); SG::ReadHandle<FaserSiHitCollection> h_siHits(m_faserSiHitKey); ATH_MSG_INFO("Read FaserSiHitCollection with " << h_siHits->size() << " hits"); diff --git a/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.h b/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.h index 1d9e7aec..9f3dd5f4 100644 --- a/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.h +++ b/Control/CalypsoExample/RDOReadExample/src/RDOReadAlg.h @@ -28,7 +28,7 @@ class RDOReadAlg : public AthHistogramAlgorithm // Read handle keys for data containers // Any other event data can be accessed identically // Note the key names ("GEN_EVENT" or "SCT_Hits") are Gaudi properties and can be configured at run-time - SG::ReadHandleKey<McEventCollection> m_mcEventKey { this, "McEventCollection", "GEN_EVENT" }; + SG::ReadHandleKey<McEventCollection> m_mcEventKey { this, "McEventCollection", "TruthEvent" }; SG::ReadHandleKey<FaserSiHitCollection> m_faserSiHitKey { this, "FaserSiHitCollection", "SCT_Hits" }; SG::ReadHandleKey<FaserSCT_RDO_Container> m_faserRdoKey { this, "FaserSCT_RDO_Container", "SCT_RDOs"}; SG::ReadHandleKey<TrackerSimDataCollection> m_sctMap {this, "TrackerSimDataCollection", "SCT_SDO_Map"}; diff --git a/DetectorDescription/GeoModel/FaserGeoEditor/CMakeLists.txt b/DetectorDescription/GeoModel/FaserGeoEditor/CMakeLists.txt index 11b7579a..c9276a52 100644 --- a/DetectorDescription/GeoModel/FaserGeoEditor/CMakeLists.txt +++ b/DetectorDescription/GeoModel/FaserGeoEditor/CMakeLists.txt @@ -35,7 +35,8 @@ set( CMAKE_AUTORCC TRUE ) atlas_add_executable( FaserGeoEditor FaserGeoEditor/*.h src/*.cxx src/*.h - PRIVATE_INCLUDE_DIRS ${QT5_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} +# PRIVATE_INCLUDE_DIRS ${QT5_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} + PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} LINK_LIBRARIES Qt5::Core Qt5::Sql Qt5::OpenGL Qt5::Gui Qt5::Widgets Qt5::PrintSupport) # Install files from the package: diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx index a2d3fe7b..680717ba 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx @@ -103,7 +103,7 @@ StatusCode GeoModelSvc::initialize() Service* convSvc=dynamic_cast<Service*>(conversionSvc.get()); if (convSvc->FSMState() < Gaudi::StateMachine::INITIALIZED) { ATH_MSG_INFO("Explicitly initializing DetDescrCnvSvc"); - convSvc->sysInitialize(); + ATH_CHECK( convSvc->sysInitialize() ); } ATH_CHECK( m_detectorTools.retrieve() ); @@ -272,7 +272,8 @@ StatusCode GeoModelSvc::geoInit() } if(!m_ignoreTagSupport) { - RDBTagDetails faserTagDetails = rdbAccess->getTagDetails(m_FaserVersion, "FASERDD"); + RDBTagDetails faserTagDetails; + rdbAccess->getTagDetails(faserTagDetails, m_FaserVersion, "FASERDD"); const coral::AttributeSpecification& supportedSpec = faserTagDetails["SUPPORTED"].specification(); if(supportedSpec.type()==typeid(bool)) { if(!faserTagDetails["SUPPORTED"].data<bool>()) { diff --git a/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py b/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py index 56b16258..d1fe2d7a 100644 --- a/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py +++ b/Simulation/G4Faser/G4FaserAlg/python/G4FaserAlgConfigNew.py @@ -9,11 +9,12 @@ from AthenaCommon.AppMgr import * from G4FaserServices.G4FaserServicesConfigNew import DetectorGeometrySvcCfg from G4FaserTools.G4FaserToolsConfigNew import SensitiveDetectorMasterToolCfg from G4FaserServices.G4FaserUserActionConfigNew import UserActionSvcCfg +from G4AtlasServices.G4AtlasServicesConfigNew import PhysicsListSvcCfg # from G4AtlasApps.G4Atlas_MetadataNew import writeSimulationParametersMetadata # # Framework utilities # -from FaserISF_Services.FaserISF_ServicesConfigNew import FaserTruthServiceCfg, FaserGeoIDSvcCfg, FaserInputConverterCfg +from FaserISF_Services.FaserISF_ServicesConfigNew import FaserTruthServiceCfg, FaserInputConverterCfg, FaserGeoIDSvcCfg # from G4FaserAlg.G4FaserAlgConf import G4FaserAlg @@ -72,6 +73,12 @@ def G4FaserAlgCfg(ConfigFlags, name='G4FaserAlg', **kwargs): kwargs.setdefault('TruthRecordService', result.getService("FaserISF_TruthService")) #kwargs.setdefault('TruthRecordService', ConfigFlags.Sim.TruthStrategy) # TODO need to have manual override (simFlags.TruthStrategy.TruthServiceName()) # + # Locates detector region for space points (no longer used by G4FaserAlg) + # + accGeoID = FaserGeoIDSvcCfg(ConfigFlags) + result.merge(accGeoID) + #kwargs.setdefault('GeoIDSvc', result.getService('ISF_FaserGeoIDSvc')) + # # Converts generator particles to a proprietary type managed by ISF # accInputConverter = FaserInputConverterCfg(ConfigFlags) @@ -92,6 +99,11 @@ def G4FaserAlgCfg(ConfigFlags, name='G4FaserAlg', **kwargs): # result.merge( UserActionSvcCfg(ConfigFlags) ) kwargs.setdefault('UserActionSvc', result.getService( "G4UA::UserActionSvc") ) + + #PhysicsListSvc + result.merge( PhysicsListSvcCfg(ConfigFlags) ) + kwargs.setdefault('PhysicsListSvc', result.getService( "PhysicsListSvc") ) + # # Output level # diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py index 0a839b88..ccf7a86c 100644 --- a/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py +++ b/Simulation/ISF/ISF_Core/FaserISF_Services/python/FaserISF_ServicesConfigNew.py @@ -25,6 +25,7 @@ ISF__FaserTruthSvc, ISF__FaserGeoIDSvc, ISF__FaserInputConverter = CompFactory.g #getMC12CaloTruthStrategies, getMC12MSTruthStrategies, getMC12TruthService, getTruthService, getMC12LLPTruthService, getMC12PlusTruthService, getMC15IDTruthStrategies #getMC15CaloTruthStrategies + def FaserGeoIDSvcCfg(ConfigFlags, name="ISF_FaserGeoIDSvc", **kwargs): result = ComponentAccumulator() @@ -32,6 +33,7 @@ def FaserGeoIDSvcCfg(ConfigFlags, name="ISF_FaserGeoIDSvc", **kwargs): return result + def GenParticleFiltersToolCfg(ConfigFlags): result = ComponentAccumulator() diff --git a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py index b4c32b99..a9264e44 100644 --- a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py +++ b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py @@ -34,8 +34,13 @@ from AthenaCommon.SystemOfUnits import MeV, mm def FaserParticlePositionFilterCfg(ConfigFlags, name="ISF_FaserParticlePositionFilter", **kwargs): result = ComponentAccumulator() + + # accGeoID = FaserGeoIDSvcCfg(ConfigFlags) + # result.merge(accGeoID) + # ParticlePositionFilter kwargs.setdefault('GeoIDService' , 'ISF_FaserGeoIDSvc' ) + # kwargs.setdefault('GeoIDService' , result.getService('ISF_FaserGeoIDSvc') ) result.setPrivateTools(ISF__FaserGenParticlePositionFilter(name, **kwargs)) return result diff --git a/Tracker/TrackerAlignTools/TrackerAlignGenTools/src/TrackerAlignDBTool.cxx b/Tracker/TrackerAlignTools/TrackerAlignGenTools/src/TrackerAlignDBTool.cxx index aa8f049d..8ab67fbf 100644 --- a/Tracker/TrackerAlignTools/TrackerAlignGenTools/src/TrackerAlignDBTool.cxx +++ b/Tracker/TrackerAlignTools/TrackerAlignGenTools/src/TrackerAlignDBTool.cxx @@ -260,7 +260,7 @@ StatusCode TrackerAlignDBTool::createDB() const } // sort the created objects (in case, usually come out sorted from GeoModel) - sortTrans(); + ATH_CHECK(sortTrans()); // list out size of all created objects ATH_MSG_DEBUG( "Dumping size of created AlignableTransform objects"); for (unsigned int i = 0; i < m_alignobjs.size(); ++i) diff --git a/graphics/VTI12/VTI12Utils/VTI12Utils/SoVisualizeAction.h b/graphics/VTI12/VTI12Utils/VTI12Utils/SoVisualizeAction.h index f15a2b6e..4061d27d 100644 --- a/graphics/VTI12/VTI12Utils/VTI12Utils/SoVisualizeAction.h +++ b/graphics/VTI12/VTI12Utils/VTI12Utils/SoVisualizeAction.h @@ -40,10 +40,6 @@ public: virtual void handleTubs(const GeoTubs *tubs); - #ifndef BUILDVP1LIGHT - virtual void handleLArCustom(const LArCustomShape *); - #endif - virtual void handleSimplePolygonBrep(const GeoSimplePolygonBrep *); virtual void handleTessellatedSolid (const GeoTessellatedSolid *); diff --git a/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx b/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx index b3dc3ad9..f078915f 100644 --- a/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx +++ b/graphics/VTI12/VTI12Utils/src/SoVisualizeAction.cxx @@ -168,95 +168,6 @@ void SoVisualizeAction::handleTubs(const GeoTubs *tubs) m_shape=sotubs; } -#ifndef BUILDVP1LIGHT -void SoVisualizeAction::handleLArCustom(const LArCustomShape *custom) -{ - //qDebug() << "SoVisualizeAction::handleLArCustom"; - static const double eta_hi = 3.2; - static const double eta_mid = 2.5; - static const double eta_low = 1.375; - - - // static const double zWheelRefPoint = 3689.5*SYSTEM_OF_UNITS::mm; //=endg_z0 - static const double dMechFocaltoWRP = 3691. *SYSTEM_OF_UNITS::mm; //=endg_z1 - // static const double dElecFocaltoWRP = 3689. *SYSTEM_OF_UNITS::mm; //=endg_dcf - static const double dWRPtoFrontFace = 11. *SYSTEM_OF_UNITS::mm; - static const double rOuterCutoff = 2034. *SYSTEM_OF_UNITS::mm; //=endg_rlimit - - - SoLAr::initClass(); - SoLAr *solar = new SoLAr(); - const LArWheelCalculator *calc = custom->calculator(); - LArG4::LArWheelCalculator_t type = calc->type(); - if (type==LArG4::InnerAbsorberWheel || - type==LArG4::InnerElectrodWheel || - type==LArG4::InnerAbsorberModule || - type==LArG4::InnerElectrodModule ) { - float zPlane[2],rInner[2],rOuter[2]; - zPlane[0]=0; - zPlane[1]=calc->GetWheelThickness(); - - double tanThetaInner = 2. * exp(-eta_hi ) / (1. - exp(2.*-eta_hi )); - double tanThetaMid = 2. * exp(-eta_mid) / (1. - exp(2.*-eta_mid)); - double zWheelFrontFace = dMechFocaltoWRP + dWRPtoFrontFace; - double zWheelBackFace = zWheelFrontFace + calc->GetWheelThickness(); - rInner[0] = zWheelFrontFace * tanThetaInner; - rInner[1] = zWheelBackFace * tanThetaInner; - // Note that there is a 3mm gap between the outer surface of the - // inner wheel and the inner surface of the outer wheel. - double HalfGapBetweenWheels = 0.15*SYSTEM_OF_UNITS::cm; // In DB EMECGEOMETRY.DCRACK - rOuter[0] = zWheelFrontFace * tanThetaMid - HalfGapBetweenWheels; - rOuter[1] = zWheelBackFace * tanThetaMid - HalfGapBetweenWheels; - solar->fRmin.setValues(0,2,rInner); - solar->fRmax.setValues(0,2,rOuter); - solar->fDz.setValues (0,2,zPlane); - } - else if (type==LArG4::OuterAbsorberWheel || - type==LArG4::OuterElectrodWheel || - type==LArG4::OuterAbsorberModule || - type==LArG4::OuterElectrodModule ) { - float zPlane[3], rInner[3], rOuter[3]; - zPlane[0] = 0; - zPlane[2] = calc->GetWheelThickness(); - double tanThetaMid = 2. * exp(-eta_mid) / (1. - exp(2.*-eta_mid)); - double tanThetaOuter = 2. * exp(-eta_low) / (1. - exp(2.*-eta_low)); - double zWheelFrontFace = dMechFocaltoWRP + dWRPtoFrontFace; - double zWheelBackFace = zWheelFrontFace + calc->GetWheelThickness(); - // Note that there is a 3mm gap between the outer surface of the - // inner wheel and the inner surface of the outer wheel. - double HalfGapBetweenWheels = 0.15*SYSTEM_OF_UNITS::cm; // In DB! (EMECGEOMETRY.DCRACK); - rInner[0] = zWheelFrontFace * tanThetaMid + HalfGapBetweenWheels; - rInner[2] = zWheelBackFace * tanThetaMid + HalfGapBetweenWheels; - rOuter[0] = zWheelFrontFace * tanThetaOuter; - rOuter[2] = zWheelBackFace * tanThetaOuter; - // If we simply left it at that, the outer wheel would protrude - // beyond the edge of the cryostat. We have to "slice off" the lip - // of the outer wheel to create a shape that's roughtly like a - // bathtub plug. - // Use the endpoints of the outer arrays to define lines in the - // (z,r) plane. - double slopeMin = (rInner[2] - rInner[0]) / (zPlane[2] - zPlane[0]); - double slopeMax = (rOuter[2] - rOuter[0]) / (zPlane[2] - zPlane[0]); - double interceptMin = rInner[0] - slopeMin * zPlane[0]; - double interceptMax = rOuter[0] - slopeMax * zPlane[0]; - // At what value of z does the outer line hit the cutoff? - zPlane[1] = (rOuterCutoff - interceptMax) / slopeMax; - // Calculate the radii at this z: - rInner[1] = slopeMin * zPlane[1] + interceptMin; - rOuter[1] = rOuterCutoff; - // Now override the radius to keep the wheel inside the cryostat: - rOuter[2] = rOuterCutoff; - solar->fRmin.setValues(0,3,rInner); - solar->fRmax.setValues(0,3,rOuter); - solar->fDz.setValues (0,3,zPlane); - } - - solar->fSPhi= 0; - solar->fDPhi= 2*M_PI; - m_shape=solar; -} -#endif - void SoVisualizeAction::handleSimplePolygonBrep(const GeoSimplePolygonBrep *brep) { //qDebug() << "SoVisualizeAction::handleSimplePolygonBrep"; -- GitLab