27 #include "GeoModelKernel/GeoVolumeCursor.h"
28 #include "GeoModelKernel/GeoTube.h"
33 #include <Inventor/nodes/SoShape.h>
34 #include <Inventor/nodes/SoTransform.h>
35 #include <Inventor/nodes/SoMaterial.h>
36 #include <Inventor/nodes/SoCylinder.h>
37 #include <Inventor/nodes/SoGroup.h>
38 #include <Inventor/nodes/SoLineSet.h>
39 #include <Inventor/nodes/SoVertexProperty.h>
72 SoShape * shape(
a.getShape() ?
a.getShape() :
new SoCylinder);
76 if (shape->getTypeId().isDerivedFrom(SoTubs::getClassTypeId())) {
78 const double halfz(tubs->
pDz.getValue());
81 SoLineSet *
line =
new SoLineSet;
82 SoVertexProperty * vertices =
new SoVertexProperty;
83 line->vertexProperty = vertices;
84 vertices->vertex.set1Value(0,0,0,+(halfz-0.1*
CLHEP::mm));
85 vertices->vertex.set1Value(1,0,0,-(halfz-0.1*
CLHEP::mm));
86 line->numVertices.set1Value(0,2);
113 GeoVolumeCursor av(*world);
114 while (!av.atEnd()) {
115 QString topvolname(av.getName().c_str());
116 if (topvolname.startsWith(
"LucidSide")) {
117 const bool sideA(topvolname.contains(
"SideA"));
118 GeoVolumeCursor av2(av.getVolume());
119 while (!av2.atEnd()) {
120 if (av2.getVolume()->getLogVol()->getName()==
"lvVessel") {
121 GeoVolumeCursor av3(av2.getVolume());
122 while (!av3.atEnd()) {
123 if (av3.getVolume()->getLogVol()->getName()==
"lvVesselGas") {
124 GeoVolumeCursor av4(av3.getVolume());
125 while (!av4.atEnd()) {
126 if (av4.getVolume()->getLogVol()->getName()==
"lvTubeGas") {
129 QString tubegasname(av4.getName().c_str());
130 if (tubegasname.startsWith(
"LucidTubeGas")) {
131 tubegasname.remove(0,12);
133 int t(tubegasname.toInt(&ok));
135 tubeID =
t + (
sideA?0:20);
139 const GeoTube * geotube = av4.getVolume()->getLogVol()->getShape()->typeID()==GeoTube::getClassTypeID() ?
140 static_cast<const GeoTube*
>(av4.getVolume()->getLogVol()->getShape()) : 0;
141 Amg::Transform3D tr( av.getTransform()*av2.getTransform()*av3.getTransform()*av4.getTransform() );
142 (*tubeID2TubeInfo)[tubeID] =
new TubeInfo(tubeID,tr,geotube);
146 VP1Msg::message(
"VP1RawDataHandle_LUCID ERROR: Can't decode tube id from PMT volume name");