]>
Commit | Line | Data |
---|---|---|
6226bf2b | 1 | // $Id: tpc_sector_raw_test.C 25672 2008-05-09 11:56:22Z cvetan $ |
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 * | |
7 | * full copyright notice. * | |
8 | **************************************************************************/ | |
9 | ||
10 | // Macro to visualise rootified raw-data from TPC. | |
11 | // | |
12 | // Use tpc_raw(Int_t mode) in order to run it | |
13 | // Needs that alieve_init() is already called | |
14 | // mode = 1 - show only 2D sectors | |
15 | // mode = 2 - show only 3D sectors | |
16 | // mode = 3 - show both 2D and 3D sectors | |
17 | ||
18 | class AliRawReader; | |
19 | ||
20 | class AliEveTPCData; | |
21 | class AliEveTPCSector2D; | |
22 | class AliEveTPCSector3D; | |
23 | ||
24 | void tpc_raw(Int_t mode = 3) | |
25 | { | |
26 | gStyle->SetPalette(1, 0); | |
27 | ||
28 | gEve->DisableRedraw(); | |
29 | ||
30 | AliRawReader *reader = AliEveEventManager::AssertRawReader(); | |
31 | reader->Reset(); | |
32 | AliTPCRawStream input(reader); | |
33 | reader->Select("TPC"); // ("TPC", firstRCU, lastRCU); | |
34 | ||
35 | x = new AliEveTPCData; | |
36 | // x->SetLoadPedestal(5); | |
37 | x->SetLoadThreshold(5); | |
38 | x->SetAutoPedestal(kTRUE); | |
39 | ||
40 | x->DropAllSectors(); | |
41 | x->LoadRaw(input, kTRUE, kTRUE); | |
42 | ||
de33999e | 43 | TEveElementList* sec2d = new TEveElementList("TPC 2D"); |
44 | gEve->AddElement(sec2d); | |
45 | ||
46 | TEveElementList* sec3d = new TEveElementList("TPC 3D"); | |
47 | gEve->AddElement(sec3d); | |
48 | ||
6226bf2b | 49 | for (Int_t i=0; i<=35; ++i) { |
50 | if (mode & 1) { | |
de33999e | 51 | s = new AliEveTPCSector2D(Form("2D sector %d",i)); |
6226bf2b | 52 | s->SetSectorID(i); |
53 | s->SetAutoTrans(kTRUE); // place on proper 3D coordinates | |
54 | s->SetDataSource(x); | |
55 | s->SetFrameColor(36); | |
de33999e | 56 | sec2d->AddElement(s); |
6226bf2b | 57 | s->IncRTS(); |
58 | } | |
59 | if (mode & 2) { | |
de33999e | 60 | t = new AliEveTPCSector3D(Form("3D sector %d",i)); |
6226bf2b | 61 | t->SetSectorID(i); |
62 | t->SetAutoTrans(kTRUE); | |
63 | t->SetDataSource(x); | |
64 | t->SetMinTime(40); | |
65 | t->SetMaxTime(980); | |
66 | t->SetDriftVel(2.273); | |
de33999e | 67 | sec3d->AddElement(t); |
6226bf2b | 68 | t->IncRTS(); |
69 | } | |
70 | } | |
71 | ||
72 | gEve->EnableRedraw(); | |
73 | gEve->Redraw3D(); | |
74 | } |