1 /**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
3 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
4 * full copyright notice. *
5 **************************************************************************/
7 #if !defined(__CINT__) || defined(__MAKECINT__)
8 #include <TGeoMatrix.h>
10 #include <TEveElement.h>
11 #include <TEveFrameBox.h>
12 #include <TEveManager.h>
13 #include <TEveRGBAPalette.h>
14 #include <TEveTrans.h>
15 #include <TEveQuadSet.h>
17 #include <AliHMPIDDigit.h>
18 #include <AliHMPIDv3.h>
19 #include <AliHMPIDRawStream.h>
20 #include <AliRawReader.h>
21 #include <AliEveEventManager.h>
26 const Char_t *name[] = { "HMPID0", "HMPID1", "HMPID2", "HMPID3",
27 "HMPID4", "HMPID5", "HMPID6" };
29 AliRawReader *rawReader = AliEveEventManager::AssertRawReader();
30 AliHMPIDRawStream stream(rawReader);
32 TEveElementList* list = new TEveElementList("HMPID Raw");
33 gEve->AddElement(list);
35 gStyle->SetPalette(1, 0);
37 TEveRGBAPalette *pal = new TEveRGBAPalette(0, 3000);
39 TEveFrameBox *box = new TEveFrameBox();
40 box->SetAAQuadXY(0, 0, 0, 144, 121);
41 box->SetFrameColor(kGray);
44 for (Int_t iCh = 0; iCh < 7; ++iCh)
46 ms[iCh] = new TEveQuadSet(Form("Chamber %d", iCh));
48 TEveQuadSet* q = ms[iCh];
52 q->SetAntiFlick(kTRUE);
53 q->SetPickable(kTRUE);
55 q->Reset(TEveQuadSet::kQT_RectangleXYFixedDimZ, kFALSE, 64);
57 q->SetDefHeight(0.84f);
63 Int_t ch = AliHMPIDParam::DDL2C(stream.GetDDLNumber());
64 TEveQuadSet* q = ms[ch];
66 for (Int_t iPad = 0; iPad < stream.GetNPads(); ++iPad)
68 AliHMPIDDigit dig(stream.GetPadArray()[iPad],stream.GetChargeArray()[iPad]);
70 q->AddQuad(dig.PadChX()*0.8f, dig.PadChY()*0.84f);
71 q->QuadValue(TMath::Nint(dig.Q()));
72 q->QuadId(new AliHMPIDDigit(dig));
76 for (Int_t iCh = 0; iCh < 7; ++iCh)
78 TEveQuadSet* q = ms[iCh];
83 AliHMPIDv3::IdealPosition(iCh, &mat);
84 q->RefMainTrans().SetFrom(mat);
85 q->RefMainTrans().Move3LF(-0.5*144, -0.5*121, 0);