1 //////////////////////////////////////////////////////
2 // C++ dummy interface to Geant3 basic routines //
3 //////////////////////////////////////////////////////
10 #include "AliGShape.h"
11 #include "AliGMaterial.h"
12 #include "AliGTransform.h"
16 #include "AliGPCone.h"
17 #include "AliGeometry.h"
19 //---------------------------------------------------------
34 Mater* AliMaterials[MAXMAT]; // Array of Mater structs containing the AliMaterial parameters.
51 Med* AliMediums[MAXMAT]; // Array of Med structs containing the AliMedium parameters.
59 NodePosp* Posp[MAXMAT];
61 AliGMaterial* Mat[MAXMAT]; // List of Pointers to my AliGMaterials created
69 TList* listNodes = new TList(); // List of Nodes
70 TList* listTransf = new TList();
71 TList* listShapes = new TList();
72 TList* listMaterials = new TList();
74 AliGNode* TopNode = NULL;
76 /***********************************************************************/
80 /***********************************************************************/
82 AliGEODB::AliGEODB(const char *title, Int_t) : AliMC("AliGEODB",title)
84 //cout << " AliGEODB" << endl;
87 /***********************************************************************/
89 void AliGEODB::DefaultRange()
91 cout << " DefaultRange" << endl;
94 //=======================functions from GBASE
96 /***********************************************************************/
98 void AliGEODB::Gfile(const char*, const char*)
100 cout << " Gfile" << endl;
103 /***********************************************************************/
105 void AliGEODB::GeomIter()
107 cout << " GeomIter" << endl;
110 /***********************************************************************/
112 Int_t AliGEODB::CurrentMaterial(Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const
114 cout << " CurrentMaterial" << endl;
118 /***********************************************************************/
120 Int_t AliGEODB::NextVolUp(Text_t*, Int_t&)
122 cout << " NextVolUp" << endl;
126 /***********************************************************************/
128 Int_t AliGEODB::CurrentVol(Text_t*, Int_t&) const
130 cout << " CurrentVol" << endl;
134 /***********************************************************************/
136 Int_t AliGEODB::NofVolumes() const
138 cout << " NofVolumes" << endl;
142 /***********************************************************************/
144 Int_t AliGEODB::CurrentVolOff(Int_t, Text_t*, Int_t&) const
146 cout << " CurrentVolOff" << endl;
150 /***********************************************************************/
152 void AliGEODB::TrackPosition(Float_t*) const
154 cout << " TrackPosition" << endl;
157 /***********************************************************************/
159 void AliGEODB::TrackMomentum(Float_t*) const
161 cout << " TrackMomentum" << endl;
164 /***********************************************************************/
166 Int_t AliGEODB::VolId( Text_t* name ) const
168 cout << " VolId" << endl;
172 /***********************************************************************/
174 const char* AliGEODB::VolName(Int_t ) const
176 cout << " VolName" << endl;
180 /***********************************************************************/
182 Float_t AliGEODB::TrackCharge() const
184 cout << " TrackCharge" << endl;
188 /***********************************************************************/
190 Float_t AliGEODB::TrackMass() const
192 cout << " TrackMass" << endl;
196 /***********************************************************************/
198 Bool_t AliGEODB::TrackInside() const
200 cout << " TrackInside" << endl;
204 /***********************************************************************/
206 Bool_t AliGEODB::TrackEntering() const
208 cout << " TrackEntering" << endl;
212 /***********************************************************************/
214 Bool_t AliGEODB::TrackExiting() const
216 cout << " TrackExiting" << endl;
220 /***********************************************************************/
222 Bool_t AliGEODB::TrackOut() const
224 cout << " TrackOut" << endl;
228 /***********************************************************************/
230 Bool_t AliGEODB::TrackDisappear() const
232 cout << " TrackDisappear" << endl;
236 /***********************************************************************/
238 Bool_t AliGEODB::TrackStop() const
240 cout << " TrackStop" << endl;
244 /***********************************************************************/
246 Int_t AliGEODB::NSecondaries() const
248 cout << " NSecondaries" << endl;
252 /***********************************************************************/
254 void AliGEODB::ProdProcess(char*) const
256 cout << " ProdProcess" << endl;
259 /***********************************************************************/
261 void AliGEODB::GetSecondary(Int_t, Int_t&, Float_t*, Float_t*)
263 cout << " GetSecondary" << endl;
266 /***********************************************************************/
268 Float_t AliGEODB::MaxStep() const
270 cout << " MaxStep" << endl;
274 /***********************************************************************/
276 void AliGEODB::SetMaxStep(Float_t )
278 cout << " SetMaxStep" << endl;
281 /***********************************************************************/
283 void AliGEODB::GetParticle(const Int_t, char*, Float_t&) const
285 cout << " GetParticle" << endl;
288 /***********************************************************************/
290 Int_t AliGEODB::CurrentEvent() const
292 cout << " CurrentEvent" << endl;
296 /***********************************************************************/
298 Int_t AliGEODB::GetMedium() const
300 cout << " GetMedium" << endl;
304 /***********************************************************************/
306 Float_t AliGEODB::Edep() const
308 cout << " Edep" << endl;
312 /***********************************************************************/
314 Float_t AliGEODB::Etot() const
316 cout << " Etot" << endl;
320 /***********************************************************************/
322 void AliGEODB::Rndm(Float_t*, const Int_t) const
324 cout << " Rndm" << endl;
327 /***********************************************************************/
329 Float_t AliGEODB::TrackStep() const
331 cout << " TrackStep" << endl;
335 /***********************************************************************/
337 Float_t AliGEODB::TrackLength() const
339 cout << " TrackLength" << endl;
343 /***********************************************************************/
345 Float_t AliGEODB::TrackTime() const
347 cout << " TrackTime" << endl;
351 /***********************************************************************/
353 Int_t AliGEODB::TrackPid() const
355 cout << " TrackPid" << endl;
359 /***********************************************************************/
361 Bool_t AliGEODB::TrackAlive() const
363 cout << " TrackAlive" << endl;
367 /***********************************************************************/
369 void AliGEODB::StopTrack()
371 cout << " StopTrack" << endl;
374 /***********************************************************************/
376 void AliGEODB::StopEvent()
378 cout << " StopEvent" << endl;
381 /***********************************************************************/
383 void AliGEODB::SetMaxNStep(Int_t)
385 cout << " SetMaxNStep" << endl;
388 /***********************************************************************/
390 void AliGEODB::SetColors()
392 cout << " SetColors" << endl;
395 /***********************************************************************/
397 Int_t AliGEODB::GetMaxNStep() const
399 cout << " GetMaxNStep" << endl;
403 /***********************************************************************/
405 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 )
407 if( MateCount >= MAXMAT ) {
408 printf( " ERROR: Material number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
412 Mater* AliMat = new Mater;
413 char* fname = new char[strlen(name)+1];
414 Float_t* fbuf = new Float_t[nwbuf];
416 strcpy( fname, name );
417 fname[strlen(name)] = '\x0';
419 AliMat->fName = fname;
422 AliMat->fDens = dens;
423 AliMat->fRadl = radl;
424 AliMat->fAbsl = absl;
425 AliMat->fNwbuf = nwbuf;
427 for( int i=0; i<nwbuf; i++ )
432 AliMaterials[MateCount] = AliMat;
437 /***********************************************************************/
439 void AliGEODB::Mixture( Int_t& imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat, Float_t* wmat )
441 if( MateCount >= MAXMAT ) {
442 printf( " ERROR: Mixture number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
446 Mater* AliMat = new Mater;
447 char* fname = new char[strlen(name)+1];
449 strcpy( fname, name );
450 fname[strlen(name)] = '\x0';
452 AliMat->fName = fname;
455 Float_t SUMwmat = 0.;
457 for( int i=0; i<nlmat; i++ ) {
458 MidA += wmat[i]*a[i];
459 MidZ += wmat[i]*z[i];
468 AliMat->fDens = dens;
475 AliMaterials[MateCount] = AliMat;
480 /***********************************************************************/
482 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 )
484 if( MedCount >= MAXMAT ) {
485 printf( " ERROR: Medium number: %d bigger that MAXMAT: %d => Out of array\n", MedCount, MAXMAT );
489 Med* AliMed = new Med;
490 char* fname = new char[strlen(name)+1];
491 Float_t* fUbuf = new Float_t[nbuf];
493 strcpy( fname, name );
494 fname[strlen(name)] = '\x0';
496 AliMed->fName = fname;
497 AliMed->fNmat = nmat;
498 AliMed->fIsvol = isvol;
499 AliMed->fIfield = ifield;
500 AliMed->fFieldm = fieldm;
501 AliMed->fTmaxfd = tmaxfd;
502 AliMed->fStemax = stemax;
503 AliMed->fDeemax = deemax;
504 AliMed->fEpsil = epsil;
505 AliMed->fStmin = stmin;
506 AliMed->fNbuf = nbuf;
508 for( int i=0; i<nbuf; i++ )
511 AliMed->fUbuf = fUbuf;
513 AliMediums[MedCount] = AliMed;
518 /***********************************************************************/
520 void AliGEODB::Matrix( Int_t &nmate , Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3 )
522 char* transname = new char[10];
523 sprintf(transname, "%s%d", "tra", MatrCount);
525 AliGTransform* tra = new AliGTransform( transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
527 //printf( " Created new AliGTransform( %s, %s, %f, %f, %f, %f, %f, %f );\n", transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
529 listTransf->AddAt( tra, MatrCount );
535 /***********************************************************************/
537 void AliGEODB::WriteEuclid(const char*, const char*, Int_t, Int_t)
539 cout << " WriteEuclid" << endl;
542 /***********************************************************************/
544 void AliGEODB::Gpcxyz()
546 cout << " Gpcxyz " << endl;
549 /***********************************************************************/
551 void AliGEODB::Ggclos()
554 for( int i=0; i<listNodes->GetSize(); i++ ) {
555 AliGNode* node = (AliGNode*) listNodes->At(i);
556 char* name = new char[strlen(node->GetName())+1];
557 strcpy(name, node->GetName());
558 name[strlen(node->GetName())] = '\x0';
559 node->AddConfig(name, name,"detail",981201,991201);
562 printf( " Total number of nodes = %d\n", listNodes->GetSize() );
564 SetVisibility( "TPC_1", 1 );
565 SetVisibility( "TGAS_1", 1 );
566 SetVisibility( "TPSG_1", 1 );
567 SetVisibility( "TPHV_1", 1 );
568 SetVisibility( "TRCS_1", 1 );
569 SetVisibility( "TSGA_1", 1 );
570 SetVisibility( "TRCL_1", 1 );
571 SetVisibility( "TLGA_1", 1 );
572 SetVisibility( "TSST_1", 1 );
573 SetVisibility( "TSST_2", 1 );
574 SetVisibility( "TSST_3", 1 );
575 SetVisibility( "TSST_4", 1 );
576 SetVisibility( "TSST_5", 1 );
577 SetVisibility( "TSST_6", 1 );
578 SetVisibility( "TSST_7", 1 );
579 SetVisibility( "TSST_8", 1 );
580 SetVisibility( "TSST_9", 1 );
581 SetVisibility( "TSST_10", 1 );
582 SetVisibility( "TSST_11", 1 );
583 SetVisibility( "TSST_12", 1 );
584 SetVisibility( "TSST_13", 1 );
585 SetVisibility( "TSST_14", 1 );
586 SetVisibility( "TSST_15", 1 );
587 SetVisibility( "TSST_16", 1 );
588 SetVisibility( "TSST_17", 1 );
589 SetVisibility( "TSST_18", 1 );
590 SetVisibility( "TSST_19", 1 );
591 SetVisibility( "TSST_20", 1 );
592 SetVisibility( "TSST_21", 1 );
593 SetVisibility( "TSST_22", 1 );
594 SetVisibility( "TSST_23", 1 );
595 SetVisibility( "TLST_1", 1 );
596 SetVisibility( "TLST_2", 1 );
597 SetVisibility( "TLST_3", 1 );
598 SetVisibility( "TLST_4", 1 );
599 SetVisibility( "TLST_5", 1 );
600 SetVisibility( "TLST_6", 1 );
601 SetVisibility( "TLST_7", 1 );
602 SetVisibility( "TLST_8", 1 );
603 SetVisibility( "TLST_9", 1 );
604 SetVisibility( "TLST_10", 1 );
605 SetVisibility( "TLST_11", 1 );
606 SetVisibility( "TLST_12", 1 );
607 SetVisibility( "TLST_13", 1 );
608 SetVisibility( "TLST_14", 1 );
609 SetVisibility( "TLST_15", 1 );
610 SetVisibility( "TLST_16", 1 );
611 SetVisibility( "TLST_17", 1 );
612 SetVisibility( "TLST_18", 1 );
613 SetVisibility( "TLST_19", 1 );
614 SetVisibility( "TLST_20", 1 );
615 SetVisibility( "TLST_21", 1 );
616 SetVisibility( "TLST_22", 1 );
617 SetVisibility( "TLST_23", 1 );
618 SetVisibility( "TLST_24", 1 );
619 SetVisibility( "TLST_25", 1 );
620 SetVisibility( "TLST_26", 1 );
621 SetVisibility( "TLST_27", 1 );
622 SetVisibility( "TLST_28", 1 );
623 SetVisibility( "TLST_29", 1 );
624 SetVisibility( "TLST_30", 1 );
625 SetVisibility( "TLST_31", 1 );
626 SetVisibility( "TLST_32", 1 );
627 SetVisibility( "TLST_33", 1 );
628 SetVisibility( "TLST_34", 1 );
629 SetVisibility( "TLST_35", 1 );
630 SetVisibility( "TLST_36", 1 );
631 SetVisibility( "TLST_37", 1 );
632 SetVisibility( "TLST_38", 1 );
633 SetVisibility( "TLST_39", 1 );
634 SetVisibility( "TLST_40", 1 );
635 SetVisibility( "TLST_41", 1 );
636 SetVisibility( "TLST_42", 1 );
637 SetVisibility( "TLST_43", 1 );
638 SetVisibility( "TLST_44", 1 );
639 SetVisibility( "TLST_45", 1 );
640 SetVisibility( "TLST_46", 1 );
641 SetVisibility( "TLST_47", 1 );
642 SetVisibility( "TLST_48", 1 );
643 SetVisibility( "TLST_49", 1 );
644 SetVisibility( "TLST_50", 1 );
645 SetVisibility( "TLST_51", 1 );
646 SetVisibility( "TLST_52", 1 );
647 SetVisibility( "TSWS_1", 1 );
648 SetVisibility( "TSWS_2", 1 );
649 SetVisibility( "TSWS_3", 1 );
650 SetVisibility( "TPW1_1", 1 );
651 SetVisibility( "TPW2_1", 1 );
652 SetVisibility( "TPW3_1", 1 );
653 SetVisibility( "TPW4_1", 1 );
654 SetVisibility( "TSPI_1", 1 );
655 SetVisibility( "TSP1_1", 1 );
656 SetVisibility( "TSPO_1", 1 );
657 SetVisibility( "TSP2_1", 1 );
658 SetVisibility( "TSWH_1", 1 );
659 SetVisibility( "TSW1_1", 1 );
660 SetVisibility( "TCOV_1", 1 );
661 SetVisibility( "TPOI_1", 1 );
662 SetVisibility( "TSWS_4", 1 );
663 SetVisibility( "TSWS_5", 1 );
664 SetVisibility( "TSWS_6", 1 );
665 SetVisibility( "TSWS_7", 1 );
666 SetVisibility( "TSWS_8", 1 );
667 SetVisibility( "TSWS_9", 1 );
668 SetVisibility( "TSWS_10", 1 );
669 SetVisibility( "TSWS_11", 1 );
670 SetVisibility( "TSWS_12", 1 );
671 SetVisibility( "TSWS_13", 1 );
672 SetVisibility( "TPIV_1", 1 );
673 SetVisibility( "TPVD_1", 1 );
675 printf( " Visibilities activated \n" );
677 AliGeometry* Geom1 = new AliGeometry( "Geom1", "Geom1", TopNode, 0 );
679 TCanvas* c1 = new TCanvas( "TPC", "Geometry Shapes", 100, 100, 750, 750 );
681 c1->SetFillColor(32); // Light Green
682 c1->SetBorderSize(3);
683 c1->SetBorderMode(0); // -1 (down) 0 (no) 1 (up)
685 TopNode->Draw("same");
687 TFile* file1 = new TFile( "GeoDB.root", "RECREATE" );
688 cout << endl << " Storing GeoDB.root file. Please, be patient... :-)" << endl;
689 TopNode->SaveAll(file1);
695 cout << " Geometry saved in disk " << endl;
701 TFile* file2 = new TFile( "GeoDB.root", "READ" );
703 AliGeometry* Geom2 = new AliGeometry( (AliGeometry*) file2->Get("Geom1") );
705 // Retrieve the memory tree structure from AliGeoDB.root and stores it in memory, being tree_root the top node
706 AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( file2 ) );
707 //AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( "GeoDB.root", "Geom1" ) );
709 TFile* file3 = new TFile( "GeoDB2.root", "RECREATE" );
710 cout << " Storing GeoDB2.root file. Please, be patient again... :-)" << endl;
711 tree_root->SaveAll( file3 ); // Memory tree structure saved in disk (second time)
717 cout << " Geometry saved in disk " << endl;
725 cout << " The two databases are stored in disk." << endl;
727 TFile* file4 = new TFile( "GeoDB.root" , "READ" );
728 TFile* file5 = new TFile( "GeoDB2.root", "READ" );
730 TBrowser* a = new TBrowser();
732 //DrawTree( TopNode, 0 );
735 /***********************************************************************/
737 void AliGEODB::SetVisibility(Text_t* name, Int_t val)
739 AliGNode* node = (AliGNode*) listNodes->FindObject( name );
744 printf( " ERROR!!! I couldn't find the node %s in the listNodes.\n", name );
747 /***********************************************************************/
749 void AliGEODB::DrawTree( AliGNode* topnode, Int_t tabs )
752 for( int i=0; topnode->GetNodeFromfNode(i); i++ ) {
753 for( int j=0; j<tabs; j++ )
755 cout << topnode->GetNodeFromfNode(i)->GetName() << endl;
757 DrawTree( topnode->GetNodeFromfNode(i), tabs );
763 /***********************************************************************/
765 void AliGEODB::Glast()
767 cout << " Glast " << endl;
770 /***********************************************************************/
772 void AliGEODB::Gprint(const char*)
774 cout << " Gprint " << endl;
777 /***********************************************************************/
779 void AliGEODB::Grun()
781 cout << " Grun " << endl;
784 /***********************************************************************/
786 void AliGEODB::Gtrig()
788 cout << " Gtrig " << endl;
791 /***********************************************************************/
793 void AliGEODB::Gtrigc()
795 cout << " Gtrigc " << endl;
798 /***********************************************************************/
800 void AliGEODB::Gtrigi()
802 cout << " Gtrigi " << endl;
805 /***********************************************************************/
807 void AliGEODB::Gwork(Int_t)
809 cout << " Gwork " << endl;
812 /***********************************************************************/
814 void AliGEODB::Gzinit()
816 cout << " Gzinit " << endl;
819 //=======================functions from GCONS
821 /***********************************************************************/
823 void AliGEODB::Gfmate(Int_t, char*, Float_t&, Float_t&, Float_t&, Float_t&, Float_t&, Float_t*, Int_t&)
825 cout << " Gfmate " << endl;
828 /***********************************************************************/
830 void AliGEODB::Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&)
832 cout << " Gfpart " << endl;
835 /***********************************************************************/
837 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*)
839 cout << " Gftmed " << endl;
842 /***********************************************************************/
844 void AliGEODB::Gmate() {
845 cout << " Gmate " << endl;
848 /***********************************************************************/
850 void AliGEODB::Gpart()
852 AliGTransform* Identity = new AliGTransform("Identity","Identity","rot 0. 0. 0.");
853 //printf( " Created new AliGTransform( Identity, Identity, rot 0. 0. 0. );\n" );
855 listTransf->AddAt( Identity, MatrCount );
858 AliGBox* box = new AliGBox("box","box", 400,400,400);
859 AliGNode* ALIC = new AliGNode( "ALIC", 1,"ALIC", box);
862 listNodes->Add(ALIC);
865 /***********************************************************************/
867 void AliGEODB::Gsdk(Int_t, Float_t*, Int_t*) {
868 cout << " Gsdk " << endl;
871 /***********************************************************************/
873 void AliGEODB::Gsmate(Int_t, const char*, Float_t, Float_t, Float_t, Float_t, Float_t) {
874 cout << " Gsmate " << endl;
877 /***********************************************************************/
879 void AliGEODB::Gsmixt(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) {
880 cout << " Gsmixt " << endl;
883 /***********************************************************************/
885 void AliGEODB::Gspart(Int_t, const char*, Int_t, Float_t, Float_t, Float_t) {
886 cout << " Gspart " << endl;
889 /***********************************************************************/
891 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) {
892 cout << " Gstmed " << endl;
895 /***********************************************************************/
897 void AliGEODB::Gstpar(Int_t, const char*, Float_t)
899 //cout << " Gstpar " << endl;
902 /***********************************************************************/
904 void AliGEODB::Gsckov(Int_t, Int_t, Float_t *, Float_t *, Float_t *, Float_t *)
906 cout << " Gsclov " << endl;
909 /***********************************************************************/
911 //=======================functions from GKINE
913 void AliGEODB::Gfkine(Int_t, Float_t*, Float_t*, Int_t&, Int_t&)
915 cout << " Gfkine" << endl;
918 /***********************************************************************/
920 void AliGEODB::Gfvert(Int_t, Float_t*, Int_t&, Int_t&, Float_t&)
922 cout << " Gfvert" << endl;
925 /***********************************************************************/
927 Int_t AliGEODB::Gskine(Float_t*, Int_t, Int_t, Float_t*, Int_t)
929 cout << " Gskine" << endl;
933 /***********************************************************************/
935 Int_t AliGEODB::Gsvert(Float_t*, Int_t, Int_t, Float_t*, Int_t)
937 cout << " Gsvert" << endl;
941 /***********************************************************************/
943 //=======================functions from GPHYS
945 void AliGEODB::Gphysi()
947 cout << " Gphysi" << endl;
950 /***********************************************************************/
952 //=======================functions from GTRAK
954 void AliGEODB::Gdebug()
956 cout << " Gdebug" << endl;
959 /***********************************************************************/
961 void AliGEODB::Gekbin()
963 cout << " Gekbin" << endl;
966 /***********************************************************************/
968 void AliGEODB::Gfinds()
970 cout << " Gfinds" << endl;
973 /***********************************************************************/
975 void AliGEODB::Gsking(Int_t)
977 cout << " Gsking" << endl;
980 /***********************************************************************/
982 void AliGEODB::Gskpho(Int_t)
984 cout << " Gskpho" << endl;
987 /***********************************************************************/
989 void AliGEODB::Gsstak(Int_t)
991 cout << " Gsstak" << endl;
994 /***********************************************************************/
996 void AliGEODB::Gsxyz()
998 cout << " Gsxyz" << endl;
1001 /***********************************************************************/
1003 void AliGEODB::Gtrack()
1005 cout << " Gtrack" << endl;
1008 /***********************************************************************/
1010 void AliGEODB::Gtreve()
1012 cout << " Gtreve" << endl;
1015 /***********************************************************************/
1017 void AliGEODB::Grndm(Float_t*, const Int_t) const
1019 cout << " Grndm" << endl;
1022 /***********************************************************************/
1024 void AliGEODB::Grndmq(Int_t&, Int_t&, const Int_t, const Text_t*)
1026 cout << " Grndmq" << endl;
1029 /***********************************************************************/
1031 //=======================functions from GDRAW
1033 void AliGEODB::Gdxyz(Int_t )
1035 cout << " Gdxyz" << endl;
1038 /***********************************************************************/
1040 void AliGEODB::Gdcxyz()
1042 cout << " Gdcxyz" << endl;
1045 /***********************************************************************/
1047 //=======================functions from GGEOM
1049 void AliGEODB::Gdtom(Float_t*, Float_t*, Int_t)
1051 printf( " Gdtom.\n" );
1054 /***********************************************************************/
1056 void AliGEODB::Glmoth(const char*, Int_t, Int_t&, Int_t*, Int_t*)
1058 printf( " Glmoth.\n" );
1062 /***********************************************************************/
1064 void AliGEODB::Gmedia(Float_t*, Int_t&)
1066 printf( " Gmedia.\n" );
1069 /***********************************************************************/
1071 void AliGEODB::Gmtod(Float_t*, Float_t*, Int_t)
1073 printf( " Gmtod.\n" );
1076 /***********************************************************************/
1078 void AliGEODB::Gsdvn(const char* name, const char* parentname, Int_t ndiv, Int_t iaxis)
1080 cout << " Inside Gsdvn " << endl;
1081 /* Divides one node in Ndiv nodes in the iaxis direction*/
1083 char* transfname = new char[10];
1084 char* nodename = new char[10];
1086 AliGNode* parent = (AliGNode*) listNodes->FindObject(parentname);
1088 /* Find the shape that will result from the division*/
1091 if( parent->GetShape()->ClassName() == "AliGBox" ) {
1092 AliGMaterial* material = new AliGMaterial(parent->GetMaterial());
1097 case 1 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() / ndiv;
1098 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1099 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1102 case 2 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1103 Dy = ((AliGBox*)(parent->GetShape()))->GetY()/ ndiv;
1104 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1107 case 3 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1108 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1109 Dz = ((AliGBox*)(parent->GetShape()))->GetZ()/ ndiv;
1112 default: Dx = Dy = Dz = 0.;
1115 AliGBox* box = new AliGBox("box","box", Dx, Dy, Dz);
1117 /* Create the nodes son*/
1122 for( int i=0; i<ndiv; i++ ) {
1123 //nodename = "Node";
1124 nodename[4] = '\x0';
1125 sprintf( nodename, "%s%d", nodename, i );
1126 transfname = "trans";
1127 transfname[5] = '\x0';
1128 sprintf( transfname, "%s%d", transfname, i );
1132 case 'x' : x = ndiv *i;
1149 /* Positioning the sons (only translations) and adding them to the parent*/
1151 sprintf( expression, "%s %f %f %f", "tra", x, y, z );
1152 AliGTransform* tran = new AliGTransform( transfname, transfname, expression );
1154 char* nodname = new char[strlen(name)];
1155 strcpy( nodname, name );
1156 AliGNode* son = new AliGNode( nodname, i, nodname, box, material );
1157 if( nodname ) delete [] nodname;
1159 parent->Add( son, tran );
1160 parent->AddConfig("","");
1161 listNodes->AddLast(son);
1166 /***********************************************************************/
1168 void AliGEODB::Gsdvn2(const char*, const char*, Int_t, Int_t, Float_t, Int_t)
1170 printf( " Gsdvn2.\n" );
1173 /***********************************************************************/
1175 void AliGEODB::Gsdvs(const char*, const char*, Float_t, Int_t, Int_t)
1177 printf( " Gsdvs.\n" );
1180 /***********************************************************************/
1182 void AliGEODB::Gsdvs2(const char*, const char*, Float_t, Int_t, Float_t, Int_t)
1184 printf( " Gsdvs2.\n" );
1187 /***********************************************************************/
1189 void AliGEODB::Gsdvt(const char*, const char*, Float_t, Int_t, Int_t, Int_t)
1191 printf( " Gsdvt.\n" );
1194 /***********************************************************************/
1196 void AliGEODB::Gsdvt2(const char *, const char *, Float_t, Int_t, Float_t, Int_t, Int_t)
1198 printf( " Gsdvt2.\n" );
1201 /***********************************************************************/
1203 void AliGEODB::Gsord(const char*, Int_t)
1205 // Aqui entra pero dice Federico que Dummy.
1208 /***********************************************************************/
1210 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 )
1213 if( !strcmp(mother, "ALIC") )
1216 AliGNode* son = NULL;
1217 AliGNode* parent = NULL;
1219 char* nodename = new char[strlen(name)+1];
1220 strcpy( nodename, name );
1221 nodename[strlen(name)] = '\x0';
1223 TObjLink *lnk = listNodes->FirstLink();
1226 while( (lnk) && (!quit) ) {
1227 TObject *obj = lnk->GetObject();
1229 if( obj->GetName() ) {
1230 char* NodeName = new char[strlen(obj->GetName())+1];
1231 strcpy( NodeName, obj->GetName() );
1232 NodeName[strlen(obj->GetName())] = '\x0';
1235 for( i=0; NodeName[i]!='_'; i++ );
1237 if( !strncmp(nodename, NodeName, i) )
1238 son = (AliGNode*) obj;
1240 if( !strncmp(mother, NodeName, i) )
1241 parent = (AliGNode*) obj;
1243 if( NodeName ) delete [] NodeName;
1245 if( (son != NULL) && (parent != NULL) )
1253 cout << " ERROR in Gspos. Couldn't find node " << nodename << " inside listNodes." << endl;
1257 if( parent == NULL) {
1258 cout << " ERROR in Gspos. Couldn't find node " << mother << " inside listNodes." << endl;
1262 AliGTransform* tra = (AliGTransform*)listTransf->At(MatrCount - 1);
1264 TVector* matrix = tra->GetMatrix();
1265 char* transname = new char[10];
1266 sprintf(transname, "%s%d", "tra", MatrCount );
1268 TVector &mat = *matrix;
1269 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);
1271 //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 );
1273 listTransf->AddAt(newtra, MatrCount);
1276 parent->Add(son, newtra);
1277 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1280 /***********************************************************************/
1282 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 )
1288 for( i=0; i<PospCount; i++ )
1289 if( !strcmp(Posp[i]->name, nodename) )
1292 char* shapename = Posp[i]->shape;
1293 Int_t nmed = Posp[i]->nmed;
1295 char* fnodename = new char[strlen(nodename)+1];
1296 strcpy(fnodename, nodename);
1297 fnodename[strlen(nodename)] = '\x0';
1299 char* fmother = new char[strlen(mother)+1];
1300 strcpy(fmother, mother);
1301 fmother[strlen(mother)] = '\x0';
1303 AliGNode* parent = NULL;
1305 TObjLink *lnk = listNodes->FirstLink();
1308 while( (lnk) && (!quit) ) {
1309 TObject *obj = lnk->GetObject();
1311 if( obj->GetName() ) {
1312 char* NodeName = new char[strlen(obj->GetName())];
1313 strcpy( NodeName, obj->GetName() );
1316 for( i=0; NodeName[i]!='_'; i++ );
1318 if( !strncmp(fmother, NodeName, i) )
1319 parent = (AliGNode*) obj ;
1321 if( NodeName ) delete [] NodeName;
1323 if( parent != NULL )
1330 if( parent == NULL) {
1331 cout << " ERROR in Gsposp. Couldn't find node " << mother << " inside listNodes." << endl;
1335 Int_t nmat = AliMediums[nmed]->fNmat;
1337 AliGMaterial* MyMaterial = NULL;
1339 for( int j=0; j<listMaterials->GetSize(); j++ )
1340 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1341 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1342 /*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 );*/
1346 if( MyMaterial == NULL ) {
1347 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]
1348 ->fBuf, AliMaterials[nmat]->fNwbuf );
1350 /*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 );*/
1352 listMaterials->Add( MyMaterial );
1355 AliGNode* son = NULL;
1357 // Different constructor depending on the shape
1358 if( !strncmp(shapename, "TUBE", 4) ) {
1360 AliGTube* Shape = NULL;
1362 for( int j=0; j<listShapes->GetSize(); j++ )
1363 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1364 Shape = (AliGTube*) listShapes->At(j);
1365 //printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1369 if( Shape == NULL ) {
1370 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1371 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1372 listShapes->Add(Shape);
1375 Shape->SetCol(Color);
1376 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1379 if( !strncmp(shapename, "BOX", 3) ) {
1381 AliGBox* Shape = NULL;
1383 for( int j=0; j<listShapes->GetSize(); j++ )
1384 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1385 Shape = (AliGBox*) listShapes->At(j);
1386 //printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1390 if( Shape == NULL ) {
1391 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1392 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1393 listShapes->Add(Shape);
1396 Shape->SetCol(Color);
1397 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1400 if( !strncmp(shapename, "TRD1", 4) ) {
1402 AliGTRD1* Shape = NULL;
1404 for( int j=0; j<listShapes->GetSize(); j++ )
1405 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1406 Shape = (AliGTRD1*) listShapes->At(j);
1407 //printf( " AliGTRD1( %s, %s, %f, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1411 if( Shape == NULL ) {
1412 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1413 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1414 listShapes->Add(Shape);
1417 Shape->SetCol(Color);
1418 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1421 if( !strncmp(shapename, "PCON", 4) ) {
1423 AliGPCone* Shape = NULL;
1425 for( int j=0; j<listShapes->GetSize(); j++ )
1426 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1427 Shape = (AliGPCone*) listShapes->At(j);
1428 //printf( " AliGPCone( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1432 if( Shape == NULL ) {
1433 Shape = new AliGPCone( shapename, shapename, upar, np );
1434 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1435 listShapes->Add(Shape);
1438 Shape->SetCol(Color);
1439 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1446 AliGTransform* tra = (AliGTransform*) listTransf->At(0);
1448 TVector* matrix = tra->GetMatrix();
1450 char* transname = new char[10];
1451 sprintf( transname, "%s%d", "tra", MatrCount );
1453 TVector &mat = *matrix;
1454 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);
1456 //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 );
1458 listTransf->AddAt(newtra, MatrCount);
1461 parent->Add(son, newtra);
1463 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1465 listNodes->Add(son);
1468 /***********************************************************************/
1470 void AliGEODB::Gsrotm(Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t)
1472 printf( " Gsrotm.\n" );
1475 /***********************************************************************/
1477 void AliGEODB::Gprotm(Int_t)
1479 printf( " Gprotm.\n" );
1482 /***********************************************************************/
1484 Int_t AliGEODB::Gsvolu(const char* vname, const char* shape, Int_t nmed, Float_t* upar, Int_t np)
1486 Int_t lenvname = strlen(vname);
1488 char* nodename = new char[lenvname+1];
1489 strcpy( nodename, vname );
1490 nodename[lenvname] = '\x0';
1493 for( pos=0; pos<lenvname; pos++ )
1494 if( (nodename[pos] == '\x0') || (nodename[pos] == ' ') )
1497 if( pos < lenvname ) {
1498 if( nodename ) delete [] nodename;
1499 nodename = new char[pos+1];
1500 strncpy( nodename, vname, pos );
1501 nodename[pos] = '\x0';
1504 char* shapename = new char[strlen(shape)+1];
1505 strcpy( shapename, shape );
1506 shapename[strlen(shape)] = '\x0';
1508 //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 );
1511 /* if number of parameters is 0, stores the nodename, shapename and nmed to be used in GSPOSP */
1512 NodePosp* AliPosp = new NodePosp;
1513 AliPosp->name = nodename;
1514 AliPosp->shape = shapename;
1515 AliPosp->nmed = nmed;
1516 Posp[PospCount] = AliPosp;
1521 if( (listNodes) && (listNodes->FindObject(nodename)) ) { // Trying to find the node inside listNodes
1522 // The node existed in listNodes.
1523 printf( "\n ERROR!!! Node %s already existed in listNodes\n", nodename );
1528 Int_t nmat = AliMediums[nmed]->fNmat;
1530 AliGMaterial* MyMaterial = NULL;
1532 for( int j=0; j<listMaterials->GetSize(); j++ )
1533 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1534 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1535 /*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 );*/
1539 if( MyMaterial == NULL ) {
1540 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 );
1542 listMaterials->Add( MyMaterial );
1544 /*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 );*/
1547 // Different constructor depending on the shape
1548 AliGNode* node = NULL;
1550 if( !strncmp(shapename, "TUBE", 4) ) {
1552 AliGTube* Shape = NULL;
1554 for( int j=0; j<listShapes->GetSize(); j++ )
1555 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1556 Shape = (AliGTube*) listShapes->At(j);
1557 printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1561 if( Shape == NULL ) {
1562 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1563 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1564 listShapes->Add(Shape);
1567 Shape->SetCol(Color);
1568 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1571 if( !strncmp(shapename, "BOX", 3) ) {
1573 AliGBox* Shape = NULL;
1575 for( int j=0; j<listShapes->GetSize(); j++ )
1576 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1577 Shape = (AliGBox*) listShapes->At(j);
1578 printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1582 if( Shape == NULL ) {
1583 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1584 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1585 listShapes->Add(Shape);
1588 Shape->SetCol(Color);
1589 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1592 if( !strncmp(shapename, "TRD1", 4) ) {
1594 AliGTRD1* Shape = NULL;
1596 for( int j=0; j<listShapes->GetSize(); j++ )
1597 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1598 Shape = (AliGTRD1*) listShapes->At(j);
1603 if( Shape == NULL ) {
1604 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1605 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1606 listShapes->Add(Shape);
1609 Shape->SetCol(Color);
1610 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1613 if( !strncmp(shapename, "PCON", 4) ) {
1615 AliGPCone* Shape = NULL;
1617 for( int j=0; j<listShapes->GetSize(); j++ )
1618 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1619 Shape = (AliGPCone*) listShapes->At(j);
1623 if( Shape == NULL ) {
1624 Shape = new AliGPCone( shapename, shapename, upar, np );
1625 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1626 listShapes->Add(Shape);
1629 Shape->SetCol(Color);
1630 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1633 //printf( " Created new AliGNode( %s, %d, %s, %s, %s );\n", nodename, 1+listNodes->GetSize(), nodename, shapename, MyMaterial->GetName() );
1635 listNodes->Add(node);
1637 //printf( " node->fShape->Color = %d\n", node->GetShape()->GetCol() );
1647 /***********************************************************************/
1649 void AliGEODB::Gsatt(const char*, const char*, Int_t)
1651 printf( " Gsatt.\n" );
1654 /***********************************************************************/
1656 void AliGEODB::Gfpara(const char*, Int_t, Int_t, Int_t&, Int_t&, Float_t*, Float_t*)
1658 printf( " Gfpara.\n" );
1661 /***********************************************************************/
1663 void AliGEODB::Gckpar(Int_t, Int_t, Float_t*)
1665 printf( " Gckpar.\n" );
1668 /***********************************************************************/
1670 void AliGEODB::Gckmat(Int_t, char*)
1672 printf( " Gckmat.\n" );
1675 /***********************************************************************/
1677 //=======================DRAW functions
1679 void AliGEODB::InitHIGZ()
1681 printf( "InitHIGZ.\n" );
1684 /***********************************************************************/
1686 void AliGEODB::Gdopen(Int_t)
1688 printf( "Gdopen.\n" );
1691 /***********************************************************************/
1693 void AliGEODB::Gdclose()
1695 printf( "Gdclose.\n" );
1698 /***********************************************************************/
1700 void AliGEODB::Gdelete(Int_t)
1702 cout << " Gdelete" << endl;
1705 /***********************************************************************/
1707 void AliGEODB::Gdshow(Int_t)
1709 cout << " Gdshow" << endl;
1712 /***********************************************************************/
1714 void AliGEODB::Gdopt(const char *,const char *)
1716 cout << " Gdopt" << endl;
1719 /***********************************************************************/
1721 void AliGEODB::Gdraw(const char *,Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1723 cout << " Gdraw" << endl;
1726 /***********************************************************************/
1728 void AliGEODB::Gdrawc(const char *,Int_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1730 cout << " Gdrawc" << endl;
1733 /***********************************************************************/
1735 void AliGEODB::Gdrawx(const char *,Float_t, Float_t, Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1737 cout << " Gdrawx" << endl;
1740 /***********************************************************************/
1742 void AliGEODB::Gdhead(Int_t, const char *, Float_t)
1744 cout << " Gdhead" << endl;
1747 /***********************************************************************/
1749 void AliGEODB::Gdman(Float_t, Float_t, const char *)
1751 cout << " Gdman" << endl;
1754 /***********************************************************************/
1756 void AliGEODB::Gdspec(const char *)
1758 cout << " Gdspec" << endl;
1761 /***********************************************************************/
1763 void AliGEODB::DrawOneSpec(const char *)
1765 cout << " DrawOneSpec" << endl;
1768 /***********************************************************************/
1770 void AliGEODB::Gdtree(const char *,Int_t,Int_t)
1772 cout << " Gdtree" << endl;
1775 /***********************************************************************/
1777 void AliGEODB::GdtreeParent(const char *,Int_t,Int_t)
1779 cout << " GdtreeParent" << endl;
1782 /***********************************************************************/
1784 //=======================Set functions
1786 void AliGEODB::SetABAN(Int_t)
1788 cout << " SetABAN" << endl;
1791 /***********************************************************************/
1793 void AliGEODB::SetANNI(Int_t)
1795 cout << " SetANNI" << endl;
1798 /***********************************************************************/
1800 void AliGEODB::SetAUTO(Int_t)
1802 cout << " SetAUTO" << endl;
1805 /***********************************************************************/
1807 void AliGEODB::SetBOMB(Float_t)
1809 cout << " SetBOMB" << endl;
1812 /***********************************************************************/
1814 void AliGEODB::SetBREM(Int_t)
1816 cout << " SetBREM" << endl;
1819 /***********************************************************************/
1821 void AliGEODB::SetCKOV(Int_t)
1823 cout << " SetCKOV" << endl;
1826 /***********************************************************************/
1828 void AliGEODB::SetClipBox(const char *,Float_t,Float_t, Float_t,Float_t,Float_t,Float_t)
1830 cout << " SetClipBox" << endl;
1833 /***********************************************************************/
1835 void AliGEODB::SetCOMP(Int_t)
1837 cout << " SetCOMP" << endl;
1840 /***********************************************************************/
1842 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 )
1844 cout << " SetCUTS" << endl;
1847 /***********************************************************************/
1849 void AliGEODB::SetDCAY(Int_t)
1851 cout << " SetDCAY" << endl;
1854 /***********************************************************************/
1856 void AliGEODB::SetDEBU(Int_t, Int_t, Int_t)
1858 cout << " SetDEBU" << endl;
1861 /***********************************************************************/
1863 void AliGEODB::SetDRAY(Int_t)
1865 cout << " SetDRAY" << endl;
1868 /***********************************************************************/
1870 void AliGEODB::SetHADR(Int_t)
1872 cout << " SetHADR" << endl;
1875 /***********************************************************************/
1877 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 )
1879 cout << " SetKINE" << endl;
1882 /***********************************************************************/
1884 void AliGEODB::SetLOSS(Int_t)
1886 cout << " SetLOSS" << endl;
1889 /***********************************************************************/
1891 void AliGEODB::SetMULS(Int_t)
1893 cout << " SetMULS" << endl;
1896 /***********************************************************************/
1898 void AliGEODB::SetMUNU(Int_t)
1900 cout << " SetMUNU" << endl;
1903 /***********************************************************************/
1905 void AliGEODB::SetOPTI(Int_t)
1907 cout << " SetOPTI" << endl;
1910 /***********************************************************************/
1912 void AliGEODB::SetPAIR(Int_t)
1914 cout << " SetPAIR" << endl;
1917 /***********************************************************************/
1919 void AliGEODB::SetPFIS(Int_t)
1921 cout << " SetPFIS" << endl;
1924 /***********************************************************************/
1926 void AliGEODB::SetPHOT(Int_t)
1928 cout << " SetPHOT" << endl;
1931 /***********************************************************************/
1933 void AliGEODB::SetRAYL(Int_t)
1935 cout << " SetRAYL" << endl;
1938 /***********************************************************************/
1940 void AliGEODB::SetSWIT(Int_t , Int_t)
1942 cout << " SetSWIT" << endl;
1945 /***********************************************************************/
1947 void AliGEODB::SetTRIG(Int_t)
1949 cout << " SetTRIG" << endl;
1952 /***********************************************************************/
1954 void AliGEODB::Vname(const char *, char *)
1956 cout << " Vname" << endl;
1959 /***********************************************************************/
1961 void AliGEODB::InitLego()
1963 cout << " InitLego" << endl;
1966 /***********************************************************************/
1968 extern "C" void sxpart_(){}