2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 **************************************************************************/
11 #if !defined(__CINT__) || defined(__MAKECINT__)
12 #include <TClonesArray.h>
13 #include <TGeoManager.h>
17 #include <TEveManager.h>
18 #include <TEveElement.h>
19 #include <TEvePointSet.h>
20 #include <TEveQuadSet.h>
21 #include <TEveTrans.h>
23 #include <AliRunLoader.h>
24 #include <AliVZEROdigit.h>
25 #include <AliEveEventManager.h>
29 // fV0CHeight1 = 2.5; // height of cell 1
30 // fV0CHeight2 = 4.4; // height of cell 2
31 // fV0CHeight3 = 7.4; // height of cell 3
32 // fV0CHeight4 = 12.5; // height of cell 4
33 // fV0CRMin = 4.6; // inner radius of box
35 // fV0AR0 = 4.2; // Radius of hole
36 // fV0AR1 = 7.6; // Maximun radius of 1st cell
37 // fV0AR2 = 13.8; // Maximun radius of 2nd cell
38 // fV0AR3 = 22.7; // Maximun radius of 3rd cell
39 // fV0AR4 = 41.3; // Maximun radius of 4th cell
43 static const Float_t RadC[] = { 4.6, 7.1, 11.5, 18.9, 31.4 };
44 static const Float_t RadA[] = { 4.2, 7.6, 13.8, 22.7, 41.4 };
45 static const Float_t RadEps = 0.4;
46 static const Float_t PhiEps = 0.025;
47 static const Float_t PhiStp = TMath::TwoPi()/8.0;
49 gStyle->SetPalette(1, 0);
51 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
52 rl->LoadDigits("VZERO");
54 TTree* dt = rl->GetTreeD("VZERO", false);
55 TClonesArray* dca = 0;
56 dt->SetBranchAddress("VZERODigit", &dca);
61 TEveQuadSet* modR = new TEveQuadSet("V0R");
62 modR->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
64 TEveQuadSet* modL = new TEveQuadSet("V0L");
65 modL->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
67 Int_t numEntr = dca->GetEntriesFast();
68 for (Int_t entr=0; entr<numEntr; ++entr)
70 AliVZEROdigit* d = (AliVZEROdigit*) dca->UncheckedAt(entr);
71 Int_t i = d->PMNumber();
73 if (i < 32) // AliEveV0 Right
75 TEveQuadSet* module = modR;
78 Float_t minR = RadC[ri] + RadEps, maxR = RadC[ri+1] - RadEps;
79 Float_t minP = pi*PhiStp + PhiEps, maxP = (pi+1)*PhiStp - PhiEps;
81 v[ 0] = minR*TMath::Cos(minP); v[ 1] = minR*TMath::Sin(minP); v[ 2] = 0;
82 v[ 3] = maxR*TMath::Cos(minP); v[ 4] = maxR*TMath::Sin(minP); v[ 5] = 0;
83 v[ 6] = maxR*TMath::Cos(maxP); v[ 7] = maxR*TMath::Sin(maxP); v[ 8] = 0;
84 v[ 9] = minR*TMath::Cos(maxP); v[10] = minR*TMath::Sin(maxP); v[11] = 0;
87 module->QuadValue(d->ADC());
92 TEveQuadSet* module = modL;
93 Int_t ri = (i-32) / 8;
95 Float_t minR = RadA[ri] + RadEps, maxR = RadA[ri+1] - RadEps;
96 Float_t minP = pi*PhiStp + PhiEps, maxP = (pi+1)*PhiStp - PhiEps;
98 v[ 0] = minR*TMath::Cos(minP); v[ 1] = minR*TMath::Sin(minP); v[ 2] = 0;
99 v[ 3] = maxR*TMath::Cos(minP); v[ 4] = maxR*TMath::Sin(minP); v[ 5] = 0;
100 v[ 6] = maxR*TMath::Cos(maxP); v[ 7] = maxR*TMath::Sin(maxP); v[ 8] = 0;
101 v[ 9] = minR*TMath::Cos(maxP); v[10] = minR*TMath::Sin(maxP); v[11] = 0;
104 module->QuadValue(d->ADC());
109 modL->RefMainTrans().SetPos(0, 0, 324);
110 modR->RefMainTrans().SetPos(0, 0, -84);
112 gEve->AddElement(modL);
113 gEve->AddElement(modR);