]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
made functional track style (almost finished)
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Sep 2008 13:55:17 +0000 (13:55 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Sep 2008 13:55:17 +0000 (13:55 +0000)
EVE/EveDet/AliEveTRDTrackList.cxx
EVE/EveDet/AliEveTRDTrackList.h
EVE/EveDet/AliEveTRDTrackListEditor.cxx
EVE/EveDet/AliEveTRDTrackListEditor.h
EVE/alice-macros/trd_friend_tracks.C

index 7abb31995937b495d8d2b697f41096b6753f5ad3..84f8eae770955d648c11f3f6b04b29119f76f916 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "AliEveTRDTrackList.h"
 
-#include <AliTRDtrackV1.h>
 #include <TFile.h>
 #include <TFunction.h>
 #include <TH1.h>
 #include <TSystem.h>
 #include <TTree.h>
 #include <TTreeStream.h>
-#include <EveDet/AliEveTRDData.h>
+
+#include <AliTRDtrackV1.h>
+#include <AliTRDReconstructor.h>
+
 
 ClassImp(AliEveTRDTrackList)
 
 ///////////////////////////////////////////////////////////
 /////////////   AliEveTRDTrackList ////////////////////////
 ///////////////////////////////////////////////////////////
-AliEveTRDTrackList::AliEveTRDTrackList(const Text_t* n, const Text_t* t, Bool_t doColor):
-  TEveElementList(n, t, doColor),
-  fMacroList(0),
-  fMacroSelList(0),
-  fDataFromMacroList(0),
-  fDataTree(0),
-  fHistoDataSelected(0),
-  fMacroListSelected(0),
-  fMacroSelListSelected(0),
-  fSelectedTab(1)             // Standard tab: "Apply macros" (index 1)
+AliEveTRDTrackList::AliEveTRDTrackList(const Text_t* n, const Text_t* t, Bool_t doColor)
+  :TEveElementList(n, t, doColor)
+  ,fMacroList(0)
+  ,fMacroSelList(0)
+  ,fDataFromMacroList(0)
+  ,fDataTree(0)
+  ,fHistoDataSelected(0)
+  ,fMacroListSelected(0)
+  ,fMacroSelListSelected(0)
+  ,fSelectedTab(1)                      // Standard tab: "Apply macros" (index 1)
+  ,fSelectedStyle(0)
 {
   // Only accept childs of type AliEveTRDTrack
   SetChildClass(AliEveTRDTrack::Class());
@@ -38,7 +41,17 @@ AliEveTRDTrackList::AliEveTRDTrackList(const Text_t* n, const Text_t* t, Bool_t
   fMacroSelList = new TList();
   fDataFromMacroList = new TList();
 
-  //fDataTree = new TTreeSRedirector("TRD.TrackListMacroData.root");
+  // Set the build directory for AClic
+  gSystem->SetBuildDir("$HOME/.trdQArec");
+  
+  // If it does not exist, create it
+  // Note: gSystem->AccessPathName(...) returns kTRUE, if the access FAILED!
+  if(gSystem->AccessPathName("$HOME/.trdQArec")) 
+  {
+    if (gSystem->mkdir("$HOME/.trdQArec") != 0)
+      Error("AliEveTRDTrackList - Constructor", 
+            "Library directory \"$HOME/.trdQArec\" could not be created - no write permission!");
+  }
 
   AddStandardMacros();
 }
@@ -69,7 +82,9 @@ AliEveTRDTrackList::~AliEveTRDTrackList()
     delete fDataTree;
     fDataTree = 0;
   } 
-  if(!gSystem->AccessPathName(Form("/tmp/TRD.TrackListMacroData_%s.root", gSystem->Getenv("USER")))) gSystem->Exec(Form("rm /tmp/TRD.TrackListMacroData_%s.root", gSystem->Getenv("USER")));
+  // Note: gSystem->AccessPathName(...) returns kTRUE, if the access FAILED!
+  if(!gSystem->AccessPathName(Form("/tmp/TRD.TrackListMacroData_%s.root", gSystem->Getenv("USER")))) 
+    gSystem->Exec(Form("rm /tmp/TRD.TrackListMacroData_%s.root", gSystem->Getenv("USER")));
 }
 
 //______________________________________________________
@@ -287,7 +302,8 @@ Bool_t AliEveTRDTrackList::ApplyProcessMacros(TList* iterator)
   gROOT->Reset();
   
   // Clear old data and re-allocate
-  if (fDataTree == 0) fDataTree = new TTreeSRedirector(Form("/tmp/TRD.TrackListMacroData_%s.root", gSystem->Getenv("USER")));
+  if (fDataTree == 0) fDataTree = new TTreeSRedirector(Form("/tmp/TRD.TrackListMacroData_%s.root", 
+                                                            gSystem->Getenv("USER")));
   if (!fDataTree)
   {
     Error("Apply process macros", "File \"TRD.TrackListMacroData.root\" could not be accessed properly!");
@@ -571,3 +587,49 @@ void AliEveTRDTrackList::RemoveSelectionMacros(TList* iterator)
   obj = 0;
 }
 
+
+//______________________________________________________
+void AliEveTRDTrackList::UpdateTrackStyle(AliEveTRDTrack::AliEveTRDTrackState s, UChar_t ss)
+{
+  switch(s){
+  case AliEveTRDTrack::kSource:
+    SETBIT(fSelectedStyle, AliEveTRDTrack::kSource);
+    break;  
+  case AliEveTRDTrack::kPID:
+    CLRBIT(fSelectedStyle, AliEveTRDTrack::kSource);
+    switch(ss){
+    case AliTRDReconstructor::kLQPID:
+      CLRBIT(fSelectedStyle, AliEveTRDTrack::kPID);
+      break;
+    case AliTRDReconstructor::kNNPID:
+      SETBIT(fSelectedStyle, AliEveTRDTrack::kPID);
+      break;
+    }
+    break;  
+  case AliEveTRDTrack::kTrackCosmics:
+    SETBIT(fSelectedStyle, AliEveTRDTrack::kTrackCosmics);
+    break;  
+  case AliEveTRDTrack::kTrackModel:
+    CLRBIT(fSelectedStyle, AliEveTRDTrack::kTrackCosmics);
+    switch(ss){
+    case AliEveTRDTrack::kRieman:
+      CLRBIT(fSelectedStyle, AliEveTRDTrack::kTrackModel);
+      break;
+    case AliEveTRDTrack::kKalman:
+      AliWarning("Kalman fit under testing for the moment.");
+      //SETBIT(fSelectedStyle, AliEveTRDTrack::kTrackModel);
+      break;
+    }
+    break;  
+  }
+
+
+
+  // Walk through the list of tracks     
+  AliEveTRDTrack* track = 0x0;
+  for (TEveElement::List_i iter = this->BeginChildren(); iter != this->EndChildren(); ++iter) {
+    if (!(track = dynamic_cast<AliEveTRDTrack*>(*iter)))  continue;
+
+    track->SetStatus(fSelectedStyle);
+  }
+}
index df5222933691ba89600102aeed9ae9d4ffc79d24..0d4a47753cd52767e973562cfe880c74e5a363c5 100644 (file)
@@ -2,6 +2,7 @@
 #define AliEveTRDTrackList_H
 
 #include <TEveElement.h>
+#include <EveDet/AliEveTRDData.h>
 
 #define SIGNATURE_ERROR   -1
 #define NOT_EXIST_ERROR   -2
@@ -12,8 +13,6 @@
 #define MAX_MACRO_PATH_LENGTH     300
 #define MAX_APPLY_COMMAND_LENGTH   50
 
-#define UNSETBIT(n,i)  ((n) &= ~BIT(i))
-
 class AliEveTRDTrack;
 class AliTRDtrackV1;
 class TFile;
@@ -69,24 +68,28 @@ public:
                                                                 // the corresponding list.    
   void RemoveSelectionMacros(TList* iterator);                  // Uses the iterator (for the selected selection
                                                                 // macros) to remove the selection macros from 
-                                                                // the corresponding list.   
+                                                                // the corresponding list.  
+  //void SetTrackStyleState(UChar_t c);   // Sets the track model and the color model for each track in the list
 
 protected:
-  TList* fMacroList;                 // List of (process) macros
-  TList* fMacroSelList;              // List of (selection) macros
-  TList* fDataFromMacroList;         // List of macros that currently have data for histograms
+  TList*  fMacroList;                 // List of (process) macros
+  TList*  fMacroSelList;              // List of (selection) macros
+  TList*  fDataFromMacroList;         // List of macros that currently have data for histograms
 
   TTreeSRedirector *fDataTree;       // Tree containing data for histograms
 
-  Int_t fHistoDataSelected;          // Stores the selection for the data of the histograms
-  Int_t fMacroListSelected;          // Stores the selection of the process macro list
-  Int_t fMacroSelListSelected;       // Stores the selection of the selection macro list
+  Int_t   fHistoDataSelected;          // Stores the selection for the data of the histograms
+  Int_t   fMacroListSelected;          // Stores the selection of the process macro list
+  Int_t   fMacroSelListSelected;       // Stores the selection of the selection macro list
 
-  Char_t fSelectedTab;               // Holds the index of the selected tab
+  Char_t  fSelectedTab;                                            // Holds the index of the selected tab
+  UChar_t fSelectedStyle;        // Holds the selected track style
 
-  Char_t GetSelectedTab()            // Get the selected tab
+  Char_t GetSelectedTab()                                         // Gets the selected tab
     { return fSelectedTab;  }
 
+  UChar_t GetSelectedTrackStyle()     // Gets the selected track style
+    { return fSelectedStyle;  }
   Bool_t HistoDataIsSelected(Int_t index)               // Is entry in list selected?
     { return TESTBIT(fHistoDataSelected, index);  }  
    
@@ -102,17 +105,22 @@ protected:
                                                         // additional check with mangled name!!
 
   void SetHistoDataSelection(Int_t index, Bool_t set)       // Set selection of entry in list
-    { if (set) SETBIT(fHistoDataSelected, index); else UNSETBIT(fHistoDataSelected, index);  }  
+    { if (set) SETBIT(fHistoDataSelected, index); else CLRBIT(fHistoDataSelected, index);  }  
 
   void SetMacroListSelection(Int_t index, Bool_t set)       // Set selection of entry in list
-    { if (set) SETBIT(fMacroListSelected, index); else UNSETBIT(fMacroListSelected, index);  }  
+    { if (set) SETBIT(fMacroListSelected, index); else CLRBIT(fMacroListSelected, index);  }  
 
   void SetMacroSelListSelection(Int_t index, Bool_t set)    // Set selection of entry in list
-    { if (set) SETBIT(fMacroSelListSelected, index); else UNSETBIT(fMacroSelListSelected, index);  }   
+    { if (set) SETBIT(fMacroSelListSelected, index); else CLRBIT(fMacroSelListSelected, index);  }   
     
-  void SetSelectedTab(Int_t index)    // Set the selected tab
+  void SetSelectedTab(Int_t index)                                          // Sets the selected tab
     { fSelectedTab = (Char_t)index; }  
 
+  void SetSelectedTrackStyle(UChar_t index)     // Sets the selected track style
+    { fSelectedStyle = index;  }
+
+  void UpdateTrackStyle(AliEveTRDTrack::AliEveTRDTrackState s, UChar_t ss=0);
+
 private:
   AliEveTRDTrackList(const AliEveTRDTrackList&);            // Not implemented
   AliEveTRDTrackList& operator=(const AliEveTRDTrackList&); // Not implemented             
index 580abd2accd5443a3b0be239e5d103dfc75a0b47..08726369ed3e7c05442c6a1b937d357fcde06f72 100644 (file)
@@ -1,9 +1,4 @@
-#include <EveDet/AliEveTRDData.h>
-#include <EveDet/AliEveTRDTrackList.h>
-#include "AliEveTRDTrackListEditor.h"
 
-#include <EveBase/AliEveEventManager.h>
-#include <AliTRDtrackV1.h>
 #include <TGButton.h>
 #include <TCanvas.h>     
 #include <TEveBrowser.h>
 #include <TH1.h>
 #include <TTreeStream.h>
 
+#include <EveDet/AliEveTRDData.h>
+#include <EveDet/AliEveTRDTrackList.h>
+#include "EveDet/AliEveTRDTrackListEditor.h"
+#include <EveBase/AliEveEventManager.h>
+
+#include <AliTRDtrackV1.h>
+#include <AliTRDReconstructor.h>
+
 
 ClassImp(AliEveTRDTrackListEditor)
 
@@ -39,6 +42,7 @@ AliEveTRDTrackListEditor::AliEveTRDTrackListEditor(const TGWindow* p, Int_t widt
   fHistoCanvas(0),
   fHistoCanvasName(0),
   fInheritMacroList(kFALSE),
+  fStyleFrame(0),
   fMainFrame(0),
   fHistoFrame(0),
   fHistoSubFrame(0),
@@ -63,38 +67,38 @@ AliEveTRDTrackListEditor::AliEveTRDTrackListEditor(const TGWindow* p, Int_t widt
   // Style stuff
   fLine5 = new TGHorizontal3DLine(this, 194, 8);
   AddFrame(fLine5, new TGLayoutHints(kLHintsLeft  | kLHintsTop, 2, 2, 8, 8));
+  fStyleFrame = new TGHorizontalFrame(this);
+  AddFrame(fStyleFrame);
 
   // Style - Track model
-  fbgStyleTrack = new TGButtonGroup(this, "Track model");
+  fbgStyleTrack = new TGButtonGroup(fStyleFrame, "Track model");
   fbgStyleTrack->SetMapSubwindows(kTRUE);
   fbgStyleTrack->Resize(194, 200);
-  AddFrame(fbgStyleTrack);
+  fStyleFrame->AddFrame(fbgStyleTrack);
 
-  frbTrack[0] = new TGRadioButton(fbgStyleTrack, "Linear");
+  frbTrack[0] = new TGRadioButton(fbgStyleTrack, "Rieman", 0);
   fbgStyleTrack->AddFrame(frbTrack[0]);
-  frbTrack[1] = new TGRadioButton(fbgStyleTrack, "Rieman");
+  frbTrack[1] = new TGRadioButton(fbgStyleTrack, "Kalman", 1);
   fbgStyleTrack->AddFrame(frbTrack[1]);
-  frbTrack[2] = new TGRadioButton(fbgStyleTrack, "Kalman");
+  frbTrack[2] = new TGRadioButton(fbgStyleTrack, "Line", 2);
   fbgStyleTrack->AddFrame(frbTrack[2]);  
-  fbgStyleTrack->SetButton(2, kTRUE); 
 
   // Style - Color model
-  fbgStyleColor = new TGButtonGroup(this, "Color model");
+  fbgStyleColor = new TGButtonGroup(fStyleFrame, "Color style");
   fbgStyleColor->SetMapSubwindows(kTRUE);
   fbgStyleColor->Resize(194, 200);
-  AddFrame(fbgStyleColor);
+  fStyleFrame->AddFrame(fbgStyleColor);
 
-  frbColor[0] = new TGRadioButton(fbgStyleColor, "PID 1");
+  frbColor[0] = new TGRadioButton(fbgStyleColor, "PID LQ", 0);
   fbgStyleColor->AddFrame(frbColor[0]);
-  frbColor[1] = new TGRadioButton(fbgStyleColor, "PID 2");
+  frbColor[1] = new TGRadioButton(fbgStyleColor, "PID NN", 1);
   fbgStyleColor->AddFrame(frbColor[1]);
-  frbColor[2] = new TGRadioButton(fbgStyleColor, "Source");
+  frbColor[2] = new TGRadioButton(fbgStyleColor, "ESD Source", 2);
   fbgStyleColor->AddFrame(frbColor[2]);  
-  fbgStyleColor->SetButton(1, kTRUE); 
   
 
   // Functionality for adding macros  
-  fMainFrame = CreateEditorTabSubFrame("Apply macros");
+  fMainFrame = CreateEditorTabSubFrame("Analysis");
    
   fLabel1 = new TGLabel(fMainFrame,"Add macro(s):");
   fMainFrame->AddFrame(fLabel1);
@@ -121,7 +125,7 @@ AliEveTRDTrackListEditor::AliEveTRDTrackListEditor(const TGWindow* p, Int_t widt
 
   fLine2 = new TGHorizontal3DLine(fMainFrame, 194, 8);
   fMainFrame->AddFrame(fLine2, new TGLayoutHints(kLHintsLeft  | kLHintsTop, 2, 2, 8, 2));
-  fLabel3 = new TGLabel(fMainFrame,"Process macros:");
+  fLabel3 = new TGLabel(fMainFrame,"Analysis macros:");
   fMainFrame->AddFrame(fLabel3);
 
   ftlMacroList = new TGListBox(fMainFrame);
@@ -142,7 +146,7 @@ AliEveTRDTrackListEditor::AliEveTRDTrackListEditor(const TGWindow* p, Int_t widt
   fMainFrame->AddFrame(fbRemoveMacros);
 
   // Stuff for displaying histograms
-  fHistoFrame = CreateEditorTabSubFrame("Histograms");  
+  fHistoFrame = CreateEditorTabSubFrame("Results");  
   fHistoFrame->SetMapSubwindows(kTRUE);
   fLabel4 = new TGLabel(fHistoFrame,"Data from applied macros:");
   fHistoFrame->AddFrame(fLabel4);
@@ -182,7 +186,7 @@ AliEveTRDTrackListEditor::AliEveTRDTrackListEditor(const TGWindow* p, Int_t widt
   ftlMacroSelList->Connect("Selected(Int_t)", "AliEveTRDTrackListEditor", this, "UpdateMacroSelListSelection(Int_t)");
 
   // Handle the signal "NewEventLoaded"
-  gAliEveEvent->Connect("NewEventLoaded()", "AliEveTRDTrackListEditor", this, "HandleNewEventLoaded()");
+  //gAliEveEvent->Connect("NewEventLoaded()", "AliEveTRDTrackListEditor", this, "HandleNewEventLoaded()");
 
   // Handle the signal "Selected" (another tab has been selected)
   GetGedEditor()->GetTab()->Connect("Selected(Int_t)", "AliEveTRDTrackListEditor", 
@@ -706,30 +710,13 @@ void AliEveTRDTrackListEditor::SetDrawingToHistoCanvasTab()
   gPad = fHistoCanvas;
 }
 
-//______________________________________________________
-void AliEveTRDTrackListEditor::UpdateHistoCanvasTab()
-{
-  // Update name of the tab (tab has been set to current tab!)
-  fHistoCanvasName->SetString(fM->GetName());  
-
-  // Use a copy of fHistoCanvasName!! -> If the user closes a tab manually, the TGString
-  // will be deleted -> Error might occur, when accessing the pointer   
-  gEve->GetBrowser()->GetTab(1)->GetCurrentTab()->SetText(new TGString(fHistoCanvasName));
-
-  // Switch tabs to force redrawing
-  gEve->GetBrowser()->GetTab(1)->SetTab(0);
-  gEve->GetBrowser()->GetTab(1)->SetTab(fHistoCanvasName->GetString());
-  fHistoCanvas->Update();
-}
-
 //______________________________________________________
 void AliEveTRDTrackListEditor::SetModel(TObject* obj)
 {  
   // Set model object
   fM = dynamic_cast<AliEveTRDTrackList*>(obj);
 
-  if (fM == 0) 
-  {
+  if (fM == 0){
     Error("SetModel", "Parameter is zero pointer");
     return;
   }
@@ -740,26 +727,67 @@ void AliEveTRDTrackListEditor::SetModel(TObject* obj)
     InheritMacroList();
     fInheritMacroList = kFALSE;
   }
+
+  // Select the correct styles -> Button index has offset 1!
+  Int_t b = 0;
+  UChar_t style = fM->GetSelectedTrackStyle();
+  if(TESTBIT(style, AliEveTRDTrack::kSource)) b = 2;
+  else {
+    if(TESTBIT(style, AliEveTRDTrack::kPID)) b = 1;
+    else b = 0;
+  } 
+  fbgStyleColor->SetButton(b, kTRUE);
+
+
+  if(TESTBIT(style, AliEveTRDTrack::kTrackCosmics)) b = 2;
+  else{
+    if(TESTBIT(style, AliEveTRDTrack::kTrackModel)) b = 1;
+    else b = 0;
+  }
+  fbgStyleTrack->SetButton(b, kTRUE);
   
   UpdateMacroList();
   UpdateHistoList(); 
 
   // View correct tab
-  GetGedEditor()->GetTab()->SetTab(fM->fSelectedTab); 
+  GetGedEditor()->GetTab()->SetTab(fM->GetSelectedTab()); 
 }
 
 //______________________________________________________
-void AliEveTRDTrackListEditor::SetTrackColor(Int_t ind)
+void AliEveTRDTrackListEditor::SetTrackModel(Int_t ind)
 {
-  Info("SetTrackColor", Form("Button index: %d", ind - 1));
+  switch(ind){ 
+  case AliEveTRDTrack::kRieman:
+    fM->UpdateTrackStyle(AliEveTRDTrack::kTrackModel, AliEveTRDTrack::kRieman);
+    break;
+  case AliEveTRDTrack::kKalman:
+    fM->UpdateTrackStyle(AliEveTRDTrack::kTrackModel, AliEveTRDTrack::kKalman);
+    break;
+  default:
+    fM->UpdateTrackStyle(AliEveTRDTrack::kTrackCosmics);
+    break;
+  }
+  gEve->Redraw3D();
 }
 
 //______________________________________________________
-void AliEveTRDTrackListEditor::SetTrackModel(Int_t ind)
+void AliEveTRDTrackListEditor::SetTrackColor(Int_t ind)
 {
-  Info("SetTrackModel", Form("Button index: %d", ind - 1));
+  switch(ind){ 
+  case AliTRDReconstructor::kLQPID:
+    fM->UpdateTrackStyle(AliEveTRDTrack::kPID, AliTRDReconstructor::kLQPID);
+    break;
+  case AliTRDReconstructor::kNNPID:
+    fM->UpdateTrackStyle(AliEveTRDTrack::kPID, AliTRDReconstructor::kNNPID);
+    break;
+  default:
+    fM->UpdateTrackStyle(AliEveTRDTrack::kSource);
+    break;
+  }
+  gEve->Redraw3D();
 }
 
+
 //______________________________________________________
 void AliEveTRDTrackListEditor::UpdateDataFromMacroListSelection()
 {
@@ -769,6 +797,22 @@ void AliEveTRDTrackListEditor::UpdateDataFromMacroListSelection()
   }
 }
 
+//______________________________________________________
+void AliEveTRDTrackListEditor::UpdateHistoCanvasTab()
+{
+  // Update name of the tab (tab has been set to current tab!)
+  fHistoCanvasName->SetString(fM->GetName());  
+
+  // Use a copy of fHistoCanvasName!! -> If the user closes a tab manually, the TGString
+  // will be deleted -> Error might occur, when accessing the pointer   
+  gEve->GetBrowser()->GetTab(1)->GetCurrentTab()->SetText(new TGString(fHistoCanvasName));
+
+  // Switch tabs to force redrawing
+  gEve->GetBrowser()->GetTab(1)->SetTab(0);
+  gEve->GetBrowser()->GetTab(1)->SetTab(fHistoCanvasName->GetString());
+  fHistoCanvas->Update();
+}
+
 //______________________________________________________
 void AliEveTRDTrackListEditor::UpdateHistoList()
 {
index a69e8b2e80444e66c8b12f8a5412c1d6ee9b1d4b..2c4c93db7f5d77fa912e6ad056f66eb845080a88 100644 (file)
@@ -46,8 +46,8 @@ public:
   void HandleNewEventLoaded();                            // Handles the "NewEventLoaded()"-signal
   void HandleTabChangedToIndex(Int_t);                    // Handles the "Selected(Int_t id)"-signal (tab changed)
   void RemoveMacros();                                    // Removes the selected macros from the lists
-  void SetTrackColor(Int_t ind);                          // Sets the track model
-  void SetTrackModel(Int_t ind);                          // Sets the track model
+  void SetTrackModel(Int_t ind);                          // Sets the track model 
+  void SetTrackColor(Int_t ind);                          // Sets the track color 
   void UpdateDataFromMacroListSelection();                // Updates the selection in the "data from macro"-list
   void UpdateHistoList();                                 // Updates the histogram list
   void UpdateMacroList();                                 // Updates the macro list
@@ -69,10 +69,11 @@ private:
   Bool_t            fInheritMacroList;       // Flag indicating, whether the macro list will be inherited from the
                                              // previously loaded track list within the next call of SetModel
 
+  TGHorizontalFrame* fStyleFrame;            // Frame for the style stuff
   TGVerticalFrame*   fMainFrame;             // Top frame for macro functionality.
   TGVerticalFrame*   fHistoFrame;            // Top frame for the histogram stuff
   TGVerticalFrame*   fHistoSubFrame;         // Frame for the histogram buttons themselves
-  TGHorizontalFrame* fBrowseFrame;           // For searching macros
+  TGHorizontalFrame* fBrowseFrame;           // Frame for features corresponding to searching macros
   TGButtonGroup*     fbgStyleColor;          // Button group for the color model
   TGButtonGroup*     fbgStyleTrack;          // Button group for the track model
   
index e829d3307f165f7083dc8debe117887b057c40ab..ed4c0c1b8d144025d5f2bc74cd5fb66bfc3cbe43 100644 (file)
@@ -26,15 +26,22 @@ void trd_friend_tracks(TEveElement *cont = 0)
       if(strcmp(cal->IsA()->GetName(), "AliTRDtrackV1") != 0) continue;
       AliTRDtrackV1 *trackObj = dynamic_cast<AliTRDtrackV1 *>(cal);
       trackObj->SetReconstructor(reco);
-      tracks->AddElement(new AliEveTRDTrack(trackObj));
+      AliEveTRDTrack *trackEve = new AliEveTRDTrack(trackObj);
+      tracks->AddElement(trackEve);
+      trackEve->SetESDstatus(esdTrack->GetStatus());
     }
   }
        
   tracks->SetTitle(Form("Tracks %d", tracks->NumChildren()));
   tracks->StampObjProps();
   gEve->AddElement(tracks, cont);
-
+  
   gEve->Redraw3D();
+
+  TGLViewer *v = gEve->GetGLViewer();
+  v->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  ((TGLOrthoCamera&)v->CurrentCamera()).SetEnableRotate(kTRUE);
+  v->UpdateScene();
   
   return;
 }