5 TH1F *pCqH1=new TH1F("clusq","Clusters Charge;q [QDC]",300,0,4000);
6 al->LoadHeader(); al->LoadKinematics();
8 Bool_t isHits=!rl->LoadHits();
9 Bool_t isSDigits=!rl->LoadSDigits();
10 Bool_t isClusters=!rl->LoadRecPoints();
11 Bool_t isDigits=!rl->LoadDigits();
13 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
14 al->GetEvent(iEventN);
16 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
17 rl->TreeH()->GetEntry(iPrimN);
18 Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
19 iTotalHits+=r->Hits()->GetEntries();
20 iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
21 iTotalSpecials+=r->Specials()->GetEntries();
25 rl->TreeS()->GetEntry(0);
28 rl->TreeD()->GetEntry(0);
29 for(int i=1;i<=7;i++);
32 rl->TreeR()->GetEntry(0);
33 Int_t iTotalClusters=0;
34 for(int i=1;i<=7;i++) iTotalClusters+=r->Clusters(i)->GetEntries();
35 for(Int_t iClusterN=0;iClusterN<r->Clusters(iChamber)->GetEntries();iClusterN++){
36 pCqH1->Fill(((AliRICHcluster*)r->Clusters(iChamber)->At(i))->Q());
40 if(isHits) rl->UnloadHits();
41 if(isSDigits) rl->UnloadSDigits();
42 if(isDigits) rl->UnloadDigits();
43 if(isClusters) rl->UnloadRecPoints();
44 al->UnloadHeader(); al->UnloadKinematics();
46 }//void ControlPlots()
47 //__________________________________________________________________________________________________
50 TStopwatch sw;TDatime time;
51 OLD_S_SD(); SD_D(); D_C();
52 cout<<"\nInfo in <MainTrank>: Start time: ";time.Print();
53 cout<<"Info in <MainTrank>: Stop time: ";time.Set(); time.Print();
54 cout<<"Info in <MainTrank>: Time used: ";sw.Print();
56 //__________________________________________________________________________________________________
59 if(rl->LoadHits()) return;
62 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
63 rl->TreeH()->GetEntry(iPrimN);
65 iTotalHits+=r->Hits()->GetEntries();
67 Info("sh","totally %i hits",iTotalHits);
70 //__________________________________________________________________________________________________
73 if(rl->LoadHits()) return;
75 Int_t iTotalSpecials=0;
76 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
77 rl->TreeH()->GetEntry(iPrimN);
78 r->Specials()->Print();
79 iTotalSpecials+=r->Specials()->GetEntries();
81 Info("ssp","totally %i specials",iTotalSpecials);
84 //__________________________________________________________________________________________________
87 if(rl->LoadSDigits()) return;
88 rl->TreeS()->GetEntry(0);
89 r->SDigits()->Print();
90 Info("ss","totally %i sdigits",r->SDigits()->GetEntries());
93 //__________________________________________________________________________________________________
96 if(rl->LoadDigits()) return;
97 rl->TreeD()->GetEntry(0);
99 for(int i=1;i<=7;i++){
100 r->Digits(i)->Print();
101 iTotalDigits+=r->Digits(i)->GetEntries();
103 Info("sd","totally %i digits",iTotalDigits);
109 if(rl->LoadRecPoints()) return;
111 rl->TreeR()->GetEntry(0);
112 for(int i=1;i<=7;i++) r->Clusters(i)->Print();
113 rl->UnloadRecPoints();
116 Double_t r2d = TMath::RadToDeg();
117 Double_t d2r = TMath::DegToRad();
121 AliRICHDisplFast *d = new AliRICHDisplFast();
128 AliRICHRecon *detect = new AliRICHRecon("RICH patrec algorithm","Reconstruction");
131 for (int nev=0; nev< a->GetEventsPerRun(); nev++) { // Event Loop
133 cout <<endl<< "Processing event:" <<nev<<endl;
134 detect->StartProcessEvent();
144 AliRICHClusterFinder *z=new AliRICHClusterFinder(r);
147 //__________________________________________________________________________________________________
150 Info("OLD_S_SD","Start.");
154 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
155 al->GetEvent(iEventN);
157 rl->MakeTree("S"); r->MakeBranch("S");
158 r->ResetSDigits(); r->ResetSpecialsOld();
160 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
161 rl->TreeH()->GetEntry(iPrimN);
162 for(Int_t i=0;i<r->Specials()->GetEntries();i++){//specials loop
163 Int_t padx= ((AliRICHSDigit*)r->Specials()->At(i))->PadX()+r->Param()->NpadsX()/2;
164 Int_t pady= ((AliRICHSDigit*)r->Specials()->At(i))->PadY()+r->Param()->NpadsY()/2;
165 Double_t q= ((AliRICHSDigit*)r->Specials()->At(i))->QPad();
166 Int_t hitN= ((AliRICHSDigit*)r->Specials()->At(i))->HitNumber()-1;//!!! important -1
167 Int_t chamber=((AliRICHhit*)r->Hits()->At(hitN))->C();
168 Int_t track=((AliRICHhit*)r->Hits()->At(hitN))->GetTrack();
169 if(padx<1 || padx>r->Param()->NpadsX() ||pady<1 || pady>r->Param()->NpadsY())
170 Error("OLD_S_SD","pad is out of valid range padx= %i pady=%i event %i",padx,pady,iEventN);
172 r->AddSDigit(chamber,padx,pady,q,track);
176 rl->WriteSDigits("OVERWRITE");
178 rl->UnloadHits(); rl->UnloadSDigits();
179 Info("OLD_S_SD","Stop.");
181 //__________________________________________________________________________________________________
184 Info("H_SD","Start.");
186 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
187 al->GetEvent(iEventN);
189 if(!rl->TreeH()) rl->LoadHits();//from
190 if(!rl->TreeS()) rl->MakeTree("S"); r->MakeBranch("S");//to
192 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
193 rl->TreeH()->GetEntry(iPrimN);
194 for(Int_t iHitN=0;iHitN<3;iHitN++){//hits loop ???
195 AliRICHhit *pHit=r->Hits()->At(iHitN);
196 TVector3 globX3(pHit->X(),pHit->Y(),pHit->Z());
197 TVector3 locX3=r->C(pHit->C())->Glob2Loc(globX3);
200 Int_t iTotQdc=r->Param()->Loc2TotQdc(locX3,pHit->Eloss(),pHit->Pid(),sector);
202 Int_t iPadXmin,iPadXmax,iPadYmin,iPadYmax;
203 r->Param()->Loc2Area(locX3,iPadXmin,iPadYmin,iPadXmax,iPadYmax);
204 cout<<"left-down=("<<iPadXmin<<","<<iPadYmin<<") right-up=("<<iPadXmax<<','<<iPadYmax<<')'<<endl;
205 for(Int_t iPadY=iPadYmin;iPadY<=iPadYmax;iPadY++)
206 for(Int_t iPadX=iPadXmin;iPadX<=iPadXmax;iPadX++){
207 Double_t padQdc=iTotQdc*r->Param()->Loc2PadFrac(locX3,iPadX,iPadY);
208 if(padQdc>0.1)r->AddSDigit(pHit->C(),iPadX,iPadY,padQdc,pHit->GetTrack());
213 rl->WriteSDigits("OVERWRITE");
218 Info("H_SD","Stop.");
220 //__________________________________________________________________________________________________
223 Info("SD_D","Start.");
227 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
228 al->GetEvent(iEventN);
229 cout<<"Event "<<iEventN<<endl;
230 rl->MakeTree("D");r->MakeBranch("D"); //create TreeD with RICH branches
231 r->ResetSDigits();r->ResetDigits();//reset lists of sdigits and digits
232 rl->TreeS()->GetEntry(0);
233 r->SDigits()->Sort();
236 Int_t chamber,x,y,tr[3],id;
238 chamber=x=y=tr[0]=tr[1]=tr[2]=id=kBad;
239 Int_t iNdigitsPerPad=kBad;//how many sdigits for a given pad
241 for(Int_t i=0;i<r->SDigits()->GetEntries();i++){//sdigits loop (sorted)
242 AliRICHdigit *pSdig=(AliRICHdigit*)r->SDigits()->At(i);
243 if(pSdig->Id()==id){//still the same pad
246 if(iNdigitsPerPad<=3)
247 tr[iNdigitsPerPad-1]=pSdig->T(0);
249 // Info("","More then 3 sdigits for the given pad");
250 }else{//new pad, add the pevious one
251 if(id!=kBad) r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//ch-xpad-ypad-qdc-tr1-2-3
252 chamber=pSdig->C();x=pSdig->X();y=pSdig->Y();q=pSdig->Q();tr[0]=pSdig->T(0);id=pSdig->Id();
253 iNdigitsPerPad=1;tr[1]=tr[2]=kBad;
255 }//sdigits loop (sorted)
257 if(r->SDigits()->GetEntries())r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//add the last digit
260 rl->WriteDigits("OVERWRITE");
262 rl->UnloadSDigits(); rl->UnloadDigits();
263 r->ResetSDigits();r->ResetDigits();//reset lists of sdigits and digits
264 Info("SD_D","Stop.");
266 //__________________________________________________________________________________________________
270 al->LoadHeader(); al->LoadKinematics();
273 Bool_t isSdigits=!rl->LoadSDigits();
274 Bool_t isClusters=!rl->LoadRecPoints();
275 Bool_t isDigits=!rl->LoadDigits();//loaders
277 cout<<endl; cout<<endl;
278 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
279 Int_t iNparticles=a->GetEvent(iEventN);
280 Int_t iNprims=rl->TreeH()->GetEntries();
282 Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
283 for(Int_t iPrimN=0;iPrimN<iNprims;iPrimN++){//prims loop
284 rl->TreeH()->GetEntry(iPrimN);
285 iTotalHits+=r->Hits()->GetEntries();
286 iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
287 iTotalSpecials+=r->Specials()->GetEntries();
288 TParticle *pPrim=al->Stack()->Particle(iPrimN);
289 Info("Show","Evt %4i prim %4i has %4i hits %5i cerenkovs and %5i specials from %s (,%7.2f,%7.2f)",
292 r->Hits()->GetEntries(),
293 r->Cerenkovs()->GetEntries(),
294 r->Specials()->GetEntries(),
296 pPrim->Theta()*r2d,pPrim->Phi()*r2d);
298 Info("Show-HITS","Evt %i total: %i particles %i primaries %i hits %i cerenkovs %i specials",
299 iEventN, iNparticles, iNprims, iTotalHits,iTotalCerenkovs,iTotalSpecials);
301 rl->TreeS()->GetEntry(0);
302 Info("Show-SDIGITS","Evt %i contains %5i sdigits",iEventN,r->SDigits()->GetEntries());
305 rl->TreeD()->GetEntry(0);
306 for(int i=1;i<=7;i++)
307 Info("Show-DIGITS","Evt %i chamber %i contains %5i digits",
308 iEventN, i, r->Digits(i)->GetEntries());
311 rl->TreeR()->GetEntry(0);
312 for(int i=1;i<=7;i++)
313 Info("Show-CLUSTERS","Evt %i chamber %i contains %5i clusters",
314 iEventN, i, r->Clusters(i)->GetEntries());
319 if(isSdigits) rl->UnloadSDigits();
320 if(isDigits) rl->UnloadDigits();
321 if(isClusters) rl->UnloadRecPoints();
323 al->UnloadKinematics();
326 //__________________________________________________________________________________________________
331 AliLoader *rl,*tl,*il;
337 Info("ReadAlice","Tring to read ALICE from SIMULATED FILE.");
338 AliLoader::SetDebug(0);
339 if(gAlice) delete gAlice;
340 if(!(al=AliRunLoader::Open("galice.root","AlicE","update"))){
341 gSystem->Exec("rm -rf *.root *.dat");
342 Error("ReadAlice","galice.root broken, removing all this garbage then init new one");
343 new AliRun("gAlice","Alice experiment system");
344 gAlice->SetDebug(-1);
345 gAlice->Init("ConfigRich.C");
346 r=(AliRICH*)gAlice->GetDetector("RICH");
350 if(!gAlice) Fatal("ReadAlice","No gAlice in file");
354 if(!(r=(AliRICH*)gAlice->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file");
356 if(!(rl=al->GetLoader("RICHLoader"))) Warning("RICH/menu.C::ReadAlice","No RICH loader in file");
358 Info("ReadAlice","Run contains %i event(s)",gAlice->GetEventsPerRun());
361 //__________________________________________________________________________________________________
362 void PrintGeo(Float_t rotDeg=0)
364 AliRICHParam *p=new AliRICHParam;
365 Double_t r=p->Offset();
366 Double_t kP=p->AngleXY();
367 Double_t kT=p->AngleYZ();
376 Double_t phi=90*deg+kRot+kP,theta=90*deg+kT;
377 Info(" menu for 1","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
378 r, theta*r2d, phi*r2d,
379 r*sin(theta)*cos(phi),
380 r*sin(theta)*sin(phi),
383 phi=90*deg+kRot+kP,theta=90*deg;
384 Info(" menu for 2","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
385 r, theta*r2d, phi*r2d,
386 r*sin(theta)*cos(phi),
387 r*sin(theta)*sin(phi),
390 phi=90*deg+kRot,theta=90*deg-kT;
391 Info(" menu for 3","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
392 r, theta*r2d, phi*r2d,
393 r*sin(theta)*cos(phi),
394 r*sin(theta)*sin(phi),
398 phi=90*deg+kRot,theta=90*deg;
399 Info(" menu for 4","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
400 r, theta*r2d, phi*r2d,
401 r*sin(theta)*cos(phi),
402 r*sin(theta)*sin(phi),
406 phi=90*deg+kRot,theta=90*deg+kT;
407 Info(" menu for 5","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
408 r, theta*r2d, phi*r2d,
409 r*sin(theta)*cos(phi),
410 r*sin(theta)*sin(phi),
414 phi=90*deg+kRot-kP,theta=90*deg;
415 Info(" menu for 6","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
416 r, theta*r2d, phi*r2d,
417 r*sin(theta)*cos(phi),
418 r*sin(theta)*sin(phi),
421 phi=90*deg+kRot-kP,theta=90*deg+kT;
422 Info(" menu for 7","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
423 r, theta*r2d, phi*r2d,
424 r*sin(theta)*cos(phi),
425 r*sin(theta)*sin(phi),
430 //__________________________________________________________________________________________________
433 TCanvas *pC=new TCanvas("c","Amplification test",900,800);
436 TF1 *pF1=new TF1("f1","9e-6*pow(x,4)+2e-7*pow(x,3)-0.0316*pow(x,2)-3e-4*x+25.367",-70,70);
441 const Int_t nPoints=8;
442 THStack *pStack=new THStack("stack","photons");
443 TLegend *pLeg=new TLegend(0.6,0.2,0.9,0.5,"legend");
446 Double_t starty=AliRICHParam::DeadZone()/2;
447 Double_t deltay=AliRICHParam::SectorSizeY()/nPoints;
449 for(int i=0;i<nPoints;i++){
450 apH[i]=new TH1F(Form("h%i",i),"Qdc for Photon;QDC;Counts",1000,0,1000); apH[i]->SetLineColor(i);
452 pLeg->AddEntry(apH[i],Form("@(0,%5.2f->%5.2f)",starty+i*deltay,starty+i*deltay-AliRICHParam::SectorSizeY()/2));
458 // AliRICHParam::ResetWireSag();
459 for(Int_t i=0;i<10000;i++){//events loop
460 for(int j=0;j<nPoints;j++){
461 x3.SetY(starty-j*deltay);
462 apH[j]->Fill(AliRICHParam::Loc2TotQdc(x3,400e-9,500000,sector));
465 pStack->Draw("nostack");
468 //__________________________________________________________________________________________________
471 Info("TestSD","Creating test sdigits.");
472 rl->MakeTree("S");r->MakeBranch("S");
474 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
475 al->GetEvent(iEventN);
477 if(!rl->TreeH()) rl->LoadHits();//from
478 if(!rl->TreeS()) rl->MakeTree("S"); r->MakeBranch("S");//to
480 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
481 rl->TreeH()->GetEntry(iPrimN);
482 for(Int_t iHitN=0;iHitN<3;iHitN++){//hits loop ???
483 AliRICHhit *pHit=r->Hits()->At(iHitN);
484 TVector3 globX3(pHit->X(),pHit->Y(),pHit->Z());
485 TVector3 locX3=r->C(pHit->C())->Glob2Loc(globX3);
488 Int_t iTotQdc=r->Param()->Loc2TotQdc(locX3,pHit->Eloss(),pHit->Pid(),sector);
490 Int_t iPadXmin,iPadXmax,iPadYmin,iPadYmax;
491 r->Param()->Loc2Area(locX3,iPadXmin,iPadYmin,iPadXmax,iPadYmax);
492 cout<<"left-down=("<<iPadXmin<<","<<iPadYmin<<") right-up=("<<iPadXmax<<','<<iPadYmax<<')'<<endl;
493 for(Int_t iPadY=iPadYmin;iPadY<=iPadYmax;iPadY++)
494 for(Int_t iPadX=iPadXmin;iPadX<=iPadXmax;iPadX++){
495 Float_t iPadQdc=iTotQdc*r->Param()->Loc2PadFrac(locX3,iPadX,iPadY);
496 Int_t padx,pady; r->Param()->Loc2Pad(locX3.X(),locX3.Y(),padx,pady);
497 cout<<"hit="<<iHitN<<" ("<<locX3.X()<<','<<locX3.Y()<<")("<<padx<<','<<pady<<") cur pad("<<iPadX<<","<<iPadY<<") qtot="<<iTotQdc<<" qfrac="<<r->Param()->Loc2PadFrac(locX3,iPadX,iPadY)<<endl;
499 // r->AddSDigit(pHit->C(),padx,pady,r->Param()->Local2PadQdc(localX3,padx,pady),pHit->GetTrack());
503 rl->WriteSDigits("OVERWRITE");
510 rl->WriteSDigits("OVERWRITE");
512 cout<<endl;r->Sdigits()->Print();
514 Info("TestSdigits","Stop.");
515 }//void TestSdigits()
516 //__________________________________________________________________________________________________
519 Info("TestC","Creating test clusters.");
520 rl->MakeTree("R");r->MakeBranch("R");
523 c.AddDigit(new AliRICHdigit(1,20,21,200,1,2,3));
524 c.AddDigit(new AliRICHdigit(1,22,21,250,1,2,3));
530 rl->WriteRecPoints("OVERWRITE");
531 rl->UnloadRecPoints();
534 Info("TestC","Stop.");
536 //__________________________________________________________________________________________________
539 AliRICHParam *p=r->Param();
542 Double_t dz=p->DeadZone();
543 Double_t sx=p->SectorSizeX(); Double_t sy=p->SectorSizeY(); Double_t px=p->PcSizeX(); Double_t py=p->PcSizeY();
545 Info(" 1- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , -py/2 ,padx,pady),padx,pady);
546 Info(" 48- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , -py/2 ,padx,pady),padx,pady);
547 Info(" 49- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , -py/2 ,padx,pady),padx,pady);
548 Info(" 96- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , -py/2 ,padx,pady),padx,pady);
549 Info(" 97- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , -py/2 ,padx,pady),padx,pady);
550 Info("144- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , -py/2 ,padx,pady),padx,pady);
552 Info(" 1- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , -dz/2 ,padx,pady),padx,pady);
553 Info(" 48- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , -dz/2 ,padx,pady),padx,pady);
554 Info(" 49- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , -dz/2 ,padx,pady),padx,pady);
555 Info(" 96- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , -dz/2 ,padx,pady),padx,pady);
556 Info(" 97- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , -dz/2 ,padx,pady),padx,pady);
557 Info("144- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , -dz/2 ,padx,pady),padx,pady);
559 Info(" 1- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , dz/2 ,padx,pady),padx,pady);
560 Info(" 48- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , dz/2 ,padx,pady),padx,pady);
561 Info(" 49- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , dz/2 ,padx,pady),padx,pady);
562 Info(" 96- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , dz/2 ,padx,pady),padx,pady);
563 Info(" 97- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , dz/2 ,padx,pady),padx,pady);
564 Info("144- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , dz/2 ,padx,pady),padx,pady);
566 Info(" 1-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , py/2 ,padx,pady),padx,pady);
567 Info(" 48-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , py/2 ,padx,pady),padx,pady);
568 Info(" 49-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , py/2 ,padx,pady),padx,pady);
569 Info(" 96-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , py/2 ,padx,pady),padx,pady);
570 Info(" 97-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , py/2 ,padx,pady),padx,pady);
571 Info("144-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , py/2 ,padx,pady),padx,pady);
573 Info(" 73-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , py/2 ,padx,pady),padx,pady);
574 Info(" 73- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , dz/2 ,padx,pady),padx,pady);
575 Info("0-0dead","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , 0 ,padx,pady),padx,pady);
576 Info(" 73- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , -dz/2 ,padx,pady),padx,pady);
577 Info(" 73- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , -py/2 ,padx,pady),padx,pady);
579 p->Pad2Loc(padx= 1,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
580 p->Pad2Loc(padx= 48,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
581 p->Pad2Loc(padx= 49,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
582 p->Pad2Loc(padx= 96,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
583 p->Pad2Loc(padx= 97,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
584 p->Pad2Loc(padx=144,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
586 p->Pad2Loc(padx= 1,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
587 p->Pad2Loc(padx= 48,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
588 p->Pad2Loc(padx= 49,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
589 p->Pad2Loc(padx= 96,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
590 p->Pad2Loc(padx= 97,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
591 p->Pad2Loc(padx=144,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
593 p->Pad2Loc(padx= 1,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
594 p->Pad2Loc(padx= 48,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
595 p->Pad2Loc(padx= 49,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
596 p->Pad2Loc(padx= 96,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
597 p->Pad2Loc(padx= 97,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
598 p->Pad2Loc(padx=144,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
600 p->Pad2Loc(padx= 1,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
601 p->Pad2Loc(padx= 48,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
602 p->Pad2Loc(padx= 49,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
603 p->Pad2Loc(padx= 96,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
604 p->Pad2Loc(padx= 97,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
605 p->Pad2Loc(padx=144,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
607 //__________________________________________________________________________________________________
610 TControlBar *pMenu = new TControlBar("vertical","RICH test");
611 pMenu->AddButton("Test segmentation", "TestSeg()", "Test AliRICHParam segmentation methods");
612 pMenu->AddButton("Test transform", "TestTransform()", "Test ALiRICHChamber methods");
613 pMenu->AddButton("Test response", "TestResponse()", "Test AliRICHParam response methods");
614 pMenu->AddButton("Test sdigits", "TestSD()", "Create test set of sdigits");
615 pMenu->AddButton("Test digits OLD", "TestDigitsOLD()", "Create test set of OLD digits");
616 pMenu->AddButton("Test clusters", "TestC()", "Create test set of clusters");
619 //__________________________________________________________________________________________________
622 TControlBar *pMenu = new TControlBar("vertical","RICH draw");
623 pMenu->AddButton("RICH Isometry", "gMC->Gdraw(\"ALIC\", 60,40,0, 10,10, 0.008,0.008)","Draws ALIC volume in isometry");
624 pMenu->AddButton("RICH Front XY", "gMC->Gdraw(\"ALIC\", 0,0,0, 10,10, 0.01,0.01)","Draws ALIC volume in XY view");
625 pMenu->AddButton("RICH Side YZ", "gMC->Gdraw(\"ALIC\",90,180, 0, 10,10, 0.01,0.01)","Draws ALIC volume in YZ view");
626 pMenu->AddButton("RICH Top XZ", "gMC->Gdraw(\"ALIC\",90, 90, 0, 10,10, 0.01,0.01)","Draws ALIC volume in XZ view");
627 pMenu->AddButton("Module Isometry","gMC->Gdraw(\"SRIC\", 30,60,0, 10,10, 0.1,0.1)","Draws SRIC volume in isometry");
628 pMenu->AddButton("Module Front XY","gMC->Gdraw(\"SRIC\", 0,0,0, 10,10, 0.1,0.1)","Draws SRIC volume in XY view");
629 pMenu->AddButton("Module Top XZ", "gMC->Gdraw(\"SRIC\",90, 90, 0, 10,10, 0.1,0.1)","Draws SRIC volume in XZ view");
630 pMenu->AddButton("ALICE Tree", "((TGeant3*)gMC)->Gdtree(\"ALIC\")","Draws ALICE tree");
631 pMenu->AddButton("RICH Tree", "((TGeant3*)gMC)->Gdtree(\"RICH\")","Draws RICH tree");
632 pMenu->AddButton("Geo test", "GeoTest()", "Draw RICH geo as a macro");
633 pMenu->AddButton("Print ref", "PrintGeo()", "Print RICH chambers default position");
634 pMenu->AddButton("AliRICH::Print", "r->Print();", "Print RICH chambers default position");
635 pMenu->AddButton("Test transform","TestTransform()","Test L2G and G2L methods");
638 //__________________________________________________________________________________________________
641 TControlBar *pMenu = new TControlBar("vertical","RICH main");
643 if(ReadAlice()){//it's from file, reconstruct
644 pMenu->AddButton("hits->sdigits->digits->clusters","MainTrank()","Convert");
646 pMenu->AddButton("hits->sdigits", "H_SD()", "Perform first phase converstion");
647 pMenu->AddButton("sdigits->digits", "SD_D()", "Perform first phase converstion");
648 pMenu->AddButton("digits->clusters", "D_C()", "Perform first phase converstion");
650 pMenu->AddButton("Show","Show()","Shows the structure of events in files");
651 pMenu->AddButton("OLD specials->sdigits", "OLD_S_SD()", "Perform first phase converstion");
653 }else{//it's aliroot, simulate
654 pMenu->AddButton("Run", "a->Run(1)", "Process!");
656 pMenu->AddButton("Geo submenu", "GeoMenu()", "Shows geomentry submenu");
657 pMenu->AddButton("Geo GUI", "new G3GeometryGUI;","Create instance of G4GeometryGUI");
658 pMenu->AddButton("Test submenu", "TestMenu()", "Shows test submenu");
659 pMenu->AddButton("Browser", "new TBrowser;", "Start ROOT TBrowser");
660 pMenu->AddButton("Display Fast", "DisplFast()", "Display Fast");
661 pMenu->AddButton("Control Plots", "ControlPlots()", "Display some control histograms");
662 pMenu->AddButton("Debug ON", "DebugON();", "Switch debug on-off");
663 pMenu->AddButton("Debug OFF", "DebugOFF();", "Switch debug on-off");
664 pMenu->AddButton("Quit", ".q", "Close session");
666 a=gAlice;//for manual manipulation convinience
668 //__________________________________________________________________________________________________
669 void DebugOFF(){ Info("DebugOFF",""); a->SetDebug(0); r->SetDebug(0); AliLoader::SetDebug(0);}
670 void DebugON() { Info("DebugON",""); a->SetDebug(1); r->SetDebug(1); AliLoader::SetDebug(1);}