From aa8231b0a002f6458422c17e3a3cda62526ce1f8 Mon Sep 17 00:00:00 2001 From: nick Date: Sat, 18 Mar 2006 01:48:34 +0000 Subject: [PATCH] 18-mar-2006 NvE Support for display of selected track array introduced in AliHelix. Also copy ctor of AliHelix made complete for new datamembers. --- RALICE/AliHelix.cxx | 40 ++++++++++++++++++++++++++++++++++++++++ RALICE/AliHelix.h | 3 ++- RALICE/history.txt | 2 ++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/RALICE/AliHelix.cxx b/RALICE/AliHelix.cxx index 5b49121db24..e3a1a1eb339 100644 --- a/RALICE/AliHelix.cxx +++ b/RALICE/AliHelix.cxx @@ -183,6 +183,11 @@ AliHelix::AliHelix(const AliHelix& h) : THelix(h) // Copy constructor fB=h.fB; fRefresh=h.fRefresh; + fTofmax=h.fTofmax; + fMstyle=h.fMstyle; + fMsize=h.fMsize; + fMcol=h.fMcol; + fEnduse=h.fEnduse; } /////////////////////////////////////////////////////////////////////////// void AliHelix::SetB(Ali3Vector& b) @@ -755,6 +760,41 @@ void AliHelix::Display(AliEvent* evt,Double_t* range,Int_t iaxis,Double_t scale) } } /////////////////////////////////////////////////////////////////////////// +void AliHelix::Display(TObjArray* arr,Double_t* range,Int_t iaxis,Double_t scale) +{ +// Display the helix curves of all tracks in the specified array. +// A convenient way to obtain an array with selected tracks from e.g. an AliEvent +// is to make use of its GetTracks() selection facility. +// Various arrays can be displayed together or individually; please refer to +// the memberfunction Refresh() for further details. +// Please refer to the track display memberfunction for further details +// on the input arguments. +// +// The default values are range=0, iaxis=3 and scale=-1. +// +// Note : +// ------ +// Before any display activity, a TCanvas and a TView have to be initiated +// first by the user like for instance +// +// TCanvas* c1=new TCanvas("c1","c1"); +// TView* view=new TView(1); +// view->SetRange(-1000,-1000,-1000,1000,1000,1000); +// view->ShowAxis(); + + if (!arr) return; + + Int_t ntk=arr->GetEntries(); + for (Int_t jtk=0; jtkAt(jtk); + if (!obj) continue; + if (!(obj->InheritsFrom("AliTrack"))) continue; + AliTrack* tx=(AliTrack*)obj; + Display(tx,range,iaxis,scale); + } +} +/////////////////////////////////////////////////////////////////////////// AliPosition* AliHelix::Extrapolate(AliTrack* t,Double_t* pars,Double_t scale) { // Extrapolate an AliTrack according to the corresponding helix curve diff --git a/RALICE/AliHelix.h b/RALICE/AliHelix.h index d1165500b20..69ea0c1012f 100644 --- a/RALICE/AliHelix.h +++ b/RALICE/AliHelix.h @@ -25,6 +25,7 @@ class AliHelix : public THelix Float_t GetTofmax() const; // Provide the maximum time of flight void Display(AliTrack* t,Double_t* range=0,Int_t iaxis=3,Double_t scale=-1);// Show curve for this track void Display(AliEvent* e,Double_t* range=0,Int_t iaxis=3,Double_t scale=-1);// Show curves for this event + void Display(TObjArray* a,Double_t* range=0,Int_t iaxis=3,Double_t scale=-1);// Show curves for this track array void Refresh(Int_t mode=0); // Refresh the view before drawing the next one AliPosition* Extrapolate(AliTrack* t,Double_t* pars=0,Double_t scale=-1); // Extrapolate this track void MakeCurve(AliTrack* t,Double_t* range=0,Int_t iaxis=3,Double_t scale=-1); // Helix curve for this track @@ -42,6 +43,6 @@ class AliHelix : public THelix TObjArray* fCurves; //! Temp. storage for the curves on the drawing AliPosition* fExt; //! The extrapolation result - ClassDef(AliHelix,2) // Representation and extrapolation of AliTracks in a magnetic field. + ClassDef(AliHelix,3) // Representation and extrapolation of AliTracks in a magnetic field. }; #endif diff --git a/RALICE/history.txt b/RALICE/history.txt index 80282c5820c..0ba2c955ec1 100644 --- a/RALICE/history.txt +++ b/RALICE/history.txt @@ -682,3 +682,5 @@ This allows observation of moving direction in event displays. Also support for ignoring track endpoints introduced in AliHelix to allow correct display for very long tracks together with observed hits. +18-mar-2006 NvE Support for display of selected track array introduced in AliHelix. + Also copy ctor of AliHelix made complete for new datamembers. -- 2.43.0