1 AliRICH * Rich() {return r;}
3 Int_t countContrib[7][3];
9 TFile *pFile = new TFile("$(HOME)/plots.root","RECREATE");
10 Bool_t isDig =!Rich()->GetLoader()->LoadDigits();
11 Bool_t isClus=!Rich()->GetLoader()->LoadRecPoints();
12 TH1F *pHxD,*pHyD,*pCqH1,*pCsH1,pCqMipH1,*pCsMipH1,*pCqCerH1,*pCsCerH1,*pCqFeeH1,*pCsFeeH1;
13 TH2F *pCmH2,*pCmMipH2,*pCmCerH2,*pCmFeeH2;
15 pHxD=new TH1F("HitDigitDiffX","Hit-Digits diff X all chambers;diff [cm]",20,-2,2);
16 pHyD=new TH1F("HitDigitDiffY","Hit-Digits diff Y all chambers;diff [cm]",20,-2,2);
20 pCqH1=new TH1F("ClusQ", "Cluster Charge all chambers;q [QDC]",Rich()->P()->MaxQdc(),0,Rich()->P()->MaxQdc());
21 pCsH1=new TH1F("ClusSize","Cluster size all chambers;size [number of pads in cluster]",100,0,100);
22 pCmH2=new TH2F("ClusMap", "Cluster map;x [cm];y [cm]",1000,-Rich()->P()->PcSizeX()/2,Rich()->P()->PcSizeX()/2,
23 1000,-Rich()->P()->PcSizeY()/2,Rich()->P()->PcSizeY()/2);
25 pCqMipH1=new TH1F("MipClusQ", "MIP Cluster Charge all chambers;q [QDC]",r->P()->MaxQdc(),0,r->P()->MaxQdc());
26 pCsMipH1=new TH1F("MipClusSize","MIP Cluster size all chambers;size [number of pads in cluster]",100,0,100);
27 pCmMipH2=new TH2F("MipClusMap", "MIP Cluster map;x [cm];y [cm]",1000,-r->P()->PcSizeX()/2,r->P()->PcSizeX()/2,
28 1000,-r->P()->PcSizeY()/2,r->P()->PcSizeY()/2);
30 pCqCerH1=new TH1F("CerClusQ", "Cerenkov Cluster Charge all chambers;q [QDC]",r->P()->MaxQdc(),0,r->P()->MaxQdc());
31 pCsCerH1=new TH1F("CerClusSize","Cernekov Cluster size all chambers;size [number of pads in cluster]",100,0,100);
32 pCmCerH2=new TH2F("CerClusMap", "Cerenkov Cluster map;x [cm];y [cm]",1000,-r->P()->PcSizeX()/2,r->P()->PcSizeX()/2,
33 1000,-r->P()->PcSizeY()/2,r->P()->PcSizeY()/2);
35 pCqFeeH1=new TH1F("FeeClusQ", "Feedback Cluster Charge all chambers;q [QDC]",r->P()->MaxQdc(),0,r->P()->MaxQdc());
36 pCsFeeH1=new TH1F("FeeClusSize","Feedback Cluster size all chambers;size [number of pads in cluster]",100,0,100);
37 pCmFeeH2=new TH2F("FeeClusMap", "Feedback Cluster map;x [cm];y [cm]",1000,-r->P()->PcSizeX()/2,r->P()->PcSizeX()/2,
38 1000,-r->P()->PcSizeY()/2,r->P()->PcSizeY()/2);
41 for(Int_t iEvtN=0;iEvtN<a->GetEventsPerRun();iEvtN++){//events loop
43 for(Int_t iChamN=1;iChamN<=7;iChamN++){//chambers loop
45 Rich()->GetLoader()->TreeR()->GetEntry(0);
46 for(Int_t iClusN=0;iClusN<r->Clusters(iChamN)->GetEntries();iClusN++){//clusters loop
47 AliRICHcluster *pClus=(AliRICHcluster*)r->Clusters(iChamN)->At(iClusN);
48 countContrib[i-1][0] += pClus->Nmips();countContrib[i-1][1] += pClus->Ncerenkovs();countContrib[i-1][2] += pClus->Nfeedbacks();
49 pCqH1->Fill(pClus->Q()); pCsH1->Fill(pClus->Size()); pCmH2->Fill(pClus->X(),pClus->Y()); //common
50 if(pClus->IsPureMip()) {pCqMipH1->Fill(pClus->Q());pCsMipH1->Fill(pClus->Size());pCmMipH2->Fill(pClus->X(),pClus->Y());}//Pure Mips
51 if(pClus->IsPureCerenkov()){pCqCerH1->Fill(pClus->Q());pCsCerH1->Fill(pClus->Size());pCmCerH2->Fill(pClus->X(),pClus->Y());}//Pure Photons
52 if(pClus->IsPureFeedback()){pCqFeeH1->Fill(pClus->Q());pCsFeeH1->Fill(pClus->Size());pCmFeeH2->Fill(pClus->X(),pClus->Y());}//Pure Feedbacks
56 Rich()->GetLoader()->TreeD()->GetEntry(0);
57 for(Int_t iDigN=0;iDigN<r->Digits(iChamN)->GetEntries();iDigN++){//digits loop
58 AliRICHdigit *pDig=(AliRICHdigit*)r->Digits(iChamN)->At(iDigN);
59 AliRICHhit *pHit=hit(pDig->Tid(0));
60 cout<<"chamber "<<iChamN<<" digit "<<iDigN<<endl;
61 TVector2 hitV2=Rich()->C(iChamN)->Glob2Loc(pHit->OutX3()); TVector2 digV2=Rich()->P()->Pad2Loc(pDig->X(),pDig->Y());
62 pHxD->Fill(hitV2.X()-digV2.X()); pHyD->Fill(hitV2.Y()-digV2.Y());
66 Info("ControlPlots","Event %i processed.",iEvtN);
69 if(isDig) Rich()->GetLoader()->UnloadDigits();
70 if(isClus) Rich()->GetLoader()->UnloadRecPoints();
72 pHxD->Draw(); pHyD->SetLineColor(kRed);pHyD->Draw("same");
74 pFile->Write(); delete pFile;
75 for(Int_t i=0;i<7;i++) cout<<" chamber "<<i+1<<" n. mips "<<countContrib[i][0]<<" n. ckovs "<<countContrib[i][1]<<" n. fdbks "<<countContrib[i][2]<<endl;
76 }//void ControlPlots()
77 //__________________________________________________________________________________________________
80 TStopwatch sw;TDatime time;
81 H_SD(); SD_D(); AliRICHClusterFinder *z=new AliRICHClusterFinder(r); z->Exec();//delete z;
82 cout<<"\nInfo in <MainTrank>: Start time: ";time.Print();
83 cout<<"Info in <MainTrank>: Stop time: ";time.Set(); time.Print();
84 cout<<"Info in <MainTrank>: Time used: ";sw.Print();
86 //__________________________________________________________________________________________________
89 Rich()->GetLoader()->LoadHits();
92 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
93 Rich()->GetLoader()->TreeH()->GetEntry(iPrimN);
94 Rich()->Hits()->Print();
95 iTotalHits+=r->Hits()->GetEntries();
97 Info("sh","totally %i hits",iTotalHits);
98 Rich()->GetLoader()->UnloadHits();
100 //__________________________________________________________________________________________________
101 AliRICHhit* hit(Int_t tid)
102 {//print hits for given tid
103 Rich()->GetLoader()->LoadHits();
104 for(Int_t iPrimN=0;iPrimN<Rich()->GetLoader()->TreeH()->GetEntries();iPrimN++){//prims loop
105 Rich()->GetLoader()->TreeH()->GetEntry(iPrimN);
106 for(Int_t iHitN=0;iHitN<Rich()->Hits()->GetEntries();iHitN++){
107 AliRICHhit *pHit=(AliRICHhit*)Rich()->Hits()->At(iHitN);
108 if(tid==pHit->Track()) {Rich()->GetLoader()->UnloadHits();return pHit;}
111 Rich()->GetLoader()->UnloadHits();
113 //__________________________________________________________________________________________________
116 if(rl->LoadSDigits()) return;
117 rl->TreeS()->GetEntry(0);
118 r->SDigits()->Print();
119 Info("ss","totally %i sdigits",r->SDigits()->GetEntries());
122 //__________________________________________________________________________________________________
125 if(rl->LoadDigits()) return;
126 rl->TreeD()->GetEntry(0);
127 Int_t iTotalDigits=0;
128 for(int i=1;i<=7;i++){
129 r->Digits(i)->Print();
130 iTotalDigits+=r->Digits(i)->GetEntries();
132 Info("sd","totally %i digits",iTotalDigits);
135 //__________________________________________________________________________________________________
138 if(rl->LoadRecPoints()) return;
140 rl->TreeR()->GetEntry(0);
141 for(int i=1;i<=7;i++) r->Clusters(i)->Print();
142 rl->UnloadRecPoints();
144 //__________________________________________________________________________________________________
147 Rich()->GetLoader()->GetRunLoader()->LoadHeader(); Rich()->GetLoader()->GetRunLoader()->LoadKinematics();
149 if(tid<0||tid>=Rich()->GetLoader()->GetRunLoader()->Stack()->GetNtrack())
150 cout<<"Valid tid number is 0-"<<Rich()->GetLoader()->GetRunLoader()->Stack()->GetNtrack()-1<<" for this event.\n";
152 PrintParticleInfo(tid);
154 Rich()->GetLoader()->GetRunLoader()->UnloadKinematics(); Rich()->GetLoader()->GetRunLoader()->UnloadHeader();
156 //__________________________________________________________________________________________________
157 void PrintParticleInfo(int tid)
159 TParticle *p=al->Stack()->Particle(tid);
160 cout<<p->GetName()<<"("<<tid<<")";
161 if(p->GetMother(0)!=-1){cout<<" from "; PrintParticleInfo(p->GetMother(0));}
164 //__________________________________________________________________________________________________
165 Int_t prim(Int_t tid)
167 Rich()->GetLoader()->GetRunLoader()->LoadHeader(); Rich()->GetLoader()->GetRunLoader()->LoadKinematics();
169 if(tid<0||tid>=Rich()->GetLoader()->GetRunLoader()->Stack()->GetNtrack())
170 cout<<"Valid tid number is 0-"<<Rich()->GetLoader()->GetRunLoader()->Stack()->GetNtrack()-1<<" for this event.\n";
173 TParticle *p=Rich()->GetLoader()->GetRunLoader()->GetAliRun()->Stack()->Particle(tid);
174 if(p->GetMother(0)==-1) break;
178 Rich()->GetLoader()->GetRunLoader()->UnloadKinematics(); Rich()->GetLoader()->GetRunLoader()->UnloadHeader();
181 //__________________________________________________________________________________________________
183 Double_t r2d = TMath::RadToDeg();
184 Double_t d2r = TMath::DegToRad();
186 void DisplFast(){ AliRICHDisplFast *d = new AliRICHDisplFast(); d->Exec();}
191 AliRICHRecon *detect = new AliRICHRecon("RICH patrec algorithm","Reconstruction");
194 for (int nev=0; nev< a->GetEventsPerRun(); nev++) { // Event Loop
196 cout <<endl<< "Processing event:" <<nev<<endl;
197 detect->StartProcessEvent();
201 //__________________________________________________________________________________________________
204 TStopwatch sw;TDatime time;
206 AliRICHClusterFinder *z=new AliRICHClusterFinder(r); z->Exec();
209 cout << "Info in Digits->Clusters: Start time: ";time.Print();
210 cout << "Info in Digits->Clusters: Stop time: ";time.Set(); time.Print();
211 cout << "Info in Digits->Clusters: Time used: ";sw.Print();
213 //__________________________________________________________________________________________________
217 Info("SD_D","Start.");
219 Rich()->Param()->GenSigmaThMap();
222 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
223 al->GetEvent(iEventN); cout<<"Event "<<iEventN<<endl;
224 rl->MakeTree("D"); Rich()->MakeBranch("D"); //create TreeD with RICH branches
225 Rich()->ResetSDigits(); Rich()->ResetDigits(); //reset lists of sdigits and digits
226 rl->TreeS()->GetEntry(0); //get sdigits to memory container
227 Rich()->SDigits()->Sort();
229 Int_t combiPid=0,chamber=0,x=0,y=0,tid[3],id=0; Double_t q=0;
230 Int_t iNdigitsPerPad;//how many sdigits for a given pad
231 const int kBad=-101;//??? to be removed in code
232 for(Int_t i=0;i<Rich()->SDigits()->GetEntries();i++){//sdigits loop (sorted)
233 AliRICHdigit *pSdig=(AliRICHdigit*)Rich()->SDigits()->At(i);
234 if(pSdig->Id()==id){//still the same pad
235 iNdigitsPerPad++; q+=pSdig->Q(); combiPid+=pSdig->CombiPid();
236 if(iNdigitsPerPad<=3)
237 tid[iNdigitsPerPad-1]=pSdig->Tid(0);
239 Warning("SDigits2Digits","More then 3 sdigits for the given pad");
240 }else{//new pad, add the pevious one
241 if(id!=kBad&&Rich()->Param()->IsOverTh(chamber,x,y,q)) {
242 Rich()->AddDigit(chamber,x,y,q,combiPid,tid);
244 combiPid=pSdig->CombiPid();chamber=pSdig->C();id=pSdig->Id();
245 x=pSdig->X();y=pSdig->Y();
247 tid[0]=pSdig->Tid(0);
248 iNdigitsPerPad=1;tid[1]=tid[2]=kBad;
250 }//sdigits loop (sorted)
252 if(Rich()->SDigits()->GetEntries() && Rich()->Param()->IsOverTh(chamber,x,y,q))
253 Rich()->AddDigit(chamber,x,y,q,combiPid,tid);//add the last digit
256 rl->WriteDigits("OVERWRITE");
258 rl->UnloadSDigits(); rl->UnloadDigits();
259 Rich()->ResetSDigits(); Rich()->ResetDigits();//reset lists of sdigits and digits
260 Info("SD_D","Stop.");
262 //__________________________________________________________________________________________________
266 al->LoadHeader(); al->LoadKinematics();
269 Bool_t isSdigits=!rl->LoadSDigits();
270 Bool_t isClusters=!rl->LoadRecPoints();
271 Bool_t isDigits=!rl->LoadDigits();//loaders
273 cout<<endl; cout<<endl;
274 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
275 Int_t iNparticles=a->GetEvent(iEventN);
276 Int_t iNprims=rl->TreeH()->GetEntries();
279 for(Int_t iPrimN=0;iPrimN<iNprims;iPrimN++){//prims loop
280 rl->TreeH()->GetEntry(iPrimN);
281 iTotalHits+=r->Hits()->GetEntries();
282 TParticle *pPrim=al->Stack()->Particle(iPrimN);
283 if(iPrimN<10) Info("Show","Evt %4i prim %4i has %4i hits from %s (,%7.2f,%7.2f)",
284 iEventN,iPrimN, r->Hits()->GetEntries(), pPrim->GetName(), pPrim->Theta()*r2d,pPrim->Phi()*r2d);
286 Info("Show-HITS","Evt %i total: %i particles %i primaries %i hits",
287 iEventN, iNparticles, iNprims, iTotalHits);
289 rl->TreeS()->GetEntry(0);
290 Info("Show-SDIGITS","Evt %i contains %5i sdigits",iEventN,r->SDigits()->GetEntries());
293 rl->TreeD()->GetEntry(0);
294 for(int i=1;i<=7;i++)
295 Info("Show-DIGITS","Evt %i chamber %i contains %5i digits",
296 iEventN, i, r->Digits(i)->GetEntries());
298 Info("Show-DIGITS","There is no digits for this event");
300 rl->TreeR()->GetEntry(0);
301 for(int i=1;i<=7;i++)
302 Info("Show-CLUSTERS","Evt %i chamber %i contains %5i clusters",
303 iEventN, i, r->Clusters(i)->GetEntries());
308 if(isSdigits) rl->UnloadSDigits();
309 if(isDigits) rl->UnloadDigits();
310 if(isClusters) rl->UnloadRecPoints();
312 al->UnloadKinematics();
315 //__________________________________________________________________________________________________
320 AliLoader *rl,*tl,*il;
326 Info("ReadAlice","Tring to read ALICE from SIMULATED FILE.");
327 AliLoader::SetDebug(0);
328 if(gAlice) delete gAlice;
329 if(!(al=AliRunLoader::Open("galice.root","AlicE","update"))){
330 gSystem->Exec("rm -rf *.root *.dat");
331 Error("ReadAlice","galice.root broken, removing all this garbage then init new one");
332 new AliRun("gAlice","Alice experiment system");
333 gAlice->SetDebug(-1);
334 gAlice->Init("Config.C");
335 r=(AliRICH*)gAlice->GetDetector("RICH");
339 if(!gAlice) Fatal("ReadAlice","No gAlice in file");
343 if(!(r=(AliRICH*)gAlice->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file");
345 if(!(rl=al->GetLoader("RICHLoader"))) Warning("RICH/menu.C::ReadAlice","No RICH loader in file");
347 Info("ReadAlice","Run contains %i event(s)",gAlice->GetEventsPerRun());
350 //__________________________________________________________________________________________________
353 TCanvas *pC=new TCanvas("c","Amplification test",900,800);
356 TF1 *pF1=new TF1("f1",Gain,-70,70,1); pF1->SetParameters(1,1);pF1->SetParNames("Sector");
357 TF1 *pF2=new TF1("f2",Gain,-70,70,1); pF2->SetParameters(2,1);pF2->SetParNames("Sector");
358 pF1->Draw();pF2->Draw("same");
362 const Int_t nPoints=8;
363 THStack *pStack=new THStack("stack","photons");
364 TLegend *pLeg=new TLegend(0.6,0.2,0.9,0.5,"legend");
367 Double_t starty=AliRICHParam::DeadZone()/2;
368 Double_t deltay=AliRICHParam::SectorSizeY()/nPoints;
370 for(int i=0;i<nPoints;i++){
371 apH[i]=new TH1F(Form("h%i",i),"Qdc for Photon;QDC;Counts",500,0,500); apH[i]->SetLineColor(i);
373 pLeg->AddEntry(apH[i],Form("@(0,%5.2f->%5.2f)",starty+i*deltay,starty+i*deltay-AliRICHParam::SectorSizeY()/2));
378 // AliRICHParam::ResetWireSag();
379 for(Int_t i=0;i<10000;i++){//events loop
380 for(int j=0;j<nPoints;j++){
381 x2.Set(0,starty-j*deltay);
382 apH[j]->Fill(AliRICHParam::TotQdc(x2,0));
385 pStack->Draw("nostack");
388 //__________________________________________________________________________________________________
391 Info("TestSD","Creating test sdigits.");
392 TVector3 hit(426.55,246.28,17.21);
393 TVector2 x2=r->C(4)->Glob2Loc(hit);
394 Int_t iTotQdc=r->Param()->TotQdc(x2,624e-9);
395 Int_t iPadXmin,iPadXmax,iPadYmin,iPadYmax;
397 Int_t sec=r->Param()->Loc2Pad(x2,padx,pady);
398 r->Param()->Loc2Area(x2,iPadXmin,iPadYmin,iPadXmax,iPadYmax);
399 Info("TestSD","Initial hit (%7.2f,%7.2f,%7.2f)->(%7.2f,%7.2f)->(%4i,%4i,%4i) gives %i charge",
400 hit.X(),hit.Y(),hit.Z(),x2.X(),x2.Y(),sec,padx,pady,iTotQdc);
402 cout<<"left-down=("<<iPadXmin<<","<<iPadYmin<<") right-up=("<<iPadXmax<<','<<iPadYmax<<')'<<endl;
403 for(Int_t iPadY=iPadYmin;iPadY<=iPadYmax;iPadY++)
404 for(Int_t iPadX=iPadXmin;iPadX<=iPadXmax;iPadX++)
405 cout<<r->Param()->FracQdc(x2,iPadX,iPadY)<<endl;
406 Info("TestSD","Stop.");
407 }//void TestSdigits()
408 //__________________________________________________________________________________________________
411 Info("TestC","Creating test clusters.");
412 rl->MakeTree("R");r->MakeBranch("R");
415 c.AddDigit(new AliRICHdigit(1,20,21,200,1,2,3));
416 c.AddDigit(new AliRICHdigit(1,22,21,250,1,2,3));
422 rl->WriteRecPoints("OVERWRITE");
423 rl->UnloadRecPoints();
426 Info("TestC","Stop.");
428 //__________________________________________________________________________________________________
431 AliRICHParam *p=r->Param();
434 Double_t eps=0.0000001;
435 Double_t x1=-0.5*p->PcSizeX()+eps; Double_t x2=-0.5*p->SectorSizeX()-p->DeadZone()-eps; Double_t x3=-0.5*p->SectorSizeX()+eps;
436 Double_t x6= 0.5*p->PcSizeX()-eps; Double_t x5= 0.5*p->SectorSizeX()+p->DeadZone()+eps; Double_t x4= 0.5*p->SectorSizeX()-eps;
437 Double_t y1=-0.5*p->PcSizeY()+eps; Double_t y2=-0.5*p->DeadZone()-eps;
438 Double_t y4= 0.5*p->PcSizeY()-eps; Double_t y3= 0.5*p->DeadZone()+eps;
441 AliRICHParam::Print();
443 sec=p->Loc2Pad(TVector2(x= 0,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 73- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
444 sec=p->Loc2Pad(TVector2(x= 0,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 73- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
445 sec=p->Loc2Pad(TVector2(x= 0,y= 0),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" dead ","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
446 sec=p->Loc2Pad(TVector2(x= 0,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 73- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
447 sec=p->Loc2Pad(TVector2(x= 0,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 73-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)\n",x,y,sec,padx,pady,v2.X(),v2.Y());
449 sec=p->Loc2Pad(TVector2(x=x1,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 1-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
450 sec=p->Loc2Pad(TVector2(x=x2,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 48-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
451 sec=p->Loc2Pad(TVector2(x=x3,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 49-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
452 sec=p->Loc2Pad(TVector2(x=x4,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 96-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
453 sec=p->Loc2Pad(TVector2(x=x5,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 97-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
454 sec=p->Loc2Pad(TVector2(x=x6,y=y4),padx,pady); v2=p->Pad2Loc(padx,pady); Info("144-160","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)\n",x,y,sec,padx,pady,v2.X(),v2.Y());
456 sec=p->Loc2Pad(TVector2(x=x1,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 1- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
457 sec=p->Loc2Pad(TVector2(x=x2,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 48- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
458 sec=p->Loc2Pad(TVector2(x=x3,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 49- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
459 sec=p->Loc2Pad(TVector2(x=x4,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 96- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
460 sec=p->Loc2Pad(TVector2(x=x5,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 97- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
461 sec=p->Loc2Pad(TVector2(x=x6,y=y3),padx,pady); v2=p->Pad2Loc(padx,pady); Info("144- 81","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)\n",x,y,sec,padx,pady,v2.X(),v2.Y());
463 sec=p->Loc2Pad(TVector2(x=x1,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 1- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
464 sec=p->Loc2Pad(TVector2(x=x2,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 48- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
465 sec=p->Loc2Pad(TVector2(x=x3,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 49- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
466 sec=p->Loc2Pad(TVector2(x=x4,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 96- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
467 sec=p->Loc2Pad(TVector2(x=x5,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 97- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
468 sec=p->Loc2Pad(TVector2(x=x6,y=y2),padx,pady); v2=p->Pad2Loc(padx,pady); Info("144- 80","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)\n",x,y,sec,padx,pady,v2.X(),v2.Y());
470 sec=p->Loc2Pad(TVector2(x=x1,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 1- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
471 sec=p->Loc2Pad(TVector2(x=x2,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 48- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
472 sec=p->Loc2Pad(TVector2(x=x3,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 49- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
473 sec=p->Loc2Pad(TVector2(x=x4,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 96- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
474 sec=p->Loc2Pad(TVector2(x=x5,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info(" 97- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)",x,y,sec,padx,pady,v2.X(),v2.Y());
475 sec=p->Loc2Pad(TVector2(x=x6,y=y1),padx,pady); v2=p->Pad2Loc(padx,pady); Info("144- 1","(%7.2f,%7.2f)->(%5i,%5i,%5i) center=(%7.2f,%7.2f)\n",x,y,sec,padx,pady,v2.X(),v2.Y());
478 //__________________________________________________________________________________________________
481 TControlBar *pMenu = new TControlBar("vertical","RICH test");
482 pMenu->AddButton("Test segmentation", "TestSeg()", "Test AliRICHParam segmentation methods");
483 pMenu->AddButton("Test response", "TestResponse()", "Test AliRICHParam response methods");
484 pMenu->AddButton("Test sdigits", "TestSD()", "Create test set of sdigits");
485 pMenu->AddButton("Test clusters", "TestC()", "Create test set of clusters");
486 pMenu->AddButton("Test digits OLD", "TestDigitsOLD()", "Create test set of OLD digits");
489 //__________________________________________________________________________________________________
492 TControlBar *pMenu = new TControlBar("vertical","RICH main");
494 if(ReadAlice()){//it's from file, reconstruct
495 pMenu->AddButton("hits->sdigits->digits->clusters","MainTrank()","Convert");
497 pMenu->AddButton("sdigits->digits" ,"SD_D()" ,"AliRICHDigitizer");
498 pMenu->AddButton("digits->clusters" ,"D_C()" ,"AliRICHClusterFinder");
499 pMenu->AddButton("clusters->recos" ,"C_R()" ,"AliRICHRecon");
501 pMenu->AddButton("Show", "Show()","Shows the structure of events in files");
502 pMenu->AddButton("Display Fast", "DisplFast()", "Display Fast");
503 pMenu->AddButton("Control Plots", "ControlPlots()", "Display some control histograms");
504 pMenu->AddButton("OLD specials->sdigits", "OLD_S_SD()", "Perform first phase converstion");
506 }else{//it's aliroot, simulate
507 pMenu->AddButton("Run", "a->Run(1)", "Process!");
508 pMenu->AddButton("Geo GUI", "new G3GeometryGUI;","Create instance of G4GeometryGUI");
510 pMenu->AddButton("Test submenu", "TestMenu()", "Shows test submenu");
511 pMenu->AddButton("Browser", "new TBrowser;", "Start ROOT TBrowser");
512 pMenu->AddButton("Debug ON", "DebugON();", "Switch debug on-off");
513 pMenu->AddButton("Debug OFF", "DebugOFF();", "Switch debug on-off");
514 pMenu->AddButton("Quit", ".q", "Close session");
516 a=gAlice;//for manual manipulation convinience
518 //__________________________________________________________________________________________________
519 void DebugOFF(){ Info("DebugOFF",""); a->SetDebug(0); r->SetDebug(0); AliLoader::SetDebug(0);}
520 void DebugON() { Info("DebugON",""); a->SetDebug(1); r->SetDebug(1); AliLoader::SetDebug(1);}