Two new items for context menu: PrintPathMarks and ImportDaughters.
[u/mrichter/AliRoot.git] / EVE / Reve / Track.cxx
CommitLineData
5a5a1232 1// $Header$
2
3#include "Track.h"
4#include "MCHelixLine.hi"
7cbaaebd 5#include "PointSet.h"
5a5a1232 6
7#include <TPolyLine3D.h>
8#include <TPolyMarker3D.h>
9#include <TColor.h>
10
11// Updates
12#include <Reve/RGTopFrame.h>
13#include <TCanvas.h>
14
15#include <vector>
16
17using namespace Reve;
18
19//______________________________________________________________________
20// Track
21//
22
23ClassImp(Reve::Track)
24
265ecb21 25Track::Track() :
eadaa89b 26 Line(),
5a5a1232 27
265ecb21 28 fV(),
29 fP(),
30 fBeta(0),
31 fCharge(0),
7cbaaebd 32 fLabel(-1),
33 fIndex(-1),
265ecb21 34 fPathMarks(),
35
eadaa89b 36 fRnrStyle(0)
265ecb21 37{}
38
3d75306d 39Track::Track(TParticle* t, Int_t label, TrackRnrStyle* rs):
eadaa89b 40 Line(),
3d75306d 41
42 fV(t->Vx(), t->Vy(), t->Vz()),
43 fP(t->Px(), t->Py(), t->Pz()),
44 fBeta(t->P()/t->Energy()),
45 fCharge(0),
46 fLabel(label),
7cbaaebd 47 fIndex(-1),
3d75306d 48 fPathMarks(),
49
eadaa89b 50 fRnrStyle(rs)
3d75306d 51{
52 fLineColor = fRnrStyle->GetColor();
53 fMainColorPtr = &fLineColor;
54
55 TParticlePDG* pdgp = t->GetPDG();
56 if (pdgp)
57 fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
eadaa89b 58
59 SetName(t->GetName());
3d75306d 60}
61
265ecb21 62Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
eadaa89b 63 Line(),
5a5a1232 64
265ecb21 65 fV(t->Vx(), t->Vy(), t->Vz()),
66 fP(t->Px(), t->Py(), t->Pz()),
67 fBeta(t->P()/t->Energy()),
68 fCharge(0),
69 fLabel(t->label),
fa446a68 70 fIndex(t->index),
265ecb21 71 fPathMarks(),
72
eadaa89b 73 fRnrStyle(rs)
265ecb21 74{
5a5a1232 75 fLineColor = fRnrStyle->GetColor();
76 fMainColorPtr = &fLineColor;
77
5a5a1232 78 TParticlePDG* pdgp = t->GetPDG();
79 if(pdgp == 0) {
80 t->ResetPdgCode(); pdgp = t->GetPDG();
81 }
48dc973d 82 fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
eadaa89b 83
84 SetName(t->GetName());
5a5a1232 85}
86
265ecb21 87Track::Track(Reve::RecTrack* t, TrackRnrStyle* rs) :
eadaa89b 88 Line(),
265ecb21 89
90 fV(t->V),
91 fP(t->P),
92 fBeta(t->beta),
93 fCharge(t->sign),
94 fLabel(t->label),
fa446a68 95 fIndex(t->index),
265ecb21 96 fPathMarks(),
97
eadaa89b 98 fRnrStyle(rs)
5a5a1232 99{
5a5a1232 100 fLineColor = fRnrStyle->GetColor();
101 fMainColorPtr = &fLineColor;
eadaa89b 102
103 SetName(t->GetName());
5a5a1232 104}
105
106Track::~Track()
265ecb21 107{
108 for (vpPathMark_i i=fPathMarks.begin(); i!=fPathMarks.end(); ++i)
109 delete *i;
110}
5a5a1232 111
eadaa89b 112/*
5a5a1232 113void Track::Reset(Int_t n_points)
114{
115 delete [] TPolyLine3D::fP; TPolyLine3D::fP = 0;
116 fN = n_points;
117 if(fN) TPolyLine3D::fP = new Float_t [3*fN];
118 memset(TPolyLine3D::fP, 0, 3*fN*sizeof(Float_t));
119 fLastPoint = -1;
120}
eadaa89b 121*/
5a5a1232 122
7cbaaebd 123 /**************************************************************************/
5a5a1232 124
125void Track::MakeTrack()
126{
127
128 TrackRnrStyle& RS((fRnrStyle != 0) ? *fRnrStyle : TrackRnrStyle::fgDefStyle);
129
130 Float_t px = fP.x, py = fP.y, pz = fP.z;
131
132 MCVertex mc_v0;
133 mc_v0.x = fV.x;
134 mc_v0.y = fV.y;
135 mc_v0.z = fV.z;
136 mc_v0.t = 0;
137
138 std::vector<MCVertex> track_points;
48dc973d 139 Bool_t decay = kFALSE;
5a5a1232 140
141 if ((TMath::Abs(fV.z) > RS.fMaxZ) || (fV.x*fV.x + fV.y*fV.y > RS.fMaxR*RS.fMaxR))
142 goto make_polyline;
143
01024c63 144 if (fCharge != 0 && TMath::Abs(RS.fMagField) > 1e-5) {
145
146 // Charged particle in magnetic field
5a5a1232 147
48dc973d 148 Float_t a = RS.fgkB2C * RS.fMagField * fCharge;
5a5a1232 149
150 MCHelix helix(fRnrStyle, &mc_v0, TMath::C()*fBeta, &track_points, a); //m->cm
151 helix.Init(TMath::Sqrt(px*px+py*py), pz);
152
7cbaaebd 153 if(!fPathMarks.empty())
154 {
155 for(std::vector<Reve::PathMark*>::iterator i=fPathMarks.begin(); i!=fPathMarks.end(); ++i)
156 {
5a5a1232 157 Reve::PathMark* pm = *i;
158
7cbaaebd 159 if (RS.fFitReferences && pm->type == Reve::PathMark::Reference)
160 {
5a5a1232 161 if(TMath::Abs(pm->V.z) > RS.fMaxZ
162 || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
163 goto helix_bounds;
164
7cbaaebd 165 // printf("%s fit reference \n", fName.Data());
166 helix.LoopToVertex(px, py, pz, pm->V.x, pm->V.y, pm->V.z);
167 px = pm->P.x;
168 py = pm->P.y;
169 pz = pm->P.z;
5a5a1232 170 }
7cbaaebd 171 else if(RS.fFitDaughters && pm->type == Reve::PathMark::Daughter)
172 {
5a5a1232 173 if(TMath::Abs(pm->V.z) > RS.fMaxZ
174 || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
175 goto helix_bounds;
7cbaaebd 176
177 // printf("%s fit daughter \n", fName.Data());
178 helix.LoopToVertex(px, py, pz, pm->V.x, pm->V.y, pm->V.z);
179 px -= pm->P.x;
180 py -= pm->P.y;
181 pz -= pm->P.z;
182 }
183 else if(RS.fFitDecay && pm->type == Reve::PathMark::Decay)
184 {
185 if(TMath::Abs(pm->V.z) > RS.fMaxZ
186 || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
187 goto helix_bounds;
188 helix.LoopToVertex(px, py, pz, pm->V.x, pm->V.y, pm->V.z);
5a5a1232 189 decay = true;
190 break;
191 }
192 }
193 }
194 helix_bounds:
7cbaaebd 195 // go to bounds
48dc973d 196 if(!decay || RS.fFitDecay == kFALSE){
5a5a1232 197 helix.LoopToBounds(px,py,pz);
198 // printf("%s loop to bounds \n",fName.Data() );
199 }
200
01024c63 201 } else {
202
203 // Neutral particle or no field
5a5a1232 204
205 MCLine line(fRnrStyle, &mc_v0, TMath::C()*fBeta, &track_points);
206
207 if(!fPathMarks.empty()){
208 for(std::vector<Reve::PathMark*>::iterator i=fPathMarks.begin(); i!=fPathMarks.end(); ++i) {
209 Reve::PathMark* pm = *i;
210
211 if(RS.fFitDaughters && pm->type == Reve::PathMark::Daughter){
212 if(TMath::Abs(pm->V.z) > RS.fMaxZ
213 || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
214 goto line_bounds;
215 line.GotoVertex(pm->V.x, pm->V.y, pm->V.z);
216 fP.x -= pm->P.x;
217 fP.y -= pm->P.y;
218 fP.z -= pm->P.z;
219 }
220
221 if(RS.fFitDecay && pm->type == Reve::PathMark::Decay){
222 if(TMath::Abs(pm->V.z) > RS.fMaxZ
223 || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
224 goto line_bounds;
225 line.GotoVertex(pm->V.x, pm->V.y, pm->V.z);
226 decay = true;
227 break;
228 }
229 }
230 }
231
232 line_bounds:
48dc973d 233 if(!decay || RS.fFitDecay == kFALSE)
5a5a1232 234 line.GotoBounds(px,py,pz);
235
236 }
237make_polyline:
238 Reset(track_points.size());
239 for(std::vector<MCVertex>::iterator i=track_points.begin(); i!=track_points.end(); ++i)
240 SetNextPoint(i->x, i->y, i->z);
241}
242
243/**************************************************************************/
244
48dc973d 245void Track::ImportHits()
246{
247 Reve::LoadMacro("hits_from_label.C");
248 gROOT->ProcessLine(Form("hits_from_label(%d);", fLabel));
249}
250
251void Track::ImportClusters()
252{
253 Reve::LoadMacro("clusters_from_label.C");
254 gROOT->ProcessLine(Form("clusters_from_label(%d);", fLabel));
255}
256
fa446a68 257void Track::ImportClustersFromIndex()
258{
7cbaaebd 259 static const Exc_t eH("Track::ImportClustersFromIndex ");
260
261 if (fIndex < 0)
262 throw(eH + "index not set.");
263
fa446a68 264 Reve::LoadMacro("clusters_from_index.C");
265 gROOT->ProcessLine(Form("clusters_from_index(%d);", fIndex));
266}
267
a525aa60 268void Track::ImportDaughters()
269{
270 static const Exc_t eH("Track::ImportDaughters ");
271
272 if (fLabel < 0)
273 throw(eH + "label not set.");
274
275 Reve::LoadMacro("daughters_from_label.C");
276 gROOT->ProcessLine(Form("daughters_from_label(%d);", fLabel));
277}
278
279/**************************************************************************/
280
b1f08706 281void Track::PrintKineStack()
282{
283 Reve::LoadMacro("print_kine_from_label.C");
284 gROOT->ProcessLine(Form("print_kine_from_label(%d);", fLabel));
285}
286
a525aa60 287
288void Track::PrintPathMarks()
289{
290 static const Exc_t eH("Track::PrintPathMarks ");
291
292 if (fLabel < 0)
293 throw(eH + "label not set.");
294
295 printf("Number of path marks %d label %d\n",
296 fPathMarks.size(), fLabel);
297
298 PathMark* pm;
299 for(vpPathMark_i i=fPathMarks.begin(); i!=fPathMarks.end(); i++)
300 {
301 pm = *i;
302 printf("Reve::PathMark: %-9s p: %8f %8f %8f Vertex: %8e %8e %8e %g \n",
303 pm->type_name(),
304 pm->P.x, pm->P.y, pm->P.z,
305 pm->V.x, pm->V.y, pm->V.z,
306 pm->time);
307 }
308}
309
9c39ede9 310/**************************************************************************/
311
312void Track::CtrlClicked(Reve::Track* track)
313{
314 Emit("CtrlClicked(Reve::Track*)", (Long_t)track);
315}
316
48dc973d 317
318/**************************************************************************/
319/**************************************************************************/
320
5a5a1232 321//______________________________________________________________________
322// TrackRnrStyle
323//
324
325ClassImp(Reve::TrackRnrStyle)
326
48dc973d 327Float_t TrackRnrStyle::fgDefMagField = 5;
328const Float_t TrackRnrStyle::fgkB2C = 0.299792458e-3;
5a5a1232 329TrackRnrStyle TrackRnrStyle::fgDefStyle;
330
265ecb21 331TrackRnrStyle::TrackRnrStyle() :
332 TObject(),
5a5a1232 333
265ecb21 334 fColor(1),
2074deef 335 fWidth(1),
265ecb21 336 fMagField(fgDefMagField),
5a5a1232 337
265ecb21 338 fMaxR (350),
339 fMaxZ (450),
5a5a1232 340
265ecb21 341 fMaxOrbs (0.5),
342 fMinAng (45),
343 fDelta (0.1),
5a5a1232 344
7cbaaebd 345 fFitDaughters (kTRUE),
346 fFitReferences (kTRUE),
347 fFitDecay (kTRUE),
5a5a1232 348
7cbaaebd 349 fRnrDaughters (kTRUE),
350 fRnrReferences (kTRUE),
351 fRnrDecay (kTRUE)
352{}
5a5a1232 353/**************************************************************************/
354/**************************************************************************/
355
356//______________________________________________________________________
357// TrackList
358//
359
360ClassImp(Reve::TrackList)
361
362void TrackList::Init()
363{
7cbaaebd 364 fMarkerStyle = 5;
5a5a1232 365 fMarkerColor = 5;
366 // fMarker->SetMarkerSize(0.05);
367
a8600b56 368 if (fRnrStyle== 0) fRnrStyle = new TrackRnrStyle;
369 SetMainColorPtr(&fRnrStyle->fColor);
5a5a1232 370}
371
a8600b56 372TrackList::TrackList(Int_t n_tracks, TrackRnrStyle* rs) :
7d42b6c2 373 RenderElementListBase(),
265ecb21 374 TPolyMarker3D(n_tracks),
375
376 fTitle(),
377
7cbaaebd 378 fRnrStyle (rs),
379 fRnrTracks (kTRUE),
380 fEditPathMarks (kFALSE)
5a5a1232 381{
382 Init();
383}
384
a8600b56 385TrackList::TrackList(const Text_t* name, Int_t n_tracks, TrackRnrStyle* rs) :
7d42b6c2 386 RenderElementListBase(),
265ecb21 387 TPolyMarker3D(n_tracks),
a8600b56 388
265ecb21 389 fTitle(),
390
a8600b56 391 fRnrStyle (rs),
265ecb21 392 fRnrTracks (kTRUE)
5a5a1232 393{
394 Init();
395 SetName(name);
396}
397
398void TrackList::Reset(Int_t n_tracks)
399{
400 delete [] fP; fP = 0;
401 fN = n_tracks;
402 if(fN) fP = new Float_t [3*fN];
403 memset(fP, 0, 3*fN*sizeof(Float_t));
404 fLastPoint = -1;
405}
406
407/**************************************************************************/
408
409void TrackList::Paint(Option_t* option)
410{
411 if(fRnrElement) {
412 if(fRnrMarkers) {
413 TPolyMarker3D::Paint(option);
414 }
415 if(fRnrTracks) {
9c39ede9 416 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
5a5a1232 417 if((*i)->GetRnrElement())
418 (*i)->GetObject()->Paint(option);
419 }
420 }
421 }
422}
423
424/**************************************************************************/
425
426void TrackList::AddElement(RenderElement* el)
427{
428 static const Exc_t eH("TrackList::AddElement ");
429 if (dynamic_cast<Track*>(el) == 0)
430 throw(eH + "new element not a Track.");
431 RenderElementListBase::AddElement(el);
432}
433
434/**************************************************************************/
435
5a5a1232 436void TrackList::MakeTracks()
437{
9c39ede9 438 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
5a5a1232 439 ((Track*)(*i))->MakeTrack();
440 }
441 gReve->Redraw3D();
442}
443
444
445void TrackList::MakeMarkers()
446{
7d42b6c2 447 Reset(fChildren.size());
9c39ede9 448 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
5a5a1232 449 Track& t = *((Track*)(*i));
450 if(t.GetN() > 0)
451 SetNextPoint(t.fV.x, t.fV.y, t.fV.z);
452 }
453 gReve->Redraw3D();
454}
455
456/**************************************************************************/
457/*************************************************************************/
458
2074deef 459void TrackList::SetWidth(Width_t w)
460{
461 Width_t oldw = fRnrStyle->fWidth;
462 fRnrStyle->fWidth = w;
9c39ede9 463 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
2074deef 464 Track& t = *((Track*)(*i));
465 if (t.GetLineWidth() == oldw)
466 t.SetLineWidth(w);
467 }
468}
469
5a5a1232 470void TrackList::SetMaxR(Float_t x)
471{
a8600b56 472 fRnrStyle->fMaxR = x;
5a5a1232 473 MakeTracks();
474 MakeMarkers();
475}
476
477void TrackList::SetMaxZ(Float_t x)
478{
a8600b56 479 fRnrStyle->fMaxZ = x;
5a5a1232 480 MakeTracks();
481 MakeMarkers();
482}
483
484void TrackList::SetMaxOrbs(Float_t x)
485{
a8600b56 486 fRnrStyle->fMaxOrbs = x;
5a5a1232 487 MakeTracks();
488}
489
490void TrackList::SetMinAng(Float_t x)
491{
a8600b56 492 fRnrStyle->fMinAng = x;
5a5a1232 493 MakeTracks();
494}
495
496void TrackList::SetDelta(Float_t x)
497{
a8600b56 498 fRnrStyle->fDelta = x;
5a5a1232 499 MakeTracks();
500}
501
502void TrackList::SetFitDaughters(Bool_t x)
503{
a8600b56 504 fRnrStyle->fFitDaughters = x;
5a5a1232 505 MakeTracks();
506}
507
7cbaaebd 508void TrackList::SetFitReferences(Bool_t x)
509{
510 fRnrStyle->fFitReferences = x;
511 MakeTracks();
512}
513
5a5a1232 514void TrackList::SetFitDecay(Bool_t x)
515{
a8600b56 516 fRnrStyle->fFitDecay = x;
5a5a1232 517 MakeTracks();
518}
519
7cbaaebd 520void TrackList::SetRnrDecay(Bool_t rnr)
521{
522 fRnrStyle->fRnrDecay = rnr;
523 MakeTracks();
524}
525
526void TrackList::SetRnrDaughters(Bool_t rnr)
527{
528 fRnrStyle->fRnrDaughters = rnr;
529 MakeTracks();
530}
531
532void TrackList::SetRnrReferences(Bool_t rnr)
533{
534 fRnrStyle->fRnrReferences = rnr;
535 MakeTracks();
536}
537
538void TrackList::SetRnrMarkers(Bool_t rnr)
539{
540 fRnrMarkers = rnr;
541 gReve->Redraw3D();
542}
543
544void TrackList::SetRnrTracks(Bool_t rnr)
545{
546
547 fRnrTracks = rnr;
548 gReve->Redraw3D();
549}
550
5a5a1232 551/**************************************************************************/
552/**************************************************************************/
553
554void TrackList::SelectByPt(Float_t min_pt, Float_t max_pt)
555{
556 Float_t minptsq = min_pt*min_pt;
557 Float_t maxptsq = max_pt*max_pt;
558 Float_t ptsq;
559
9c39ede9 560 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
5a5a1232 561 ptsq = ((Track*)(*i))->fP.Perp2();
562 (*i)->SetRnrElement(ptsq >= minptsq && ptsq <= maxptsq);
563 }
564}
565
566/**************************************************************************/
567
b99aed53 568void TrackList::ImportHits()
5a5a1232 569{
9c39ede9 570 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
b99aed53 571 ((Track*)(*i))->ImportHits();
572 }
5a5a1232 573}
574
b99aed53 575void TrackList::ImportClusters()
5a5a1232 576{
9c39ede9 577 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
b99aed53 578 ((Track*)(*i))->ImportClusters();
579 }
5a5a1232 580}
9c39ede9 581
582/**************************************************************************/
583/**************************************************************************/
584/**************************************************************************/
585
586#include "RGEditor.h"
587
588//______________________________________________________________________
589// TrackCounter
590//
591
592ClassImp(TrackCounter)
593
b1f08706 594TrackCounter* TrackCounter::fgInstance = 0;
595
9c39ede9 596TrackCounter::TrackCounter(const Text_t* name, const Text_t* title) :
597 RenderElement(),
598 TNamed(name, title),
599
600 fBadLineStyle (6),
601 fClickAction (CA_ToggleTrack),
602 fAllTracks (0),
603 fGoodTracks (0),
604 fTrackLists ()
605{
b1f08706 606 if (fgInstance == 0) fgInstance = this;
9c39ede9 607 TQObject::Connect("Reve::Track", "CtrlClicked(Reve::Track*)",
608 "Reve::TrackCounter", this, "DoTrackAction(Reve::Track*)");
609}
610
611TrackCounter::~TrackCounter()
612{
613 TQObject::Disconnect("Reve::Track", "DoTrackAction(Reve::Track*)");
b1f08706 614 if (fgInstance == this) fgInstance = 0;
9c39ede9 615}
616
617/**************************************************************************/
618
619void TrackCounter::Reset()
620{
621 printf("TrackCounter::Reset()\n");
622 fAllTracks = 0;
623 fGoodTracks = 0;
624 TIter next(&fTrackLists);
625 TrackList* tlist;
626 while ((tlist = dynamic_cast<TrackList*>(next())))
627 tlist->RemoveParent(this);
628 fTrackLists.Clear();
629}
630
631void TrackCounter::RegisterTracks(TrackList* tlist, Bool_t goodTracks)
632{
633 // printf("TrackCounter::RegisterTracks '%s', %s\n",
634 // tlist->GetObject()->GetName(), goodTracks ? "good" : "bad");
635
636 tlist->AddParent(this);
637 fTrackLists.Add(tlist);
638
639 List_i i = tlist->BeginChildren();
640 while (i != tlist->EndChildren())
641 {
642 Track* t = dynamic_cast<Track*>(*i);
643 if (t != 0)
644 {
645 if (goodTracks)
646 {
647 ++fGoodTracks;
648 } else {
649 t->SetLineStyle(fBadLineStyle);
650 }
651 ++fAllTracks;
652 }
653 ++i;
654 }
655}
656
657void TrackCounter::DoTrackAction(Track* track)
658{
659 // !!!! No check done if ok.
660 // !!!! Should also override RemoveElementLocal
7af62191 661 // !!!! But then ... should also sotre local information if track is ok.
9c39ede9 662
663 switch (fClickAction)
664 {
665
666 case CA_PrintTrackInfo:
667 {
668 printf("Track '%s'\n", track->GetObject()->GetName());
669 Vector &v = track->fV, &p = track->fP;
670 printf(" Vx=%f, Vy=%f, Vz=%f; Pt=%f, Pz=%f, phi=%f)\n",
671 v.x, v.y, v.z, p.Perp(), p.z, TMath::RadToDeg()*p.Phi());
672 printf(" <other information should be printed ... full AliESDtrack>\n");
673 break;
674 }
675
676 case CA_ToggleTrack:
677 {
678 if (track->GetLineStyle() == 1)
679 {
680 track->SetLineStyle(fBadLineStyle);
681 --fGoodTracks;
682 } else {
683 track->SetLineStyle(1);
684 ++fGoodTracks;
685 }
686 gReve->Redraw3D();
687
688 printf("TrackCounter::CountTrack All=%d, Good=%d, Bad=%d\n",
689 fAllTracks, fGoodTracks, fAllTracks-fGoodTracks);
690
691 if (gReve->GetEditor()->GetModel() == GetObject())
692 gReve->EditRenderElement(this);
693
694 break;
695 }
696
697 } // end switch fClickAction
698}
7af62191 699
700/**************************************************************************/
701
702void TrackCounter::OutputEventTracks(FILE* out)
703{
704 if (out == 0)
705 {
706 out = stdout;
707 fprintf(out, "TrackCounter::FinalizeEvent()\n");
708 }
709
710 fprintf(out, "Event = %d Ntracks = %d\n", fEventId, fGoodTracks);
711
712 TIter tlists(&fTrackLists);
713 TrackList* tlist;
714 Int_t cnt = 0;
715 while ((tlist = (TrackList*) tlists()) != 0)
716 {
717 List_i i = tlist->BeginChildren();
718 while (i != tlist->EndChildren())
719 {
720 Track* t = dynamic_cast<Track*>(*i);
721 if (t != 0 && t->GetLineStyle() == 1)
722 {
723 ++cnt;
724 fprintf(out, " %2d: chg=%+2d pt=%8.5f eta=%+8.5f\n",
725 cnt, t->fCharge, t->fP.Perp(), t->fP.Eta());
726 }
727 ++i;
728 }
7af62191 729 }
730}