Deleting this file since name is wrong (Christian)
[u/mrichter/AliRoot.git] / HMPID / Hdisp.C
CommitLineData
d1bf51e1 1Hdisp()
fe88cf1b 2{
3 gSystem->Load("libMinuit.so");
4 gSystem->Load("libVMC.so");
5 gSystem->Load("libESD.so");
6 gSystem->Load("libSTEER.so");
7 gSystem->Load("libCDB.so");
8
9 gSystem->Load("libGed.so");
10 gSystem->Load("libRGL.so");
11 gSystem->Load("libGeom.so");
12 gSystem->Load("libVMC.so");
13
14 gSystem->Load("libReve.so");
15
16 gSystem->Load("libHMPIDbase.so");
17 gSystem->Load("libHMPIDsim.so");
18 gSystem->Load("libHMPIDrec.so");
19
20 TGeoManager::Import("geometry.root");
21
22 AliHMPIDParam *pParam=AliHMPIDParam::Instance();
23
24 AliRunLoader *pAL=AliRunLoader::Open(); pAL->LoadHits ("HMPID"); TTree *pHitT=pAL->GetTreeH("HMPID", false);
25 pAL->LoadDigits("HMPID"); TTree *pDigT=pAL->GetTreeD("HMPID", false);
26
27 Reve::PointSet *pHitPnt=new Reve::PointSet("Hits"));
28 TPolyMarker3D *pDigPnt=new TPolyMarker3D; pDigPnt->SetName("Digits"); pDigPnt->SetMarkerColor(kGreen);iPntCnt=0;
29
30 TPointSelector ps(pHitT,pHitPnt,"fX:fY:fZ",""); ps.Select();
31
32 TClonesArray *pDigLst=new TClonesArray("AliHMPIDDigit"); //this is tmp dig list per chamber
33
34 for(Int_t iCh=0;iCh<7;iCh++){
35 pDigT->SetBranchAddress(Form("HMPID%i",iCh+1),&pDigLst);
36 pDigT->GetEntry(0);
37 for(Int_t iDig=0;iDig<pDigLst->GetEntries();iDig++){
38 AliHMPIDDigit *pDig=(AliHMPIDDigit*)pDigLst->At(iDig);
39 TVector2 lors=pParam->Pad2Loc(pDig->PadX(),pDig->PadY());
40 TVector3 mars=pParam->Lors2Mars(iCh,lors.X(),lors.Y());
41 pDigPnt->SetPoint(iPntCnt++,mars.X(),mars.Y(),mars.Z());
42 }//digits loop for chamber
43 }//chambers loop
44
45 if(!gReve) new Reve::RGTopFrame(0,0,0,2);
46 gReve->AddGlobalRenderElement(new Reve::RenderElementObjPtr(pDigPnt));
47 gReve->AddRenderElement(pHitPnt);
48 gReve->Redraw3D();
49}