3 AliRICHPatRec *detect = new AliRICHPatRec("RICH patrec algorithm","Reconstruction");
6 for (int nev=0; nev<= a->GetEventsPerRun(); nev++) { // Event Loop
8 cout <<endl<< "Processing event:" <<nev<<endl;
17 TStopwatch sw;TDatime time;
18 r->Hits2SDigits();r->SDigits2Digits();
19 cout<<"\nInfo in <hits->digits>: Start time: ";time.Print();
20 cout<<"Info in <hits->digits>: Stop time: ";time.Set(); time.Print();
21 cout<<"Info in <hits->digits>: Time used: ";sw.Print();
24 void DigitsOLD2RawClustersOLD()
26 AliRICHClusterFinder *z=new AliRICHClusterFinder(r);
30 void Specials2DigitsOLD()
32 Info("OLDspec2d","Start.");
36 AliRunDigitizer *pManager = new AliRunDigitizer(1,1);
37 pManager->SetDebug(10);
38 pManager->SetInputStream(0,"galice.root");
39 new AliRICHDigitizer(pManager);
40 pManager->Exec("deb");
42 Info("OLDspec2d","Stop.");
45 void Specials2Sdigits()
47 Info("Specials2Sdigits","Start.");
51 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
52 al->GetEvent(iEventN);
54 rl->MakeTree("S"); r->MakeBranch("S");
55 r->ResetSdigits(); r->ResetSpecialsOld();
57 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
58 rl->TreeH()->GetEntry(iPrimN);
59 for(Int_t i=0;i<r->Specials()->GetEntries();i++){//specials loop
60 Int_t padx= ((AliRICHSDigit*)r->Specials()->At(i))->PadX();
61 Int_t pady= ((AliRICHSDigit*)r->Specials()->At(i))->PadY();
62 Int_t qdc= ((AliRICHSDigit*)r->Specials()->At(i))->QPad();
63 Int_t hitN= ((AliRICHSDigit*)r->Specials()->At(i))->HitNumber()-1;//!!! important -1
64 Int_t chamber=((AliRICHhit*)r->Hits()->At(hitN))->C();
65 Int_t track=((AliRICHhit*)r->Hits()->At(hitN))->GetTrack();
66 r->AddSdigit(chamber,padx+r->Param()->NpadsX()/2,pady+r->Param()->NpadsY()/2,qdc,track);
70 rl->WriteSDigits("OVERWRITE");
72 rl->UnloadHits(); rl->UnloadSDigits();
73 Info("Specials2Sdigits","Stop.");
75 //__________________________________________________________________________________________________
78 Info("Hits2Sdigits","Start.");
80 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
81 al->GetEvent(iEventN);
83 if(!rl->TreeH()) rl->LoadHits();//from
84 if(!rl->TreeS()) rl->MakeTree("S"); r->MakeBranch("S");//to
87 for(Int_t iPrimN=0;iPrimN<rl->TreeH()->GetEntries();iPrimN++){//prims loop
88 rl->TreeH()->GetEntry(iPrimN);
89 for(Int_t iHitN=0;iHitN<r->Hits()->GetEntries();iHitN++){//hits loop
90 AliRICHhit *pHit=r->Hits()->At(iHitN);
92 r->AddSdigit(pHit->C(),padx+r->Param()->NpadsX()/2,pady+r->Param()->NpadsY()/2,qdc,track);
96 rl->WriteSDigits("OVERWRITE");
101 Info("Hits2Sdigits","Stop.");
103 //__________________________________________________________________________________________________
104 void Sdigits2Digits()
106 Info("Sdigits2Digits","Start.");
110 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
111 al->GetEvent(iEventN);
113 rl->MakeTree("D");r->MakeBranch("D"); //create TreeD with RICH branches
114 r->ResetSdigits();r->ResetDigits();//reset lists of sdigits and digits
115 rl->TreeS()->GetEntry(0);
116 r->Sdigits()->Sort();
119 Int_t chamber,x,y,qdc,tr[3],id;
120 chamber=x=y=qdc=tr[0]=tr[1]=tr[2]=id=kBad;
121 Int_t iNdigitsPerPad=kBad;//how many sdigits for a given pad
123 for(Int_t i=0;i<r->Sdigits()->GetEntries();i++){//sdigits loop (sorted)
124 AliRICHdigit *pSdig=(AliRICHdigit*)r->Sdigits()->At(i);
125 if(pSdig->Id()==id){//still the same pad
128 if(iNdigitsPerPad<=3)
129 tr[iNdigitsPerPad-1]=pSdig->T(0);
131 Info("","More then 3 sdigits for the given pad");
132 }else{//new pad, add the pevious one
133 if(id!=kBad) r->AddDigit(chamber,x,y,qdc,tr[0],tr[1],tr[2]);//ch-xpad-ypad-qdc-tr1-2-3
134 chamber=pSdig->C();x=pSdig->X();y=pSdig->Y();qdc=pSdig->Qdc();tr[0]=pSdig->T(0);id=pSdig->Id();
135 iNdigitsPerPad=1;tr[1]=tr[2]=kBad;
137 }//sdigits loop (sorted)
139 r->AddDigit(chamber,x,y,qdc,tr[0],tr[1],tr[2]);//add the last digit
142 rl->WriteDigits("OVERWRITE");
144 rl->UnloadSDigits(); rl->UnloadDigits();
145 r->ResetSdigits();r->ResetDigits();//reset lists of sdigits and digits
146 Info("Sdigits2Digits","Stop.");
151 void Sdigits2DigitsOLD()
153 Info("Sdigits2DigitsOLD","Start.");
157 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
158 al->GetEvent(iEventN);
160 rl->MakeTree("D");r->MakeBranch("D"); //create TreeD with RICH branches
161 r->ResetSdigits();r->ResetDigitsOld();//reset lists of sdigits and digits
162 rl->TreeS()->GetEntry(0);
163 r->Sdigits()->Sort();
167 Int_t tr[3],q[3],dig[5]; for(Int_t i=0;i<3;i++) tr[i]=q[i]=kBad; for(Int_t i=0;i<5;i++) dig[i]=kBad;
168 Int_t chamber=kBad,id=kBad,iNdigitsPerPad=kBad;//how many sdigits for a given pad
170 for(Int_t i=0;i<r->Sdigits()->GetEntries();i++){//sdigits loop (sorted)
171 AliRICHdigit *pSdig=(AliRICHdigit*)r->Sdigits()->At(i);
172 if(pSdig->Id()==id){//still the same pad
174 dig[2]+=pSdig->Qdc();//sum up qdc
175 if(iNdigitsPerPad<=3)
176 tr[iNdigitsPerPad-1]=pSdig->T(0);
178 Info("","More then 3 sdigits for the given pad");
179 }else{//new pad, add the pevious one
180 if(id!=kBad) r->AddDigitOld(chamber,tr,q,dig);
181 chamber=pSdig->C();dig[0]=pSdig->X();dig[1]=pSdig->Y();dig[2]=pSdig->Qdc();tr[0]=pSdig->T(0);id=pSdig->Id();
182 iNdigitsPerPad=1;tr[1]=tr[2]=kBad;
184 }//sdigits loop (sorted)
185 r->AddDigitOld(chamber,tr,q,dig);//add the last digit
188 rl->WriteDigits("OVERWRITE");
190 rl->UnloadSDigits(); rl->UnloadDigits();
191 r->ResetSdigits();r->ResetDigitsOld();//reset lists of sdigits and digits
192 Info("Sdigits2DigitsOLD","Stop.");
199 al->LoadHeader(); al->LoadKinematics();
201 rl->LoadHits(); Bool_t isSdigits=!rl->LoadSDigits(); Bool_t isDigits=!rl->LoadDigits();//loaders
203 cout<<endl; cout<<endl;
204 for(Int_t iEventN=0;iEventN<a->GetEventsPerRun();iEventN++){//events loop
205 Int_t iNparticles=a->GetEvent(iEventN);
206 Int_t iNprims=rl->TreeH()->GetEntries();
208 Int_t iTotalHits=0,iTotalCerenkovs=0,iTotalSpecials=0;
209 for(Int_t iPrimN=0;iPrimN<iNprims;iPrimN++){//prims loop
210 rl->TreeH()->GetEntry(iPrimN);
211 iTotalHits+=r->Hits()->GetEntries();
212 iTotalCerenkovs+=r->Cerenkovs()->GetEntries();
213 iTotalSpecials+=r->Specials()->GetEntries();
214 TParticle *pPrim=al->Stack()->Particle(iPrimN);
215 Info("Show","Evt %4i prim %4i has %4i hits %5i cerenkovs and %5i specials from %s (,%7.2f,%7.2f)",
218 r->Hits()->GetEntries(),
219 r->Cerenkovs()->GetEntries(),
220 r->Specials()->GetEntries(),
222 pPrim->Theta()*r2d,pPrim->Phi()*r2d);
224 Info("Show-HITS","Evt %i total: %i particles %i primaries %i hits %i cerenkovs %i specials",
225 iEventN, iNparticles, iNprims, iTotalHits,iTotalCerenkovs,iTotalSpecials);
227 rl->TreeS()->GetEntry(0);
228 Info("Show-SDIGITS","Evt %i contains %5i sdigits",iEventN,r->Sdigits()->GetEntries());
231 rl->TreeD()->GetEntry(0);
232 for(int i=1;i<=7;i++)
233 Info("Show-DIGITS","Evt %i chamber %i contains %5i NEW digits and %5i OLD",
234 iEventN, i, r->Digits(i)->GetEntries(),r->DigitsOld(i)->GetEntries());
238 rl->UnloadHits(); if(isSdigits) rl->UnloadSDigits(); if(isDigits) rl->UnloadDigits();
240 al->UnloadKinematics();
251 AliLoader::SetDebug(0);
259 AliLoader::SetDebug(1);
265 AliLoader *rl,*tl,*il;
271 if(gAlice){//it's aliroot
272 if(gSystem->Exec("ls galice.root")){
273 Info("CheckAlice","It's AliRoot, and no galice.root: SIMULATION");
274 gAlice->SetDebug(-1);
275 gAlice->Init("ConfigRich.C");
276 r=(AliRICH*)gAlice->GetDetector("RICH");
278 }else{//galice.root is present we want to read alice from file
282 }else{//it's root with ALICE libs loaded
290 Info("ReadAlice","Reading ALICE from SIMULATED FILE.");
291 AliLoader::SetDebug(0);
292 if(gAlice) delete gAlice;
293 if(!(al=AliRunLoader::Open("galice.root","AlicE","update"))){
294 gSystem->Exec("rm -rf *.root *.dat");
295 Fatal("ReadAlice","galice.root broken, removing all this garbage");
298 if(!gAlice) Fatal("ReadAlice","No gAlice in file");
302 if(!(r=(AliRICH*)gAlice->GetDetector("RICH"))) Warning("RICH/menu.C::ReadAlice","No RICH in file");
304 if(!(rl=al->GetLoader("RICHLoader"))) Warning("RICH/menu.C::ReadAlice","No RICH loader in file");
306 Info("ReadAlice","Run contains %i event(s)",gAlice->GetEventsPerRun());
308 //__________________________________________________________________________________________________
311 gStyle->SetPalette(1);
312 TCanvas *view=new TCanvas("Display","ALICE RICH Display",0,0,600,600);
314 TH2F *pH2=new TH2F("pH2F","RICH DISPLAY",r->Param()->Nx(),0,r->Param()->Nx(),r->Param()->Ny(),0,r->Param()->Ny());
316 pH2->SetMaximum(100);
318 Int_t Nevents = gAlice->GetEventsPerRun();
320 //______________________________________________________________________________
321 //__________________________________________________________________________________________________
325 TBRIK *pAliceBRIK=new TBRIK("aliceBRIK","ALICE mother volume","void",500,500,500);
326 TBRIK *pArmBRIK=new TBRIK("armBRIK","RICH arm1","void",pRICH->GetSizeX(),pRICH->GetSizeY(),pRICH->GetSizeZ());
328 TNode *pAliceNode=new TNode("aliceNode","Mother volume","aliceBRIK");
333 TVector3 v1(0,pRICH->GetOffset(),0);
336 rot1.RotateX(pRICH->GetYZAngle()*kDegrad); v1.RotateX(pRICH->GetYZAngle()*kDegrad);
337 rot1.RotateZ(pRICH->GetXYAngle()*kDegrad); v1.RotateZ(pRICH->GetXYAngle()*kDegrad);
338 rot1.RotateZ(pRICH->GetRotAngle()*kDegrad); v1.RotateZ(pRICH->GetRotAngle()*kDegrad);
340 TRotMatrix *pArm1RotMatrix=new TRotMatrix("rotArm1","rotArm1",rot1.ThetaX()*kRaddeg, rot1.PhiX()*kRaddeg,
341 rot1.ThetaY()*kRaddeg, rot1.PhiY()*kRaddeg,
342 rot1.ThetaZ()*kRaddeg, rot1.PhiZ()*kRaddeg);
344 TNode *pArm1Node=new TNode("arm1Node","Left arm","armBRIK",v1.X(),v1.Y(),v1.Z(),"rotArm1");
345 arm1Node->SetLineColor(kRed);
349 TVector3 v2(0,pRICH->GetOffset(),0);
352 rot2.RotateX( pRICH->YZAngle()*kDegrad); v2.RotateX(pRICH->GetYZAngle()*kDegrad);
353 rot2.RotateZ(-pRICH->XYAngle()*kDegrad); v2.RotateZ(-pRICH->GetXYAngle()*kDegrad);
354 rot2.RotateZ( pRICH->RotAngle()*kDegrad); v2.RotateZ(pRICH->GetRotAngle()*kDegrad);
356 TRotMatrix *pArm2RotMatrix=new TRotMatrix("rotArm2","rotArm2",rot2.ThetaX()*kRaddeg, rot2.PhiX()*kRaddeg,
357 rot2.ThetaY()*kRaddeg, rot2.PhiY()*kRaddeg,
358 rot2.ThetaZ()*kRaddeg, rot2.PhiZ()*kRaddeg);
360 TNode *pArm2Node=new TNode("arm2Node","Left arm","armBRIK",v2.X(),v2.Y(),v2.Z(),"rotArm2");
361 arm2Node->SetLineColor(kBlue);
365 //__________________________________________________________________________________________________
366 void PrintGeo(Float_t rotDeg=0)
368 AliRICHParam *p=new AliRICHParam;
369 Double_t r=p->Offset();
370 Double_t kP=p->AngleXY();
371 Double_t kT=p->AngleYZ();
380 Double_t phi=90*deg+kRot+kP,theta=90*deg+kT;
381 Info(" menu for 1","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
382 r, theta*r2d, phi*r2d,
383 r*sin(theta)*cos(phi),
384 r*sin(theta)*sin(phi),
387 phi=90*deg+kRot+kP,theta=90*deg;
388 Info(" menu for 2","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,theta=90*deg-kT;
395 Info(" menu for 3","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),
402 phi=90*deg+kRot,theta=90*deg;
403 Info(" menu for 4","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
404 r, theta*r2d, phi*r2d,
405 r*sin(theta)*cos(phi),
406 r*sin(theta)*sin(phi),
410 phi=90*deg+kRot,theta=90*deg+kT;
411 Info(" menu for 5","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
412 r, theta*r2d, phi*r2d,
413 r*sin(theta)*cos(phi),
414 r*sin(theta)*sin(phi),
418 phi=90*deg+kRot-kP,theta=90*deg;
419 Info(" menu for 6","r=%8.3f theta=%5.1f phi=%5.1f x=%8.3f y=%8.3f z=%8.3f",
420 r, theta*r2d, phi*r2d,
421 r*sin(theta)*cos(phi),
422 r*sin(theta)*sin(phi),
425 phi=90*deg+kRot-kP,theta=90*deg+kT;
426 Info(" menu for 7","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),
437 //__________________________________________________________________________________________________
440 AliRICHParam *pParam=new AliRICHParam;
441 AliRICHResponseV0 *pRes=new AliRICHResponseV0;
443 TLegend *pLegend=new TLegend(0.6,0.3,0.85,0.5);
444 TH1F *pH0=new TH1F("pH1","Gain",100,0,600);
445 TH1F *pH10=new TH1F("pH10","Gain",100,0,600);
446 TH1F *pH20=new TH1F("pH20","Gain",100,0,600);
447 TH1F *pH30=new TH1F("pH30","Gain",100,0,600);
448 TH1F *pHold=new TH1F("pHold","Mip Charge",100,0,2000);
449 for(int i=0;i<1000;i++){
450 pH0 ->Fill(pParam->Gain(0));
451 pH10->Fill(pParam->Gain(10));
452 pH20->Fill(pParam->Gain(20));
453 pH30->Fill(pParam->Gain(30));
454 pHold->Fill(pRes->IntPH(30));
461 pLegend->AddEntry(pH0,"y=0");
462 pLegend->AddEntry(pH10,"y=10");pH10->SetLineColor(kRed);
463 pLegend->AddEntry(pH20,"y=20");pH20->SetLineColor(kBlue);
464 pLegend->AddEntry(pH30,"y=30");pH30->SetLineColor(kGreen);
465 pLegend->AddEntry(pHold,"res");pHold->SetLineColor(kMagenta);
468 //__________________________________________________________________________________________________
471 AliRICHParam *pParam=new AliRICHParam;
472 AliRICHResponseV0 *pRes=new AliRICHResponseV0;
474 TLegend *pLegend=new TLegend(0.6,0.3,0.85,0.5);
475 TH1F *pH0= new TH1F("pH1", "Mip Charge",100,0,500);
476 TH1F *pH10=new TH1F("pH10","Mip Charge",100,0,500);
477 TH1F *pH20=new TH1F("pH20","Mip Charge",100,0,500);
478 TH1F *pH30=new TH1F("pH30","Mip Charge",100,0,500);
479 TH1F *pHold=new TH1F("pHold","Mip Charge",100,0,500);
480 for(int i=0;i<1000;i++){
481 pH0 ->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,0));
482 pH10->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,10));
483 pH20->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,20));
484 pH30->Fill(pParam->TotalCharge(kPiPlus,0.5e-9,30));
485 pHold->Fill(pRes->IntPH(0.5e-9,-30));
492 pLegend->AddEntry(pH0,"y=0");
493 pLegend->AddEntry(pH10,"y=10");pH10->SetLineColor(kRed);
494 pLegend->AddEntry(pH20,"y=20");pH20->SetLineColor(kBlue);
495 pLegend->AddEntry(pH30,"y=30");pH30->SetLineColor(kGreen);
496 pLegend->AddEntry(pHold,"res");pHold->SetLineColor(kMagenta);
499 //__________________________________________________________________________________________________
502 Info("TestDigitsOLD","Creating test digits.");
503 rl->MakeTree("D");r->MakeBranch("D");
509 t[0]=100;t[1]=200;t[2]=300;
510 c[0]=10;c[1]=20;c[2]=30;
513 d[0]=1;d[1]=1;d[2]=10;d[3]=3;d[4]=4;r->AddDigitOld(1,t,c,d);
515 d[0]=2;d[1]=2;d[2]=10;d[3]=3;d[4]=4;r->AddDigitOld(2,t,c,d);
516 d[0]=2;d[1]=3;d[2]=10;d[3]=3;d[4]=4;r->AddDigitOld(2,t,c,d);
518 d[0]=2;d[1]=2;d[2]=100;d[3]=3;d[4]=4;r->AddDigitOld(3,t,c,d);
519 d[0]=2;d[1]=3;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(3,t,c,d);
520 d[0]=2;d[1]=4;d[2]=200;d[3]=3;d[4]=4;r->AddDigitOld(3,t,c,d);
522 d[0]=2;d[1]=2;d[2]=100;d[3]=3;d[4]=4;r->AddDigitOld(4,t,c,d);
523 d[0]=2;d[1]=3;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(4,t,c,d);
524 d[0]=2;d[1]=4;d[2]=200;d[3]=3;d[4]=4;r->AddDigitOld(4,t,c,d);
525 d[0]=2;d[1]=5;d[2]= 50;d[3]=3;d[4]=4;r->AddDigitOld(4,t,c,d);
528 rl->WriteDigits("OVERWRITE");
531 Info("TestDigitsOLD","Stop.");
533 //__________________________________________________________________________________________________
536 Info("TestSdigits","Creating test sdigits.");
537 rl->MakeTree("S");r->MakeBranch("S");
538 //totally 19 must be trasformd to 6 digits
539 r->AddSdigit(1,40,40,10,40); r->AddSdigit(1,40,40,10,41); r->AddSdigit(1,40,40,10,42); r->AddSdigit(1,40,40,10,43);
540 r->AddSdigit(1,45,45,10,45); r->AddSdigit(1,45,45,10,45); r->AddSdigit(1,45,45,10,45); r->AddSdigit(1,45,45,10,45);
542 r->AddSdigit(1,20,20,10,20); r->AddSdigit(1,20,20,10,21);
543 r->AddSdigit(1,25,25,10,25); r->AddSdigit(1,25,25,10,25);
545 r->AddSdigit(1,30,30,10,30); r->AddSdigit(1,30,30,10,31); r->AddSdigit(1,30,30,10,32);
546 r->AddSdigit(1,35,35,10,35); r->AddSdigit(1,35,35,10,35); r->AddSdigit(1,35,35,10,35);
549 r->AddSdigit(1,10,10,10,10);
553 rl->WriteSDigits("OVERWRITE");
555 cout<<endl;r->Sdigits()->Print();
557 Info("TestSdigits","Stop.");
558 }//void TestSdigits()
559 //__________________________________________________________________________________________________
560 void TestClustersOLD()
562 Info("TestClusters","Creating test clusters.");
563 rl->MakeTree("R");r->MakeBranch("R");
566 r->AddClusterOld(1,c);
568 rl->WriteRecPoints("OVERWRITE");
569 rl->UnloadRecPoints();
570 r->ResetRawClusters();
572 Info("TestClusters","Stop.");
573 }//void TestClustersOLD()
574 //__________________________________________________________________________________________________
577 AliRICHParam *p=r->Param();
580 Float_t dz=p->DeadZone();
581 Float_t sx=p->SectorSizeX(); Float_t sy=p->SectorSizeY(); Float_t px=p->PcSizeX(); Float_t py=p->PcSizeY();
583 Info(" 1- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad(-px/2 , -py/2 ,padx,pady),padx,pady);
584 Info(" 48- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2-dz , -py/2 ,padx,pady),padx,pady);
585 Info(" 49- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2 , -py/2 ,padx,pady),padx,pady);
586 Info(" 96- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2 , -py/2 ,padx,pady),padx,pady);
587 Info(" 97- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2+dz , -py/2 ,padx,pady),padx,pady);
588 Info("144- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad( px/2 , -py/2 ,padx,pady),padx,pady);
590 Info(" 1- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad(-px/2 , -dz/2 ,padx,pady),padx,pady);
591 Info(" 48- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2-dz , -dz/2 ,padx,pady),padx,pady);
592 Info(" 49- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2 , -dz/2 ,padx,pady),padx,pady);
593 Info(" 96- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2 , -dz/2 ,padx,pady),padx,pady);
594 Info(" 97- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2+dz , -dz/2 ,padx,pady),padx,pady);
595 Info("144- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad( px/2 , -dz/2 ,padx,pady),padx,pady);
597 Info(" 1- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad(-px/2 , dz/2 ,padx,pady),padx,pady);
598 Info(" 48- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2-dz , dz/2 ,padx,pady),padx,pady);
599 Info(" 49- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2 , dz/2 ,padx,pady),padx,pady);
600 Info(" 96- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2 , dz/2 ,padx,pady),padx,pady);
601 Info(" 97- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2+dz , dz/2 ,padx,pady),padx,pady);
602 Info("144- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad( px/2 , dz/2 ,padx,pady),padx,pady);
604 Info(" 1-160","sec=%i padx=%3i pady=%3i",p->Local2Pad(-px/2 , py/2 ,padx,pady),padx,pady);
605 Info(" 48-160","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2-dz , py/2 ,padx,pady),padx,pady);
606 Info(" 49-160","sec=%i padx=%3i pady=%3i",p->Local2Pad(-sx/2 , py/2 ,padx,pady),padx,pady);
607 Info(" 96-160","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2 , py/2 ,padx,pady),padx,pady);
608 Info(" 97-160","sec=%i padx=%3i pady=%3i",p->Local2Pad( sx/2+dz , py/2 ,padx,pady),padx,pady);
609 Info("144-160","sec=%i padx=%3i pady=%3i",p->Local2Pad( px/2 , py/2 ,padx,pady),padx,pady);
611 Info(" 73-160","sec=%i padx=%3i pady=%3i",p->Local2Pad( 0 , py/2 ,padx,pady),padx,pady);
612 Info(" 73- 81","sec=%i padx=%3i pady=%3i",p->Local2Pad( 0 , dz/2 ,padx,pady),padx,pady);
613 Info("0-0dead","sec=%i padx=%3i pady=%3i",p->Local2Pad( 0 , 0 ,padx,pady),padx,pady);
614 Info(" 73- 80","sec=%i padx=%3i pady=%3i",p->Local2Pad( 0 , -dz/2 ,padx,pady),padx,pady);
615 Info(" 73- 1","sec=%i padx=%3i pady=%3i",p->Local2Pad( 0 , -py/2 ,padx,pady),padx,pady);
617 p->Pad2Local(padx= 1,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
618 p->Pad2Local(padx= 48,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
619 p->Pad2Local(padx= 49,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
620 p->Pad2Local(padx= 96,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
621 p->Pad2Local(padx= 97,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
622 p->Pad2Local(padx=144,pady=1,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
624 p->Pad2Local(padx= 1,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
625 p->Pad2Local(padx= 48,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
626 p->Pad2Local(padx= 49,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
627 p->Pad2Local(padx= 96,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
628 p->Pad2Local(padx= 97,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
629 p->Pad2Local(padx=144,pady=80,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
631 p->Pad2Local(padx= 1,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
632 p->Pad2Local(padx= 48,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
633 p->Pad2Local(padx= 49,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
634 p->Pad2Local(padx= 96,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
635 p->Pad2Local(padx= 97,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
636 p->Pad2Local(padx=144,pady=81,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
638 p->Pad2Local(padx= 1,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
639 p->Pad2Local(padx= 48,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
640 p->Pad2Local(padx= 49,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
641 p->Pad2Local(padx= 96,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
642 p->Pad2Local(padx= 97,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
643 p->Pad2Local(padx=144,pady=160,x,y); cout<<"padx="<<padx<<" pady="<<pady<<" x="<<x<<" y="<<y<<endl;
645 //__________________________________________________________________________________________________
648 TControlBar *pMenu = new TControlBar("vertical","RICH test");
649 pMenu->AddButton("Test segmentation", "TestSeg()", "Test AliRICHParam::L2P() method");
650 pMenu->AddButton("Test transform", "TestTransform()", "Test ALiRICHChamber::L2G() and G2L methods");
651 pMenu->AddButton("Test gain", "TestGain()", "Test AliRICHParam::Gain() method");
652 pMenu->AddButton("Test MIP charge", "TestMipCharge()", "Test AliRICHParam::TotalCharge() method");
653 pMenu->AddButton("Test Sdigits", "TestSdigits()", "Create test set of sdigits");
654 pMenu->AddButton("Test Digits OLD", "TestDigitsOLD()", "Create test set of OLD digits");
655 pMenu->AddButton("Test Clusters OLD", "TestClustersOLD()", "Create test set of OLD clusters");
658 //__________________________________________________________________________________________________
661 TControlBar *pMenu = new TControlBar("vertical","RICH draw");
662 pMenu->AddButton("RICH Isometry", "gMC->Gdraw(\"ALIC\", 60,40,0, 10,10, 0.008,0.008)","Draws ALIC volume in isometry");
663 pMenu->AddButton("RICH Front XY", "gMC->Gdraw(\"ALIC\", 0,0,0, 10,10, 0.01,0.01)","Draws ALIC volume in XY view");
664 pMenu->AddButton("RICH Side YZ", "gMC->Gdraw(\"ALIC\",90,180, 0, 10,10, 0.01,0.01)","Draws ALIC volume in YZ view");
665 pMenu->AddButton("RICH Top XZ", "gMC->Gdraw(\"ALIC\",90, 90, 0, 10,10, 0.01,0.01)","Draws ALIC volume in XZ view");
666 pMenu->AddButton("Module Isometry","gMC->Gdraw(\"SRIC\", 30,60,0, 10,10, 0.1,0.1)","Draws SRIC volume in isometry");
667 pMenu->AddButton("Module Front XY","gMC->Gdraw(\"SRIC\", 0,0,0, 10,10, 0.1,0.1)","Draws SRIC volume in XY view");
668 pMenu->AddButton("Module Top XZ", "gMC->Gdraw(\"SRIC\",90, 90, 0, 10,10, 0.1,0.1)","Draws SRIC volume in XZ view");
669 pMenu->AddButton("ALICE Tree", "((TGeant3*)gMC)->Gdtree(\"ALIC\")","Draws ALICE tree");
670 pMenu->AddButton("RICH Tree", "((TGeant3*)gMC)->Gdtree(\"RICH\")","Draws RICH tree");
671 pMenu->AddButton("Geo test", "GeoTest()", "Draw RICH geo as a macro");
672 pMenu->AddButton("Print ref", "PrintGeo()", "Print RICH chambers default position");
673 pMenu->AddButton("AliRICH::Print", "r->Print();", "Print RICH chambers default position");
674 pMenu->AddButton("Test transform","TestTransform()","Test L2G and G2L methods");
675 pMenu->AddButton("Geo GUI", "new G3GeometryGUI;","Create instance of G4GeometryGUI");
678 //__________________________________________________________________________________________________
681 TControlBar *pMenu = new TControlBar("vertical","RICH main");
683 pMenu->AddButton("Debug ON", "DebugON();", "Switch debug on-off");
684 pMenu->AddButton("Debug OFF", "DebugOFF();", "Switch debug on-off");
685 if(CheckAlice()){//it's from file, reconstruct
686 pMenu->AddButton("Hits->Sdigits->Digits","Hits2Digits()","Convert");
687 pMenu->AddButton("Digits->Recos", "Digits2Recos()","Convert");
688 pMenu->AddButton("Show","Show3()","Shows the structure of events in files");
689 pMenu->AddButton("Hits->Sdigits", "Hits2Sdigits()", "Perform first phase converstion");
690 pMenu->AddButton("Specials->Sdigits","Specials2Sdigits()", "Perform first phase converstion");
691 pMenu->AddButton("Sdigits->Digits", "Sdigits2Digits()", "Perform first phase converstion");
692 pMenu->AddButton("Digits->Clusters", "Digits2Clusters()", "Perform first phase converstion");
694 pMenu->AddButton("Sdigits->DigitsOLD", "Sdigits2DigitsOLD()","Perform second phase converstion");
695 pMenu->AddButton("DigitsOLD->RawClustersOLD", "DigitsOLD2RawClustersOLD()", "Perform second phase converstion");
697 }else{//it's aliroot, simulate
698 pMenu->AddButton("Run", "a->Run(1)", "Process!");
700 pMenu->AddButton("Geo submenu", "GeoMenu()", "Shows geomentry submenu");
701 pMenu->AddButton("Test submenu", "TestMenu()", "Shows test submenu");
702 pMenu->AddButton("Browser", "new TBrowser;", "Start ROOT TBrowser");
703 pMenu->AddButton("Quit", ".q", "Close session");
705 a=gAlice;//for manual manipulation convinience
707 //__________________________________________________________________________________________________