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.3 1999/11/03 13:17:05 fca
19 Have ProdProcess return const char*
21 Revision 1.2 1999/09/29 09:24:19 fca
22 Introduction of the Copyright and cvs Log
26 //////////////////////////////////////////////////////
27 // C++ dummy interface to Geant3 basic routines //
28 //////////////////////////////////////////////////////
35 #include "AliGShape.h"
36 #include "AliGMaterial.h"
37 #include "AliGTransform.h"
41 #include "AliGPCone.h"
42 #include "AliGeometry.h"
44 //---------------------------------------------------------
59 Mater* AliMaterials[MAXMAT]; // Array of Mater structs containing the AliMaterial parameters.
76 Med* AliMediums[MAXMAT]; // Array of Med structs containing the AliMedium parameters.
84 NodePosp* Posp[MAXMAT];
86 AliGMaterial* Mat[MAXMAT]; // List of Pointers to my AliGMaterials created
94 TList* listNodes = new TList(); // List of Nodes
95 TList* listTransf = new TList();
96 TList* listShapes = new TList();
97 TList* listMaterials = new TList();
99 AliGNode* TopNode = NULL;
101 /***********************************************************************/
105 /***********************************************************************/
107 AliGEODB::AliGEODB(const char *title, Int_t) : AliMC("AliGEODB",title)
109 //cout << " AliGEODB" << endl;
112 /***********************************************************************/
114 void AliGEODB::DefaultRange()
116 cout << " DefaultRange" << endl;
119 //=======================functions from GBASE
121 /***********************************************************************/
123 void AliGEODB::Gfile(const char*, const char*)
125 cout << " Gfile" << endl;
128 /***********************************************************************/
130 void AliGEODB::GeomIter()
132 cout << " GeomIter" << endl;
135 /***********************************************************************/
137 Int_t AliGEODB::CurrentMaterial(Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const
139 cout << " CurrentMaterial" << endl;
143 /***********************************************************************/
145 Int_t AliGEODB::NextVolUp(Text_t*, Int_t&)
147 cout << " NextVolUp" << endl;
151 /***********************************************************************/
153 Int_t AliGEODB::CurrentVol(Text_t*, Int_t&) const
155 cout << " CurrentVol" << endl;
159 /***********************************************************************/
161 Int_t AliGEODB::NofVolumes() const
163 cout << " NofVolumes" << endl;
167 /***********************************************************************/
169 Int_t AliGEODB::CurrentVolOff(Int_t, Text_t*, Int_t&) const
171 cout << " CurrentVolOff" << endl;
175 /***********************************************************************/
177 void AliGEODB::TrackPosition(Float_t*) const
179 cout << " TrackPosition" << endl;
182 /***********************************************************************/
184 void AliGEODB::TrackMomentum(Float_t*) const
186 cout << " TrackMomentum" << endl;
189 /***********************************************************************/
191 Int_t AliGEODB::VolId( Text_t* name ) const
193 cout << " VolId" << endl;
197 /***********************************************************************/
199 const char* AliGEODB::VolName(Int_t ) const
201 cout << " VolName" << endl;
205 /***********************************************************************/
207 Float_t AliGEODB::TrackCharge() const
209 cout << " TrackCharge" << endl;
213 /***********************************************************************/
215 Float_t AliGEODB::TrackMass() const
217 cout << " TrackMass" << endl;
221 /***********************************************************************/
223 Bool_t AliGEODB::TrackInside() const
225 cout << " TrackInside" << endl;
229 /***********************************************************************/
231 Bool_t AliGEODB::TrackEntering() const
233 cout << " TrackEntering" << endl;
237 /***********************************************************************/
239 Bool_t AliGEODB::TrackExiting() const
241 cout << " TrackExiting" << endl;
245 /***********************************************************************/
247 Bool_t AliGEODB::TrackOut() const
249 cout << " TrackOut" << endl;
253 /***********************************************************************/
255 Bool_t AliGEODB::TrackDisappear() const
257 cout << " TrackDisappear" << endl;
261 /***********************************************************************/
263 Bool_t AliGEODB::TrackStop() const
265 cout << " TrackStop" << endl;
269 /***********************************************************************/
271 Int_t AliGEODB::NSecondaries() const
273 cout << " NSecondaries" << endl;
277 /***********************************************************************/
279 AliMCProcess AliGEODB::ProdProcess() const
281 cout << " ProdProcess" << endl;
285 /***********************************************************************/
287 void AliGEODB::GetSecondary(Int_t, Int_t&, Float_t*, Float_t*)
289 cout << " GetSecondary" << endl;
292 /***********************************************************************/
294 Float_t AliGEODB::MaxStep() const
296 cout << " MaxStep" << endl;
300 /***********************************************************************/
302 void AliGEODB::SetMaxStep(Float_t )
304 cout << " SetMaxStep" << endl;
307 /***********************************************************************/
309 void AliGEODB::GetParticle(const Int_t, char*, Float_t&) const
311 cout << " GetParticle" << endl;
314 /***********************************************************************/
316 Int_t AliGEODB::CurrentEvent() const
318 cout << " CurrentEvent" << endl;
322 /***********************************************************************/
324 Int_t AliGEODB::GetMedium() const
326 cout << " GetMedium" << endl;
330 /***********************************************************************/
332 Float_t AliGEODB::Edep() const
334 cout << " Edep" << endl;
338 /***********************************************************************/
340 Float_t AliGEODB::Etot() const
342 cout << " Etot" << endl;
346 /***********************************************************************/
348 void AliGEODB::Rndm(Float_t*, const Int_t) const
350 cout << " Rndm" << endl;
353 /***********************************************************************/
355 Float_t AliGEODB::TrackStep() const
357 cout << " TrackStep" << endl;
361 /***********************************************************************/
363 Float_t AliGEODB::TrackLength() const
365 cout << " TrackLength" << endl;
369 /***********************************************************************/
371 Float_t AliGEODB::TrackTime() const
373 cout << " TrackTime" << endl;
377 /***********************************************************************/
379 Int_t AliGEODB::TrackPid() const
381 cout << " TrackPid" << endl;
385 /***********************************************************************/
387 Bool_t AliGEODB::TrackAlive() const
389 cout << " TrackAlive" << endl;
393 /***********************************************************************/
395 void AliGEODB::StopTrack()
397 cout << " StopTrack" << endl;
400 /***********************************************************************/
402 void AliGEODB::StopEvent()
404 cout << " StopEvent" << endl;
407 /***********************************************************************/
409 void AliGEODB::SetMaxNStep(Int_t)
411 cout << " SetMaxNStep" << endl;
414 /***********************************************************************/
416 void AliGEODB::SetColors()
418 cout << " SetColors" << endl;
421 /***********************************************************************/
423 Int_t AliGEODB::GetMaxNStep() const
425 cout << " GetMaxNStep" << endl;
429 /***********************************************************************/
431 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 )
433 if( MateCount >= MAXMAT ) {
434 printf( " ERROR: Material number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
438 Mater* AliMat = new Mater;
439 char* fname = new char[strlen(name)+1];
440 Float_t* fbuf = new Float_t[nwbuf];
442 strcpy( fname, name );
443 fname[strlen(name)] = '\x0';
445 AliMat->fName = fname;
448 AliMat->fDens = dens;
449 AliMat->fRadl = radl;
450 AliMat->fAbsl = absl;
451 AliMat->fNwbuf = nwbuf;
453 for( int i=0; i<nwbuf; i++ )
458 AliMaterials[MateCount] = AliMat;
463 /***********************************************************************/
465 void AliGEODB::Mixture( Int_t& imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat, Float_t* wmat )
467 if( MateCount >= MAXMAT ) {
468 printf( " ERROR: Mixture number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
472 Mater* AliMat = new Mater;
473 char* fname = new char[strlen(name)+1];
475 strcpy( fname, name );
476 fname[strlen(name)] = '\x0';
478 AliMat->fName = fname;
481 Float_t SUMwmat = 0.;
483 for( int i=0; i<nlmat; i++ ) {
484 MidA += wmat[i]*a[i];
485 MidZ += wmat[i]*z[i];
494 AliMat->fDens = dens;
501 AliMaterials[MateCount] = AliMat;
506 /***********************************************************************/
508 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 )
510 if( MedCount >= MAXMAT ) {
511 printf( " ERROR: Medium number: %d bigger that MAXMAT: %d => Out of array\n", MedCount, MAXMAT );
515 Med* AliMed = new Med;
516 char* fname = new char[strlen(name)+1];
517 Float_t* fUbuf = new Float_t[nbuf];
519 strcpy( fname, name );
520 fname[strlen(name)] = '\x0';
522 AliMed->fName = fname;
523 AliMed->fNmat = nmat;
524 AliMed->fIsvol = isvol;
525 AliMed->fIfield = ifield;
526 AliMed->fFieldm = fieldm;
527 AliMed->fTmaxfd = tmaxfd;
528 AliMed->fStemax = stemax;
529 AliMed->fDeemax = deemax;
530 AliMed->fEpsil = epsil;
531 AliMed->fStmin = stmin;
532 AliMed->fNbuf = nbuf;
534 for( int i=0; i<nbuf; i++ )
537 AliMed->fUbuf = fUbuf;
539 AliMediums[MedCount] = AliMed;
544 /***********************************************************************/
546 void AliGEODB::Matrix( Int_t &nmate , Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3 )
548 char* transname = new char[10];
549 sprintf(transname, "%s%d", "tra", MatrCount);
551 AliGTransform* tra = new AliGTransform( transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
553 //printf( " Created new AliGTransform( %s, %s, %f, %f, %f, %f, %f, %f );\n", transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
555 listTransf->AddAt( tra, MatrCount );
561 /***********************************************************************/
563 void AliGEODB::WriteEuclid(const char*, const char*, Int_t, Int_t)
565 cout << " WriteEuclid" << endl;
568 /***********************************************************************/
570 void AliGEODB::Gpcxyz()
572 cout << " Gpcxyz " << endl;
575 /***********************************************************************/
577 void AliGEODB::Ggclos()
580 for( int i=0; i<listNodes->GetSize(); i++ ) {
581 AliGNode* node = (AliGNode*) listNodes->At(i);
582 char* name = new char[strlen(node->GetName())+1];
583 strcpy(name, node->GetName());
584 name[strlen(node->GetName())] = '\x0';
585 node->AddConfig(name, name,"detail",981201,991201);
588 printf( " Total number of nodes = %d\n", listNodes->GetSize() );
590 SetVisibility( "TPC_1", 1 );
591 SetVisibility( "TGAS_1", 1 );
592 SetVisibility( "TPSG_1", 1 );
593 SetVisibility( "TPHV_1", 1 );
594 SetVisibility( "TRCS_1", 1 );
595 SetVisibility( "TSGA_1", 1 );
596 SetVisibility( "TRCL_1", 1 );
597 SetVisibility( "TLGA_1", 1 );
598 SetVisibility( "TSST_1", 1 );
599 SetVisibility( "TSST_2", 1 );
600 SetVisibility( "TSST_3", 1 );
601 SetVisibility( "TSST_4", 1 );
602 SetVisibility( "TSST_5", 1 );
603 SetVisibility( "TSST_6", 1 );
604 SetVisibility( "TSST_7", 1 );
605 SetVisibility( "TSST_8", 1 );
606 SetVisibility( "TSST_9", 1 );
607 SetVisibility( "TSST_10", 1 );
608 SetVisibility( "TSST_11", 1 );
609 SetVisibility( "TSST_12", 1 );
610 SetVisibility( "TSST_13", 1 );
611 SetVisibility( "TSST_14", 1 );
612 SetVisibility( "TSST_15", 1 );
613 SetVisibility( "TSST_16", 1 );
614 SetVisibility( "TSST_17", 1 );
615 SetVisibility( "TSST_18", 1 );
616 SetVisibility( "TSST_19", 1 );
617 SetVisibility( "TSST_20", 1 );
618 SetVisibility( "TSST_21", 1 );
619 SetVisibility( "TSST_22", 1 );
620 SetVisibility( "TSST_23", 1 );
621 SetVisibility( "TLST_1", 1 );
622 SetVisibility( "TLST_2", 1 );
623 SetVisibility( "TLST_3", 1 );
624 SetVisibility( "TLST_4", 1 );
625 SetVisibility( "TLST_5", 1 );
626 SetVisibility( "TLST_6", 1 );
627 SetVisibility( "TLST_7", 1 );
628 SetVisibility( "TLST_8", 1 );
629 SetVisibility( "TLST_9", 1 );
630 SetVisibility( "TLST_10", 1 );
631 SetVisibility( "TLST_11", 1 );
632 SetVisibility( "TLST_12", 1 );
633 SetVisibility( "TLST_13", 1 );
634 SetVisibility( "TLST_14", 1 );
635 SetVisibility( "TLST_15", 1 );
636 SetVisibility( "TLST_16", 1 );
637 SetVisibility( "TLST_17", 1 );
638 SetVisibility( "TLST_18", 1 );
639 SetVisibility( "TLST_19", 1 );
640 SetVisibility( "TLST_20", 1 );
641 SetVisibility( "TLST_21", 1 );
642 SetVisibility( "TLST_22", 1 );
643 SetVisibility( "TLST_23", 1 );
644 SetVisibility( "TLST_24", 1 );
645 SetVisibility( "TLST_25", 1 );
646 SetVisibility( "TLST_26", 1 );
647 SetVisibility( "TLST_27", 1 );
648 SetVisibility( "TLST_28", 1 );
649 SetVisibility( "TLST_29", 1 );
650 SetVisibility( "TLST_30", 1 );
651 SetVisibility( "TLST_31", 1 );
652 SetVisibility( "TLST_32", 1 );
653 SetVisibility( "TLST_33", 1 );
654 SetVisibility( "TLST_34", 1 );
655 SetVisibility( "TLST_35", 1 );
656 SetVisibility( "TLST_36", 1 );
657 SetVisibility( "TLST_37", 1 );
658 SetVisibility( "TLST_38", 1 );
659 SetVisibility( "TLST_39", 1 );
660 SetVisibility( "TLST_40", 1 );
661 SetVisibility( "TLST_41", 1 );
662 SetVisibility( "TLST_42", 1 );
663 SetVisibility( "TLST_43", 1 );
664 SetVisibility( "TLST_44", 1 );
665 SetVisibility( "TLST_45", 1 );
666 SetVisibility( "TLST_46", 1 );
667 SetVisibility( "TLST_47", 1 );
668 SetVisibility( "TLST_48", 1 );
669 SetVisibility( "TLST_49", 1 );
670 SetVisibility( "TLST_50", 1 );
671 SetVisibility( "TLST_51", 1 );
672 SetVisibility( "TLST_52", 1 );
673 SetVisibility( "TSWS_1", 1 );
674 SetVisibility( "TSWS_2", 1 );
675 SetVisibility( "TSWS_3", 1 );
676 SetVisibility( "TPW1_1", 1 );
677 SetVisibility( "TPW2_1", 1 );
678 SetVisibility( "TPW3_1", 1 );
679 SetVisibility( "TPW4_1", 1 );
680 SetVisibility( "TSPI_1", 1 );
681 SetVisibility( "TSP1_1", 1 );
682 SetVisibility( "TSPO_1", 1 );
683 SetVisibility( "TSP2_1", 1 );
684 SetVisibility( "TSWH_1", 1 );
685 SetVisibility( "TSW1_1", 1 );
686 SetVisibility( "TCOV_1", 1 );
687 SetVisibility( "TPOI_1", 1 );
688 SetVisibility( "TSWS_4", 1 );
689 SetVisibility( "TSWS_5", 1 );
690 SetVisibility( "TSWS_6", 1 );
691 SetVisibility( "TSWS_7", 1 );
692 SetVisibility( "TSWS_8", 1 );
693 SetVisibility( "TSWS_9", 1 );
694 SetVisibility( "TSWS_10", 1 );
695 SetVisibility( "TSWS_11", 1 );
696 SetVisibility( "TSWS_12", 1 );
697 SetVisibility( "TSWS_13", 1 );
698 SetVisibility( "TPIV_1", 1 );
699 SetVisibility( "TPVD_1", 1 );
701 printf( " Visibilities activated \n" );
703 AliGeometry* Geom1 = new AliGeometry( "Geom1", "Geom1", TopNode, 0 );
705 TCanvas* c1 = new TCanvas( "TPC", "Geometry Shapes", 100, 100, 750, 750 );
707 c1->SetFillColor(32); // Light Green
708 c1->SetBorderSize(3);
709 c1->SetBorderMode(0); // -1 (down) 0 (no) 1 (up)
711 TopNode->Draw("same");
713 TFile* file1 = new TFile( "GeoDB.root", "RECREATE" );
714 cout << endl << " Storing GeoDB.root file. Please, be patient... :-)" << endl;
715 TopNode->SaveAll(file1);
721 cout << " Geometry saved in disk " << endl;
727 TFile* file2 = new TFile( "GeoDB.root", "READ" );
729 AliGeometry* Geom2 = new AliGeometry( (AliGeometry*) file2->Get("Geom1") );
731 // Retrieve the memory tree structure from AliGeoDB.root and stores it in memory, being tree_root the top node
732 AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( file2 ) );
733 //AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( "GeoDB.root", "Geom1" ) );
735 TFile* file3 = new TFile( "GeoDB2.root", "RECREATE" );
736 cout << " Storing GeoDB2.root file. Please, be patient again... :-)" << endl;
737 tree_root->SaveAll( file3 ); // Memory tree structure saved in disk (second time)
743 cout << " Geometry saved in disk " << endl;
751 cout << " The two databases are stored in disk." << endl;
753 TFile* file4 = new TFile( "GeoDB.root" , "READ" );
754 TFile* file5 = new TFile( "GeoDB2.root", "READ" );
756 TBrowser* a = new TBrowser();
758 //DrawTree( TopNode, 0 );
761 /***********************************************************************/
763 void AliGEODB::SetVisibility(Text_t* name, Int_t val)
765 AliGNode* node = (AliGNode*) listNodes->FindObject( name );
770 printf( " ERROR!!! I couldn't find the node %s in the listNodes.\n", name );
773 /***********************************************************************/
775 void AliGEODB::DrawTree( AliGNode* topnode, Int_t tabs )
778 for( int i=0; topnode->GetNodeFromfNode(i); i++ ) {
779 for( int j=0; j<tabs; j++ )
781 cout << topnode->GetNodeFromfNode(i)->GetName() << endl;
783 DrawTree( topnode->GetNodeFromfNode(i), tabs );
789 /***********************************************************************/
791 void AliGEODB::Glast()
793 cout << " Glast " << endl;
796 /***********************************************************************/
798 void AliGEODB::Gprint(const char*)
800 cout << " Gprint " << endl;
803 /***********************************************************************/
805 void AliGEODB::Grun()
807 cout << " Grun " << endl;
810 /***********************************************************************/
812 void AliGEODB::Gtrig()
814 cout << " Gtrig " << endl;
817 /***********************************************************************/
819 void AliGEODB::Gtrigc()
821 cout << " Gtrigc " << endl;
824 /***********************************************************************/
826 void AliGEODB::Gtrigi()
828 cout << " Gtrigi " << endl;
831 /***********************************************************************/
833 void AliGEODB::Gwork(Int_t)
835 cout << " Gwork " << endl;
838 /***********************************************************************/
840 void AliGEODB::Gzinit()
842 cout << " Gzinit " << endl;
845 //=======================functions from GCONS
847 /***********************************************************************/
849 void AliGEODB::Gfmate(Int_t, char*, Float_t&, Float_t&, Float_t&, Float_t&, Float_t&, Float_t*, Int_t&)
851 cout << " Gfmate " << endl;
854 /***********************************************************************/
856 void AliGEODB::Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&)
858 cout << " Gfpart " << endl;
861 /***********************************************************************/
863 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*)
865 cout << " Gftmed " << endl;
868 /***********************************************************************/
870 void AliGEODB::Gmate() {
871 cout << " Gmate " << endl;
874 /***********************************************************************/
876 void AliGEODB::Gpart()
878 AliGTransform* Identity = new AliGTransform("Identity","Identity","rot 0. 0. 0.");
879 //printf( " Created new AliGTransform( Identity, Identity, rot 0. 0. 0. );\n" );
881 listTransf->AddAt( Identity, MatrCount );
884 AliGBox* box = new AliGBox("box","box", 400,400,400);
885 AliGNode* ALIC = new AliGNode( "ALIC", 1,"ALIC", box);
888 listNodes->Add(ALIC);
891 /***********************************************************************/
893 void AliGEODB::Gsdk(Int_t, Float_t*, Int_t*) {
894 cout << " Gsdk " << endl;
897 /***********************************************************************/
899 void AliGEODB::Gsmate(Int_t, const char*, Float_t, Float_t, Float_t, Float_t, Float_t) {
900 cout << " Gsmate " << endl;
903 /***********************************************************************/
905 void AliGEODB::Gsmixt(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) {
906 cout << " Gsmixt " << endl;
909 /***********************************************************************/
911 void AliGEODB::Gspart(Int_t, const char*, Int_t, Float_t, Float_t, Float_t) {
912 cout << " Gspart " << endl;
915 /***********************************************************************/
917 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) {
918 cout << " Gstmed " << endl;
921 /***********************************************************************/
923 void AliGEODB::Gstpar(Int_t, const char*, Float_t)
925 //cout << " Gstpar " << endl;
928 /***********************************************************************/
930 void AliGEODB::Gsckov(Int_t, Int_t, Float_t *, Float_t *, Float_t *, Float_t *)
932 cout << " Gsclov " << endl;
935 /***********************************************************************/
937 //=======================functions from GKINE
939 void AliGEODB::Gfkine(Int_t, Float_t*, Float_t*, Int_t&, Int_t&)
941 cout << " Gfkine" << endl;
944 /***********************************************************************/
946 void AliGEODB::Gfvert(Int_t, Float_t*, Int_t&, Int_t&, Float_t&)
948 cout << " Gfvert" << endl;
951 /***********************************************************************/
953 Int_t AliGEODB::Gskine(Float_t*, Int_t, Int_t, Float_t*, Int_t)
955 cout << " Gskine" << endl;
959 /***********************************************************************/
961 Int_t AliGEODB::Gsvert(Float_t*, Int_t, Int_t, Float_t*, Int_t)
963 cout << " Gsvert" << endl;
967 /***********************************************************************/
969 //=======================functions from GPHYS
971 void AliGEODB::Gphysi()
973 cout << " Gphysi" << endl;
976 /***********************************************************************/
978 //=======================functions from GTRAK
980 void AliGEODB::Gdebug()
982 cout << " Gdebug" << endl;
985 /***********************************************************************/
987 void AliGEODB::Gekbin()
989 cout << " Gekbin" << endl;
992 /***********************************************************************/
994 void AliGEODB::Gfinds()
996 cout << " Gfinds" << endl;
999 /***********************************************************************/
1001 void AliGEODB::Gsking(Int_t)
1003 cout << " Gsking" << endl;
1006 /***********************************************************************/
1008 void AliGEODB::Gskpho(Int_t)
1010 cout << " Gskpho" << endl;
1013 /***********************************************************************/
1015 void AliGEODB::Gsstak(Int_t)
1017 cout << " Gsstak" << endl;
1020 /***********************************************************************/
1022 void AliGEODB::Gsxyz()
1024 cout << " Gsxyz" << endl;
1027 /***********************************************************************/
1029 void AliGEODB::Gtrack()
1031 cout << " Gtrack" << endl;
1034 /***********************************************************************/
1036 void AliGEODB::Gtreve()
1038 cout << " Gtreve" << endl;
1041 /***********************************************************************/
1043 void AliGEODB::Grndm(Float_t*, const Int_t) const
1045 cout << " Grndm" << endl;
1048 /***********************************************************************/
1050 void AliGEODB::Grndmq(Int_t&, Int_t&, const Int_t, const Text_t*)
1052 cout << " Grndmq" << endl;
1055 /***********************************************************************/
1057 //=======================functions from GDRAW
1059 void AliGEODB::Gdxyz(Int_t )
1061 cout << " Gdxyz" << endl;
1064 /***********************************************************************/
1066 void AliGEODB::Gdcxyz()
1068 cout << " Gdcxyz" << endl;
1071 /***********************************************************************/
1073 //=======================functions from GGEOM
1075 void AliGEODB::Gdtom(Float_t*, Float_t*, Int_t)
1077 printf( " Gdtom.\n" );
1080 /***********************************************************************/
1082 void AliGEODB::Glmoth(const char*, Int_t, Int_t&, Int_t*, Int_t*)
1084 printf( " Glmoth.\n" );
1088 /***********************************************************************/
1090 void AliGEODB::Gmedia(Float_t*, Int_t&)
1092 printf( " Gmedia.\n" );
1095 /***********************************************************************/
1097 void AliGEODB::Gmtod(Float_t*, Float_t*, Int_t)
1099 printf( " Gmtod.\n" );
1102 /***********************************************************************/
1104 void AliGEODB::Gsdvn(const char* name, const char* parentname, Int_t ndiv, Int_t iaxis)
1106 cout << " Inside Gsdvn " << endl;
1107 /* Divides one node in Ndiv nodes in the iaxis direction*/
1109 char* transfname = new char[10];
1110 char* nodename = new char[10];
1112 AliGNode* parent = (AliGNode*) listNodes->FindObject(parentname);
1114 /* Find the shape that will result from the division*/
1117 if( parent->GetShape()->ClassName() == "AliGBox" ) {
1118 AliGMaterial* material = new AliGMaterial(parent->GetMaterial());
1123 case 1 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() / ndiv;
1124 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1125 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1128 case 2 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1129 Dy = ((AliGBox*)(parent->GetShape()))->GetY()/ ndiv;
1130 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1133 case 3 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1134 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1135 Dz = ((AliGBox*)(parent->GetShape()))->GetZ()/ ndiv;
1138 default: Dx = Dy = Dz = 0.;
1141 AliGBox* box = new AliGBox("box","box", Dx, Dy, Dz);
1143 /* Create the nodes son*/
1148 for( int i=0; i<ndiv; i++ ) {
1149 //nodename = "Node";
1150 nodename[4] = '\x0';
1151 sprintf( nodename, "%s%d", nodename, i );
1152 transfname = "trans";
1153 transfname[5] = '\x0';
1154 sprintf( transfname, "%s%d", transfname, i );
1158 case 'x' : x = ndiv *i;
1175 /* Positioning the sons (only translations) and adding them to the parent*/
1177 sprintf( expression, "%s %f %f %f", "tra", x, y, z );
1178 AliGTransform* tran = new AliGTransform( transfname, transfname, expression );
1180 char* nodname = new char[strlen(name)];
1181 strcpy( nodname, name );
1182 AliGNode* son = new AliGNode( nodname, i, nodname, box, material );
1183 if( nodname ) delete [] nodname;
1185 parent->Add( son, tran );
1186 parent->AddConfig("","");
1187 listNodes->AddLast(son);
1192 /***********************************************************************/
1194 void AliGEODB::Gsdvn2(const char*, const char*, Int_t, Int_t, Float_t, Int_t)
1196 printf( " Gsdvn2.\n" );
1199 /***********************************************************************/
1201 void AliGEODB::Gsdvs(const char*, const char*, Float_t, Int_t, Int_t)
1203 printf( " Gsdvs.\n" );
1206 /***********************************************************************/
1208 void AliGEODB::Gsdvs2(const char*, const char*, Float_t, Int_t, Float_t, Int_t)
1210 printf( " Gsdvs2.\n" );
1213 /***********************************************************************/
1215 void AliGEODB::Gsdvt(const char*, const char*, Float_t, Int_t, Int_t, Int_t)
1217 printf( " Gsdvt.\n" );
1220 /***********************************************************************/
1222 void AliGEODB::Gsdvt2(const char *, const char *, Float_t, Int_t, Float_t, Int_t, Int_t)
1224 printf( " Gsdvt2.\n" );
1227 /***********************************************************************/
1229 void AliGEODB::Gsord(const char*, Int_t)
1231 // Aqui entra pero dice Federico que Dummy.
1234 /***********************************************************************/
1236 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 )
1239 if( !strcmp(mother, "ALIC") )
1242 AliGNode* son = NULL;
1243 AliGNode* parent = NULL;
1245 char* nodename = new char[strlen(name)+1];
1246 strcpy( nodename, name );
1247 nodename[strlen(name)] = '\x0';
1249 TObjLink *lnk = listNodes->FirstLink();
1252 while( (lnk) && (!quit) ) {
1253 TObject *obj = lnk->GetObject();
1255 if( obj->GetName() ) {
1256 char* NodeName = new char[strlen(obj->GetName())+1];
1257 strcpy( NodeName, obj->GetName() );
1258 NodeName[strlen(obj->GetName())] = '\x0';
1261 for( i=0; NodeName[i]!='_'; i++ );
1263 if( !strncmp(nodename, NodeName, i) )
1264 son = (AliGNode*) obj;
1266 if( !strncmp(mother, NodeName, i) )
1267 parent = (AliGNode*) obj;
1269 if( NodeName ) delete [] NodeName;
1271 if( (son != NULL) && (parent != NULL) )
1279 cout << " ERROR in Gspos. Couldn't find node " << nodename << " inside listNodes." << endl;
1283 if( parent == NULL) {
1284 cout << " ERROR in Gspos. Couldn't find node " << mother << " inside listNodes." << endl;
1288 AliGTransform* tra = (AliGTransform*)listTransf->At(MatrCount - 1);
1290 TVector* matrix = tra->GetMatrix();
1291 char* transname = new char[10];
1292 sprintf(transname, "%s%d", "tra", MatrCount );
1294 TVector &mat = *matrix;
1295 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);
1297 //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 );
1299 listTransf->AddAt(newtra, MatrCount);
1302 parent->Add(son, newtra);
1303 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1306 /***********************************************************************/
1308 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 )
1314 for( i=0; i<PospCount; i++ )
1315 if( !strcmp(Posp[i]->name, nodename) )
1318 char* shapename = Posp[i]->shape;
1319 Int_t nmed = Posp[i]->nmed;
1321 char* fnodename = new char[strlen(nodename)+1];
1322 strcpy(fnodename, nodename);
1323 fnodename[strlen(nodename)] = '\x0';
1325 char* fmother = new char[strlen(mother)+1];
1326 strcpy(fmother, mother);
1327 fmother[strlen(mother)] = '\x0';
1329 AliGNode* parent = NULL;
1331 TObjLink *lnk = listNodes->FirstLink();
1334 while( (lnk) && (!quit) ) {
1335 TObject *obj = lnk->GetObject();
1337 if( obj->GetName() ) {
1338 char* NodeName = new char[strlen(obj->GetName())];
1339 strcpy( NodeName, obj->GetName() );
1342 for( i=0; NodeName[i]!='_'; i++ );
1344 if( !strncmp(fmother, NodeName, i) )
1345 parent = (AliGNode*) obj ;
1347 if( NodeName ) delete [] NodeName;
1349 if( parent != NULL )
1356 if( parent == NULL) {
1357 cout << " ERROR in Gsposp. Couldn't find node " << mother << " inside listNodes." << endl;
1361 Int_t nmat = AliMediums[nmed]->fNmat;
1363 AliGMaterial* MyMaterial = NULL;
1365 for( int j=0; j<listMaterials->GetSize(); j++ )
1366 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1367 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1368 /*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 );*/
1372 if( MyMaterial == NULL ) {
1373 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]
1374 ->fBuf, AliMaterials[nmat]->fNwbuf );
1376 /*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 );*/
1378 listMaterials->Add( MyMaterial );
1381 AliGNode* son = NULL;
1383 // Different constructor depending on the shape
1384 if( !strncmp(shapename, "TUBE", 4) ) {
1386 AliGTube* Shape = NULL;
1388 for( int j=0; j<listShapes->GetSize(); j++ )
1389 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1390 Shape = (AliGTube*) listShapes->At(j);
1391 //printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1395 if( Shape == NULL ) {
1396 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1397 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1398 listShapes->Add(Shape);
1401 Shape->SetCol(Color);
1402 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1405 if( !strncmp(shapename, "BOX", 3) ) {
1407 AliGBox* Shape = NULL;
1409 for( int j=0; j<listShapes->GetSize(); j++ )
1410 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1411 Shape = (AliGBox*) listShapes->At(j);
1412 //printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1416 if( Shape == NULL ) {
1417 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1418 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1419 listShapes->Add(Shape);
1422 Shape->SetCol(Color);
1423 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1426 if( !strncmp(shapename, "TRD1", 4) ) {
1428 AliGTRD1* Shape = NULL;
1430 for( int j=0; j<listShapes->GetSize(); j++ )
1431 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1432 Shape = (AliGTRD1*) listShapes->At(j);
1433 //printf( " AliGTRD1( %s, %s, %f, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1437 if( Shape == NULL ) {
1438 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1439 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1440 listShapes->Add(Shape);
1443 Shape->SetCol(Color);
1444 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1447 if( !strncmp(shapename, "PCON", 4) ) {
1449 AliGPCone* Shape = NULL;
1451 for( int j=0; j<listShapes->GetSize(); j++ )
1452 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1453 Shape = (AliGPCone*) listShapes->At(j);
1454 //printf( " AliGPCone( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1458 if( Shape == NULL ) {
1459 Shape = new AliGPCone( shapename, shapename, upar, np );
1460 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1461 listShapes->Add(Shape);
1464 Shape->SetCol(Color);
1465 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1472 AliGTransform* tra = (AliGTransform*) listTransf->At(0);
1474 TVector* matrix = tra->GetMatrix();
1476 char* transname = new char[10];
1477 sprintf( transname, "%s%d", "tra", MatrCount );
1479 TVector &mat = *matrix;
1480 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);
1482 //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 );
1484 listTransf->AddAt(newtra, MatrCount);
1487 parent->Add(son, newtra);
1489 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1491 listNodes->Add(son);
1494 /***********************************************************************/
1496 void AliGEODB::Gsrotm(Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t)
1498 printf( " Gsrotm.\n" );
1501 /***********************************************************************/
1503 void AliGEODB::Gprotm(Int_t)
1505 printf( " Gprotm.\n" );
1508 /***********************************************************************/
1510 Int_t AliGEODB::Gsvolu(const char* vname, const char* shape, Int_t nmed, Float_t* upar, Int_t np)
1512 Int_t lenvname = strlen(vname);
1514 char* nodename = new char[lenvname+1];
1515 strcpy( nodename, vname );
1516 nodename[lenvname] = '\x0';
1519 for( pos=0; pos<lenvname; pos++ )
1520 if( (nodename[pos] == '\x0') || (nodename[pos] == ' ') )
1523 if( pos < lenvname ) {
1524 if( nodename ) delete [] nodename;
1525 nodename = new char[pos+1];
1526 strncpy( nodename, vname, pos );
1527 nodename[pos] = '\x0';
1530 char* shapename = new char[strlen(shape)+1];
1531 strcpy( shapename, shape );
1532 shapename[strlen(shape)] = '\x0';
1534 //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 );
1537 /* if number of parameters is 0, stores the nodename, shapename and nmed to be used in GSPOSP */
1538 NodePosp* AliPosp = new NodePosp;
1539 AliPosp->name = nodename;
1540 AliPosp->shape = shapename;
1541 AliPosp->nmed = nmed;
1542 Posp[PospCount] = AliPosp;
1547 if( (listNodes) && (listNodes->FindObject(nodename)) ) { // Trying to find the node inside listNodes
1548 // The node existed in listNodes.
1549 printf( "\n ERROR!!! Node %s already existed in listNodes\n", nodename );
1554 Int_t nmat = AliMediums[nmed]->fNmat;
1556 AliGMaterial* MyMaterial = NULL;
1558 for( int j=0; j<listMaterials->GetSize(); j++ )
1559 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1560 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1561 /*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 );*/
1565 if( MyMaterial == NULL ) {
1566 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 );
1568 listMaterials->Add( MyMaterial );
1570 /*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 );*/
1573 // Different constructor depending on the shape
1574 AliGNode* node = NULL;
1576 if( !strncmp(shapename, "TUBE", 4) ) {
1578 AliGTube* Shape = NULL;
1580 for( int j=0; j<listShapes->GetSize(); j++ )
1581 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1582 Shape = (AliGTube*) listShapes->At(j);
1583 printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1587 if( Shape == NULL ) {
1588 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1589 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1590 listShapes->Add(Shape);
1593 Shape->SetCol(Color);
1594 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1597 if( !strncmp(shapename, "BOX", 3) ) {
1599 AliGBox* Shape = NULL;
1601 for( int j=0; j<listShapes->GetSize(); j++ )
1602 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1603 Shape = (AliGBox*) listShapes->At(j);
1604 printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1608 if( Shape == NULL ) {
1609 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1610 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1611 listShapes->Add(Shape);
1614 Shape->SetCol(Color);
1615 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1618 if( !strncmp(shapename, "TRD1", 4) ) {
1620 AliGTRD1* Shape = NULL;
1622 for( int j=0; j<listShapes->GetSize(); j++ )
1623 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1624 Shape = (AliGTRD1*) listShapes->At(j);
1629 if( Shape == NULL ) {
1630 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1631 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1632 listShapes->Add(Shape);
1635 Shape->SetCol(Color);
1636 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1639 if( !strncmp(shapename, "PCON", 4) ) {
1641 AliGPCone* Shape = NULL;
1643 for( int j=0; j<listShapes->GetSize(); j++ )
1644 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1645 Shape = (AliGPCone*) listShapes->At(j);
1649 if( Shape == NULL ) {
1650 Shape = new AliGPCone( shapename, shapename, upar, np );
1651 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1652 listShapes->Add(Shape);
1655 Shape->SetCol(Color);
1656 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1659 //printf( " Created new AliGNode( %s, %d, %s, %s, %s );\n", nodename, 1+listNodes->GetSize(), nodename, shapename, MyMaterial->GetName() );
1661 listNodes->Add(node);
1663 //printf( " node->fShape->Color = %d\n", node->GetShape()->GetCol() );
1673 /***********************************************************************/
1675 void AliGEODB::Gsatt(const char*, const char*, Int_t)
1677 printf( " Gsatt.\n" );
1680 /***********************************************************************/
1682 void AliGEODB::Gfpara(const char*, Int_t, Int_t, Int_t&, Int_t&, Float_t*, Float_t*)
1684 printf( " Gfpara.\n" );
1687 /***********************************************************************/
1689 void AliGEODB::Gckpar(Int_t, Int_t, Float_t*)
1691 printf( " Gckpar.\n" );
1694 /***********************************************************************/
1696 void AliGEODB::Gckmat(Int_t, char*)
1698 printf( " Gckmat.\n" );
1701 /***********************************************************************/
1703 //=======================DRAW functions
1705 void AliGEODB::InitHIGZ()
1707 printf( "InitHIGZ.\n" );
1710 /***********************************************************************/
1712 void AliGEODB::Gdopen(Int_t)
1714 printf( "Gdopen.\n" );
1717 /***********************************************************************/
1719 void AliGEODB::Gdclose()
1721 printf( "Gdclose.\n" );
1724 /***********************************************************************/
1726 void AliGEODB::Gdelete(Int_t)
1728 cout << " Gdelete" << endl;
1731 /***********************************************************************/
1733 void AliGEODB::Gdshow(Int_t)
1735 cout << " Gdshow" << endl;
1738 /***********************************************************************/
1740 void AliGEODB::Gdopt(const char *,const char *)
1742 cout << " Gdopt" << endl;
1745 /***********************************************************************/
1747 void AliGEODB::Gdraw(const char *,Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1749 cout << " Gdraw" << endl;
1752 /***********************************************************************/
1754 void AliGEODB::Gdrawc(const char *,Int_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1756 cout << " Gdrawc" << endl;
1759 /***********************************************************************/
1761 void AliGEODB::Gdrawx(const char *,Float_t, Float_t, Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1763 cout << " Gdrawx" << endl;
1766 /***********************************************************************/
1768 void AliGEODB::Gdhead(Int_t, const char *, Float_t)
1770 cout << " Gdhead" << endl;
1773 /***********************************************************************/
1775 void AliGEODB::Gdman(Float_t, Float_t, const char *)
1777 cout << " Gdman" << endl;
1780 /***********************************************************************/
1782 void AliGEODB::Gdspec(const char *)
1784 cout << " Gdspec" << endl;
1787 /***********************************************************************/
1789 void AliGEODB::DrawOneSpec(const char *)
1791 cout << " DrawOneSpec" << endl;
1794 /***********************************************************************/
1796 void AliGEODB::Gdtree(const char *,Int_t,Int_t)
1798 cout << " Gdtree" << endl;
1801 /***********************************************************************/
1803 void AliGEODB::GdtreeParent(const char *,Int_t,Int_t)
1805 cout << " GdtreeParent" << endl;
1808 /***********************************************************************/
1810 //=======================Set functions
1812 void AliGEODB::SetABAN(Int_t)
1814 cout << " SetABAN" << endl;
1817 /***********************************************************************/
1819 void AliGEODB::SetANNI(Int_t)
1821 cout << " SetANNI" << endl;
1824 /***********************************************************************/
1826 void AliGEODB::SetAUTO(Int_t)
1828 cout << " SetAUTO" << endl;
1831 /***********************************************************************/
1833 void AliGEODB::SetBOMB(Float_t)
1835 cout << " SetBOMB" << endl;
1838 /***********************************************************************/
1840 void AliGEODB::SetBREM(Int_t)
1842 cout << " SetBREM" << endl;
1845 /***********************************************************************/
1847 void AliGEODB::SetCKOV(Int_t)
1849 cout << " SetCKOV" << endl;
1852 /***********************************************************************/
1854 void AliGEODB::SetClipBox(const char *,Float_t,Float_t, Float_t,Float_t,Float_t,Float_t)
1856 cout << " SetClipBox" << endl;
1859 /***********************************************************************/
1861 void AliGEODB::SetCOMP(Int_t)
1863 cout << " SetCOMP" << endl;
1866 /***********************************************************************/
1868 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 )
1870 cout << " SetCUTS" << endl;
1873 /***********************************************************************/
1875 void AliGEODB::SetDCAY(Int_t)
1877 cout << " SetDCAY" << endl;
1880 /***********************************************************************/
1882 void AliGEODB::SetDEBU(Int_t, Int_t, Int_t)
1884 cout << " SetDEBU" << endl;
1887 /***********************************************************************/
1889 void AliGEODB::SetDRAY(Int_t)
1891 cout << " SetDRAY" << endl;
1894 /***********************************************************************/
1896 void AliGEODB::SetHADR(Int_t)
1898 cout << " SetHADR" << endl;
1901 /***********************************************************************/
1903 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 )
1905 cout << " SetKINE" << endl;
1908 /***********************************************************************/
1910 void AliGEODB::SetLOSS(Int_t)
1912 cout << " SetLOSS" << endl;
1915 /***********************************************************************/
1917 void AliGEODB::SetMULS(Int_t)
1919 cout << " SetMULS" << endl;
1922 /***********************************************************************/
1924 void AliGEODB::SetMUNU(Int_t)
1926 cout << " SetMUNU" << endl;
1929 /***********************************************************************/
1931 void AliGEODB::SetOPTI(Int_t)
1933 cout << " SetOPTI" << endl;
1936 /***********************************************************************/
1938 void AliGEODB::SetPAIR(Int_t)
1940 cout << " SetPAIR" << endl;
1943 /***********************************************************************/
1945 void AliGEODB::SetPFIS(Int_t)
1947 cout << " SetPFIS" << endl;
1950 /***********************************************************************/
1952 void AliGEODB::SetPHOT(Int_t)
1954 cout << " SetPHOT" << endl;
1957 /***********************************************************************/
1959 void AliGEODB::SetRAYL(Int_t)
1961 cout << " SetRAYL" << endl;
1964 /***********************************************************************/
1966 void AliGEODB::SetSWIT(Int_t , Int_t)
1968 cout << " SetSWIT" << endl;
1971 /***********************************************************************/
1973 void AliGEODB::SetTRIG(Int_t)
1975 cout << " SetTRIG" << endl;
1978 /***********************************************************************/
1980 void AliGEODB::Vname(const char *, char *)
1982 cout << " Vname" << endl;
1985 /***********************************************************************/
1987 void AliGEODB::InitLego()
1989 cout << " InitLego" << endl;
1992 /***********************************************************************/
1994 extern "C" void sxpart_(){}