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 <TClonesArray.h>
10 #include <TGeoMatrix.h>
13 #include <TEveElement.h>
14 #include <TEveFrameBox.h>
15 #include <TEveManager.h>
16 #include <TEvePointSet.h>
17 #include <TEveRGBAPalette.h>
18 #include <TEveTrans.h>
19 #include <TEveQuadSet.h>
21 #include <AliHMPIDDigit.h>
22 #include <AliHMPIDv3.h>
23 #include <AliCluster3D.h>
24 #include <AliRunLoader.h>
25 #include <AliEveEventManager.h>
30 const Char_t *name[]={ "HMPID0", "HMPID1", "HMPID2", "HMPID3",
31 "HMPID4", "HMPID5", "HMPID6" };
33 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
34 rl->LoadDigits("HMPID");
36 TTree *dTree = rl->GetTreeD("HMPID", kFALSE);
39 TEveElementList* list = new TEveElementList("HMPID Digits");
40 gEve->AddElement(list);
42 gStyle->SetPalette(1, 0);
44 TEveRGBAPalette *pal = new TEveRGBAPalette(0, 3000);
46 TEveFrameBox *box = new TEveFrameBox();
47 box->SetAAQuadXY(0, 0, 0, 144, 121);
48 box->SetFrameColor(kGray);
50 TClonesArray* digits = new TClonesArray("AliHMPIDDigit");
51 for (Int_t iCh = 0; iCh < 7; ++iCh)
53 TBranch *br = dTree->GetBranch(name[iCh]);
54 br->SetAddress(&digits);
57 TEveQuadSet* q = new TEveQuadSet(Form("Chamber %d", iCh));
61 q->SetAntiFlick(kTRUE);
62 q->SetPickable(kTRUE);
64 q->Reset(TEveQuadSet::kQT_RectangleXYFixedDimZ, kFALSE, 64);
66 q->SetDefHeight(0.84f);
69 for(Int_t iDig = 0; iDig < digits->GetEntriesFast(); ++iDig)
71 AliHMPIDDigit *pDig = (AliHMPIDDigit*) digits->At(iDig);
73 q->AddQuad(pDig->PadChX()*0.8f, pDig->PadChY()*0.84f);
74 q->QuadValue(TMath::Nint(pDig->Q()));
75 q->QuadId(new AliHMPIDDigit(*pDig));
81 AliHMPIDv3::IdealPosition(iCh, &mat);
82 q->RefMainTrans().SetFrom(mat);
83 q->RefMainTrans().Move3LF(-0.5f*144, -0.5f*121, 0);
89 rl->UnloadDigits("HMPID");