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());
79 tubs->
pDz.setValue(halfz + 0.2*CLHEP::mm);
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");
200 l << prefix+
"TubeID: "+QString::number(
getTubeID());
201 l << prefix+
"QDC: "+QString::number(
getQDC());
202 l << prefix+
"TDC: "+QString::number(
getTDC());
203 l << prefix+
"SideA: "+(
isSideA()?
"Yes":
"No");
204 l << prefix+
"SideC: "+(
isSideC()?
"Yes":
"No");
SoNode * getShapeNode_Point()
SoTransform * getUnitTransform()
SoTubs - Inventor version of the G4Tubs Geant Geometry entity.
SoSFFloat pDz
Half-length in Z.
static void initClass()
Class Initializer, required.
static const GeoPVConstLink * geoModelWorld()
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
static void messageVerbose(const QString &)
static void message(const QString &, IVP1System *sys=0)
HitsSoNodeManager * nodeManager() const
VP1RawDataCommonData * common() const
VP1RawDataHandleBase(VP1RawDataCollBase *)
VP1RawDataCollBase * coll() const
const GeoTube * m_geotube
SoTransform * m_transform
const Amg::Transform3D m_heptransform
SoTransform * getTransform()
TubeInfo(int tubeID, const Amg::Transform3D &heptransform, const GeoTube *geotube)
static void ensureInitTubeInfo()
static std::map< int, TubeInfo * > * tubeID2TubeInfo
virtual unsigned short getTDC() const =0
QStringList commonClicked(const QString &prefix="") const
virtual bool isSideA() const =0
virtual ~VP1RawDataHandle_LUCID()
SoTransform * buildTransform()
virtual unsigned short getQDC() const =0
virtual bool isSideC() const =0
VP1RawDataHandle_LUCID(VP1RawDataCollBase *)
virtual unsigned short getTubeID() const =0
Eigen::Affine3d Transform3D