]>
Commit | Line | Data |
---|---|---|
38fb31ba | 1 | // $Id$ |
d810d0de | 2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 |
3 | ||
4 | /************************************************************************** | |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
ba978640 | 9 | #if !defined(__CINT__) || defined(__MAKECINT__) |
10 | #include <TTree.h> | |
11 | #include <TString.h> | |
12 | #include <TEveManager.h> | |
13 | #include <TEveElement.h> | |
14 | #include <TEvePointSet.h> | |
15 | #include <TEveTreeTools.h> | |
16 | ||
17 | #include <EVE/EveBase/AliEveEventManager.h> | |
18 | #include <STEER/STEER/AliRunLoader.h> | |
19 | ||
20 | #endif | |
38fb31ba | 21 | |
84aff7a4 | 22 | TEvePointSet* |
38fb31ba | 23 | emcal_hits(const char *varexp = "fX:fY:fZ", |
24 | const char *selection = "", | |
84aff7a4 | 25 | TEveElement* cont = 0) |
38fb31ba | 26 | { |
d810d0de | 27 | AliRunLoader* rl = AliEveEventManager::AssertRunLoader(); |
38fb31ba | 28 | rl->LoadHits("EMCAL"); |
29 | ||
30 | TTree* ht = rl->GetTreeH("EMCAL", false); | |
51346b82 | 31 | |
30650838 | 32 | TEvePointSet* points = new TEvePointSet(Form("EMCAL Hits '%s'", selection)); |
38fb31ba | 33 | |
84aff7a4 | 34 | TEvePointSelector ps(ht, points, varexp, selection); |
38fb31ba | 35 | ps.Select(); |
36 | ||
84aff7a4 | 37 | if (points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) { |
ba978640 | 38 | Warning("emcal_hits", "No hits match '%s'",selection); |
38fb31ba | 39 | delete points; |
40 | return 0; | |
41 | } | |
42 | ||
30650838 | 43 | points->SetName(Form("EMCAL Hits")); |
44 | const TString viz_tag("SIM Hits EMCAL"); | |
45 | points->ApplyVizTag(viz_tag, "Hits"); | |
46 | ||
9dcd42ea | 47 | points->SetTitle(Form("N=%d", points->Size())); |
38fb31ba | 48 | points->SetMarkerSize(.5); |
fbc350a3 | 49 | points->SetMarkerColor(2); |
38fb31ba | 50 | |
84aff7a4 | 51 | gEve->AddElement(points, cont); |
52 | gEve->Redraw3D(); | |
38fb31ba | 53 | |
54 | return points; | |
55 | } |