]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Id$ |
2 | ||
84aff7a4 | 3 | TEvePointSet* |
5a5a1232 | 4 | tpc_hits(const char *varexp = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ", |
2caed564 | 5 | const char *selection = "TPC2.fArray.fR>80", |
84aff7a4 | 6 | TEveElement* cont = 0) |
5a5a1232 | 7 | { |
8 | // Extracts 'major' TPC hits (not the compressed ones). | |
9 | // This gives ~2.5% of all hits. | |
10 | ||
11 | AliRunLoader* rl = Alieve::Event::AssertRunLoader(); | |
12 | rl->LoadHits("TPC"); | |
13 | ||
14 | TTree* ht = rl->GetTreeH("TPC", false); | |
f37061fc | 15 | |
7be1e8cd | 16 | //PH The line below is replaced waiting for a fix in Root |
17 | //PH which permits to use variable siza arguments in CINT | |
18 | //PH on some platforms (alphalinuxgcc, solariscc5, etc.) | |
84aff7a4 | 19 | //PH TEvePointSet* points = new TEvePointSet(Form("TPC Hits '%s'", selection)); |
7be1e8cd | 20 | char form[1000]; |
21 | sprintf(form,"TPC Hits '%s'", selection); | |
84aff7a4 | 22 | TEvePointSet* points = new TEvePointSet(form); |
23 | points->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ); | |
f37061fc | 24 | |
84aff7a4 | 25 | TEvePointSelector ps(ht, points, varexp, selection); |
f37061fc | 26 | ps.Select(); |
27 | ||
84aff7a4 | 28 | if (points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) { |
bcb585f3 | 29 | Warning("tpc_hits", Form("No hits match '%s'", selection)); |
52465a1b | 30 | delete points; |
31 | return 0; | |
32 | } | |
33 | ||
7be1e8cd | 34 | //PH points->SetTitle(Form("N=%d", points->Size())); |
35 | sprintf(form,"N=%d", points->Size()); | |
36 | points->SetTitle(form); | |
8a68912d | 37 | points->SetMarkerSize(.5); |
5a5a1232 | 38 | points->SetMarkerColor((Color_t)3); |
39 | ||
84aff7a4 | 40 | gEve->AddElement(points, cont); |
41 | gEve->Redraw3D(); | |
5a5a1232 | 42 | |
43 | return points; | |
44 | } |