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.2 1999/09/29 09:24:19 fca
19 Introduction of the Copyright and cvs Log
23 //////////////////////////////////////////////////////
24 // C++ dummy interface to Geant3 basic routines //
25 //////////////////////////////////////////////////////
32 #include "AliGShape.h"
33 #include "AliGMaterial.h"
34 #include "AliGTransform.h"
38 #include "AliGPCone.h"
39 #include "AliGeometry.h"
41 //---------------------------------------------------------
56 Mater* AliMaterials[MAXMAT]; // Array of Mater structs containing the AliMaterial parameters.
73 Med* AliMediums[MAXMAT]; // Array of Med structs containing the AliMedium parameters.
81 NodePosp* Posp[MAXMAT];
83 AliGMaterial* Mat[MAXMAT]; // List of Pointers to my AliGMaterials created
91 TList* listNodes = new TList(); // List of Nodes
92 TList* listTransf = new TList();
93 TList* listShapes = new TList();
94 TList* listMaterials = new TList();
96 AliGNode* TopNode = NULL;
98 /***********************************************************************/
102 /***********************************************************************/
104 AliGEODB::AliGEODB(const char *title, Int_t) : AliMC("AliGEODB",title)
106 //cout << " AliGEODB" << endl;
109 /***********************************************************************/
111 void AliGEODB::DefaultRange()
113 cout << " DefaultRange" << endl;
116 //=======================functions from GBASE
118 /***********************************************************************/
120 void AliGEODB::Gfile(const char*, const char*)
122 cout << " Gfile" << endl;
125 /***********************************************************************/
127 void AliGEODB::GeomIter()
129 cout << " GeomIter" << endl;
132 /***********************************************************************/
134 Int_t AliGEODB::CurrentMaterial(Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const
136 cout << " CurrentMaterial" << endl;
140 /***********************************************************************/
142 Int_t AliGEODB::NextVolUp(Text_t*, Int_t&)
144 cout << " NextVolUp" << endl;
148 /***********************************************************************/
150 Int_t AliGEODB::CurrentVol(Text_t*, Int_t&) const
152 cout << " CurrentVol" << endl;
156 /***********************************************************************/
158 Int_t AliGEODB::NofVolumes() const
160 cout << " NofVolumes" << endl;
164 /***********************************************************************/
166 Int_t AliGEODB::CurrentVolOff(Int_t, Text_t*, Int_t&) const
168 cout << " CurrentVolOff" << endl;
172 /***********************************************************************/
174 void AliGEODB::TrackPosition(Float_t*) const
176 cout << " TrackPosition" << endl;
179 /***********************************************************************/
181 void AliGEODB::TrackMomentum(Float_t*) const
183 cout << " TrackMomentum" << endl;
186 /***********************************************************************/
188 Int_t AliGEODB::VolId( Text_t* name ) const
190 cout << " VolId" << endl;
194 /***********************************************************************/
196 const char* AliGEODB::VolName(Int_t ) const
198 cout << " VolName" << endl;
202 /***********************************************************************/
204 Float_t AliGEODB::TrackCharge() const
206 cout << " TrackCharge" << endl;
210 /***********************************************************************/
212 Float_t AliGEODB::TrackMass() const
214 cout << " TrackMass" << endl;
218 /***********************************************************************/
220 Bool_t AliGEODB::TrackInside() const
222 cout << " TrackInside" << endl;
226 /***********************************************************************/
228 Bool_t AliGEODB::TrackEntering() const
230 cout << " TrackEntering" << endl;
234 /***********************************************************************/
236 Bool_t AliGEODB::TrackExiting() const
238 cout << " TrackExiting" << endl;
242 /***********************************************************************/
244 Bool_t AliGEODB::TrackOut() const
246 cout << " TrackOut" << endl;
250 /***********************************************************************/
252 Bool_t AliGEODB::TrackDisappear() const
254 cout << " TrackDisappear" << endl;
258 /***********************************************************************/
260 Bool_t AliGEODB::TrackStop() const
262 cout << " TrackStop" << endl;
266 /***********************************************************************/
268 Int_t AliGEODB::NSecondaries() const
270 cout << " NSecondaries" << endl;
274 /***********************************************************************/
276 const char* AliGEODB::ProdProcess() const
278 cout << " ProdProcess" << endl;
282 /***********************************************************************/
284 void AliGEODB::GetSecondary(Int_t, Int_t&, Float_t*, Float_t*)
286 cout << " GetSecondary" << endl;
289 /***********************************************************************/
291 Float_t AliGEODB::MaxStep() const
293 cout << " MaxStep" << endl;
297 /***********************************************************************/
299 void AliGEODB::SetMaxStep(Float_t )
301 cout << " SetMaxStep" << endl;
304 /***********************************************************************/
306 void AliGEODB::GetParticle(const Int_t, char*, Float_t&) const
308 cout << " GetParticle" << endl;
311 /***********************************************************************/
313 Int_t AliGEODB::CurrentEvent() const
315 cout << " CurrentEvent" << endl;
319 /***********************************************************************/
321 Int_t AliGEODB::GetMedium() const
323 cout << " GetMedium" << endl;
327 /***********************************************************************/
329 Float_t AliGEODB::Edep() const
331 cout << " Edep" << endl;
335 /***********************************************************************/
337 Float_t AliGEODB::Etot() const
339 cout << " Etot" << endl;
343 /***********************************************************************/
345 void AliGEODB::Rndm(Float_t*, const Int_t) const
347 cout << " Rndm" << endl;
350 /***********************************************************************/
352 Float_t AliGEODB::TrackStep() const
354 cout << " TrackStep" << endl;
358 /***********************************************************************/
360 Float_t AliGEODB::TrackLength() const
362 cout << " TrackLength" << endl;
366 /***********************************************************************/
368 Float_t AliGEODB::TrackTime() const
370 cout << " TrackTime" << endl;
374 /***********************************************************************/
376 Int_t AliGEODB::TrackPid() const
378 cout << " TrackPid" << endl;
382 /***********************************************************************/
384 Bool_t AliGEODB::TrackAlive() const
386 cout << " TrackAlive" << endl;
390 /***********************************************************************/
392 void AliGEODB::StopTrack()
394 cout << " StopTrack" << endl;
397 /***********************************************************************/
399 void AliGEODB::StopEvent()
401 cout << " StopEvent" << endl;
404 /***********************************************************************/
406 void AliGEODB::SetMaxNStep(Int_t)
408 cout << " SetMaxNStep" << endl;
411 /***********************************************************************/
413 void AliGEODB::SetColors()
415 cout << " SetColors" << endl;
418 /***********************************************************************/
420 Int_t AliGEODB::GetMaxNStep() const
422 cout << " GetMaxNStep" << endl;
426 /***********************************************************************/
428 void AliGEODB::Material( Int_t& kmat, const char* name, Float_t a, Float_t z, Float_t dens, Float_t radl, Float_t absl,Float_t* buf, Int_t nwbuf )
430 if( MateCount >= MAXMAT ) {
431 printf( " ERROR: Material number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
435 Mater* AliMat = new Mater;
436 char* fname = new char[strlen(name)+1];
437 Float_t* fbuf = new Float_t[nwbuf];
439 strcpy( fname, name );
440 fname[strlen(name)] = '\x0';
442 AliMat->fName = fname;
445 AliMat->fDens = dens;
446 AliMat->fRadl = radl;
447 AliMat->fAbsl = absl;
448 AliMat->fNwbuf = nwbuf;
450 for( int i=0; i<nwbuf; i++ )
455 AliMaterials[MateCount] = AliMat;
460 /***********************************************************************/
462 void AliGEODB::Mixture( Int_t& imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat, Float_t* wmat )
464 if( MateCount >= MAXMAT ) {
465 printf( " ERROR: Mixture number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
469 Mater* AliMat = new Mater;
470 char* fname = new char[strlen(name)+1];
472 strcpy( fname, name );
473 fname[strlen(name)] = '\x0';
475 AliMat->fName = fname;
478 Float_t SUMwmat = 0.;
480 for( int i=0; i<nlmat; i++ ) {
481 MidA += wmat[i]*a[i];
482 MidZ += wmat[i]*z[i];
491 AliMat->fDens = dens;
498 AliMaterials[MateCount] = AliMat;
503 /***********************************************************************/
505 void AliGEODB::Medium( Int_t& numed, const char* name, Int_t nmat, Int_t isvol, Int_t ifield, Float_t fieldm, Float_t tmaxfd, Float_t stemax, Float_t deemax, Float_t epsil, Float_t stmin, Float_t* ubuf, Int_t nbuf )
507 if( MedCount >= MAXMAT ) {
508 printf( " ERROR: Medium number: %d bigger that MAXMAT: %d => Out of array\n", MedCount, MAXMAT );
512 Med* AliMed = new Med;
513 char* fname = new char[strlen(name)+1];
514 Float_t* fUbuf = new Float_t[nbuf];
516 strcpy( fname, name );
517 fname[strlen(name)] = '\x0';
519 AliMed->fName = fname;
520 AliMed->fNmat = nmat;
521 AliMed->fIsvol = isvol;
522 AliMed->fIfield = ifield;
523 AliMed->fFieldm = fieldm;
524 AliMed->fTmaxfd = tmaxfd;
525 AliMed->fStemax = stemax;
526 AliMed->fDeemax = deemax;
527 AliMed->fEpsil = epsil;
528 AliMed->fStmin = stmin;
529 AliMed->fNbuf = nbuf;
531 for( int i=0; i<nbuf; i++ )
534 AliMed->fUbuf = fUbuf;
536 AliMediums[MedCount] = AliMed;
541 /***********************************************************************/
543 void AliGEODB::Matrix( Int_t &nmate , Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3 )
545 char* transname = new char[10];
546 sprintf(transname, "%s%d", "tra", MatrCount);
548 AliGTransform* tra = new AliGTransform( transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
550 //printf( " Created new AliGTransform( %s, %s, %f, %f, %f, %f, %f, %f );\n", transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
552 listTransf->AddAt( tra, MatrCount );
558 /***********************************************************************/
560 void AliGEODB::WriteEuclid(const char*, const char*, Int_t, Int_t)
562 cout << " WriteEuclid" << endl;
565 /***********************************************************************/
567 void AliGEODB::Gpcxyz()
569 cout << " Gpcxyz " << endl;
572 /***********************************************************************/
574 void AliGEODB::Ggclos()
577 for( int i=0; i<listNodes->GetSize(); i++ ) {
578 AliGNode* node = (AliGNode*) listNodes->At(i);
579 char* name = new char[strlen(node->GetName())+1];
580 strcpy(name, node->GetName());
581 name[strlen(node->GetName())] = '\x0';
582 node->AddConfig(name, name,"detail",981201,991201);
585 printf( " Total number of nodes = %d\n", listNodes->GetSize() );
587 SetVisibility( "TPC_1", 1 );
588 SetVisibility( "TGAS_1", 1 );
589 SetVisibility( "TPSG_1", 1 );
590 SetVisibility( "TPHV_1", 1 );
591 SetVisibility( "TRCS_1", 1 );
592 SetVisibility( "TSGA_1", 1 );
593 SetVisibility( "TRCL_1", 1 );
594 SetVisibility( "TLGA_1", 1 );
595 SetVisibility( "TSST_1", 1 );
596 SetVisibility( "TSST_2", 1 );
597 SetVisibility( "TSST_3", 1 );
598 SetVisibility( "TSST_4", 1 );
599 SetVisibility( "TSST_5", 1 );
600 SetVisibility( "TSST_6", 1 );
601 SetVisibility( "TSST_7", 1 );
602 SetVisibility( "TSST_8", 1 );
603 SetVisibility( "TSST_9", 1 );
604 SetVisibility( "TSST_10", 1 );
605 SetVisibility( "TSST_11", 1 );
606 SetVisibility( "TSST_12", 1 );
607 SetVisibility( "TSST_13", 1 );
608 SetVisibility( "TSST_14", 1 );
609 SetVisibility( "TSST_15", 1 );
610 SetVisibility( "TSST_16", 1 );
611 SetVisibility( "TSST_17", 1 );
612 SetVisibility( "TSST_18", 1 );
613 SetVisibility( "TSST_19", 1 );
614 SetVisibility( "TSST_20", 1 );
615 SetVisibility( "TSST_21", 1 );
616 SetVisibility( "TSST_22", 1 );
617 SetVisibility( "TSST_23", 1 );
618 SetVisibility( "TLST_1", 1 );
619 SetVisibility( "TLST_2", 1 );
620 SetVisibility( "TLST_3", 1 );
621 SetVisibility( "TLST_4", 1 );
622 SetVisibility( "TLST_5", 1 );
623 SetVisibility( "TLST_6", 1 );
624 SetVisibility( "TLST_7", 1 );
625 SetVisibility( "TLST_8", 1 );
626 SetVisibility( "TLST_9", 1 );
627 SetVisibility( "TLST_10", 1 );
628 SetVisibility( "TLST_11", 1 );
629 SetVisibility( "TLST_12", 1 );
630 SetVisibility( "TLST_13", 1 );
631 SetVisibility( "TLST_14", 1 );
632 SetVisibility( "TLST_15", 1 );
633 SetVisibility( "TLST_16", 1 );
634 SetVisibility( "TLST_17", 1 );
635 SetVisibility( "TLST_18", 1 );
636 SetVisibility( "TLST_19", 1 );
637 SetVisibility( "TLST_20", 1 );
638 SetVisibility( "TLST_21", 1 );
639 SetVisibility( "TLST_22", 1 );
640 SetVisibility( "TLST_23", 1 );
641 SetVisibility( "TLST_24", 1 );
642 SetVisibility( "TLST_25", 1 );
643 SetVisibility( "TLST_26", 1 );
644 SetVisibility( "TLST_27", 1 );
645 SetVisibility( "TLST_28", 1 );
646 SetVisibility( "TLST_29", 1 );
647 SetVisibility( "TLST_30", 1 );
648 SetVisibility( "TLST_31", 1 );
649 SetVisibility( "TLST_32", 1 );
650 SetVisibility( "TLST_33", 1 );
651 SetVisibility( "TLST_34", 1 );
652 SetVisibility( "TLST_35", 1 );
653 SetVisibility( "TLST_36", 1 );
654 SetVisibility( "TLST_37", 1 );
655 SetVisibility( "TLST_38", 1 );
656 SetVisibility( "TLST_39", 1 );
657 SetVisibility( "TLST_40", 1 );
658 SetVisibility( "TLST_41", 1 );
659 SetVisibility( "TLST_42", 1 );
660 SetVisibility( "TLST_43", 1 );
661 SetVisibility( "TLST_44", 1 );
662 SetVisibility( "TLST_45", 1 );
663 SetVisibility( "TLST_46", 1 );
664 SetVisibility( "TLST_47", 1 );
665 SetVisibility( "TLST_48", 1 );
666 SetVisibility( "TLST_49", 1 );
667 SetVisibility( "TLST_50", 1 );
668 SetVisibility( "TLST_51", 1 );
669 SetVisibility( "TLST_52", 1 );
670 SetVisibility( "TSWS_1", 1 );
671 SetVisibility( "TSWS_2", 1 );
672 SetVisibility( "TSWS_3", 1 );
673 SetVisibility( "TPW1_1", 1 );
674 SetVisibility( "TPW2_1", 1 );
675 SetVisibility( "TPW3_1", 1 );
676 SetVisibility( "TPW4_1", 1 );
677 SetVisibility( "TSPI_1", 1 );
678 SetVisibility( "TSP1_1", 1 );
679 SetVisibility( "TSPO_1", 1 );
680 SetVisibility( "TSP2_1", 1 );
681 SetVisibility( "TSWH_1", 1 );
682 SetVisibility( "TSW1_1", 1 );
683 SetVisibility( "TCOV_1", 1 );
684 SetVisibility( "TPOI_1", 1 );
685 SetVisibility( "TSWS_4", 1 );
686 SetVisibility( "TSWS_5", 1 );
687 SetVisibility( "TSWS_6", 1 );
688 SetVisibility( "TSWS_7", 1 );
689 SetVisibility( "TSWS_8", 1 );
690 SetVisibility( "TSWS_9", 1 );
691 SetVisibility( "TSWS_10", 1 );
692 SetVisibility( "TSWS_11", 1 );
693 SetVisibility( "TSWS_12", 1 );
694 SetVisibility( "TSWS_13", 1 );
695 SetVisibility( "TPIV_1", 1 );
696 SetVisibility( "TPVD_1", 1 );
698 printf( " Visibilities activated \n" );
700 AliGeometry* Geom1 = new AliGeometry( "Geom1", "Geom1", TopNode, 0 );
702 TCanvas* c1 = new TCanvas( "TPC", "Geometry Shapes", 100, 100, 750, 750 );
704 c1->SetFillColor(32); // Light Green
705 c1->SetBorderSize(3);
706 c1->SetBorderMode(0); // -1 (down) 0 (no) 1 (up)
708 TopNode->Draw("same");
710 TFile* file1 = new TFile( "GeoDB.root", "RECREATE" );
711 cout << endl << " Storing GeoDB.root file. Please, be patient... :-)" << endl;
712 TopNode->SaveAll(file1);
718 cout << " Geometry saved in disk " << endl;
724 TFile* file2 = new TFile( "GeoDB.root", "READ" );
726 AliGeometry* Geom2 = new AliGeometry( (AliGeometry*) file2->Get("Geom1") );
728 // Retrieve the memory tree structure from AliGeoDB.root and stores it in memory, being tree_root the top node
729 AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( file2 ) );
730 //AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( "GeoDB.root", "Geom1" ) );
732 TFile* file3 = new TFile( "GeoDB2.root", "RECREATE" );
733 cout << " Storing GeoDB2.root file. Please, be patient again... :-)" << endl;
734 tree_root->SaveAll( file3 ); // Memory tree structure saved in disk (second time)
740 cout << " Geometry saved in disk " << endl;
748 cout << " The two databases are stored in disk." << endl;
750 TFile* file4 = new TFile( "GeoDB.root" , "READ" );
751 TFile* file5 = new TFile( "GeoDB2.root", "READ" );
753 TBrowser* a = new TBrowser();
755 //DrawTree( TopNode, 0 );
758 /***********************************************************************/
760 void AliGEODB::SetVisibility(Text_t* name, Int_t val)
762 AliGNode* node = (AliGNode*) listNodes->FindObject( name );
767 printf( " ERROR!!! I couldn't find the node %s in the listNodes.\n", name );
770 /***********************************************************************/
772 void AliGEODB::DrawTree( AliGNode* topnode, Int_t tabs )
775 for( int i=0; topnode->GetNodeFromfNode(i); i++ ) {
776 for( int j=0; j<tabs; j++ )
778 cout << topnode->GetNodeFromfNode(i)->GetName() << endl;
780 DrawTree( topnode->GetNodeFromfNode(i), tabs );
786 /***********************************************************************/
788 void AliGEODB::Glast()
790 cout << " Glast " << endl;
793 /***********************************************************************/
795 void AliGEODB::Gprint(const char*)
797 cout << " Gprint " << endl;
800 /***********************************************************************/
802 void AliGEODB::Grun()
804 cout << " Grun " << endl;
807 /***********************************************************************/
809 void AliGEODB::Gtrig()
811 cout << " Gtrig " << endl;
814 /***********************************************************************/
816 void AliGEODB::Gtrigc()
818 cout << " Gtrigc " << endl;
821 /***********************************************************************/
823 void AliGEODB::Gtrigi()
825 cout << " Gtrigi " << endl;
828 /***********************************************************************/
830 void AliGEODB::Gwork(Int_t)
832 cout << " Gwork " << endl;
835 /***********************************************************************/
837 void AliGEODB::Gzinit()
839 cout << " Gzinit " << endl;
842 //=======================functions from GCONS
844 /***********************************************************************/
846 void AliGEODB::Gfmate(Int_t, char*, Float_t&, Float_t&, Float_t&, Float_t&, Float_t&, Float_t*, Int_t&)
848 cout << " Gfmate " << endl;
851 /***********************************************************************/
853 void AliGEODB::Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&)
855 cout << " Gfpart " << endl;
858 /***********************************************************************/
860 void AliGEODB::Gftmed(Int_t, char*, Int_t&, Int_t&, Int_t&, Float_t&, Float_t&,Float_t&, Float_t&, Float_t&, Float_t&, Float_t*, Int_t*)
862 cout << " Gftmed " << endl;
865 /***********************************************************************/
867 void AliGEODB::Gmate() {
868 cout << " Gmate " << endl;
871 /***********************************************************************/
873 void AliGEODB::Gpart()
875 AliGTransform* Identity = new AliGTransform("Identity","Identity","rot 0. 0. 0.");
876 //printf( " Created new AliGTransform( Identity, Identity, rot 0. 0. 0. );\n" );
878 listTransf->AddAt( Identity, MatrCount );
881 AliGBox* box = new AliGBox("box","box", 400,400,400);
882 AliGNode* ALIC = new AliGNode( "ALIC", 1,"ALIC", box);
885 listNodes->Add(ALIC);
888 /***********************************************************************/
890 void AliGEODB::Gsdk(Int_t, Float_t*, Int_t*) {
891 cout << " Gsdk " << endl;
894 /***********************************************************************/
896 void AliGEODB::Gsmate(Int_t, const char*, Float_t, Float_t, Float_t, Float_t, Float_t) {
897 cout << " Gsmate " << endl;
900 /***********************************************************************/
902 void AliGEODB::Gsmixt(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) {
903 cout << " Gsmixt " << endl;
906 /***********************************************************************/
908 void AliGEODB::Gspart(Int_t, const char*, Int_t, Float_t, Float_t, Float_t) {
909 cout << " Gspart " << endl;
912 /***********************************************************************/
914 void AliGEODB::Gstmed(Int_t, const char*, Int_t, Int_t, Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t) {
915 cout << " Gstmed " << endl;
918 /***********************************************************************/
920 void AliGEODB::Gstpar(Int_t, const char*, Float_t)
922 //cout << " Gstpar " << endl;
925 /***********************************************************************/
927 void AliGEODB::Gsckov(Int_t, Int_t, Float_t *, Float_t *, Float_t *, Float_t *)
929 cout << " Gsclov " << endl;
932 /***********************************************************************/
934 //=======================functions from GKINE
936 void AliGEODB::Gfkine(Int_t, Float_t*, Float_t*, Int_t&, Int_t&)
938 cout << " Gfkine" << endl;
941 /***********************************************************************/
943 void AliGEODB::Gfvert(Int_t, Float_t*, Int_t&, Int_t&, Float_t&)
945 cout << " Gfvert" << endl;
948 /***********************************************************************/
950 Int_t AliGEODB::Gskine(Float_t*, Int_t, Int_t, Float_t*, Int_t)
952 cout << " Gskine" << endl;
956 /***********************************************************************/
958 Int_t AliGEODB::Gsvert(Float_t*, Int_t, Int_t, Float_t*, Int_t)
960 cout << " Gsvert" << endl;
964 /***********************************************************************/
966 //=======================functions from GPHYS
968 void AliGEODB::Gphysi()
970 cout << " Gphysi" << endl;
973 /***********************************************************************/
975 //=======================functions from GTRAK
977 void AliGEODB::Gdebug()
979 cout << " Gdebug" << endl;
982 /***********************************************************************/
984 void AliGEODB::Gekbin()
986 cout << " Gekbin" << endl;
989 /***********************************************************************/
991 void AliGEODB::Gfinds()
993 cout << " Gfinds" << endl;
996 /***********************************************************************/
998 void AliGEODB::Gsking(Int_t)
1000 cout << " Gsking" << endl;
1003 /***********************************************************************/
1005 void AliGEODB::Gskpho(Int_t)
1007 cout << " Gskpho" << endl;
1010 /***********************************************************************/
1012 void AliGEODB::Gsstak(Int_t)
1014 cout << " Gsstak" << endl;
1017 /***********************************************************************/
1019 void AliGEODB::Gsxyz()
1021 cout << " Gsxyz" << endl;
1024 /***********************************************************************/
1026 void AliGEODB::Gtrack()
1028 cout << " Gtrack" << endl;
1031 /***********************************************************************/
1033 void AliGEODB::Gtreve()
1035 cout << " Gtreve" << endl;
1038 /***********************************************************************/
1040 void AliGEODB::Grndm(Float_t*, const Int_t) const
1042 cout << " Grndm" << endl;
1045 /***********************************************************************/
1047 void AliGEODB::Grndmq(Int_t&, Int_t&, const Int_t, const Text_t*)
1049 cout << " Grndmq" << endl;
1052 /***********************************************************************/
1054 //=======================functions from GDRAW
1056 void AliGEODB::Gdxyz(Int_t )
1058 cout << " Gdxyz" << endl;
1061 /***********************************************************************/
1063 void AliGEODB::Gdcxyz()
1065 cout << " Gdcxyz" << endl;
1068 /***********************************************************************/
1070 //=======================functions from GGEOM
1072 void AliGEODB::Gdtom(Float_t*, Float_t*, Int_t)
1074 printf( " Gdtom.\n" );
1077 /***********************************************************************/
1079 void AliGEODB::Glmoth(const char*, Int_t, Int_t&, Int_t*, Int_t*)
1081 printf( " Glmoth.\n" );
1085 /***********************************************************************/
1087 void AliGEODB::Gmedia(Float_t*, Int_t&)
1089 printf( " Gmedia.\n" );
1092 /***********************************************************************/
1094 void AliGEODB::Gmtod(Float_t*, Float_t*, Int_t)
1096 printf( " Gmtod.\n" );
1099 /***********************************************************************/
1101 void AliGEODB::Gsdvn(const char* name, const char* parentname, Int_t ndiv, Int_t iaxis)
1103 cout << " Inside Gsdvn " << endl;
1104 /* Divides one node in Ndiv nodes in the iaxis direction*/
1106 char* transfname = new char[10];
1107 char* nodename = new char[10];
1109 AliGNode* parent = (AliGNode*) listNodes->FindObject(parentname);
1111 /* Find the shape that will result from the division*/
1114 if( parent->GetShape()->ClassName() == "AliGBox" ) {
1115 AliGMaterial* material = new AliGMaterial(parent->GetMaterial());
1120 case 1 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() / ndiv;
1121 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1122 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1125 case 2 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1126 Dy = ((AliGBox*)(parent->GetShape()))->GetY()/ ndiv;
1127 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1130 case 3 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1131 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1132 Dz = ((AliGBox*)(parent->GetShape()))->GetZ()/ ndiv;
1135 default: Dx = Dy = Dz = 0.;
1138 AliGBox* box = new AliGBox("box","box", Dx, Dy, Dz);
1140 /* Create the nodes son*/
1145 for( int i=0; i<ndiv; i++ ) {
1146 //nodename = "Node";
1147 nodename[4] = '\x0';
1148 sprintf( nodename, "%s%d", nodename, i );
1149 transfname = "trans";
1150 transfname[5] = '\x0';
1151 sprintf( transfname, "%s%d", transfname, i );
1155 case 'x' : x = ndiv *i;
1172 /* Positioning the sons (only translations) and adding them to the parent*/
1174 sprintf( expression, "%s %f %f %f", "tra", x, y, z );
1175 AliGTransform* tran = new AliGTransform( transfname, transfname, expression );
1177 char* nodname = new char[strlen(name)];
1178 strcpy( nodname, name );
1179 AliGNode* son = new AliGNode( nodname, i, nodname, box, material );
1180 if( nodname ) delete [] nodname;
1182 parent->Add( son, tran );
1183 parent->AddConfig("","");
1184 listNodes->AddLast(son);
1189 /***********************************************************************/
1191 void AliGEODB::Gsdvn2(const char*, const char*, Int_t, Int_t, Float_t, Int_t)
1193 printf( " Gsdvn2.\n" );
1196 /***********************************************************************/
1198 void AliGEODB::Gsdvs(const char*, const char*, Float_t, Int_t, Int_t)
1200 printf( " Gsdvs.\n" );
1203 /***********************************************************************/
1205 void AliGEODB::Gsdvs2(const char*, const char*, Float_t, Int_t, Float_t, Int_t)
1207 printf( " Gsdvs2.\n" );
1210 /***********************************************************************/
1212 void AliGEODB::Gsdvt(const char*, const char*, Float_t, Int_t, Int_t, Int_t)
1214 printf( " Gsdvt.\n" );
1217 /***********************************************************************/
1219 void AliGEODB::Gsdvt2(const char *, const char *, Float_t, Int_t, Float_t, Int_t, Int_t)
1221 printf( " Gsdvt2.\n" );
1224 /***********************************************************************/
1226 void AliGEODB::Gsord(const char*, Int_t)
1228 // Aqui entra pero dice Federico que Dummy.
1231 /***********************************************************************/
1233 void AliGEODB::Gspos( const char *name, Int_t nr, const char *mother, Float_t x, Float_t y, Float_t z, Int_t irot, const char* konly )
1236 if( !strcmp(mother, "ALIC") )
1239 AliGNode* son = NULL;
1240 AliGNode* parent = NULL;
1242 char* nodename = new char[strlen(name)+1];
1243 strcpy( nodename, name );
1244 nodename[strlen(name)] = '\x0';
1246 TObjLink *lnk = listNodes->FirstLink();
1249 while( (lnk) && (!quit) ) {
1250 TObject *obj = lnk->GetObject();
1252 if( obj->GetName() ) {
1253 char* NodeName = new char[strlen(obj->GetName())+1];
1254 strcpy( NodeName, obj->GetName() );
1255 NodeName[strlen(obj->GetName())] = '\x0';
1258 for( i=0; NodeName[i]!='_'; i++ );
1260 if( !strncmp(nodename, NodeName, i) )
1261 son = (AliGNode*) obj;
1263 if( !strncmp(mother, NodeName, i) )
1264 parent = (AliGNode*) obj;
1266 if( NodeName ) delete [] NodeName;
1268 if( (son != NULL) && (parent != NULL) )
1276 cout << " ERROR in Gspos. Couldn't find node " << nodename << " inside listNodes." << endl;
1280 if( parent == NULL) {
1281 cout << " ERROR in Gspos. Couldn't find node " << mother << " inside listNodes." << endl;
1285 AliGTransform* tra = (AliGTransform*)listTransf->At(MatrCount - 1);
1287 TVector* matrix = tra->GetMatrix();
1288 char* transname = new char[10];
1289 sprintf(transname, "%s%d", "tra", MatrCount );
1291 TVector &mat = *matrix;
1292 AliGTransform* newtra = new AliGTransform(transname, transname, mat(0), mat(1), mat(2), mat(4), mat(5), mat(6),mat(8), mat(9), mat(10), x, y, z);
1294 //printf( "\n Created new AliGTransform( %s, %s, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f );\n", transname, transname, mat(0), mat(1), mat(2), mat(4), mat(5), mat(6), mat(8), mat(9), mat(10), x, y, z );
1296 listTransf->AddAt(newtra, MatrCount);
1299 parent->Add(son, newtra);
1300 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1303 /***********************************************************************/
1305 void AliGEODB::Gsposp( const char* nodename, Int_t nr, const char* mother, Float_t x, Float_t y, Float_t z, Int_t irot, const char* konly, Float_t* upar, Int_t np )
1311 for( i=0; i<PospCount; i++ )
1312 if( !strcmp(Posp[i]->name, nodename) )
1315 char* shapename = Posp[i]->shape;
1316 Int_t nmed = Posp[i]->nmed;
1318 char* fnodename = new char[strlen(nodename)+1];
1319 strcpy(fnodename, nodename);
1320 fnodename[strlen(nodename)] = '\x0';
1322 char* fmother = new char[strlen(mother)+1];
1323 strcpy(fmother, mother);
1324 fmother[strlen(mother)] = '\x0';
1326 AliGNode* parent = NULL;
1328 TObjLink *lnk = listNodes->FirstLink();
1331 while( (lnk) && (!quit) ) {
1332 TObject *obj = lnk->GetObject();
1334 if( obj->GetName() ) {
1335 char* NodeName = new char[strlen(obj->GetName())];
1336 strcpy( NodeName, obj->GetName() );
1339 for( i=0; NodeName[i]!='_'; i++ );
1341 if( !strncmp(fmother, NodeName, i) )
1342 parent = (AliGNode*) obj ;
1344 if( NodeName ) delete [] NodeName;
1346 if( parent != NULL )
1353 if( parent == NULL) {
1354 cout << " ERROR in Gsposp. Couldn't find node " << mother << " inside listNodes." << endl;
1358 Int_t nmat = AliMediums[nmed]->fNmat;
1360 AliGMaterial* MyMaterial = NULL;
1362 for( int j=0; j<listMaterials->GetSize(); j++ )
1363 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1364 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1365 /*printf( " AliGMaterial( %d, %s, %s, %d, %d, %f, %f, %f, %f, %f, %f, *fUbuf, %d, %f, %f, %f, %f, %f, *fBuf, %d ); already existed.\n", nmat,AliMaterials[nmat]->fName, AliMaterials[nmat]->fName, AliMediums[nmed]->fIsvol, AliMediums[nmed]->fIfield, AliMediums[nmed]->fFieldm, AliMediums[nmed]->fTmaxfd, AliMediums[nmed]->fStemax, AliMediums[nmed]->fDeemax, AliMediums[nmed]->fEpsil, AliMediums[nmed]->fStmin, AliMediums[nmed]->fNbuf, AliMaterials[nmat]->fA, AliMaterials[nmat]->fZ, AliMaterials[nmat]->fDens, AliMaterials[nmat]->fRadl, AliMaterials[nmat]->fAbsl, AliMaterials[nmat]->fNwbuf );*/
1369 if( MyMaterial == NULL ) {
1370 MyMaterial = new AliGMaterial( nmat, AliMaterials[nmat]->fName, AliMaterials[nmat]->fName, AliMediums[nmed]->fIsvol, AliMediums[nmed]->fIfield, AliMediums[nmed]->fFieldm, AliMediums[nmed]->fTmaxfd, AliMediums[nmed]->fStemax, AliMediums[nmed]->fDeemax, AliMediums[nmed]->fEpsil, AliMediums[nmed]->fStmin, AliMediums[nmed]->fUbuf, AliMediums[nmed]->fNbuf, AliMaterials[nmat]->fA, AliMaterials[nmat]->fZ, AliMaterials[nmat]->fDens, AliMaterials[nmat]->fRadl, AliMaterials[nmat]->fAbsl, AliMaterials[nmat]
1371 ->fBuf, AliMaterials[nmat]->fNwbuf );
1373 /*printf( " Created new AliGMaterial( %d, %s, %s, %d, %d, %f, %f, %f, %f, %f, %f, *fUbuf, %d, %f, %f, %f, %f, %f, *fBuf, %d );\n", nmat,AliMaterials[nmat]->fName, AliMaterials[nmat]->fName, AliMediums[nmed]->fIsvol, AliMediums[nmed]->fIfield, AliMediums[nmed]->fFieldm, AliMediums[nmed]->fTmaxfd, AliMediums[nmed]->fStemax, AliMediums[nmed]->fDeemax, AliMediums[nmed]->fEpsil, AliMediums[nmed]->fStmin, AliMediums[nmed]->fNbuf, AliMaterials[nmat]->fA, AliMaterials[nmat]->fZ, AliMaterials[nmat]->fDens, AliMaterials[nmat]->fRadl, AliMaterials[nmat]->fAbsl, AliMaterials[nmat]->fNwbuf );*/
1375 listMaterials->Add( MyMaterial );
1378 AliGNode* son = NULL;
1380 // Different constructor depending on the shape
1381 if( !strncmp(shapename, "TUBE", 4) ) {
1383 AliGTube* Shape = NULL;
1385 for( int j=0; j<listShapes->GetSize(); j++ )
1386 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1387 Shape = (AliGTube*) listShapes->At(j);
1388 //printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1392 if( Shape == NULL ) {
1393 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1394 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1395 listShapes->Add(Shape);
1398 Shape->SetCol(Color);
1399 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1402 if( !strncmp(shapename, "BOX", 3) ) {
1404 AliGBox* Shape = NULL;
1406 for( int j=0; j<listShapes->GetSize(); j++ )
1407 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1408 Shape = (AliGBox*) listShapes->At(j);
1409 //printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1413 if( Shape == NULL ) {
1414 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1415 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1416 listShapes->Add(Shape);
1419 Shape->SetCol(Color);
1420 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1423 if( !strncmp(shapename, "TRD1", 4) ) {
1425 AliGTRD1* Shape = NULL;
1427 for( int j=0; j<listShapes->GetSize(); j++ )
1428 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1429 Shape = (AliGTRD1*) listShapes->At(j);
1430 //printf( " AliGTRD1( %s, %s, %f, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1434 if( Shape == NULL ) {
1435 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1436 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1437 listShapes->Add(Shape);
1440 Shape->SetCol(Color);
1441 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1444 if( !strncmp(shapename, "PCON", 4) ) {
1446 AliGPCone* Shape = NULL;
1448 for( int j=0; j<listShapes->GetSize(); j++ )
1449 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1450 Shape = (AliGPCone*) listShapes->At(j);
1451 //printf( " AliGPCone( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1455 if( Shape == NULL ) {
1456 Shape = new AliGPCone( shapename, shapename, upar, np );
1457 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1458 listShapes->Add(Shape);
1461 Shape->SetCol(Color);
1462 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1469 AliGTransform* tra = (AliGTransform*) listTransf->At(0);
1471 TVector* matrix = tra->GetMatrix();
1473 char* transname = new char[10];
1474 sprintf( transname, "%s%d", "tra", MatrCount );
1476 TVector &mat = *matrix;
1477 AliGTransform* newtra = new AliGTransform(transname, transname, mat(0), mat(1), mat(2), mat(4), mat(5), mat(6), mat(8), mat(9), mat(10), x, y, z);
1479 //printf( " Created new AliGTransform( %s, %s, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f );\n", transname, transname, mat(0), mat(1), mat(2), mat(4), mat(5), mat(6), mat(8), mat(9), mat(10), x, y, z );
1481 listTransf->AddAt(newtra, MatrCount);
1484 parent->Add(son, newtra);
1486 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1488 listNodes->Add(son);
1491 /***********************************************************************/
1493 void AliGEODB::Gsrotm(Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t)
1495 printf( " Gsrotm.\n" );
1498 /***********************************************************************/
1500 void AliGEODB::Gprotm(Int_t)
1502 printf( " Gprotm.\n" );
1505 /***********************************************************************/
1507 Int_t AliGEODB::Gsvolu(const char* vname, const char* shape, Int_t nmed, Float_t* upar, Int_t np)
1509 Int_t lenvname = strlen(vname);
1511 char* nodename = new char[lenvname+1];
1512 strcpy( nodename, vname );
1513 nodename[lenvname] = '\x0';
1516 for( pos=0; pos<lenvname; pos++ )
1517 if( (nodename[pos] == '\x0') || (nodename[pos] == ' ') )
1520 if( pos < lenvname ) {
1521 if( nodename ) delete [] nodename;
1522 nodename = new char[pos+1];
1523 strncpy( nodename, vname, pos );
1524 nodename[pos] = '\x0';
1527 char* shapename = new char[strlen(shape)+1];
1528 strcpy( shapename, shape );
1529 shapename[strlen(shape)] = '\x0';
1531 //printf( "\n Trying to build node: %s with shape: %s, nmed: %d, upar[0]: %f and np: %d\n", nodename, shapename, nmed, upar[0], np );
1534 /* if number of parameters is 0, stores the nodename, shapename and nmed to be used in GSPOSP */
1535 NodePosp* AliPosp = new NodePosp;
1536 AliPosp->name = nodename;
1537 AliPosp->shape = shapename;
1538 AliPosp->nmed = nmed;
1539 Posp[PospCount] = AliPosp;
1544 if( (listNodes) && (listNodes->FindObject(nodename)) ) { // Trying to find the node inside listNodes
1545 // The node existed in listNodes.
1546 printf( "\n ERROR!!! Node %s already existed in listNodes\n", nodename );
1551 Int_t nmat = AliMediums[nmed]->fNmat;
1553 AliGMaterial* MyMaterial = NULL;
1555 for( int j=0; j<listMaterials->GetSize(); j++ )
1556 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1557 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1558 /*printf( " AliGMaterial( %d, %s, %s, %d, %d, %f, %f, %f, %f, %f, %f, *fUbuf, %d, %f, %f, %f, %f, %f, *fBuf, %d ); already existed.\n", nmat,AliMaterials[nmat]->fName, AliMaterials[nmat]->fName, AliMediums[nmed]->fIsvol, AliMediums[nmed]->fIfield, AliMediums[nmed]->fFieldm, AliMediums[nmed]->fTmaxfd, AliMediums[nmed]->fStemax, AliMediums[nmed]->fDeemax, AliMediums[nmed]->fEpsil, AliMediums[nmed]->fStmin, AliMediums[nmed]->fNbuf, AliMaterials[nmat]->fA, AliMaterials[nmat]->fZ, AliMaterials[nmat]->fDens, AliMaterials[nmat]->fRadl, AliMaterials[nmat]->fAbsl, AliMaterials[nmat]->fNwbuf );*/
1562 if( MyMaterial == NULL ) {
1563 MyMaterial = new AliGMaterial( nmat, AliMaterials[nmat]->fName, AliMaterials[nmat]->fName, AliMediums[nmed]->fIsvol, AliMediums[nmed]->fIfield, AliMediums[nmed]->fFieldm, AliMediums[nmed]->fTmaxfd, AliMediums[nmed]->fStemax, AliMediums[nmed]->fDeemax, AliMediums[nmed]->fEpsil, AliMediums[nmed]->fStmin, AliMediums[nmed]->fUbuf, AliMediums[nmed]->fNbuf, AliMaterials[nmat]->fA, AliMaterials[nmat]->fZ, AliMaterials[nmat]->fDens, AliMaterials[nmat]->fRadl, AliMaterials[nmat]->fAbsl, AliMaterials[nmat]->fBuf, AliMaterials[nmat]->fNwbuf );
1565 listMaterials->Add( MyMaterial );
1567 /*printf( " Created new AliGMaterial( %d, %s, %s, %d, %d, %f, %f, %f, %f, %f, %f, *fUbuf, %d, %f, %f, %f, %f, %f, *fBuf, %d );\n", nmat,AliMaterials[nmat]->fName, AliMaterials[nmat]->fName, AliMediums[nmed]->fIsvol, AliMediums[nmed]->fIfield, AliMediums[nmed]->fFieldm, AliMediums[nmed]->fTmaxfd, AliMediums[nmed]->fStemax, AliMediums[nmed]->fDeemax, AliMediums[nmed]->fEpsil, AliMediums[nmed]->fStmin, AliMediums[nmed]->fNbuf, AliMaterials[nmat]->fA, AliMaterials[nmat]->fZ, AliMaterials[nmat]->fDens, AliMaterials[nmat]->fRadl, AliMaterials[nmat]->fAbsl, AliMaterials[nmat]->fNwbuf );*/
1570 // Different constructor depending on the shape
1571 AliGNode* node = NULL;
1573 if( !strncmp(shapename, "TUBE", 4) ) {
1575 AliGTube* Shape = NULL;
1577 for( int j=0; j<listShapes->GetSize(); j++ )
1578 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1579 Shape = (AliGTube*) listShapes->At(j);
1580 printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1584 if( Shape == NULL ) {
1585 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1586 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1587 listShapes->Add(Shape);
1590 Shape->SetCol(Color);
1591 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1594 if( !strncmp(shapename, "BOX", 3) ) {
1596 AliGBox* Shape = NULL;
1598 for( int j=0; j<listShapes->GetSize(); j++ )
1599 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1600 Shape = (AliGBox*) listShapes->At(j);
1601 printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1605 if( Shape == NULL ) {
1606 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1607 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1608 listShapes->Add(Shape);
1611 Shape->SetCol(Color);
1612 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1615 if( !strncmp(shapename, "TRD1", 4) ) {
1617 AliGTRD1* Shape = NULL;
1619 for( int j=0; j<listShapes->GetSize(); j++ )
1620 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1621 Shape = (AliGTRD1*) listShapes->At(j);
1626 if( Shape == NULL ) {
1627 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1628 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1629 listShapes->Add(Shape);
1632 Shape->SetCol(Color);
1633 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1636 if( !strncmp(shapename, "PCON", 4) ) {
1638 AliGPCone* Shape = NULL;
1640 for( int j=0; j<listShapes->GetSize(); j++ )
1641 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1642 Shape = (AliGPCone*) listShapes->At(j);
1646 if( Shape == NULL ) {
1647 Shape = new AliGPCone( shapename, shapename, upar, np );
1648 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1649 listShapes->Add(Shape);
1652 Shape->SetCol(Color);
1653 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1656 //printf( " Created new AliGNode( %s, %d, %s, %s, %s );\n", nodename, 1+listNodes->GetSize(), nodename, shapename, MyMaterial->GetName() );
1658 listNodes->Add(node);
1660 //printf( " node->fShape->Color = %d\n", node->GetShape()->GetCol() );
1670 /***********************************************************************/
1672 void AliGEODB::Gsatt(const char*, const char*, Int_t)
1674 printf( " Gsatt.\n" );
1677 /***********************************************************************/
1679 void AliGEODB::Gfpara(const char*, Int_t, Int_t, Int_t&, Int_t&, Float_t*, Float_t*)
1681 printf( " Gfpara.\n" );
1684 /***********************************************************************/
1686 void AliGEODB::Gckpar(Int_t, Int_t, Float_t*)
1688 printf( " Gckpar.\n" );
1691 /***********************************************************************/
1693 void AliGEODB::Gckmat(Int_t, char*)
1695 printf( " Gckmat.\n" );
1698 /***********************************************************************/
1700 //=======================DRAW functions
1702 void AliGEODB::InitHIGZ()
1704 printf( "InitHIGZ.\n" );
1707 /***********************************************************************/
1709 void AliGEODB::Gdopen(Int_t)
1711 printf( "Gdopen.\n" );
1714 /***********************************************************************/
1716 void AliGEODB::Gdclose()
1718 printf( "Gdclose.\n" );
1721 /***********************************************************************/
1723 void AliGEODB::Gdelete(Int_t)
1725 cout << " Gdelete" << endl;
1728 /***********************************************************************/
1730 void AliGEODB::Gdshow(Int_t)
1732 cout << " Gdshow" << endl;
1735 /***********************************************************************/
1737 void AliGEODB::Gdopt(const char *,const char *)
1739 cout << " Gdopt" << endl;
1742 /***********************************************************************/
1744 void AliGEODB::Gdraw(const char *,Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1746 cout << " Gdraw" << endl;
1749 /***********************************************************************/
1751 void AliGEODB::Gdrawc(const char *,Int_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1753 cout << " Gdrawc" << endl;
1756 /***********************************************************************/
1758 void AliGEODB::Gdrawx(const char *,Float_t, Float_t, Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1760 cout << " Gdrawx" << endl;
1763 /***********************************************************************/
1765 void AliGEODB::Gdhead(Int_t, const char *, Float_t)
1767 cout << " Gdhead" << endl;
1770 /***********************************************************************/
1772 void AliGEODB::Gdman(Float_t, Float_t, const char *)
1774 cout << " Gdman" << endl;
1777 /***********************************************************************/
1779 void AliGEODB::Gdspec(const char *)
1781 cout << " Gdspec" << endl;
1784 /***********************************************************************/
1786 void AliGEODB::DrawOneSpec(const char *)
1788 cout << " DrawOneSpec" << endl;
1791 /***********************************************************************/
1793 void AliGEODB::Gdtree(const char *,Int_t,Int_t)
1795 cout << " Gdtree" << endl;
1798 /***********************************************************************/
1800 void AliGEODB::GdtreeParent(const char *,Int_t,Int_t)
1802 cout << " GdtreeParent" << endl;
1805 /***********************************************************************/
1807 //=======================Set functions
1809 void AliGEODB::SetABAN(Int_t)
1811 cout << " SetABAN" << endl;
1814 /***********************************************************************/
1816 void AliGEODB::SetANNI(Int_t)
1818 cout << " SetANNI" << endl;
1821 /***********************************************************************/
1823 void AliGEODB::SetAUTO(Int_t)
1825 cout << " SetAUTO" << endl;
1828 /***********************************************************************/
1830 void AliGEODB::SetBOMB(Float_t)
1832 cout << " SetBOMB" << endl;
1835 /***********************************************************************/
1837 void AliGEODB::SetBREM(Int_t)
1839 cout << " SetBREM" << endl;
1842 /***********************************************************************/
1844 void AliGEODB::SetCKOV(Int_t)
1846 cout << " SetCKOV" << endl;
1849 /***********************************************************************/
1851 void AliGEODB::SetClipBox(const char *,Float_t,Float_t, Float_t,Float_t,Float_t,Float_t)
1853 cout << " SetClipBox" << endl;
1856 /***********************************************************************/
1858 void AliGEODB::SetCOMP(Int_t)
1860 cout << " SetCOMP" << endl;
1863 /***********************************************************************/
1865 void AliGEODB::SetCUTS( Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t )
1867 cout << " SetCUTS" << endl;
1870 /***********************************************************************/
1872 void AliGEODB::SetDCAY(Int_t)
1874 cout << " SetDCAY" << endl;
1877 /***********************************************************************/
1879 void AliGEODB::SetDEBU(Int_t, Int_t, Int_t)
1881 cout << " SetDEBU" << endl;
1884 /***********************************************************************/
1886 void AliGEODB::SetDRAY(Int_t)
1888 cout << " SetDRAY" << endl;
1891 /***********************************************************************/
1893 void AliGEODB::SetHADR(Int_t)
1895 cout << " SetHADR" << endl;
1898 /***********************************************************************/
1900 void AliGEODB::SetKINE(Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t,Float_t )
1902 cout << " SetKINE" << endl;
1905 /***********************************************************************/
1907 void AliGEODB::SetLOSS(Int_t)
1909 cout << " SetLOSS" << endl;
1912 /***********************************************************************/
1914 void AliGEODB::SetMULS(Int_t)
1916 cout << " SetMULS" << endl;
1919 /***********************************************************************/
1921 void AliGEODB::SetMUNU(Int_t)
1923 cout << " SetMUNU" << endl;
1926 /***********************************************************************/
1928 void AliGEODB::SetOPTI(Int_t)
1930 cout << " SetOPTI" << endl;
1933 /***********************************************************************/
1935 void AliGEODB::SetPAIR(Int_t)
1937 cout << " SetPAIR" << endl;
1940 /***********************************************************************/
1942 void AliGEODB::SetPFIS(Int_t)
1944 cout << " SetPFIS" << endl;
1947 /***********************************************************************/
1949 void AliGEODB::SetPHOT(Int_t)
1951 cout << " SetPHOT" << endl;
1954 /***********************************************************************/
1956 void AliGEODB::SetRAYL(Int_t)
1958 cout << " SetRAYL" << endl;
1961 /***********************************************************************/
1963 void AliGEODB::SetSWIT(Int_t , Int_t)
1965 cout << " SetSWIT" << endl;
1968 /***********************************************************************/
1970 void AliGEODB::SetTRIG(Int_t)
1972 cout << " SetTRIG" << endl;
1975 /***********************************************************************/
1977 void AliGEODB::Vname(const char *, char *)
1979 cout << " Vname" << endl;
1982 /***********************************************************************/
1984 void AliGEODB::InitLego()
1986 cout << " InitLego" << endl;
1989 /***********************************************************************/
1991 extern "C" void sxpart_(){}