31{
32 const Trk::CylinderBounds* ccbo =
dynamic_cast<const Trk::CylinderBounds*
>(&(
m_driftcircle->detectorElement()->surface(
m_driftcircle->identify()).bounds()));
33 if (not ccbo) return;
35 const double halflength = ccbo->halflengthZ();
36 const double mintuberadius = 0.1;
37
39 VP1Msg::message(
"Warning: TRT has additional elements in rdoList: NOT IMPLEMENTED");
40
41 const PRDCollHandle_TRT* trtcollhandle(
static_cast<PRDCollHandle_TRT*
>(
collHandle()));
42
43 if (trtcollhandle->project()) {
44
46
48
49 const InDetProjFlags::InDetProjPartsFlags projparts(trtcollhandle->appropriateProjections());
50 bool inner,outer;
54 } else {
58
59
60
63
64
66 std::vector<Amg::Vector3D > points;
67
68 if (posz) {
76 points.push_back(p);
77 }
80
86 points.push_back(p);
87 }
88 } else {
96 points.push_back(p);
97 }
105 points.push_back(p);
106 }
107 }
108
109
110 const unsigned npoints = points.size();
111 if (npoints<1||npoints>2) {
112 collHandle()->
message(
"PRDHandle_TRT::buildShapes ERROR: Unexpected number of points in special endcap projections!!");
113 } else {
114 SoSeparator * sepsimple = new SoSeparator;
118 sepsimple->addChild(transf1);
119 sepsimple->addChild(point);
120 SoTranslation * transf2(0);
121 if (npoints==2) {
122 transf2 = new SoTranslation;
123 transf2->translation.setValue(points[1].
x()-points[0].
x(),points[1].
y()-points[0].
y(),points[1].
z()-points[0].
z());
124 sepsimple->addChild(transf2);
125 sepsimple->addChild(point);
126 }
127 shape_simple = sepsimple;
128
129 if (radius<mintuberadius) {
130 shape_detailed = shape_simple;
131 return;
132 }
133 SoSeparator * sepdetailed = new SoSeparator;
135 sepdetailed->addChild(transf1);
136 sepdetailed->addChild(disc);
137 if (npoints==2) {
138 sepdetailed->addChild(transf2);
139 sepdetailed->addChild(disc);
140 }
141 shape_detailed = sepdetailed;
142 return;
143 }
144 inner = false;outer = false;
145
146 } else {
149 }
150 }
151 if (!inner&&!outer) {
152 collHandle()->
message(
"PRDHandle_TRT::buildShapes ERROR: Inconsistent projection settings! Won't project!");
153 } else {
154
156 if (radius<mintuberadius)
157 shape_detailed = shape_simple;
158 else
160 return;
161 }
162 }
163
165
167
169 if (radius<mintuberadius)
170 shape_detailed = shape_simple;
171 else
173
174}
SoNode * getShapeNode_Point()
SoNode * getShapeNode_DriftDisc(double radius)
SoNode * getShapeNode_ProjectedDriftTube(double halfLength, double radius, bool inner, bool outer)
SoNode * getShapeNode_DriftTube(double halfLength, double radius)
static void transformECPointToZPlane_specialZtoR(Amg::Vector3D &p, const double &planeZ, const double &planeRBegin, const double &endcapZBegin, const double &squeezeFactor)
static double trt_barrel_posneg_z()
static double trt_endcap_zasr_squeezefact()
static double surfacethickness()
static double trt_endcap_zasr_endcapz_begin()
static double trt_data_disttosurface_epsilon()
static double trt_endcap_zasr_innerradius()
Amg::Transform3D getTransform_CLHEP() const
PRDSysCommonData * common() const
PRDCollHandleBase * collHandle() const
virtual Amg::Vector3D center() const
HitsSoNodeManager * nodeManager() const
void message(const QString &) const
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
static void message(const QString &, IVP1System *sys=0)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Translation< double, 3 > Translation3D