71 : FairTask(name, iVerbose)
75 , fEveTrList(new TObjArray(16))
78 , fEvePSList(new TObjArray(8))
117 LOG(debug2) <<
" CbmEvDisTracks::Exec starting with verbosity " << fVerbose <<
" and option " << option;
119 const Double_t* point;
124 LOG(debug4) <<
" CbmEvDisTracks:: NTrks " <<
fTrackList->GetEntriesFast();
125 Int_t TMul[10] = {10 * 0};
127 for (Int_t iOpt = 0; iOpt < 2; iOpt++)
128 for (Int_t i = 0; i <
fTrackList->GetEntriesFast(); i++) {
129 LOG(debug4) <<
"CbmEvDisTracks::Exec " << i;
131 if (
nullptr == tr)
continue;
135 if (iOpt == 0) TMul[Np]++;
140 TParticle* P =
new TParticle();
143 if (iCol > 4) iCol++;
144 track->SetAttLineAttMarker(
fTrList);
145 track->SetLineColor(iCol);
146 track->SetMarkerColor(iCol);
147 track->SetMarkerSize(2.);
151 TEveVector pos0 = TEveVector(tr->
GetFitX(0.), tr->
GetFitY(0.), 0.);
152 TEvePathMark* path0 =
new TEvePathMark();
154 track->AddPathMark(*path0);
156 Double_t pbuf[3], vbuf[3];
161 pbuf[2] = 1. / tr->
GetTt();
167 track->SetName(Form(
"TEveTrack %d", rt.fIndex));
171 Double_t beta, beta_err, res_x, res_y, res_t;
173 case 0: track->SetStdTitle();
break;
176 beta = (1 / tr->
GetTt()) / 29.98;
180 Form(
"%s\nChiSqDoF = %2.2f\nbeta = %1.3f +/- %1.3f", track->GetName(), tr->
GetChiSq(), beta, beta_err));
182 track->SetTitle(Form(
"%s\nChiSqDoF = %2.2f\nbeta = %1.3f", track->GetName(), tr->
GetChiSq(), beta));
185 track->SetStdTitle();
192 TEvePointSetArray* psa =
new TEvePointSetArray(Form(
"TEveTrack Points %d", i),
"");
193 psa->SetMarkerColor(iCol);
194 psa->SetMarkerSize(2.0);
195 psa->SetMarkerStyle(4);
196 psa->InitBins(
"Hits", Np, 0.5, Np + 0.5);
199 for (Int_t n = 0; n < Np; n++) {
204 psa->Fill(point[0], point[1], point[2], n + 1);
206 res_x = (point[0] - tr->
GetFitX(point[2])) / hit->
GetDx();
207 res_y = (point[1] - tr->
GetFitY(point[2])) / hit->
GetDy();
210 psa->GetBin(n + 1)->SetTitle(Form(
"%s\nPointId = %d\nResiduals:\nX = %1.3f\nY = %1.3f\nT = %1.3f",
211 track->GetName(), tr->
GetHitIndex(n), res_x, res_y, res_t));
216 track->SetPoint(n + 1, point[0], point[1], point[2]);
217 LOG(debug4) << Form(
" CbmEvDisTracks::Exec SetPoint %d, %6.2f, %6.2f, %6.2f, %6.2f ", n, point[0], point[1],
220 TEveVector
pos = TEveVector(point[0], point[1], point[2]);
221 TEvePathMark* path =
new TEvePathMark();
223 path->fTime = point[3];
225 TEveVector Mom = TEveVector(P->Px(), P->Py(), P->Pz());
228 LOG(debug4) <<
"Path marker added " << path;
230 track->AddPathMark(*path);
232 LOG(debug4) <<
"Path marker added " << path;
235 if (iOpt == 0) {
fPSList->AddElement(psa); }
237 track->SortPathMarksByTime();
239 LOG(debug3) << i <<
". track added: " << track->GetName();
241 for (Int_t i = 0; i <
fEveTrList->GetEntriesFast(); i++) {
248 TString cEventInfo = Form(
"ev# %d ",
fEventManager->GetCurrentEvent());
249 TString cTrackInfo =
"trkl mul: ";
250 for (Int_t i = 9; i > 0; i--)
251 if (TMul[i] > 0) cTrackInfo += Form(
"M%d %d/", i, TMul[i]);
253 TGLViewer*
v = gEve->GetDefaultGLViewer();
255 if (NULL !=
anne)
anne->SetText(cEventInfo);
257 anne =
new TGLAnnotation(
v, cEventInfo, 0.01, 0.95);
258 if (NULL !=
annt)
annt->SetText(cTrackInfo);
260 annt =
new TGLAnnotation(
v, cTrackInfo, 0.01, 0.92);
261 anne->SetTextSize(0.03);
262 annt->SetTextSize(0.03);
263 anne->SetTextColor(4);
264 annt->SetTextColor(4);
266 gEve->Redraw3D(kFALSE);