1 /* *************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.8 2000/07/12 08:56:32 fca
19 Coding convention correction and warning removal
21 Revision 1.7 2000/06/28 21:27:45 morsch
22 Most coding rule violations corrected.
23 Still to do: Split the file (on file per class) ? Avoid the global variables.
24 Copy constructors and assignment operators (dummy ?)
26 Revision 1.6 2000/04/14 11:07:46 morsch
27 Correct volume to medium assignment in case several media are asigned to the
30 Revision 1.5 2000/03/20 15:11:03 fca
31 Mods to make the code compile on HP
33 Revision 1.4 2000/01/18 16:12:08 morsch
34 Bug in calculation of number of volume divisions and number of positionings corrected
35 Browser for Material and Media properties added
37 Revision 1.3 1999/11/14 14:31:14 fca
38 Correct small error and remove compilation warnings on HP
40 Revision 1.2 1999/11/10 16:53:35 fca
41 The new geometry viewer from A.Morsch
47 * Written by Andreas Morsch
51 * For questions critics and suggestions to this part of the code
52 * contact andreas.morsch@cern.ch
54 **************************************************************************/
62 #include "TGTextBuffer.h"
63 #include "TGTextEntry.h"
69 #include "TApplication.h"
70 #include "TGFileDialog.h"
72 #include "AliGuiGeomMain.h"
73 #include "AliGUIMaterial.h"
74 #include "AliGuiGeomDialog.h"
75 #include "AliDrawVolume.h"
76 #include "AliGUIMedium.h"
79 ClassImp(AliGuiGeomMain)
81 static Int_t gCurrentParticle = 1;
82 static Int_t gCurrentProcess = 1;
84 const Text_t* kLabelTextP[19] =
85 {"PAIR ", "COMP ", "PHOT ", "PFIS ", "DRAY ", "ANNI ", "BREM ",
86 "HADR ", "MUNU ", "DCAY ", "LOSS ", "MULS ", "GHCOR1", "BIRK1 ",
87 "BIRK2 ", "BIRK3 ", "LABS ", "SYNC ", "STRA "};
90 const Text_t* kLabelTextC[10] =
91 {"CUTGAM", "CUTELE", "CUTNEU", "CUTHAD", "CUTMUO", "BCUTE", "BCUTM",
92 "DCUTE ", "DCUTM ", "PPCUTM"};
94 const Text_t* kLabelTextPart[24] =
95 {"Photon", "Positron", "Electron", "Neutrino", "Muon+", "Muon-",
96 "Pi0", "Pi+", "Pi-", "Kaon_L", "Kaon+", "Kaon-", "Neutron", "Proton",
97 "Anti Proton", "Kaon_S", "Eta", "Lambda", "Sigma+", "Sigma0", "Sigma-",
98 "Xi0", "Xi-", "Omega-"};
100 const Text_t* kLabelTextMechanism[24] =
101 {"HADF", "INEF", "ELAF", "FISF", "CAPF",
102 "HADG", "INEG", "ELAG", "FISG", "CAPG",
103 "LOSS", "PHOT", "ANNI", "COMP", "BREM",
104 "PAIR", "DRAY", "PFIS", "RAYL", "HADG",
105 "MUNU", "RANG", "STEP", "MUON"};
110 enum ETestCommandIdentifiers {
135 Int_t mbButtonId[9] = { kMBYes, kMBNo, kMBOk, kMBApply,
136 kMBRetry, kMBIgnore, kMBCancel,
137 kMBClose, kMBDismiss };
139 EMsgBoxIcon mbIcon[4] = { kMBIconStop, kMBIconQuestion,
140 kMBIconExclamation, kMBIconAsterisk };
142 const char *kFileTypes[] = { "All files", "*",
143 "ROOT files", "*.root",
144 "ROOT macros", "*.C",
150 TGListTreeItem* AliGuiGeomMain::
151 AddItem(TObject * obj, TGListTreeItem *parent, const char* name, const TGPicture *open, const TGPicture *closed)
153 // Add item to the list tree
154 return fLt->AddItem(parent, name, obj, open, closed);
157 AliGuiGeomMain::AliGuiGeomMain(const TGWindow *p, UInt_t w, UInt_t h)
158 : TGMainFrame(p, w, h)
160 // Create test main frame. A TGMainFrame is a top level window.
161 // Create menubar and popup menus. The hint objects are used to place
162 // and group the different menu widgets with respect to eachother.
165 fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX,
167 fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0);
168 fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight);
170 fMenuFile = new TGPopupMenu(gClient->GetRoot());
171 fMenuFile->AddEntry("&Open...", kFileOpen);
172 fMenuFile->AddEntry("&Save", kFileSave);
173 fMenuFile->AddEntry("S&ave as...", kFileSaveAs);
174 fMenuFile->AddEntry("&Close", -1);
175 fMenuFile->AddSeparator();
176 fMenuFile->AddEntry("E&xit", kFileExit);
178 fMenuFile->DisableEntry(kFileSaveAs);
179 fMenuFile->DisableEntry(kFileOpen);
180 fMenuFile->DisableEntry(kFileSave);
184 fMenuTest = new TGPopupMenu(this);
185 fMenuTest->AddLabel("Draw");
186 fMenuTest->AddSeparator();
187 fMenuTest->AddEntry("&Volume Draw Control", kTestDlg);
188 fMenuTest->AddSeparator();
189 fMenuTest->Associate(this);
192 fMenuHelp = new TGPopupMenu(gClient->GetRoot());
193 fMenuHelp->AddEntry("&Contents", kHelpContents);
194 fMenuHelp->AddEntry("&Search...", kHelpSearch);
195 fMenuHelp->AddSeparator();
196 fMenuHelp->AddEntry("&About", kHelpAbout);
198 fMenuFile->DisableEntry(kHelpContents);
199 fMenuFile->DisableEntry(kHelpSearch);
200 fMenuFile->DisableEntry(kHelpAbout);
201 // Menu button messages are handled by the main frame (i.e. "this")
202 // ProcessMessage() method.
203 fMenuFile->Associate(this);
204 fMenuTest->Associate(this);
205 fMenuHelp->Associate(this);
207 fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
208 fMenuBar->AddPopup("&File", fMenuFile, fMenuBarItemLayout);
209 fMenuBar->AddPopup("&Draw Control", fMenuTest, fMenuBarItemLayout);
210 fMenuBar->AddPopup("&Help", fMenuHelp, fMenuBarHelpLayout);
212 AddFrame(fMenuBar, fMenuBarLayout);
217 fTab = new TGTab(this, 400, 400);
218 TGCompositeFrame *tf = fTab->AddTab("Volumes");
219 TGLayoutHints *lTab = new TGLayoutHints(kLHintsBottom | kLHintsExpandX |
220 kLHintsExpandY, 2, 2, 5, 1);
221 AddFrame(fTab, lTab);
223 // Create TGCanvas and a canvas container which uses a tile layout manager
224 fCanvasWindow = new TGCanvas(tf, 400, 240);
226 fLt = new TGListTree(fCanvasWindow->GetViewPort(), 10, 10, kHorizontalFrame,
228 fLt->Associate(this);
229 fCanvasWindow->SetContainer(fLt);
232 TGLayoutHints *lo = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY);
233 tf->AddFrame(fCanvasWindow, lo);
237 tf = fTab->AddTab("Materials");
238 fF2 = new TGCompositeFrame(tf, 60, 20, kHorizontalFrame);
239 fL2 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5);
240 // ComboBox for materials
241 fMaterialCombo = new TGComboBox(fF2, 1);
242 fF2->AddFrame(fMaterialCombo, fL2);
244 // text labels with material properties
246 Text_t* labelText[6] =
252 "Absorption Length"};
255 new TGLayoutHints(kLHintsTop | kLHintsExpandY, 5, 5, 5, 5);
256 TGLayoutHints* bFly1 =
257 new TGLayoutHints(kLHintsLeft | kLHintsExpandX );
258 fF21 = new TGCompositeFrame(fF2, 60, 20, kVerticalFrame);
259 fF2->AddFrame(fF21,fL2);
260 { //Begin local scope for i
261 for (Int_t i=0; i<6; i++) {
263 fHframe[i] = new TGHorizontalFrame(fF21, 400, 100, kFixedWidth);
264 fF21->AddFrame(fHframe[i], bly);
265 fTbh[i] = new TGTextBuffer(10);
266 fTeh[i] = new TGTextEntry(fHframe[i], fTbh[i],idT);
267 fTeh[i]->Associate(this);
268 fLabel[i] = new TGLabel(fHframe[i], labelText[i]);
269 fHframe[i]->AddFrame(fLabel[i], bFly1);
270 fHframe[i]->AddFrame(fTeh[i], bFly1);
272 } //End local scope for i
273 tf->AddFrame(fF2, fL2);
274 fMaterialCombo->Resize(200, 20);
275 fMaterialCombo->Associate(this);
280 tf = fTab->AddTab("Media");
281 fF3 = new TGCompositeFrame(tf, 60, 20, kHorizontalFrame);
282 // ComboBox for tracking media
283 fMediaCombo = new TGComboBox(fF3, 2);
284 fF3->AddFrame(fMediaCombo, fL2);
286 // text labels with material properties
288 Text_t* labelTextM[8] =
289 {"Sensitivity Flag ",
290 "Magnetic Field Flag ",
292 "Max. Ang. Deviation ",
294 "Max. Frac. Energy Loss",
295 "Crossing Precission ",
296 "Minimum Step Size "};
298 fF31 = new TGCompositeFrame(fF3, 60, 20, kVerticalFrame);
299 fF3->AddFrame(fF31,fL2);
300 { //Begin local scope for i
301 for (Int_t i=0; i<8; i++) {
303 fHframeM[i] = new TGHorizontalFrame(fF31, 400, 100, kFixedWidth);
304 fF31->AddFrame(fHframeM[i], bly);
305 fTbhM[i] = new TGTextBuffer(10);
306 fTehM[i] = new TGTextEntry(fHframeM[i], fTbhM[i],idT);
307 fTehM[i]->Associate(this);
308 fLabelM[i] = new TGLabel(fHframeM[i], labelTextM[i]);
309 fHframeM[i]->AddFrame(fLabelM[i], bFly1);
310 fHframeM[i]->AddFrame(fTehM[i], bFly1);
312 } //End local scope for i
313 tf->AddFrame(fF3, fL2);
314 fMediaCombo->Resize(200, 20);
315 fMediaCombo->Associate(this);
318 tf = fTab->AddTab("Processes");
319 fF4 = new TGCompositeFrame(tf, 60, 20, kHorizontalFrame);
320 fProcessLB = new TGListBox(fF4, 1);
321 fF4->AddFrame(fProcessLB, fL2);
322 tf->AddFrame(fF4, fL2);
323 fProcessLB->Resize(150, 350);
324 fProcessLB->Associate(this);
328 tf = fTab->AddTab("Cuts");
329 fF5 = new TGCompositeFrame(tf, 60, 20, kHorizontalFrame);
330 fCutsLB = new TGListBox(fF5, 1);
331 fF5->AddFrame(fCutsLB, fL2);
332 tf->AddFrame(fF5, fL2);
333 fCutsLB->Resize(150, 350);
336 // de/dx and cross-sections
337 tf = fTab->AddTab("DE/DX and X-Sections");
338 fF6 = new TGCompositeFrame(tf, 60, 20, kHorizontalFrame);
340 // ComboBox for particles
341 fF61 = new TGCompositeFrame(fF6, 60, 20, kVerticalFrame);
342 fF6->AddFrame(fF61, fL2);
343 fParticleCombo = new TGComboBox(fF61, 3);
344 fF61->AddFrame(fParticleCombo, fL2);
345 { //Begin local scope for i
346 for (Int_t i = 0; i < 24; i++) {
348 sprintf(tmp, "%s", kLabelTextPart[i]);
349 fParticleCombo->AddEntry(tmp, i+1);
351 } //End local scope for i
352 fParticleCombo->Select(1);
353 fParticleCombo->Resize(100, 20);
354 fParticleCombo->Associate(this);
356 // ComboBox for mechanisms
357 fF63 = new TGCompositeFrame(fF6, 60, 20, kVerticalFrame);
358 fF6->AddFrame(fF63, fL2);
359 fMechanismCombo = new TGComboBox(fF63, 4);
360 fF63->AddFrame(fMechanismCombo, fL2);
361 { //Begin local scope for i
362 for (Int_t i = 0; i < 24; i++) {
364 sprintf(tmp, "%s", kLabelTextMechanism[i]);
365 fMechanismCombo->AddEntry(tmp, i+1);
367 } //End local scope for i
368 fMechanismCombo->Select(1);
369 fMechanismCombo->Resize(100, 20);
370 fMechanismCombo->Associate(this);
375 fTbh61 = new TGTextBuffer(10);
376 fTeh61 = new TGTextEntry(fF61, fTbh61,10);
377 fTbh61->AddText(0, " 100");
378 fTeh61->Associate(this);
380 fTbh62 = new TGTextBuffer(10);
381 fTeh62 = new TGTextEntry(fF61, fTbh62,11);
382 fTbh62->AddText(0, "0.001");
383 fTeh62->Associate(this);
385 fTbh63 = new TGTextBuffer(10);
386 fTeh63 = new TGTextEntry(fF61, fTbh63,12);
387 fTbh63->AddText(0, "10.");
388 fTeh63->Associate(this);
394 fSLabel61 = new TGLabel(fF61, "Nbins-Emin-Emax");
395 bFly1 = new TGLayoutHints(kLHintsLeft | kLHintsExpandX );
396 fF61->AddFrame(fSLabel61, bFly1);
397 fF61->AddFrame(fTeh61, bFly1);
398 fF61->AddFrame(fTeh62, bFly1);
399 fF61->AddFrame(fTeh63, bFly1);
402 fF62 = new TGCompositeFrame(fF6, 60, 20, kHorizontalFrame);
403 fF6->AddFrame(fF62, fL2);
404 fPlotButton = new TGTextButton(fF62, "Plot", 1);
405 fPlotButton -> Associate(this);
406 fF62->AddFrame(fPlotButton);
408 tf->AddFrame(fF6, fL2);
409 // Window name and final mapping
411 SetWindowName("AliRoot Geometry Browser");
413 // We need to use GetDefault...() to initialize the layout algorithm...
414 Resize(GetDefaultSize());
418 AliGuiGeomMain::~AliGuiGeomMain()
420 // Delete all created widgets.
422 delete fCanvasWindow;
424 delete fMenuBarLayout;
425 delete fMenuBarItemLayout;
426 delete fMenuBarHelpLayout;
433 void AliGuiGeomMain::Streamer(TBuffer &)
439 void AliGuiGeomMain::Plot()
441 // plot de/dx or cross-sections
442 const Float_t kAvo=0.60221367;
443 Float_t *tkin = new Float_t[fNbins];
444 Float_t *value = new Float_t[fNbins];
445 Float_t *pcut = new Float_t[fNbins];
447 Int_t imate=gCurrentMaterial->Id();
448 Float_t z=gCurrentMaterial->Z();
449 Float_t a=gCurrentMaterial->A();
450 Float_t density=gCurrentMaterial->Density();
452 Int_t ipart=gCurrentParticle;
453 const char *kChMeca= kLabelTextMechanism[gCurrentProcess-1];
456 strncpy(tmp, kChMeca, 4);
459 Float_t de=(fEmax-fEmin)/fNbins;
460 { //Begin local scope for i
461 for (Int_t i=0; i<kdim; i++) {
462 tkin[i]=fEmin+Float_t(i)*de;
465 } //End local scope for i
466 if (kChMeca!="MUON") {
467 ((TGeant3*) gMC)->Gftmat(imate, ipart, tmp, kdim, tkin, value, pcut, ixst);
469 for (Int_t i=0; i<kdim; i++) {
470 Float_t ekin=tkin[i];
471 value[i]+=((TGeant3*) gMC)->Gbrelm(z,ekin,1.e10);
472 value[i]+=((TGeant3*) gMC)->Gprelm(z,ekin,1.e10);
473 value[i]*=1000.*kAvo*density/a;
478 printf("\n %d %d %s %d \n",imate, ipart, kChMeca, kdim);
480 TGraph *graph = new TGraph(kdim,tkin,value);
481 TCanvas *c1 = new TCanvas("c1"," ",400,10,600,700);
485 graph->SetFillColor(42);
486 graph->SetMarkerColor(4);
487 graph->SetMarkerStyle(21);
489 graph->GetHistogram()->SetXTitle("Energy (GeV)");
490 if (kChMeca == "RANG" || kChMeca == "STEP") {
491 graph->GetHistogram()->SetYTitle
493 } else if (kChMeca == "LOSS" || kChMeca == "MUON") {
494 graph->GetHistogram()->SetYTitle("dE/dx (MeV/cm)");
496 graph->GetHistogram()->SetYTitle
497 ("Macroscopic X-Section (1/cm)");
508 void AliGuiGeomMain::Update()
515 Int_t imat=gCurrentVolume->Material();
516 Int_t nmat=fComboEntries->GetEntriesFast();
518 for (i=0; i<nmat; i++) {
519 gCurrentMaterial = (AliGUIMaterial*)
520 (fComboEntries->UncheckedAt(i));
521 if (gCurrentMaterial->Id()==imat) break;
523 Int_t imed = gCurrentVolume->Medium();
524 Int_t nmed=fComboMediaEntries->GetEntriesFast();
525 for (i=0; i<nmed; i++) {
526 gCurrentMedium = (AliGUIMedium*)
527 (fComboMediaEntries->UncheckedAt(i));
528 if (gCurrentMedium->Id()==imed) break;
536 void AliGuiGeomMain::UpdateCombo()
540 Int_t imat = gCurrentMaterial->Id();
541 Float_t a = gCurrentMaterial->A();
542 Float_t z = gCurrentMaterial->Z();
543 Float_t dens = gCurrentMaterial->Density();
544 Float_t radl = gCurrentMaterial->RadiationLength();
545 Float_t absl = gCurrentMaterial->AbsorptionLength();
546 Int_t entry=gCurrentMaterial->ItemId();
549 fMaterialCombo->Select(entry);
550 fMediaCombo->Select(entry);
553 sprintf(buf, "%10i", imat);
555 fTbh[0]->AddText(0, buf);
556 gClient->NeedRedraw(fTeh[0]);
557 sprintf(buf, "%10.2e", a);
559 fTbh[1]->AddText(0, buf);
560 gClient->NeedRedraw(fTeh[1]);
562 sprintf(buf, "%10.2e", z);
564 fTbh[2]->AddText(0, buf);
565 gClient->NeedRedraw(fTeh[2]);
567 sprintf(buf, "%10.2e", dens);
569 fTbh[3]->AddText(0, buf);
570 gClient->NeedRedraw(fTeh[3]);
572 sprintf(buf, "%10.2e", radl);
574 fTbh[4]->AddText(0, buf);
575 gClient->NeedRedraw(fTeh[4]);
577 sprintf(buf, "%10.2e", absl);
579 fTbh[5]->AddText(0, buf);
580 gClient->NeedRedraw(fTeh[5]);
583 sprintf(buf, "%10i", gCurrentMedium->Isvol());
585 fTbhM[0]->AddText(0, buf);
586 gClient->NeedRedraw(fTehM[0]);
589 sprintf(buf, "%10i", gCurrentMedium->Ifield());
591 fTbhM[1]->AddText(0, buf);
592 gClient->NeedRedraw(fTehM[1]);
594 sprintf(buf, "%10.2e", gCurrentMedium->Fieldm());
596 fTbhM[2]->AddText(0, buf);
597 gClient->NeedRedraw(fTehM[2]);
599 sprintf(buf, "%10.2e", gCurrentMedium->Tmaxfd());
601 fTbhM[3]->AddText(0, buf);
602 gClient->NeedRedraw(fTehM[3]);
604 sprintf(buf, "%10.2e", gCurrentMedium->Stemax());
606 fTbhM[4]->AddText(0, buf);
607 gClient->NeedRedraw(fTehM[4]);
609 sprintf(buf, "%10.2e", gCurrentMedium->Deemax());
611 fTbhM[5]->AddText(0, buf);
612 gClient->NeedRedraw(fTehM[5]);
614 sprintf(buf, "%10.2e", gCurrentMedium->Epsil());
616 fTbhM[6]->AddText(0, buf);
617 gClient->NeedRedraw(fTehM[6]);
619 sprintf(buf, "%10.2e", gCurrentMedium->Stmin());
621 fTbhM[7]->AddText(0, buf);
622 gClient->NeedRedraw(fTehM[7]);
625 void AliGuiGeomMain::UpdateListBox()
627 // Update the list box
629 fProcessLB->RemoveEntries(1,19);
630 for (i=11; i < 30; i++) {
631 Float_t p=gCurrentMedium->GetPar(i);
633 sprintf(tmp, "%6s%5d", kLabelTextP[i-11], Int_t(p));
634 fProcessLB->AddEntry(tmp, i-10);
636 fProcessLB->MapSubwindows();
637 fProcessLB->Layout();
639 fCutsLB->RemoveEntries(1,10);
640 for (i=1; i < 11; i++) {
641 Float_t p=gCurrentMedium->GetPar(i);
643 sprintf(tmp, "%6s%10.3e", kLabelTextC[i-1], p);
644 fCutsLB->AddEntry(tmp,i);
646 fCutsLB->MapSubwindows();
651 void AliGuiGeomMain::CloseWindow()
653 // Got close message for this MainFrame. Calls parent CloseWindow()
654 // (which destroys the window) and terminate the application.
655 // The close message is generated by the window manager when its close
656 // window menu item is selected.
658 TGMainFrame::CloseWindow();
659 gApplication->Terminate(0);
662 Bool_t AliGuiGeomMain::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
664 // Process messages to widgets
665 switch (GET_MSG(msg)) {
667 // Text entries for binning of cross-section plots
669 switch (GET_SUBMSG(msg)) {
670 case kTE_TEXTCHANGED:
673 fNbins=(Int_t) atof(fTbh61->GetString());
676 fEmin= atof(fTbh62->GetString());
679 fEmax= atof(fTbh63->GetString());
682 printf("\n %d %f %f binning", fNbins, fEmin, fEmax);
686 // ListTree for volumes
688 switch (GET_SUBMSG(msg)) {
690 // Handle mouse click
693 // Button 1: Select volume
694 if (parm1 == kButton1) {
695 TGListTreeItem *item;
696 if ((item = fLt->GetSelected()))
698 gCurrentVolume=((AliDrawVolume *) item->GetUserData());
703 // Button 2: Draw volume specifications
705 if (parm1 == kButton2) {
706 TGListTreeItem *item;
707 if ((item = fLt->GetSelected()))
710 ((AliDrawVolume *) item->GetUserData())->DrawSpec();
712 gCurrentVolume=((AliDrawVolume *) item->GetUserData());
717 // Button 3: Draw Volume
718 if (parm1 == kButton3) {
719 TGListTreeItem *item;
720 if ((item = fLt->GetSelected()))
722 ((AliDrawVolume *) item->GetUserData())->Draw();
723 gCurrentVolume=((AliDrawVolume *) item->GetUserData());
730 case kCT_ITEMDBLCLICK:
731 if (parm1 == kButton1) {
732 if (fLt->GetSelected() != 0) {
733 gClient->NeedRedraw(fLt);
742 switch (GET_SUBMSG(msg)) {
752 // Combo box bindings
757 gCurrentMaterial=(AliGUIMaterial*)
758 (fComboEntries->UncheckedAt(Int_t(parm2-1)));
759 gCurrentMedium=(AliGUIMedium*)
760 (fComboMediaEntries->UncheckedAt(Int_t(parm2-1)));
767 gCurrentMedium=(AliGUIMedium*)
768 (fComboMediaEntries->UncheckedAt(Int_t(parm2-1)));
769 gCurrentMaterial=(AliGUIMaterial*)
770 (fComboEntries->UncheckedAt(Int_t(parm2-1)));
777 gCurrentParticle=Int_t(parm2);
782 gCurrentProcess=Int_t(parm2);
783 printf("\n Process %d", gCurrentProcess);
796 fi.fFileTypes = (char **)kFileTypes;
797 new TGFileDialog(gClient->GetRoot(), this, kFDOpen,&fi);
802 fDialog = new AliGuiGeomDialog
803 (gClient->GetRoot(), this, 400, 200);
807 printf("kFileSave\n");
811 CloseWindow(); // this also terminates theApp
825 void AliGuiGeomMain::AddMaterial(AliGUIMaterial *Material, Int_t i)
827 // Add material to material combo
829 tmp=Material->Name();
830 Material->SetItemId(i);
831 fMaterialCombo->AddEntry(tmp, i);
832 fMaterialCombo->Select(i);
833 fMaterialCombo->Resize(200, 20);
836 void AliGuiGeomMain::AddMedium(AliGUIMedium *Medium, Int_t i)
838 // Add medium to medium combo
841 Medium->SetItemId(i);
843 fMediaCombo->AddEntry(tmp, i);
844 fMediaCombo->Select(i);
845 fMediaCombo->Resize(200, 20);