]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Alexey: new macros for T0 visualization.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2007 12:18:53 +0000 (12:18 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Apr 2007 12:18:53 +0000 (12:18 +0000)
EVE/alice-macros/t0_digits.C [new file with mode: 0644]
EVE/alice-macros/t0_hits.C [new file with mode: 0644]
EVE/alice-macros/t0_raw.C [new file with mode: 0644]

diff --git a/EVE/alice-macros/t0_digits.C b/EVE/alice-macros/t0_digits.C
new file mode 100644 (file)
index 0000000..6f515a6
--- /dev/null
@@ -0,0 +1,36 @@
+// $Id$
+
+namespace Alieve {
+class Event;
+}
+
+
+
+void t0_digits()
+{
+  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  Int_t g_currentEvent = Alieve::gEvent->GetEventId();
+    cout<<g_currentEvent<<endl;
+
+  rl->LoadDigits("T0");
+  TTree* dt = rl->GetTreeD("T0", false);
+  //Alieve::T0DigitsInfo* di = new Alieve::T0DigitsInfo();
+  //  di->SetDTree(dt);
+  //di->Dump();
+  //  AliSTARTdigit *digits = 0;
+  AliT0digit *digits = 0;
+  dt->SetBranchAddress("T0", &digits);
+  dt->GetEntry(0);
+
+  gStyle->SetPalette(1, 0);
+  //  gReve->DisableRedraw();
+
+  Alieve::T0Module::MakeModules(digits);
+
+  //Alieve::T0Module* m = new Alieve::T0Module(di);
+  //
+  //gReve->EnableRedraw();
+  //m->LoadQuadsDigits();
+}
+
diff --git a/EVE/alice-macros/t0_hits.C b/EVE/alice-macros/t0_hits.C
new file mode 100644 (file)
index 0000000..7914289
--- /dev/null
@@ -0,0 +1,41 @@
+// $Id$
+
+Reve::PointSet*
+t0_hits(const char *varexp    = "T0.fX:T0.fY:T0.fZ",
+        const char *selection = "")
+{
+  // Extracts  T0 hits.
+
+
+  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  rl->LoadHits("T0");
+
+  TTree* ht = rl->GetTreeH("T0", false);
+
+  Int_t nTracks = ht->GetEntries();
+  // printf("Found %d tracks. \n",nTracks);
+  for (Int_t it = 0; it < nTracks; it++) {
+    TClonesArray *hits = 0;
+    ht->SetBranchAddress("T0",&hits);
+    ht->GetEvent(it);
+ Int_t nHits = hits->GetEntriesFast();
+ //  printf("Found %d hits in track %d. \n",nHits,it);
+
+  }
+  Reve::PointSet* points = new Reve::PointSet(Form("T0 Hits '%s'", selection));
+   points->SetSourceCS(TPointSelectorConsumer::TVT_XYZ);
+
+  TPointSelector ps(ht, points, varexp, selection);
+  ps.Select();
+
+  points->SetTitle(Form("N=%d", points->Size()));
+  points->SetMarkerSize(.5);
+  points->SetMarkerColor((Color_t)3);
+
+  gReve->AddRenderElement(points);
+  gReve->Redraw3D();
+
+  return points;
+}
diff --git a/EVE/alice-macros/t0_raw.C b/EVE/alice-macros/t0_raw.C
new file mode 100644 (file)
index 0000000..1dad3ea
--- /dev/null
@@ -0,0 +1,21 @@
+// $Id$
+
+namespace Alieve {
+class Event;
+}
+
+
+
+void t0_raw()
+{
+  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  Int_t ievt = Alieve::gEvent->GetEventId();
+    cout<<ievt<<endl;
+
+  gStyle->SetPalette(1, 0);
+
+  Alieve::T0Module::LoadRaw("raw.root",ievt);
+
+
+}
+