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 **************************************************************************/
10 // fV0CHeight1 = 2.5; // height of cell 1
11 // fV0CHeight2 = 4.4; // height of cell 2
12 // fV0CHeight3 = 7.4; // height of cell 3
13 // fV0CHeight4 = 12.5; // height of cell 4
14 // fV0CRMin = 4.6; // inner radius of box
16 // fV0AR0 = 4.2; // Radius of hole
17 // fV0AR1 = 7.6; // Maximun radius of 1st cell
18 // fV0AR2 = 13.8; // Maximun radius of 2nd cell
19 // fV0AR3 = 22.7; // Maximun radius of 3rd cell
20 // fV0AR4 = 41.3; // Maximun radius of 4th cell
24 static const Float_t RadC[] = { 4.6, 7.1, 11.5, 18.9, 31.4 };
25 static const Float_t RadA[] = { 4.2, 7.6, 13.8, 22.7, 41.4 };
26 static const Float_t RadEps = 0.4;
27 static const Float_t PhiEps = 0.025;
28 static const Float_t PhiStp = TMath::TwoPi()/8.0;
30 gStyle->SetPalette(1, 0);
32 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
33 rl->LoadDigits("VZERO");
35 TTree* dt = rl->GetTreeD("VZERO", false);
36 TClonesArray* dca = 0;
37 dt->SetBranchAddress("VZERODigit", &dca);
42 TEveQuadSet* modR = new TEveQuadSet("V0R");
43 modR->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
45 TEveQuadSet* modL = new TEveQuadSet("V0L");
46 modL->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
48 Int_t numEntr = dca->GetEntriesFast();
49 for (Int_t entr=0; entr<numEntr; ++entr)
51 AliVZEROdigit* d = (AliVZEROdigit*) dca->UncheckedAt(entr);
52 Int_t i = d->PMNumber();
54 if (i < 32) // AliEveV0 Right
56 TEveQuadSet* module = modR;
59 Float_t minR = RadC[ri] + RadEps, maxR = RadC[ri+1] - RadEps;
60 Float_t minP = pi*PhiStp + PhiEps, maxP = (pi+1)*PhiStp - PhiEps;
62 v[ 0] = minR*TMath::Cos(minP); v[ 1] = minR*TMath::Sin(minP); v[ 2] = 0;
63 v[ 3] = maxR*TMath::Cos(minP); v[ 4] = maxR*TMath::Sin(minP); v[ 5] = 0;
64 v[ 6] = maxR*TMath::Cos(maxP); v[ 7] = maxR*TMath::Sin(maxP); v[ 8] = 0;
65 v[ 9] = minR*TMath::Cos(maxP); v[10] = minR*TMath::Sin(maxP); v[11] = 0;
68 module->QuadValue(d->ADC());
73 TEveQuadSet* module = modL;
74 Int_t ri = (i-32) / 8;
76 Float_t minR = RadA[ri] + RadEps, maxR = RadA[ri+1] - RadEps;
77 Float_t minP = pi*PhiStp + PhiEps, maxP = (pi+1)*PhiStp - PhiEps;
79 v[ 0] = minR*TMath::Cos(minP); v[ 1] = minR*TMath::Sin(minP); v[ 2] = 0;
80 v[ 3] = maxR*TMath::Cos(minP); v[ 4] = maxR*TMath::Sin(minP); v[ 5] = 0;
81 v[ 6] = maxR*TMath::Cos(maxP); v[ 7] = maxR*TMath::Sin(maxP); v[ 8] = 0;
82 v[ 9] = minR*TMath::Cos(maxP); v[10] = minR*TMath::Sin(maxP); v[11] = 0;
85 module->QuadValue(d->ADC());
90 modL->RefMainTrans().SetPos(0, 0, 324);
91 modR->RefMainTrans().SetPos(0, 0, -84);
93 gEve->AddElement(modL);
94 gEve->AddElement(modR);