1 Int_t AliTPCDisplayDigits(int sec, int row, int lab=-1,
2 int max_t_chan=500, float min_t=0., float max_t=500.,
3 int max_p_chan=150, float min_p=0., float max_p=150.)
5 cerr<<"Displaying digits...\n";
7 // Connect the Root Galice file containing Geometry, Kine and Hits
8 TFile *f = TFile::Open("galice.root");
9 if (!f->IsOpen()) {cerr<<"Can't open galice.root !\n"; return 1;}
11 AliTPCParam *par=(AliTPCParam *)f->Get("75x40_100x60");
14 sprintf(s,"Sector %d Row %d\n",sec,row);
15 TH2F *h = new TH2F("h",s,max_t_chan,min_t,max_t,max_p_chan,min_p,max_p);
17 TTree *t=(TTree*)f->Get("TreeD_75x40_100x60");
18 AliSimDigits dummy, *digit=&dummy;
19 t->GetBranch("Segment")->SetAddress(&digit);
20 for (int i=0; i<t->GetEntries(); i++) {
23 par->AdjustSectorRow(digit->GetID(),ss,rr);
24 if (ss==sec && rr==row) goto ok;
29 int imax=0, jmax=0, qmax=0;
32 Short_t dig=digit->CurrentDigit();
33 int i=digit->CurrentRow(), j=digit->CurrentColumn();
35 int lab0=digit->GetTrackID(i,j,0);
36 int lab1=digit->GetTrackID(i,j,1);
37 int lab2=digit->GetTrackID(i,j,2);
38 if (lab0!=lab) if (lab1!=lab) if (lab2!=lab) continue;
39 if (dig>qmax) {imax=i; jmax=j; qmax=dig;}
40 cerr<<lab0<<' '<<lab1<<' '<<lab2<<endl;
43 } while (digit->Next());
44 if (qmax>0){cerr<<"Peak (time,pad,q) : "<<imax<<' '<<jmax<<' '<<qmax<<endl;}
47 gStyle->SetOptStat(0);
48 TCanvas *c1=new TCanvas("ddisplay","TPC digits display",0,0,1110,680);
49 TPad *p1=new TPad("p1","",0,0,1,0.5);
51 TPad *p2=new TPad("p2","",0,0.5,1,1);
58 c1->Modified(); c1->Update();