5 TH1F *pCqH1=new TH1F("clusq","Cluster Charge;q [QDC]",AliRICHParam::MaxQdc(),0,AliRICHParam::MaxQdc());
6 TH1F *pDqH1=new TH1F("digq","Digit Charge;q [QDC]",AliRICHParam::MaxQdc(),0,AliRICHParam::MaxQdc());
7 al->LoadHeader(); al->LoadKinematics();
9 Bool_t isHits=!rl->LoadHits();
10 Bool_t isSDigits=!rl->LoadSDigits();
11 Bool_t isClusters=!rl->LoadRecPoints();
12 Bool_t isDigits=!rl->LoadDigits();
14 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
15 al->GetEvent(iEventN);
17 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
18 rl->TreeH()->GetEntry(iPrimN);
19 Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
20 iTotalHits+=r->Hits()->GetEntries();
21 iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
22 iTotalSpecials+=r->Specials()->GetEntries();
26 rl->TreeS()->GetEntry(0);
29 rl->TreeD()->GetEntry(0);
31 for(int i=1;i<=7;i++) iTotalDigits+=r->Clusters(i)->GetEntries();
32 for(Int_t iDigitN=0;iDigitN<r->Digits(iChamber)->GetEntries();iDigitN++){
33 pDqH1->Fill(((AliRICHdigit*)r->Digits(iChamber)->At(iDigitN))->Q());
37 rl->TreeR()->GetEntry(0);
38 Int_t iTotalClusters=0;
39 for(int i=1;i<=7;i++) iTotalClusters+=r->Clusters(i)->GetEntries();
40 for(Int_t iClusterN=0;iClusterN<r->Clusters(iChamber)->GetEntries();iClusterN++){
41 pCqH1->Fill(((AliRICHcluster*)r->Clusters(iChamber)->At(iClusterN))->Q());
44 cout<<"Event "<<iEventN<<endl;
46 if(isHits) rl->UnloadHits();
47 if(isSDigits) rl->UnloadSDigits();
48 if(isDigits) rl->UnloadDigits();
49 if(isClusters) rl->UnloadRecPoints();
50 al->UnloadHeader(); al->UnloadKinematics();
51 TCanvas *pC=new TCanvas("c","Control Plots",600,500);
53 pC->cd(1); pCqH1->Draw();
54 pC->cd(2); pDqH1->Draw();
55 }//void ControlPlots()
56 //__________________________________________________________________________________________________
59 TStopwatch sw;TDatime time;
60 OLD_S_SD(); SD_D(); D_C();
61 cout<<"\nInfo in <MainTrank>: Start time: ";time.Print();
62 cout<<"Info in <MainTrank>: Stop time: ";time.Set(); time.Print();
63 cout<<"Info in <MainTrank>: Time used: ";sw.Print();
65 //__________________________________________________________________________________________________
68 if(rl->LoadHits()) return;
71 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
72 rl->TreeH()->GetEntry(iPrimN);
74 iTotalHits+=r->Hits()->GetEntries();
76 Info("sh","totally %i hits",iTotalHits);
79 //__________________________________________________________________________________________________
82 if(rl->LoadHits()) return;
84 Int_t iTotalSpecials=0;
85 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
86 rl->TreeH()->GetEntry(iPrimN);
87 r->Specials()->Print();
88 iTotalSpecials+=r->Specials()->GetEntries();
90 Info("ssp","totally %i specials",iTotalSpecials);
93 //__________________________________________________________________________________________________
96 if(rl->LoadSDigits()) return;
97 rl->TreeS()->GetEntry(0);
98 r->SDigits()->Print();
99 Info("ss","totally %i sdigits",r->SDigits()->GetEntries());
102 //__________________________________________________________________________________________________
105 if(rl->LoadDigits()) return;
106 rl->TreeD()->GetEntry(0);
107 Int_t iTotalDigits=0;
108 for(int i=1;i<=7;i++){
109 r->Digits(i)->Print();
110 iTotalDigits+=r->Digits(i)->GetEntries();
112 Info("sd","totally %i digits",iTotalDigits);
118 if(rl->LoadRecPoints()) return;
120 rl->TreeR()->GetEntry(0);
121 for(int i=1;i<=7;i++) r->Clusters(i)->Print();
122 rl->UnloadRecPoints();
125 Double_t r2d = TMath::RadToDeg();
126 Double_t d2r = TMath::DegToRad();
130 AliRICHDisplFast *d = new AliRICHDisplFast();
137 AliRICHRecon *detect = new AliRICHRecon("RICH patrec algorithm","Reconstruction");
140 for (int nev=0; nev< a->GetEventsPerRun(); nev++) { // Event Loop
142 cout <<endl<< "Processing event:" <<nev<<endl;
143 detect->StartProcessEvent();
153 AliRICHClusterFinder *z=new AliRICHClusterFinder(r);
156 //__________________________________________________________________________________________________
159 Info("OLD_S_SD","Start.");
163 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
164 al->GetEvent(iEventN); cout<<"Event "<<iEventN<<endl;
166 rl->MakeTree("S"); r->MakeBranch("S");
167 r->ResetSDigits(); r->ResetSpecialsOld();
169 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
170 rl->TreeH()->GetEntry(iPrimN);
171 for(Int_t i=0;i<r->Specials()->GetEntries();i++){//specials loop
172 Int_t padx=1+ ((AliRICHSDigit*)r->Specials()->At(i))->PadX()+r->Param()->NpadsX()/2;
173 Int_t pady=1+ ((AliRICHSDigit*)r->Specials()->At(i))->PadY()+r->Param()->NpadsY()/2;
174 Double_t q= ((AliRICHSDigit*)r->Specials()->At(i))->QPad();
175 Int_t hitN= ((AliRICHSDigit*)r->Specials()->At(i))->HitNumber()-1;//!!! important -1
176 Int_t chamber=((AliRICHhit*)r->Hits()->At(hitN))->C();
177 Int_t track=((AliRICHhit*)r->Hits()->At(hitN))->GetTrack();
178 if(padx<1 || padx>r->Param()->NpadsX() ||pady<1 || pady>r->Param()->NpadsY())
179 Warning("OLD_S_SD","pad is out of valid range padx= %i pady=%i event %i",padx,pady,iEventN);
181 r->AddSDigit(chamber,padx,pady,q,track);
185 rl->WriteSDigits("OVERWRITE");
187 rl->UnloadHits(); rl->UnloadSDigits();
188 Info("OLD_S_SD","Stop.");
190 //__________________________________________________________________________________________________
193 Info("H_SD","Start.");
195 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
196 al->GetEvent(iEventN);
198 if(!rl->TreeH()) rl->LoadHits();//from
199 if(!rl->TreeS()) rl->MakeTree("S"); r->MakeBranch("S");//to
201 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
202 rl->TreeH()->GetEntry(iPrimN);
203 for(Int_t iHitN=0;iHitN<3;iHitN++){//hits loop ???
204 AliRICHhit *pHit=r->Hits()->At(iHitN);
205 TVector3 globX3(pHit->X(),pHit->Y(),pHit->Z());
206 TVector3 locX3=r->C(pHit->C())->Glob2Loc(globX3);
209 Int_t iTotQdc=r->Param()->Loc2TotQdc(locX3,pHit->Eloss(),pHit->Pid(),sector);
211 Int_t iPadXmin,iPadXmax,iPadYmin,iPadYmax;
212 r->Param()->Loc2Area(locX3,iPadXmin,iPadYmin,iPadXmax,iPadYmax);
213 cout<<"left-down=("<<iPadXmin<<","<<iPadYmin<<") right-up=("<<iPadXmax<<','<<iPadYmax<<')'<<endl;
214 for(Int_t iPadY=iPadYmin;iPadY<=iPadYmax;iPadY++)
215 for(Int_t iPadX=iPadXmin;iPadX<=iPadXmax;iPadX++){
216 Double_t padQdc=iTotQdc*r->Param()->Loc2PadFrac(locX3,iPadX,iPadY);
217 if(padQdc>0.1)r->AddSDigit(pHit->C(),iPadX,iPadY,padQdc,pHit->GetTrack());
222 rl->WriteSDigits("OVERWRITE");
227 Info("H_SD","Stop.");
229 //__________________________________________________________________________________________________
232 Info("SD_D","Start.");
234 r->Param()->GenSigmaThMap();
237 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
238 al->GetEvent(iEventN); cout<<"Event "<<iEventN<<endl;
239 rl->MakeTree("D");r->MakeBranch("D"); //create TreeD with RICH branches
240 r->ResetSDigits();r->ResetDigits();//reset lists of sdigits and digits
241 rl->TreeS()->GetEntry(0);
242 r->SDigits()->Sort();
245 Int_t chamber,x,y,tr[3],id;
247 chamber=x=y=tr[0]=tr[1]=tr[2]=id=kBad;
248 Int_t iNdigitsPerPad=kBad;//how many sdigits for a given pad
250 for(Int_t i=0;i<r->SDigits()->GetEntries();i++){//sdigits loop (sorted)
251 AliRICHdigit *pSdig=(AliRICHdigit*)r->SDigits()->At(i);
252 if(pSdig->Id()==id){//still the same pad
255 if(iNdigitsPerPad<=3)
256 tr[iNdigitsPerPad-1]=pSdig->T(0);
258 // Info("","More then 3 sdigits for the given pad");
259 }else{//new pad, add the pevious one
260 if(id!=kBad&&r->Param()->IsOverTh(chamber,x,y,q))
261 r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//ch-xpad-ypad-qdc-tr1-2-3
262 chamber=pSdig->C();x=pSdig->X();y=pSdig->Y();q=pSdig->Q();tr[0]=pSdig->T(0);id=pSdig->Id();
263 iNdigitsPerPad=1;tr[1]=tr[2]=kBad;
265 }//sdigits loop (sorted)
267 if(r->SDigits()->GetEntries()&&r->Param()->IsOverTh(chamber,x,y,q))
268 r->AddDigit(chamber,x,y,q,tr[0],tr[1],tr[2]);//add the last digit
271 rl->WriteDigits("OVERWRITE");
273 rl->UnloadSDigits(); rl->UnloadDigits();
274 r->ResetSDigits();r->ResetDigits();//reset lists of sdigits and digits
275 Info("SD_D","Stop.");
277 //__________________________________________________________________________________________________
281 al->LoadHeader(); al->LoadKinematics();
284 Bool_t isSdigits=!rl->LoadSDigits();
285 Bool_t isClusters=!rl->LoadRecPoints();
286 Bool_t isDigits=!rl->LoadDigits();//loaders
288 cout<<endl; cout<<endl;
289 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
290 Int_t iNparticles=a->GetEvent(iEventN);
291 Int_t iNprims=rl->TreeH()->GetEntries();
293 Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
294 for(Int_t iPrimN=0;iPrimN<iNprims;iPrimN++){//prims loop
295 rl->TreeH()->GetEntry(iPrimN);
296 iTotalHits+=r->Hits()->GetEntries();
297 iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
298 iTotalSpecials+=r->Specials()->GetEntries();
299 TParticle *pPrim=al->Stack()->Particle(iPrimN);
300 Info("Show","Evt %4i prim %4i has %4i hits %5i cerenkovs and %5i specials from %s (,%7.2f,%7.2f)",
303 r->Hits()->GetEntries(),
304 r->Cerenkovs()->GetEntries(),
305 r->Specials()->GetEntries(),
307 pPrim->Theta()*r2d,pPrim->Phi()*r2d);
309 Info("Show-HITS","Evt %i total: %i particles %i primaries %i hits %i cerenkovs %i specials",
310 iEventN, iNparticles, iNprims, iTotalHits,iTotalCerenkovs,iTotalSpecials);
312 rl->TreeS()->GetEntry(0);
313 Info("Show-SDIGITS","Evt %i contains %5i sdigits",iEventN,r->SDigits()->GetEntries());
316 rl->TreeD()->GetEntry(0);
317 for(int i=1;i<=7;i++)
318 Info("Show-DIGITS","Evt %i chamber %i contains %5i digits",
319 iEventN, i, r->Digits(i)->GetEntries());
322 rl->TreeR()->GetEntry(0);
323 for(int i=1;i<=7;i++)
324 Info("Show-CLUSTERS","Evt %i chamber %i contains %5i clusters",
325 iEventN, i, r->Clusters(i)->GetEntries());
330 if(isSdigits) rl->UnloadSDigits();
331 if(isDigits) rl->UnloadDigits();
332 if(isClusters) rl->UnloadRecPoints();
334 al->UnloadKinematics();
337 //__________________________________________________________________________________________________
342 AliLoader *rl,*tl,*il;
348 Info("ReadAlice","Tring to read ALICE from SIMULATED FILE.");
349 AliLoader::SetDebug(0);
350 if(gAlice) delete gAlice;
351 if(!(al=AliRunLoader::Open("galice.root","AlicE","update"))){
352 gSystem->Exec("rm -rf *.root *.dat");
353 Error("ReadAlice","galice.root broken, removing all this garbage then init new one");
354 new AliRun("gAlice","Alice experiment system");
355 gAlice->SetDebug(-1);
356 gAlice->Init("ConfigRich.C");
357 r=(AliRICH*)gAlice->GetDetector("RICH");
361 if(!gAlice) Fatal("ReadAlice","No gAlice in file");
365 if(!(r=(AliRICH*)gAlice->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file");
367 if(!(rl=al->GetLoader("RICHLoader"))) Warning("RICH/menu.C::ReadAlice","No RICH loader in file");
369 Info("ReadAlice","Run contains %i event(s)",gAlice->GetEventsPerRun());
372 //__________________________________________________________________________________________________
373 void PrintGeo(Float_t rotDeg=0)
375 AliRICHParam *p=new AliRICHParam;
376 Double_t r=p->Offset();
377 Double_t kP=p->AngleXY();
378 Double_t kT=p->AngleYZ();
387 Double_t phi=90*deg+kRot+kP,theta=90*deg+kT;
388 Info(" menu for 1","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
389 r, theta*r2d, phi*r2d,
390 r*sin(theta)*cos(phi),
391 r*sin(theta)*sin(phi),
394 phi=90*deg+kRot+kP,theta=90*deg;
395 Info(" menu for 2","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
396 r, theta*r2d, phi*r2d,
397 r*sin(theta)*cos(phi),
398 r*sin(theta)*sin(phi),
401 phi=90*deg+kRot,theta=90*deg-kT;
402 Info(" menu for 3","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
403 r, theta*r2d, phi*r2d,
404 r*sin(theta)*cos(phi),
405 r*sin(theta)*sin(phi),
409 phi=90*deg+kRot,theta=90*deg;
410 Info(" menu for 4","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
411 r, theta*r2d, phi*r2d,
412 r*sin(theta)*cos(phi),
413 r*sin(theta)*sin(phi),
417 phi=90*deg+kRot,theta=90*deg+kT;
418 Info(" menu for 5","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
419 r, theta*r2d, phi*r2d,
420 r*sin(theta)*cos(phi),
421 r*sin(theta)*sin(phi),
425 phi=90*deg+kRot-kP,theta=90*deg;
426 Info(" menu for 6","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
427 r, theta*r2d, phi*r2d,
428 r*sin(theta)*cos(phi),
429 r*sin(theta)*sin(phi),
432 phi=90*deg+kRot-kP,theta=90*deg+kT;
433 Info(" menu for 7","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
434 r, theta*r2d, phi*r2d,
435 r*sin(theta)*cos(phi),
436 r*sin(theta)*sin(phi),
441 //__________________________________________________________________________________________________
444 TCanvas *pC=new TCanvas("c","Amplification test",900,800);
447 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);
452 const Int_t nPoints=8;
453 THStack *pStack=new THStack("stack","photons");
454 TLegend *pLeg=new TLegend(0.6,0.2,0.9,0.5,"legend");
457 Double_t starty=AliRICHParam::DeadZone()/2;
458 Double_t deltay=AliRICHParam::SectorSizeY()/nPoints;
460 for(int i=0;i<nPoints;i++){
461 apH[i]=new TH1F(Form("h%i",i),"Qdc for Photon;QDC;Counts",1000,0,1000); apH[i]->SetLineColor(i);
463 pLeg->AddEntry(apH[i],Form("@(0,%5.2f->%5.2f)",starty+i*deltay,starty+i*deltay-AliRICHParam::SectorSizeY()/2));
469 // AliRICHParam::ResetWireSag();
470 for(Int_t i=0;i<10000;i++){//events loop
471 for(int j=0;j<nPoints;j++){
472 x3.SetY(starty-j*deltay);
473 apH[j]->Fill(AliRICHParam::Loc2TotQdc(x3,400e-9,500000,sector));
476 pStack->Draw("nostack");
479 //__________________________________________________________________________________________________
482 Info("TestSD","Creating test sdigits.");
483 rl->MakeTree("S");r->MakeBranch("S");
485 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
486 al->GetEvent(iEventN);
488 if(!rl->TreeH()) rl->LoadHits();//from
489 if(!rl->TreeS()) rl->MakeTree("S"); r->MakeBranch("S");//to
491 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
492 rl->TreeH()->GetEntry(iPrimN);
493 for(Int_t iHitN=0;iHitN<3;iHitN++){//hits loop ???
494 AliRICHhit *pHit=r->Hits()->At(iHitN);
495 TVector3 globX3(pHit->X(),pHit->Y(),pHit->Z());
496 TVector3 locX3=r->C(pHit->C())->Glob2Loc(globX3);
499 Int_t iTotQdc=r->Param()->Loc2TotQdc(locX3,pHit->Eloss(),pHit->Pid(),sector);
501 Int_t iPadXmin,iPadXmax,iPadYmin,iPadYmax;
502 r->Param()->Loc2Area(locX3,iPadXmin,iPadYmin,iPadXmax,iPadYmax);
503 cout<<"left-down=("<<iPadXmin<<","<<iPadYmin<<") right-up=("<<iPadXmax<<','<<iPadYmax<<')'<<endl;
504 for(Int_t iPadY=iPadYmin;iPadY<=iPadYmax;iPadY++)
505 for(Int_t iPadX=iPadXmin;iPadX<=iPadXmax;iPadX++){
506 Float_t iPadQdc=iTotQdc*r->Param()->Loc2PadFrac(locX3,iPadX,iPadY);
507 Int_t padx,pady; r->Param()->Loc2Pad(locX3.X(),locX3.Y(),padx,pady);
508 cout<<"hit="<<iHitN<<" ("<<locX3.X()<<','<<locX3.Y()<<")("<<padx<<','<<pady<<") cur pad("<<iPadX<<","<<iPadY<<") qtot="<<iTotQdc<<" qfrac="<<r->Param()->Loc2PadFrac(locX3,iPadX,iPadY)<<endl;
510 // r->AddSDigit(pHit->C(),padx,pady,r->Param()->Local2PadQdc(localX3,padx,pady),pHit->GetTrack());
514 rl->WriteSDigits("OVERWRITE");
521 rl->WriteSDigits("OVERWRITE");
523 cout<<endl;r->Sdigits()->Print();
525 Info("TestSdigits","Stop.");
526 }//void TestSdigits()
527 //__________________________________________________________________________________________________
530 Info("TestC","Creating test clusters.");
531 rl->MakeTree("R");r->MakeBranch("R");
534 c.AddDigit(new AliRICHdigit(1,20,21,200,1,2,3));
535 c.AddDigit(new AliRICHdigit(1,22,21,250,1,2,3));
541 rl->WriteRecPoints("OVERWRITE");
542 rl->UnloadRecPoints();
545 Info("TestC","Stop.");
547 //__________________________________________________________________________________________________
550 AliRICHParam *p=r->Param();
553 Double_t dz=p->DeadZone();
554 Double_t sx=p->SectorSizeX(); Double_t sy=p->SectorSizeY(); Double_t px=p->PcSizeX(); Double_t py=p->PcSizeY();
556 Info(" 1- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , -py/2 ,padx,pady),padx,pady);
557 Info(" 48- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , -py/2 ,padx,pady),padx,pady);
558 Info(" 49- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , -py/2 ,padx,pady),padx,pady);
559 Info(" 96- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , -py/2 ,padx,pady),padx,pady);
560 Info(" 97- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , -py/2 ,padx,pady),padx,pady);
561 Info("144- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , -py/2 ,padx,pady),padx,pady);
563 Info(" 1- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , -dz/2 ,padx,pady),padx,pady);
564 Info(" 48- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , -dz/2 ,padx,pady),padx,pady);
565 Info(" 49- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , -dz/2 ,padx,pady),padx,pady);
566 Info(" 96- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , -dz/2 ,padx,pady),padx,pady);
567 Info(" 97- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , -dz/2 ,padx,pady),padx,pady);
568 Info("144- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , -dz/2 ,padx,pady),padx,pady);
570 Info(" 1- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , dz/2 ,padx,pady),padx,pady);
571 Info(" 48- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , dz/2 ,padx,pady),padx,pady);
572 Info(" 49- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , dz/2 ,padx,pady),padx,pady);
573 Info(" 96- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , dz/2 ,padx,pady),padx,pady);
574 Info(" 97- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , dz/2 ,padx,pady),padx,pady);
575 Info("144- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , dz/2 ,padx,pady),padx,pady);
577 Info(" 1-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-px/2 , py/2 ,padx,pady),padx,pady);
578 Info(" 48-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2-dz , py/2 ,padx,pady),padx,pady);
579 Info(" 49-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad(-sx/2 , py/2 ,padx,pady),padx,pady);
580 Info(" 96-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2 , py/2 ,padx,pady),padx,pady);
581 Info(" 97-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( sx/2+dz , py/2 ,padx,pady),padx,pady);
582 Info("144-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( px/2 , py/2 ,padx,pady),padx,pady);
584 Info(" 73-160","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , py/2 ,padx,pady),padx,pady);
585 Info(" 73- 81","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , dz/2 ,padx,pady),padx,pady);
586 Info("0-0dead","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , 0 ,padx,pady),padx,pady);
587 Info(" 73- 80","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , -dz/2 ,padx,pady),padx,pady);
588 Info(" 73- 1","sec=%i padx=%3i pady=%3i",p->Loc2Pad( 0 , -py/2 ,padx,pady),padx,pady);
590 p->Pad2Loc(padx= 1,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
591 p->Pad2Loc(padx= 48,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
592 p->Pad2Loc(padx= 49,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
593 p->Pad2Loc(padx= 96,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
594 p->Pad2Loc(padx= 97,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
595 p->Pad2Loc(padx=144,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
597 p->Pad2Loc(padx= 1,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
598 p->Pad2Loc(padx= 48,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
599 p->Pad2Loc(padx= 49,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
600 p->Pad2Loc(padx= 96,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
601 p->Pad2Loc(padx= 97,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
602 p->Pad2Loc(padx=144,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
604 p->Pad2Loc(padx= 1,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
605 p->Pad2Loc(padx= 48,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
606 p->Pad2Loc(padx= 49,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
607 p->Pad2Loc(padx= 96,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
608 p->Pad2Loc(padx= 97,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
609 p->Pad2Loc(padx=144,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
611 p->Pad2Loc(padx= 1,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
612 p->Pad2Loc(padx= 48,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
613 p->Pad2Loc(padx= 49,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
614 p->Pad2Loc(padx= 96,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
615 p->Pad2Loc(padx= 97,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
616 p->Pad2Loc(padx=144,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
618 //__________________________________________________________________________________________________
621 TControlBar *pMenu = new TControlBar("vertical","RICH test");
622 pMenu->AddButton("Test segmentation", "TestSeg()", "Test AliRICHParam segmentation methods");
623 pMenu->AddButton("Test transform", "TestTransform()", "Test ALiRICHChamber methods");
624 pMenu->AddButton("Test response", "TestResponse()", "Test AliRICHParam response methods");
625 pMenu->AddButton("Test sdigits", "TestSD()", "Create test set of sdigits");
626 pMenu->AddButton("Test digits OLD", "TestDigitsOLD()", "Create test set of OLD digits");
627 pMenu->AddButton("Test clusters", "TestC()", "Create test set of clusters");
630 //__________________________________________________________________________________________________
633 TControlBar *pMenu = new TControlBar("vertical","RICH draw");
634 pMenu->AddButton("RICH Isometry", "gMC->Gdraw(\"ALIC\", 60,40,0, 10,10, 0.008,0.008)","Draws ALIC volume in isometry");
635 pMenu->AddButton("RICH Front XY", "gMC->Gdraw(\"ALIC\", 0,0,0, 10,10, 0.01,0.01)","Draws ALIC volume in XY view");
636 pMenu->AddButton("RICH Side YZ", "gMC->Gdraw(\"ALIC\",90,180, 0, 10,10, 0.01,0.01)","Draws ALIC volume in YZ view");
637 pMenu->AddButton("RICH Top XZ", "gMC->Gdraw(\"ALIC\",90, 90, 0, 10,10, 0.01,0.01)","Draws ALIC volume in XZ view");
638 pMenu->AddButton("Module Isometry","gMC->Gdraw(\"SRIC\", 30,60,0, 10,10, 0.1,0.1)","Draws SRIC volume in isometry");
639 pMenu->AddButton("Module Front XY","gMC->Gdraw(\"SRIC\", 0,0,0, 10,10, 0.1,0.1)","Draws SRIC volume in XY view");
640 pMenu->AddButton("Module Top XZ", "gMC->Gdraw(\"SRIC\",90, 90, 0, 10,10, 0.1,0.1)","Draws SRIC volume in XZ view");
641 pMenu->AddButton("ALICE Tree", "((TGeant3*)gMC)->Gdtree(\"ALIC\")","Draws ALICE tree");
642 pMenu->AddButton("RICH Tree", "((TGeant3*)gMC)->Gdtree(\"RICH\")","Draws RICH tree");
643 pMenu->AddButton("Geo test", "GeoTest()", "Draw RICH geo as a macro");
644 pMenu->AddButton("Print ref", "PrintGeo()", "Print RICH chambers default position");
645 pMenu->AddButton("AliRICH::Print", "r->Print();", "Print RICH chambers default position");
646 pMenu->AddButton("Test transform","TestTransform()","Test L2G and G2L methods");
649 //__________________________________________________________________________________________________
652 TControlBar *pMenu = new TControlBar("vertical","RICH main");
654 if(ReadAlice()){//it's from file, reconstruct
655 pMenu->AddButton("hits->sdigits->digits->clusters","MainTrank()","Convert");
657 pMenu->AddButton("hits->sdigits", "H_SD()", "Perform first phase converstion");
658 pMenu->AddButton("sdigits->digits", "SD_D()", "Perform first phase converstion");
659 pMenu->AddButton("digits->clusters", "D_C()", "Perform first phase converstion");
661 pMenu->AddButton("Show","Show()","Shows the structure of events in files");
662 pMenu->AddButton("OLD specials->sdigits", "OLD_S_SD()", "Perform first phase converstion");
664 }else{//it's aliroot, simulate
665 pMenu->AddButton("Run", "a->Run(1)", "Process!");
667 pMenu->AddButton("Geo submenu", "GeoMenu()", "Shows geomentry submenu");
668 pMenu->AddButton("Geo GUI", "new G3GeometryGUI;","Create instance of G4GeometryGUI");
669 pMenu->AddButton("Test submenu", "TestMenu()", "Shows test submenu");
670 pMenu->AddButton("Browser", "new TBrowser;", "Start ROOT TBrowser");
671 pMenu->AddButton("Display Fast", "DisplFast()", "Display Fast");
672 pMenu->AddButton("Control Plots", "ControlPlots()", "Display some control histograms");
673 pMenu->AddButton("Debug ON", "DebugON();", "Switch debug on-off");
674 pMenu->AddButton("Debug OFF", "DebugOFF();", "Switch debug on-off");
675 pMenu->AddButton("Quit", ".q", "Close session");
677 a=gAlice;//for manual manipulation convinience
679 //__________________________________________________________________________________________________
680 void DebugOFF(){ Info("DebugOFF",""); a->SetDebug(0); r->SetDebug(0); AliLoader::SetDebug(0);}
681 void DebugON() { Info("DebugON",""); a->SetDebug(1); r->SetDebug(1); AliLoader::SetDebug(1);}