]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 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 | **************************************************************************/ |
5a5a1232 | 9 | |
84aff7a4 | 10 | TEvePointSet* |
16718cdc | 11 | tpc_hits(const char *varexp = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ", |
12 | const char *selection = "TPC2.fArray.fR>80", | |
13 | TEveElement *cont = 0) | |
5a5a1232 | 14 | { |
15 | // Extracts 'major' TPC hits (not the compressed ones). | |
16 | // This gives ~2.5% of all hits. | |
17 | ||
d810d0de | 18 | AliRunLoader* rl = AliEveEventManager::AssertRunLoader(); |
5a5a1232 | 19 | rl->LoadHits("TPC"); |
20 | ||
21 | TTree* ht = rl->GetTreeH("TPC", false); | |
f37061fc | 22 | |
9dcd42ea | 23 | TEvePointSet* points = new TEvePointSet(Form("TPC Hits '%s'", selection)); |
84aff7a4 | 24 | points->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ); |
f37061fc | 25 | |
84aff7a4 | 26 | TEvePointSelector ps(ht, points, varexp, selection); |
f37061fc | 27 | ps.Select(); |
28 | ||
84aff7a4 | 29 | if (points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) { |
bcb585f3 | 30 | Warning("tpc_hits", Form("No hits match '%s'", selection)); |
52465a1b | 31 | delete points; |
32 | return 0; | |
33 | } | |
9dcd42ea | 34 | |
30650838 | 35 | points->SetName(Form("TPC Hits")); |
9dcd42ea | 36 | const TString viz_tag("SIM Hits TPC"); |
37 | points->ApplyVizTag(viz_tag, "Hits"); | |
38 | ||
9dcd42ea | 39 | points->SetTitle(Form("N=%d", points->Size())); |
8a68912d | 40 | points->SetMarkerSize(.5); |
fbc350a3 | 41 | points->SetMarkerColor(3); |
5a5a1232 | 42 | |
9dcd42ea | 43 | |
44 | ||
84aff7a4 | 45 | gEve->AddElement(points, cont); |
46 | gEve->Redraw3D(); | |
5a5a1232 | 47 | |
48 | return points; | |
49 | } |