94 std::cout <<
"EventDisplay::LoadGeometry>" << std::endl;
95 TFile::SetCacheFileDir(
".");
96 std::cout << geoFileName.Data() << std::endl;
97 gGeoManager = gEve->GetGeometry(geoFileName.Data());
98 gGeoManager->DefaultColors();
100 TEveGeoTopNode* tn =
new TEveGeoTopNode(gGeoManager, gGeoManager->GetTopNode());
101 gEve->AddGlobalElement(tn);
102 gEve->FullRedraw3D(kTRUE);
140 std::cout <<
"EventDisplay::DrawModel>" << std::endl;
142 std::cout <<
"EventDisplay::DrawModel> horizontalWidth " << ob->horizontalWidth << std::endl;
143 double horizontalWidth = ob->horizontalWidth;
146 TEveBoxSet* bs =
new TEveBoxSet(
"model");
147 bs->Reset(TEveBoxSet::kBT_FreeBox, kFALSE,64);
151 for(
auto mp : model->
model->midPos)
153 double modelLength = model->
model->length[i];
154 TRotation modelRotation = model->
model->midRot[i];
157 TVector3 v1 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, -horizontalWidth / 2, -modelLength / 2));
158 TVector3 v2 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, horizontalWidth / 2, -modelLength / 2));
159 TVector3 v3 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, horizontalWidth / 2, -modelLength / 2));
160 TVector3 v4 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, -horizontalWidth / 2, -modelLength / 2));
162 TVector3 v5 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, -horizontalWidth / 2, modelLength / 2));
163 TVector3 v6 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, horizontalWidth / 2, modelLength / 2));
164 TVector3 v7 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, horizontalWidth / 2, modelLength / 2));
165 TVector3 v8 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, -horizontalWidth / 2, modelLength / 2));
168 vert[0] = (float) v1.x();
169 vert[1] = (float) v1.y();
170 vert[2] = (float) v1.z();
172 vert[3] = (float) v2.x();
173 vert[4] = (float) v2.y();
174 vert[5] = (float) v2.z();
176 vert[6] = (float) v3.x();
177 vert[7] = (float) v3.y();
178 vert[8] = (float) v3.z();
180 vert[9] = (float) v4.x();
181 vert[10] = (float) v4.y();
182 vert[11] = (float) v4.z();
184 vert[12] = (float) v5.x();
185 vert[13] = (float) v5.y();
186 vert[14] = (float) v5.z();
188 vert[15] = (float) v6.x();
189 vert[16] = (float) v6.y();
190 vert[17] = (float) v6.z();
192 vert[18] = (float) v7.x();
193 vert[19] = (float) v7.y();
194 vert[20] = (float) v7.z();
196 vert[21] = (float) v8.x();
197 vert[22] = (float) v8.y();
198 vert[23] = (float) v8.z();
203 bs->SetMainColor(kWhite);
204 bs->SetRenderMode(TEveBoxSet::kRM_Line);
205 gEve->AddElement(bs);
249 std::cout <<
"EventDisplay::DrawSamplers>" << std::endl;
252 for(
auto sampler :
event->Samplers)
254 TEvePointSet* ps =
new TEvePointSet((std::string(
"Sampler_")+sampler->samplerName.c_str()).c_str());
257 TVector3 mpos = model->
model->endPos[sampler->modelID];
258 TRotation mrot = model->
model->endRot[sampler->modelID];
261 for(
int i=0;i<sampler->n;++i)
263 TVector3 v = mpos + mrot*TVector3(sampler->x[i],sampler->y[i],0);
264 ps->SetNextPoint(v.x()*100.0,
269 ps->SetMainColor(kBlue);
270 gEve->AddElement(ps);