93 std::cout <<
"EventDisplay::LoadGeometry>" << std::endl;
94 TFile::SetCacheFileDir(
".");
95 std::cout << geoFileName.Data() << std::endl;
96 gGeoManager = gEve->GetGeometry(geoFileName.Data());
97 gGeoManager->DefaultColors();
99 TEveGeoTopNode* tn =
new TEveGeoTopNode(gGeoManager, gGeoManager->GetTopNode());
100 gEve->AddGlobalElement(tn);
101 gEve->FullRedraw3D(kTRUE);
139 std::cout <<
"EventDisplay::DrawModel>" << std::endl;
141 std::cout <<
"EventDisplay::DrawModel> horizontalWidth " << ob->horizontalWidth << std::endl;
142 double horizontalWidth = ob->horizontalWidth;
145 TEveBoxSet* bs =
new TEveBoxSet(
"model");
146 bs->Reset(TEveBoxSet::kBT_FreeBox, kFALSE,64);
150 for(
auto mp : model->
model->midPos)
152 double modelLength = model->
model->length[i];
153 TRotation modelRotation = model->
model->midRot[i];
156 TVector3 v1 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, -horizontalWidth / 2, -modelLength / 2));
157 TVector3 v2 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, horizontalWidth / 2, -modelLength / 2));
158 TVector3 v3 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, horizontalWidth / 2, -modelLength / 2));
159 TVector3 v4 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, -horizontalWidth / 2, -modelLength / 2));
161 TVector3 v5 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, -horizontalWidth / 2, modelLength / 2));
162 TVector3 v6 = 100*(mp + modelRotation*TVector3(-horizontalWidth / 2, horizontalWidth / 2, modelLength / 2));
163 TVector3 v7 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, horizontalWidth / 2, modelLength / 2));
164 TVector3 v8 = 100*(mp + modelRotation*TVector3( horizontalWidth / 2, -horizontalWidth / 2, modelLength / 2));
167 vert[0] = (float) v1.x();
168 vert[1] = (float) v1.y();
169 vert[2] = (float) v1.z();
171 vert[3] = (float) v2.x();
172 vert[4] = (float) v2.y();
173 vert[5] = (float) v2.z();
175 vert[6] = (float) v3.x();
176 vert[7] = (float) v3.y();
177 vert[8] = (float) v3.z();
179 vert[9] = (float) v4.x();
180 vert[10] = (float) v4.y();
181 vert[11] = (float) v4.z();
183 vert[12] = (float) v5.x();
184 vert[13] = (float) v5.y();
185 vert[14] = (float) v5.z();
187 vert[15] = (float) v6.x();
188 vert[16] = (float) v6.y();
189 vert[17] = (float) v6.z();
191 vert[18] = (float) v7.x();
192 vert[19] = (float) v7.y();
193 vert[20] = (float) v7.z();
195 vert[21] = (float) v8.x();
196 vert[22] = (float) v8.y();
197 vert[23] = (float) v8.z();
202 bs->SetMainColor(kWhite);
203 bs->SetRenderMode(TEveBoxSet::kRM_Line);
204 gEve->AddElement(bs);
248 std::cout <<
"EventDisplay::DrawSamplers>" << std::endl;
251 for(
auto sampler :
event->Samplers)
253 TEvePointSet* ps =
new TEvePointSet((std::string(
"Sampler_")+sampler->samplerName.c_str()).c_str());
256 TVector3 mpos = model->
model->endPos[sampler->modelID];
257 TRotation mrot = model->
model->endRot[sampler->modelID];
260 for(
int i=0;i<sampler->n;++i)
262 TVector3 v = mpos + mrot*TVector3(sampler->x[i],sampler->y[i],0);
263 ps->SetNextPoint(v.x()*100.0,
268 ps->SetMainColor(kBlue);
269 gEve->AddElement(ps);