Commit 86d49edf authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Merge branch 'refactor_geometryinfo' into 'master'

Use GeometryInfoPlus

See merge request !117
parents 104f5972 740f503b
Pipeline #3834951 passed with stage
in 30 seconds
......@@ -110,8 +110,8 @@ def plotVelo(openX):
transR.push_back(-1 * openX)
transR.push_back(0.)
transR.push_back(0.)
veloR.geometry().localDeltaParams(transR, rot)
veloL.geometry().localDeltaParams(transL, rot)
veloR.geometryPlus().localDeltaParams(transR, rot)
veloL.geometryPlus().localDeltaParams(transL, rot)
uiSvc().visualize(veloR)
uiSvc().visualize(veloL)
......
......@@ -866,22 +866,22 @@ def det_muonContours():
XYZPoint = GaudiPython.gbl.Math.XYZPoint
p1 = XYZPoint(x, y, 0)
p1 = station.geometry().toGlobal(p1)
p1 = station.geometryPlus().toGlobal(p1)
x1 = p1.x()
y1 = p1.y()
z1 = p1.z()
p2 = XYZPoint(x, -y, 0)
p2 = station.geometry().toGlobal(p2)
p2 = station.geometryPlus().toGlobal(p2)
x2 = p2.x()
y2 = p2.y()
z2 = p2.z()
p3 = XYZPoint(-x, -y, 0)
p3 = station.geometry().toGlobal(p3)
p3 = station.geometryPlus().toGlobal(p3)
x3 = p3.x()
y3 = p3.y()
z3 = p3.z()
p4 = XYZPoint(-x, y, 0)
p4 = station.geometry().toGlobal(p4)
p4 = station.geometryPlus().toGlobal(p4)
x4 = p4.x()
y4 = p4.y()
z4 = p4.z()
......
......@@ -30,7 +30,7 @@ def muonStationContours(m):
station = det['/dd/Structure/LHCb/DownstreamRegion/Muon/M' + str(m + 1)]
globpoints = GaudiPython.gbl.std.vector(XYZPoint)()
for p in points:
globpoints.push_back(station.geometry().toGlobal(p))
globpoints.push_back(station.geometryPlus().toGlobal(p))
g = 1. - 0.5 * m / 6.
b = 0.5 * m / 6.
Style().setRGB(0., g, b)
......
......@@ -136,7 +136,7 @@ inline TGeoVolume* RootSvc_example_rootgeom()
top->AddNode( replica, 4, new TGeoTranslation( -150, 150, 0 ) );
//--- close the geometry
gGeoManager->CloseGeometry();
gGeoManager->ClosegeometryPlus();
return top;
}
......
......@@ -97,26 +97,26 @@ StatusCode SoDetElemCnv::createRep( DataObject* aObject, IOpaqueAddress*& )
return StatusCode::FAILURE;
}
DetectorElement* de = dynamic_cast<DetectorElement*>( aObject );
DetectorElementPlus* de = dynamic_cast<DetectorElementPlus*>( aObject );
if ( !de ) {
msgStream() << MSG::ERROR << " bad object type." << endmsg;
return StatusCode::FAILURE;
}
if ( !de->geometry() ) {
if ( !de->geometryPlus() ) {
msgStream() << MSG::WARNING << " no geometry associated" << endmsg;
return StatusCode::SUCCESS;
}
const ILVolume* lv = de->geometry()->lvolume();
const ILVolume* lv = de->geometryPlus()->lvolume();
// check if the detector element has a geometry associated
if ( 0 == lv ) {
msgStream() << MSG::WARNING << " no geometry associated" << endmsg;
msgStream() << MSG::WARNING << " lvolume name :" << de->geometry()->lvolumeName() << "|" << endmsg;
msgStream() << MSG::WARNING << " lvolume name :" << de->geometryPlus()->lvolumeName() << "|" << endmsg;
return StatusCode::SUCCESS;
}
msgStream() << MSG::DEBUG << " lvolume : " << de->geometry()->lvolumeName() << endmsg;
msgStream() << MSG::DEBUG << " lvolume : " << de->geometryPlus()->lvolumeName() << endmsg;
SoNode* node = volumeToSoDetectorTreeKit( *lv, Gaudi::Transform3D(), opened );
if ( !node ) {
......@@ -129,7 +129,7 @@ StatusCode SoDetElemCnv::createRep( DataObject* aObject, IOpaqueAddress*& )
// Deal with the Transformation
Gaudi::Rotation3D rot;
Gaudi::XYZVector c;
de->geometry()->toLocalMatrix().GetDecomposition( rot, c );
de->geometryPlus()->toLocalMatrix().GetDecomposition( rot, c );
c = c * -1.0;
rot.Invert();
Gaudi::AxisAngle axisAngle( rot );
......
......@@ -127,12 +127,12 @@ StatusCode SoParticleCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr
log << MSG::ERROR << "SoTrackCnv : unable to find geometry" << endmsg;
return StatusCode::FAILURE;
}
auto* lhcb = dynamic_cast<::DetectorElement*>( obj );
auto* lhcb = dynamic_cast<::DetectorElementPlus*>( obj );
if ( !lhcb ) {
log << MSG::ERROR << "SoTrackCnv : Could not load geometry" << endmsg;
return StatusCode::FAILURE;
}
auto& geometry = *lhcb->geometry();
auto& geometry = *lhcb->geometryPlus();
LHCb::Particles* particles = dynamic_cast<LHCb::Particles*>( aObject );
if ( !particles ) {
......
......@@ -132,12 +132,12 @@ StatusCode SoTrackCnv::createRep( DataObject* aObject, IOpaqueAddress*& aAddr )
log << MSG::ERROR << "SoTrackCnv : unable to find geometry" << endmsg;
return StatusCode::FAILURE;
}
auto* lhcb = dynamic_cast<::DetectorElement*>( obj );
auto* lhcb = dynamic_cast<::DetectorElementPlus*>( obj );
if ( !lhcb ) {
log << MSG::ERROR << "SoTrackCnv : Could not load geometry" << endmsg;
return StatusCode::FAILURE;
}
auto& geometry = *lhcb->geometry();
auto& geometry = *lhcb->geometryPlus();
IToolSvc* toolSvc = 0;
sc = service( "ToolSvc", toolSvc, true );
......
......@@ -210,12 +210,12 @@ void TrackType::visualize( Lib::Identifier aIdentifier, void* aData )
m_msgStream << MSG::ERROR << "SoTrackCnv : unable to find geometry" << endmsg;
return;
}
auto* lhcb = dynamic_cast<::DetectorElement*>( obj );
auto* lhcb = dynamic_cast<::DetectorElementPlus*>( obj );
if ( !lhcb ) {
m_msgStream << MSG::ERROR << "SoTrackCnv : Could not load geometry" << endmsg;
return;
}
auto& geometry = *lhcb->geometry();
auto& geometry = *lhcb->geometryPlus();
fUISvc->session()->parameterValue( "modeling.what", value );
if ( value == "clusters" ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment