In muon-related macros in EVE:
[u/mrichter/AliRoot.git] / EVE / alice-macros / hmpid_raw.C
CommitLineData
391fa967 1void hmpid_raw()
2{
3 const Char_t *name[] = { "HMPID0", "HMPID1", "HMPID2", "HMPID3",
4 "HMPID4", "HMPID5", "HMPID6" };
5
6 AliRawReader *rawReader = AliEveEventManager::AssertRawReader();
7 AliHMPIDRawStream stream(rawReader);
8
9 TEveElementList* list = new TEveElementList("HMPID Raw");
10 gEve->AddElement(list);
11
12 gStyle->SetPalette(1, 0);
13
14 TEveRGBAPalette *pal = new TEveRGBAPalette(0, 3000);
15 pal->SetMax(1000);
16 TEveFrameBox *box = new TEveFrameBox();
17 box->SetAAQuadXY(0, 0, 0, 144, 121);
18 box->SetFrameColor(kGray);
19
20 TEveQuadSet* ms[7];
21 for (Int_t iCh = 0; iCh < 7; ++iCh)
22 {
23 ms[iCh] = new TEveQuadSet(Form("Chamber %d", iCh));
24
25 TEveQuadSet* q = ms[iCh];
26 q->SetOwnIds(kTRUE);
27 q->SetPalette(pal);
28 q->SetFrame(box);
29 q->SetAntiFlick(kTRUE);
30 q->SetPickable(kTRUE);
31
32 q->Reset(TEveQuadSet::kQT_RectangleXYFixedDimZ, kFALSE, 64);
33 q->SetDefCoord(0);
34 q->SetDefHeight(0.84f);
35 q->SetDefWidth(0.8f);
36 }
37
38 while (stream.Next())
39 {
40 Int_t ch = AliHMPIDParam::DDL2C(stream.GetDDLNumber());
41 TEveQuadSet* q = ms[ch];
42
43 for (Int_t iPad = 0; iPad < stream.GetNPads(); ++iPad)
44 {
45 AliHMPIDDigit dig(stream.GetPadArray()[iPad],stream.GetChargeArray()[iPad]);
46
47 q->AddQuad(dig.PadChX()*0.8f, dig.PadChY()*0.84f);
48 q->QuadValue(TMath::Nint(dig.Q()));
49 q->QuadId(new AliHMPIDDigit(dig));
50 }
51 }
52
53 for (Int_t iCh = 0; iCh < 7; ++iCh)
54 {
55 TEveQuadSet* q = ms[iCh];
56
57 q->RefitPlex();
58
59 TGeoHMatrix mat;
60 AliHMPIDv3::IdealPosition(iCh, &mat);
61 q->RefMainTrans().SetFrom(mat);
62 q->RefMainTrans().Move3LF(-0.5*144, -0.5*121, 0);
63
64 list->AddElement(q);
65 }
66
67 gEve->Redraw3D();
68}