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 **************************************************************************/
20 //////////////////////////////////////////////////////
21 // C++ dummy interface to Geant3 basic routines //
22 //////////////////////////////////////////////////////
29 #include "AliGShape.h"
30 #include "AliGMaterial.h"
31 #include "AliGTransform.h"
35 #include "AliGPCone.h"
36 #include "AliGeometry.h"
38 //---------------------------------------------------------
53 Mater* AliMaterials[MAXMAT]; // Array of Mater structs containing the AliMaterial parameters.
70 Med* AliMediums[MAXMAT]; // Array of Med structs containing the AliMedium parameters.
78 NodePosp* Posp[MAXMAT];
80 AliGMaterial* Mat[MAXMAT]; // List of Pointers to my AliGMaterials created
88 TList* listNodes = new TList(); // List of Nodes
89 TList* listTransf = new TList();
90 TList* listShapes = new TList();
91 TList* listMaterials = new TList();
93 AliGNode* TopNode = NULL;
95 /***********************************************************************/
99 /***********************************************************************/
101 AliGEODB::AliGEODB(const char *title, Int_t) : AliMC("AliGEODB",title)
103 //cout << " AliGEODB" << endl;
106 /***********************************************************************/
108 void AliGEODB::DefaultRange()
110 cout << " DefaultRange" << endl;
113 //=======================functions from GBASE
115 /***********************************************************************/
117 void AliGEODB::Gfile(const char*, const char*)
119 cout << " Gfile" << endl;
122 /***********************************************************************/
124 void AliGEODB::GeomIter()
126 cout << " GeomIter" << endl;
129 /***********************************************************************/
131 Int_t AliGEODB::CurrentMaterial(Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const
133 cout << " CurrentMaterial" << endl;
137 /***********************************************************************/
139 Int_t AliGEODB::NextVolUp(Text_t*, Int_t&)
141 cout << " NextVolUp" << endl;
145 /***********************************************************************/
147 Int_t AliGEODB::CurrentVol(Text_t*, Int_t&) const
149 cout << " CurrentVol" << endl;
153 /***********************************************************************/
155 Int_t AliGEODB::NofVolumes() const
157 cout << " NofVolumes" << endl;
161 /***********************************************************************/
163 Int_t AliGEODB::CurrentVolOff(Int_t, Text_t*, Int_t&) const
165 cout << " CurrentVolOff" << endl;
169 /***********************************************************************/
171 void AliGEODB::TrackPosition(Float_t*) const
173 cout << " TrackPosition" << endl;
176 /***********************************************************************/
178 void AliGEODB::TrackMomentum(Float_t*) const
180 cout << " TrackMomentum" << endl;
183 /***********************************************************************/
185 Int_t AliGEODB::VolId( Text_t* name ) const
187 cout << " VolId" << endl;
191 /***********************************************************************/
193 const char* AliGEODB::VolName(Int_t ) const
195 cout << " VolName" << endl;
199 /***********************************************************************/
201 Float_t AliGEODB::TrackCharge() const
203 cout << " TrackCharge" << endl;
207 /***********************************************************************/
209 Float_t AliGEODB::TrackMass() const
211 cout << " TrackMass" << endl;
215 /***********************************************************************/
217 Bool_t AliGEODB::TrackInside() const
219 cout << " TrackInside" << endl;
223 /***********************************************************************/
225 Bool_t AliGEODB::TrackEntering() const
227 cout << " TrackEntering" << endl;
231 /***********************************************************************/
233 Bool_t AliGEODB::TrackExiting() const
235 cout << " TrackExiting" << endl;
239 /***********************************************************************/
241 Bool_t AliGEODB::TrackOut() const
243 cout << " TrackOut" << endl;
247 /***********************************************************************/
249 Bool_t AliGEODB::TrackDisappear() const
251 cout << " TrackDisappear" << endl;
255 /***********************************************************************/
257 Bool_t AliGEODB::TrackStop() const
259 cout << " TrackStop" << endl;
263 /***********************************************************************/
265 Int_t AliGEODB::NSecondaries() const
267 cout << " NSecondaries" << endl;
271 /***********************************************************************/
273 void AliGEODB::ProdProcess(char*) const
275 cout << " ProdProcess" << endl;
278 /***********************************************************************/
280 void AliGEODB::GetSecondary(Int_t, Int_t&, Float_t*, Float_t*)
282 cout << " GetSecondary" << endl;
285 /***********************************************************************/
287 Float_t AliGEODB::MaxStep() const
289 cout << " MaxStep" << endl;
293 /***********************************************************************/
295 void AliGEODB::SetMaxStep(Float_t )
297 cout << " SetMaxStep" << endl;
300 /***********************************************************************/
302 void AliGEODB::GetParticle(const Int_t, char*, Float_t&) const
304 cout << " GetParticle" << endl;
307 /***********************************************************************/
309 Int_t AliGEODB::CurrentEvent() const
311 cout << " CurrentEvent" << endl;
315 /***********************************************************************/
317 Int_t AliGEODB::GetMedium() const
319 cout << " GetMedium" << endl;
323 /***********************************************************************/
325 Float_t AliGEODB::Edep() const
327 cout << " Edep" << endl;
331 /***********************************************************************/
333 Float_t AliGEODB::Etot() const
335 cout << " Etot" << endl;
339 /***********************************************************************/
341 void AliGEODB::Rndm(Float_t*, const Int_t) const
343 cout << " Rndm" << endl;
346 /***********************************************************************/
348 Float_t AliGEODB::TrackStep() const
350 cout << " TrackStep" << endl;
354 /***********************************************************************/
356 Float_t AliGEODB::TrackLength() const
358 cout << " TrackLength" << endl;
362 /***********************************************************************/
364 Float_t AliGEODB::TrackTime() const
366 cout << " TrackTime" << endl;
370 /***********************************************************************/
372 Int_t AliGEODB::TrackPid() const
374 cout << " TrackPid" << endl;
378 /***********************************************************************/
380 Bool_t AliGEODB::TrackAlive() const
382 cout << " TrackAlive" << endl;
386 /***********************************************************************/
388 void AliGEODB::StopTrack()
390 cout << " StopTrack" << endl;
393 /***********************************************************************/
395 void AliGEODB::StopEvent()
397 cout << " StopEvent" << endl;
400 /***********************************************************************/
402 void AliGEODB::SetMaxNStep(Int_t)
404 cout << " SetMaxNStep" << endl;
407 /***********************************************************************/
409 void AliGEODB::SetColors()
411 cout << " SetColors" << endl;
414 /***********************************************************************/
416 Int_t AliGEODB::GetMaxNStep() const
418 cout << " GetMaxNStep" << endl;
422 /***********************************************************************/
424 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 )
426 if( MateCount >= MAXMAT ) {
427 printf( " ERROR: Material number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
431 Mater* AliMat = new Mater;
432 char* fname = new char[strlen(name)+1];
433 Float_t* fbuf = new Float_t[nwbuf];
435 strcpy( fname, name );
436 fname[strlen(name)] = '\x0';
438 AliMat->fName = fname;
441 AliMat->fDens = dens;
442 AliMat->fRadl = radl;
443 AliMat->fAbsl = absl;
444 AliMat->fNwbuf = nwbuf;
446 for( int i=0; i<nwbuf; i++ )
451 AliMaterials[MateCount] = AliMat;
456 /***********************************************************************/
458 void AliGEODB::Mixture( Int_t& imat, const char* name, Float_t* a, Float_t* z, Float_t dens, Int_t nlmat, Float_t* wmat )
460 if( MateCount >= MAXMAT ) {
461 printf( " ERROR: Mixture number: %d bigger that MAXMAT: %d => Out of array\n", MateCount, MAXMAT );
465 Mater* AliMat = new Mater;
466 char* fname = new char[strlen(name)+1];
468 strcpy( fname, name );
469 fname[strlen(name)] = '\x0';
471 AliMat->fName = fname;
474 Float_t SUMwmat = 0.;
476 for( int i=0; i<nlmat; i++ ) {
477 MidA += wmat[i]*a[i];
478 MidZ += wmat[i]*z[i];
487 AliMat->fDens = dens;
494 AliMaterials[MateCount] = AliMat;
499 /***********************************************************************/
501 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 )
503 if( MedCount >= MAXMAT ) {
504 printf( " ERROR: Medium number: %d bigger that MAXMAT: %d => Out of array\n", MedCount, MAXMAT );
508 Med* AliMed = new Med;
509 char* fname = new char[strlen(name)+1];
510 Float_t* fUbuf = new Float_t[nbuf];
512 strcpy( fname, name );
513 fname[strlen(name)] = '\x0';
515 AliMed->fName = fname;
516 AliMed->fNmat = nmat;
517 AliMed->fIsvol = isvol;
518 AliMed->fIfield = ifield;
519 AliMed->fFieldm = fieldm;
520 AliMed->fTmaxfd = tmaxfd;
521 AliMed->fStemax = stemax;
522 AliMed->fDeemax = deemax;
523 AliMed->fEpsil = epsil;
524 AliMed->fStmin = stmin;
525 AliMed->fNbuf = nbuf;
527 for( int i=0; i<nbuf; i++ )
530 AliMed->fUbuf = fUbuf;
532 AliMediums[MedCount] = AliMed;
537 /***********************************************************************/
539 void AliGEODB::Matrix( Int_t &nmate , Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, Float_t phi3 )
541 char* transname = new char[10];
542 sprintf(transname, "%s%d", "tra", MatrCount);
544 AliGTransform* tra = new AliGTransform( transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
546 //printf( " Created new AliGTransform( %s, %s, %f, %f, %f, %f, %f, %f );\n", transname, transname, theta1, phi1, theta2, phi2, theta3, phi3 );
548 listTransf->AddAt( tra, MatrCount );
554 /***********************************************************************/
556 void AliGEODB::WriteEuclid(const char*, const char*, Int_t, Int_t)
558 cout << " WriteEuclid" << endl;
561 /***********************************************************************/
563 void AliGEODB::Gpcxyz()
565 cout << " Gpcxyz " << endl;
568 /***********************************************************************/
570 void AliGEODB::Ggclos()
573 for( int i=0; i<listNodes->GetSize(); i++ ) {
574 AliGNode* node = (AliGNode*) listNodes->At(i);
575 char* name = new char[strlen(node->GetName())+1];
576 strcpy(name, node->GetName());
577 name[strlen(node->GetName())] = '\x0';
578 node->AddConfig(name, name,"detail",981201,991201);
581 printf( " Total number of nodes = %d\n", listNodes->GetSize() );
583 SetVisibility( "TPC_1", 1 );
584 SetVisibility( "TGAS_1", 1 );
585 SetVisibility( "TPSG_1", 1 );
586 SetVisibility( "TPHV_1", 1 );
587 SetVisibility( "TRCS_1", 1 );
588 SetVisibility( "TSGA_1", 1 );
589 SetVisibility( "TRCL_1", 1 );
590 SetVisibility( "TLGA_1", 1 );
591 SetVisibility( "TSST_1", 1 );
592 SetVisibility( "TSST_2", 1 );
593 SetVisibility( "TSST_3", 1 );
594 SetVisibility( "TSST_4", 1 );
595 SetVisibility( "TSST_5", 1 );
596 SetVisibility( "TSST_6", 1 );
597 SetVisibility( "TSST_7", 1 );
598 SetVisibility( "TSST_8", 1 );
599 SetVisibility( "TSST_9", 1 );
600 SetVisibility( "TSST_10", 1 );
601 SetVisibility( "TSST_11", 1 );
602 SetVisibility( "TSST_12", 1 );
603 SetVisibility( "TSST_13", 1 );
604 SetVisibility( "TSST_14", 1 );
605 SetVisibility( "TSST_15", 1 );
606 SetVisibility( "TSST_16", 1 );
607 SetVisibility( "TSST_17", 1 );
608 SetVisibility( "TSST_18", 1 );
609 SetVisibility( "TSST_19", 1 );
610 SetVisibility( "TSST_20", 1 );
611 SetVisibility( "TSST_21", 1 );
612 SetVisibility( "TSST_22", 1 );
613 SetVisibility( "TSST_23", 1 );
614 SetVisibility( "TLST_1", 1 );
615 SetVisibility( "TLST_2", 1 );
616 SetVisibility( "TLST_3", 1 );
617 SetVisibility( "TLST_4", 1 );
618 SetVisibility( "TLST_5", 1 );
619 SetVisibility( "TLST_6", 1 );
620 SetVisibility( "TLST_7", 1 );
621 SetVisibility( "TLST_8", 1 );
622 SetVisibility( "TLST_9", 1 );
623 SetVisibility( "TLST_10", 1 );
624 SetVisibility( "TLST_11", 1 );
625 SetVisibility( "TLST_12", 1 );
626 SetVisibility( "TLST_13", 1 );
627 SetVisibility( "TLST_14", 1 );
628 SetVisibility( "TLST_15", 1 );
629 SetVisibility( "TLST_16", 1 );
630 SetVisibility( "TLST_17", 1 );
631 SetVisibility( "TLST_18", 1 );
632 SetVisibility( "TLST_19", 1 );
633 SetVisibility( "TLST_20", 1 );
634 SetVisibility( "TLST_21", 1 );
635 SetVisibility( "TLST_22", 1 );
636 SetVisibility( "TLST_23", 1 );
637 SetVisibility( "TLST_24", 1 );
638 SetVisibility( "TLST_25", 1 );
639 SetVisibility( "TLST_26", 1 );
640 SetVisibility( "TLST_27", 1 );
641 SetVisibility( "TLST_28", 1 );
642 SetVisibility( "TLST_29", 1 );
643 SetVisibility( "TLST_30", 1 );
644 SetVisibility( "TLST_31", 1 );
645 SetVisibility( "TLST_32", 1 );
646 SetVisibility( "TLST_33", 1 );
647 SetVisibility( "TLST_34", 1 );
648 SetVisibility( "TLST_35", 1 );
649 SetVisibility( "TLST_36", 1 );
650 SetVisibility( "TLST_37", 1 );
651 SetVisibility( "TLST_38", 1 );
652 SetVisibility( "TLST_39", 1 );
653 SetVisibility( "TLST_40", 1 );
654 SetVisibility( "TLST_41", 1 );
655 SetVisibility( "TLST_42", 1 );
656 SetVisibility( "TLST_43", 1 );
657 SetVisibility( "TLST_44", 1 );
658 SetVisibility( "TLST_45", 1 );
659 SetVisibility( "TLST_46", 1 );
660 SetVisibility( "TLST_47", 1 );
661 SetVisibility( "TLST_48", 1 );
662 SetVisibility( "TLST_49", 1 );
663 SetVisibility( "TLST_50", 1 );
664 SetVisibility( "TLST_51", 1 );
665 SetVisibility( "TLST_52", 1 );
666 SetVisibility( "TSWS_1", 1 );
667 SetVisibility( "TSWS_2", 1 );
668 SetVisibility( "TSWS_3", 1 );
669 SetVisibility( "TPW1_1", 1 );
670 SetVisibility( "TPW2_1", 1 );
671 SetVisibility( "TPW3_1", 1 );
672 SetVisibility( "TPW4_1", 1 );
673 SetVisibility( "TSPI_1", 1 );
674 SetVisibility( "TSP1_1", 1 );
675 SetVisibility( "TSPO_1", 1 );
676 SetVisibility( "TSP2_1", 1 );
677 SetVisibility( "TSWH_1", 1 );
678 SetVisibility( "TSW1_1", 1 );
679 SetVisibility( "TCOV_1", 1 );
680 SetVisibility( "TPOI_1", 1 );
681 SetVisibility( "TSWS_4", 1 );
682 SetVisibility( "TSWS_5", 1 );
683 SetVisibility( "TSWS_6", 1 );
684 SetVisibility( "TSWS_7", 1 );
685 SetVisibility( "TSWS_8", 1 );
686 SetVisibility( "TSWS_9", 1 );
687 SetVisibility( "TSWS_10", 1 );
688 SetVisibility( "TSWS_11", 1 );
689 SetVisibility( "TSWS_12", 1 );
690 SetVisibility( "TSWS_13", 1 );
691 SetVisibility( "TPIV_1", 1 );
692 SetVisibility( "TPVD_1", 1 );
694 printf( " Visibilities activated \n" );
696 AliGeometry* Geom1 = new AliGeometry( "Geom1", "Geom1", TopNode, 0 );
698 TCanvas* c1 = new TCanvas( "TPC", "Geometry Shapes", 100, 100, 750, 750 );
700 c1->SetFillColor(32); // Light Green
701 c1->SetBorderSize(3);
702 c1->SetBorderMode(0); // -1 (down) 0 (no) 1 (up)
704 TopNode->Draw("same");
706 TFile* file1 = new TFile( "GeoDB.root", "RECREATE" );
707 cout << endl << " Storing GeoDB.root file. Please, be patient... :-)" << endl;
708 TopNode->SaveAll(file1);
714 cout << " Geometry saved in disk " << endl;
720 TFile* file2 = new TFile( "GeoDB.root", "READ" );
722 AliGeometry* Geom2 = new AliGeometry( (AliGeometry*) file2->Get("Geom1") );
724 // Retrieve the memory tree structure from AliGeoDB.root and stores it in memory, being tree_root the top node
725 AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( file2 ) );
726 //AliGNode* tree_root = new AliGNode( Geom2->FileToMemTree( "GeoDB.root", "Geom1" ) );
728 TFile* file3 = new TFile( "GeoDB2.root", "RECREATE" );
729 cout << " Storing GeoDB2.root file. Please, be patient again... :-)" << endl;
730 tree_root->SaveAll( file3 ); // Memory tree structure saved in disk (second time)
736 cout << " Geometry saved in disk " << endl;
744 cout << " The two databases are stored in disk." << endl;
746 TFile* file4 = new TFile( "GeoDB.root" , "READ" );
747 TFile* file5 = new TFile( "GeoDB2.root", "READ" );
749 TBrowser* a = new TBrowser();
751 //DrawTree( TopNode, 0 );
754 /***********************************************************************/
756 void AliGEODB::SetVisibility(Text_t* name, Int_t val)
758 AliGNode* node = (AliGNode*) listNodes->FindObject( name );
763 printf( " ERROR!!! I couldn't find the node %s in the listNodes.\n", name );
766 /***********************************************************************/
768 void AliGEODB::DrawTree( AliGNode* topnode, Int_t tabs )
771 for( int i=0; topnode->GetNodeFromfNode(i); i++ ) {
772 for( int j=0; j<tabs; j++ )
774 cout << topnode->GetNodeFromfNode(i)->GetName() << endl;
776 DrawTree( topnode->GetNodeFromfNode(i), tabs );
782 /***********************************************************************/
784 void AliGEODB::Glast()
786 cout << " Glast " << endl;
789 /***********************************************************************/
791 void AliGEODB::Gprint(const char*)
793 cout << " Gprint " << endl;
796 /***********************************************************************/
798 void AliGEODB::Grun()
800 cout << " Grun " << endl;
803 /***********************************************************************/
805 void AliGEODB::Gtrig()
807 cout << " Gtrig " << endl;
810 /***********************************************************************/
812 void AliGEODB::Gtrigc()
814 cout << " Gtrigc " << endl;
817 /***********************************************************************/
819 void AliGEODB::Gtrigi()
821 cout << " Gtrigi " << endl;
824 /***********************************************************************/
826 void AliGEODB::Gwork(Int_t)
828 cout << " Gwork " << endl;
831 /***********************************************************************/
833 void AliGEODB::Gzinit()
835 cout << " Gzinit " << endl;
838 //=======================functions from GCONS
840 /***********************************************************************/
842 void AliGEODB::Gfmate(Int_t, char*, Float_t&, Float_t&, Float_t&, Float_t&, Float_t&, Float_t*, Int_t&)
844 cout << " Gfmate " << endl;
847 /***********************************************************************/
849 void AliGEODB::Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&)
851 cout << " Gfpart " << endl;
854 /***********************************************************************/
856 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*)
858 cout << " Gftmed " << endl;
861 /***********************************************************************/
863 void AliGEODB::Gmate() {
864 cout << " Gmate " << endl;
867 /***********************************************************************/
869 void AliGEODB::Gpart()
871 AliGTransform* Identity = new AliGTransform("Identity","Identity","rot 0. 0. 0.");
872 //printf( " Created new AliGTransform( Identity, Identity, rot 0. 0. 0. );\n" );
874 listTransf->AddAt( Identity, MatrCount );
877 AliGBox* box = new AliGBox("box","box", 400,400,400);
878 AliGNode* ALIC = new AliGNode( "ALIC", 1,"ALIC", box);
881 listNodes->Add(ALIC);
884 /***********************************************************************/
886 void AliGEODB::Gsdk(Int_t, Float_t*, Int_t*) {
887 cout << " Gsdk " << endl;
890 /***********************************************************************/
892 void AliGEODB::Gsmate(Int_t, const char*, Float_t, Float_t, Float_t, Float_t, Float_t) {
893 cout << " Gsmate " << endl;
896 /***********************************************************************/
898 void AliGEODB::Gsmixt(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) {
899 cout << " Gsmixt " << endl;
902 /***********************************************************************/
904 void AliGEODB::Gspart(Int_t, const char*, Int_t, Float_t, Float_t, Float_t) {
905 cout << " Gspart " << endl;
908 /***********************************************************************/
910 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) {
911 cout << " Gstmed " << endl;
914 /***********************************************************************/
916 void AliGEODB::Gstpar(Int_t, const char*, Float_t)
918 //cout << " Gstpar " << endl;
921 /***********************************************************************/
923 void AliGEODB::Gsckov(Int_t, Int_t, Float_t *, Float_t *, Float_t *, Float_t *)
925 cout << " Gsclov " << endl;
928 /***********************************************************************/
930 //=======================functions from GKINE
932 void AliGEODB::Gfkine(Int_t, Float_t*, Float_t*, Int_t&, Int_t&)
934 cout << " Gfkine" << endl;
937 /***********************************************************************/
939 void AliGEODB::Gfvert(Int_t, Float_t*, Int_t&, Int_t&, Float_t&)
941 cout << " Gfvert" << endl;
944 /***********************************************************************/
946 Int_t AliGEODB::Gskine(Float_t*, Int_t, Int_t, Float_t*, Int_t)
948 cout << " Gskine" << endl;
952 /***********************************************************************/
954 Int_t AliGEODB::Gsvert(Float_t*, Int_t, Int_t, Float_t*, Int_t)
956 cout << " Gsvert" << endl;
960 /***********************************************************************/
962 //=======================functions from GPHYS
964 void AliGEODB::Gphysi()
966 cout << " Gphysi" << endl;
969 /***********************************************************************/
971 //=======================functions from GTRAK
973 void AliGEODB::Gdebug()
975 cout << " Gdebug" << endl;
978 /***********************************************************************/
980 void AliGEODB::Gekbin()
982 cout << " Gekbin" << endl;
985 /***********************************************************************/
987 void AliGEODB::Gfinds()
989 cout << " Gfinds" << endl;
992 /***********************************************************************/
994 void AliGEODB::Gsking(Int_t)
996 cout << " Gsking" << endl;
999 /***********************************************************************/
1001 void AliGEODB::Gskpho(Int_t)
1003 cout << " Gskpho" << endl;
1006 /***********************************************************************/
1008 void AliGEODB::Gsstak(Int_t)
1010 cout << " Gsstak" << endl;
1013 /***********************************************************************/
1015 void AliGEODB::Gsxyz()
1017 cout << " Gsxyz" << endl;
1020 /***********************************************************************/
1022 void AliGEODB::Gtrack()
1024 cout << " Gtrack" << endl;
1027 /***********************************************************************/
1029 void AliGEODB::Gtreve()
1031 cout << " Gtreve" << endl;
1034 /***********************************************************************/
1036 void AliGEODB::Grndm(Float_t*, const Int_t) const
1038 cout << " Grndm" << endl;
1041 /***********************************************************************/
1043 void AliGEODB::Grndmq(Int_t&, Int_t&, const Int_t, const Text_t*)
1045 cout << " Grndmq" << endl;
1048 /***********************************************************************/
1050 //=======================functions from GDRAW
1052 void AliGEODB::Gdxyz(Int_t )
1054 cout << " Gdxyz" << endl;
1057 /***********************************************************************/
1059 void AliGEODB::Gdcxyz()
1061 cout << " Gdcxyz" << endl;
1064 /***********************************************************************/
1066 //=======================functions from GGEOM
1068 void AliGEODB::Gdtom(Float_t*, Float_t*, Int_t)
1070 printf( " Gdtom.\n" );
1073 /***********************************************************************/
1075 void AliGEODB::Glmoth(const char*, Int_t, Int_t&, Int_t*, Int_t*)
1077 printf( " Glmoth.\n" );
1081 /***********************************************************************/
1083 void AliGEODB::Gmedia(Float_t*, Int_t&)
1085 printf( " Gmedia.\n" );
1088 /***********************************************************************/
1090 void AliGEODB::Gmtod(Float_t*, Float_t*, Int_t)
1092 printf( " Gmtod.\n" );
1095 /***********************************************************************/
1097 void AliGEODB::Gsdvn(const char* name, const char* parentname, Int_t ndiv, Int_t iaxis)
1099 cout << " Inside Gsdvn " << endl;
1100 /* Divides one node in Ndiv nodes in the iaxis direction*/
1102 char* transfname = new char[10];
1103 char* nodename = new char[10];
1105 AliGNode* parent = (AliGNode*) listNodes->FindObject(parentname);
1107 /* Find the shape that will result from the division*/
1110 if( parent->GetShape()->ClassName() == "AliGBox" ) {
1111 AliGMaterial* material = new AliGMaterial(parent->GetMaterial());
1116 case 1 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() / ndiv;
1117 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1118 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1121 case 2 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1122 Dy = ((AliGBox*)(parent->GetShape()))->GetY()/ ndiv;
1123 Dz = ((AliGBox*)(parent->GetShape()))->GetZ();
1126 case 3 : Dx = ((AliGBox*)(parent->GetShape()))->GetX() ;
1127 Dy = ((AliGBox*)(parent->GetShape()))->GetY();
1128 Dz = ((AliGBox*)(parent->GetShape()))->GetZ()/ ndiv;
1131 default: Dx = Dy = Dz = 0.;
1134 AliGBox* box = new AliGBox("box","box", Dx, Dy, Dz);
1136 /* Create the nodes son*/
1141 for( int i=0; i<ndiv; i++ ) {
1142 //nodename = "Node";
1143 nodename[4] = '\x0';
1144 sprintf( nodename, "%s%d", nodename, i );
1145 transfname = "trans";
1146 transfname[5] = '\x0';
1147 sprintf( transfname, "%s%d", transfname, i );
1151 case 'x' : x = ndiv *i;
1168 /* Positioning the sons (only translations) and adding them to the parent*/
1170 sprintf( expression, "%s %f %f %f", "tra", x, y, z );
1171 AliGTransform* tran = new AliGTransform( transfname, transfname, expression );
1173 char* nodname = new char[strlen(name)];
1174 strcpy( nodname, name );
1175 AliGNode* son = new AliGNode( nodname, i, nodname, box, material );
1176 if( nodname ) delete [] nodname;
1178 parent->Add( son, tran );
1179 parent->AddConfig("","");
1180 listNodes->AddLast(son);
1185 /***********************************************************************/
1187 void AliGEODB::Gsdvn2(const char*, const char*, Int_t, Int_t, Float_t, Int_t)
1189 printf( " Gsdvn2.\n" );
1192 /***********************************************************************/
1194 void AliGEODB::Gsdvs(const char*, const char*, Float_t, Int_t, Int_t)
1196 printf( " Gsdvs.\n" );
1199 /***********************************************************************/
1201 void AliGEODB::Gsdvs2(const char*, const char*, Float_t, Int_t, Float_t, Int_t)
1203 printf( " Gsdvs2.\n" );
1206 /***********************************************************************/
1208 void AliGEODB::Gsdvt(const char*, const char*, Float_t, Int_t, Int_t, Int_t)
1210 printf( " Gsdvt.\n" );
1213 /***********************************************************************/
1215 void AliGEODB::Gsdvt2(const char *, const char *, Float_t, Int_t, Float_t, Int_t, Int_t)
1217 printf( " Gsdvt2.\n" );
1220 /***********************************************************************/
1222 void AliGEODB::Gsord(const char*, Int_t)
1224 // Aqui entra pero dice Federico que Dummy.
1227 /***********************************************************************/
1229 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 )
1232 if( !strcmp(mother, "ALIC") )
1235 AliGNode* son = NULL;
1236 AliGNode* parent = NULL;
1238 char* nodename = new char[strlen(name)+1];
1239 strcpy( nodename, name );
1240 nodename[strlen(name)] = '\x0';
1242 TObjLink *lnk = listNodes->FirstLink();
1245 while( (lnk) && (!quit) ) {
1246 TObject *obj = lnk->GetObject();
1248 if( obj->GetName() ) {
1249 char* NodeName = new char[strlen(obj->GetName())+1];
1250 strcpy( NodeName, obj->GetName() );
1251 NodeName[strlen(obj->GetName())] = '\x0';
1254 for( i=0; NodeName[i]!='_'; i++ );
1256 if( !strncmp(nodename, NodeName, i) )
1257 son = (AliGNode*) obj;
1259 if( !strncmp(mother, NodeName, i) )
1260 parent = (AliGNode*) obj;
1262 if( NodeName ) delete [] NodeName;
1264 if( (son != NULL) && (parent != NULL) )
1272 cout << " ERROR in Gspos. Couldn't find node " << nodename << " inside listNodes." << endl;
1276 if( parent == NULL) {
1277 cout << " ERROR in Gspos. Couldn't find node " << mother << " inside listNodes." << endl;
1281 AliGTransform* tra = (AliGTransform*)listTransf->At(MatrCount - 1);
1283 TVector* matrix = tra->GetMatrix();
1284 char* transname = new char[10];
1285 sprintf(transname, "%s%d", "tra", MatrCount );
1287 TVector &mat = *matrix;
1288 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);
1290 //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 );
1292 listTransf->AddAt(newtra, MatrCount);
1295 parent->Add(son, newtra);
1296 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1299 /***********************************************************************/
1301 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 )
1307 for( i=0; i<PospCount; i++ )
1308 if( !strcmp(Posp[i]->name, nodename) )
1311 char* shapename = Posp[i]->shape;
1312 Int_t nmed = Posp[i]->nmed;
1314 char* fnodename = new char[strlen(nodename)+1];
1315 strcpy(fnodename, nodename);
1316 fnodename[strlen(nodename)] = '\x0';
1318 char* fmother = new char[strlen(mother)+1];
1319 strcpy(fmother, mother);
1320 fmother[strlen(mother)] = '\x0';
1322 AliGNode* parent = NULL;
1324 TObjLink *lnk = listNodes->FirstLink();
1327 while( (lnk) && (!quit) ) {
1328 TObject *obj = lnk->GetObject();
1330 if( obj->GetName() ) {
1331 char* NodeName = new char[strlen(obj->GetName())];
1332 strcpy( NodeName, obj->GetName() );
1335 for( i=0; NodeName[i]!='_'; i++ );
1337 if( !strncmp(fmother, NodeName, i) )
1338 parent = (AliGNode*) obj ;
1340 if( NodeName ) delete [] NodeName;
1342 if( parent != NULL )
1349 if( parent == NULL) {
1350 cout << " ERROR in Gsposp. Couldn't find node " << mother << " inside listNodes." << endl;
1354 Int_t nmat = AliMediums[nmed]->fNmat;
1356 AliGMaterial* MyMaterial = NULL;
1358 for( int j=0; j<listMaterials->GetSize(); j++ )
1359 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1360 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1361 /*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 );*/
1365 if( MyMaterial == NULL ) {
1366 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]
1367 ->fBuf, AliMaterials[nmat]->fNwbuf );
1369 /*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 );*/
1371 listMaterials->Add( MyMaterial );
1374 AliGNode* son = NULL;
1376 // Different constructor depending on the shape
1377 if( !strncmp(shapename, "TUBE", 4) ) {
1379 AliGTube* Shape = NULL;
1381 for( int j=0; j<listShapes->GetSize(); j++ )
1382 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1383 Shape = (AliGTube*) listShapes->At(j);
1384 //printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1388 if( Shape == NULL ) {
1389 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1390 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1391 listShapes->Add(Shape);
1394 Shape->SetCol(Color);
1395 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1398 if( !strncmp(shapename, "BOX", 3) ) {
1400 AliGBox* Shape = NULL;
1402 for( int j=0; j<listShapes->GetSize(); j++ )
1403 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1404 Shape = (AliGBox*) listShapes->At(j);
1405 //printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1409 if( Shape == NULL ) {
1410 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1411 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1412 listShapes->Add(Shape);
1415 Shape->SetCol(Color);
1416 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1419 if( !strncmp(shapename, "TRD1", 4) ) {
1421 AliGTRD1* Shape = NULL;
1423 for( int j=0; j<listShapes->GetSize(); j++ )
1424 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1425 Shape = (AliGTRD1*) listShapes->At(j);
1426 //printf( " AliGTRD1( %s, %s, %f, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1430 if( Shape == NULL ) {
1431 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1432 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1433 listShapes->Add(Shape);
1436 Shape->SetCol(Color);
1437 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1440 if( !strncmp(shapename, "PCON", 4) ) {
1442 AliGPCone* Shape = NULL;
1444 for( int j=0; j<listShapes->GetSize(); j++ )
1445 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1446 Shape = (AliGPCone*) listShapes->At(j);
1447 //printf( " AliGPCone( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1451 if( Shape == NULL ) {
1452 Shape = new AliGPCone( shapename, shapename, upar, np );
1453 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1454 listShapes->Add(Shape);
1457 Shape->SetCol(Color);
1458 son = new AliGNode( fnodename, nr, fnodename, Shape, MyMaterial );
1465 AliGTransform* tra = (AliGTransform*) listTransf->At(0);
1467 TVector* matrix = tra->GetMatrix();
1469 char* transname = new char[10];
1470 sprintf( transname, "%s%d", "tra", MatrCount );
1472 TVector &mat = *matrix;
1473 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);
1475 //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 );
1477 listTransf->AddAt(newtra, MatrCount);
1480 parent->Add(son, newtra);
1482 //printf( " %s->Add( %s, %s );\n", parent->GetName(), son->GetName(), newtra->GetName() );
1484 listNodes->Add(son);
1487 /***********************************************************************/
1489 void AliGEODB::Gsrotm(Int_t, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t)
1491 printf( " Gsrotm.\n" );
1494 /***********************************************************************/
1496 void AliGEODB::Gprotm(Int_t)
1498 printf( " Gprotm.\n" );
1501 /***********************************************************************/
1503 Int_t AliGEODB::Gsvolu(const char* vname, const char* shape, Int_t nmed, Float_t* upar, Int_t np)
1505 Int_t lenvname = strlen(vname);
1507 char* nodename = new char[lenvname+1];
1508 strcpy( nodename, vname );
1509 nodename[lenvname] = '\x0';
1512 for( pos=0; pos<lenvname; pos++ )
1513 if( (nodename[pos] == '\x0') || (nodename[pos] == ' ') )
1516 if( pos < lenvname ) {
1517 if( nodename ) delete [] nodename;
1518 nodename = new char[pos+1];
1519 strncpy( nodename, vname, pos );
1520 nodename[pos] = '\x0';
1523 char* shapename = new char[strlen(shape)+1];
1524 strcpy( shapename, shape );
1525 shapename[strlen(shape)] = '\x0';
1527 //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 );
1530 /* if number of parameters is 0, stores the nodename, shapename and nmed to be used in GSPOSP */
1531 NodePosp* AliPosp = new NodePosp;
1532 AliPosp->name = nodename;
1533 AliPosp->shape = shapename;
1534 AliPosp->nmed = nmed;
1535 Posp[PospCount] = AliPosp;
1540 if( (listNodes) && (listNodes->FindObject(nodename)) ) { // Trying to find the node inside listNodes
1541 // The node existed in listNodes.
1542 printf( "\n ERROR!!! Node %s already existed in listNodes\n", nodename );
1547 Int_t nmat = AliMediums[nmed]->fNmat;
1549 AliGMaterial* MyMaterial = NULL;
1551 for( int j=0; j<listMaterials->GetSize(); j++ )
1552 if( ((AliGMaterial*) listMaterials->At(j))->GetfImat() == nmat ) {
1553 MyMaterial = (AliGMaterial*) listMaterials->At(j);
1554 /*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 );*/
1558 if( MyMaterial == NULL ) {
1559 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 );
1561 listMaterials->Add( MyMaterial );
1563 /*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 );*/
1566 // Different constructor depending on the shape
1567 AliGNode* node = NULL;
1569 if( !strncmp(shapename, "TUBE", 4) ) {
1571 AliGTube* Shape = NULL;
1573 for( int j=0; j<listShapes->GetSize(); j++ )
1574 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1575 Shape = (AliGTube*) listShapes->At(j);
1576 printf( " AliGTube( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1580 if( Shape == NULL ) {
1581 Shape = new AliGTube( shapename, shapename, upar[0], upar[1], upar[2] );
1582 //printf( " Created new AliGTube( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1583 listShapes->Add(Shape);
1586 Shape->SetCol(Color);
1587 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1590 if( !strncmp(shapename, "BOX", 3) ) {
1592 AliGBox* Shape = NULL;
1594 for( int j=0; j<listShapes->GetSize(); j++ )
1595 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1596 Shape = (AliGBox*) listShapes->At(j);
1597 printf( " AliGBox( %s, %s, %f, %f, %f ); already existed.\n", shapename, shapename, upar[0], upar[1], upar[2] );
1601 if( Shape == NULL ) {
1602 Shape = new AliGBox( shapename, shapename, upar[0], upar[1], upar[2] );
1603 //printf( " Created new AliGBox( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1604 listShapes->Add(Shape);
1607 Shape->SetCol(Color);
1608 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1611 if( !strncmp(shapename, "TRD1", 4) ) {
1613 AliGTRD1* Shape = NULL;
1615 for( int j=0; j<listShapes->GetSize(); j++ )
1616 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1617 Shape = (AliGTRD1*) listShapes->At(j);
1622 if( Shape == NULL ) {
1623 Shape = new AliGTRD1( shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1624 //printf( " Created new AliGTRD1( %s, %s, %f, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2], upar[3] );
1625 listShapes->Add(Shape);
1628 Shape->SetCol(Color);
1629 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1632 if( !strncmp(shapename, "PCON", 4) ) {
1634 AliGPCone* Shape = NULL;
1636 for( int j=0; j<listShapes->GetSize(); j++ )
1637 if( ((AliGShape*) listShapes->At(j))->GetName() == shapename ) {
1638 Shape = (AliGPCone*) listShapes->At(j);
1642 if( Shape == NULL ) {
1643 Shape = new AliGPCone( shapename, shapename, upar, np );
1644 //printf( " Created new AliGPCone( %s, %s, %f, %f, %f );\n", shapename, shapename, upar[0], upar[1], upar[2] );
1645 listShapes->Add(Shape);
1648 Shape->SetCol(Color);
1649 node = new AliGNode( nodename, 1, nodename, Shape, MyMaterial );
1652 //printf( " Created new AliGNode( %s, %d, %s, %s, %s );\n", nodename, 1+listNodes->GetSize(), nodename, shapename, MyMaterial->GetName() );
1654 listNodes->Add(node);
1656 //printf( " node->fShape->Color = %d\n", node->GetShape()->GetCol() );
1666 /***********************************************************************/
1668 void AliGEODB::Gsatt(const char*, const char*, Int_t)
1670 printf( " Gsatt.\n" );
1673 /***********************************************************************/
1675 void AliGEODB::Gfpara(const char*, Int_t, Int_t, Int_t&, Int_t&, Float_t*, Float_t*)
1677 printf( " Gfpara.\n" );
1680 /***********************************************************************/
1682 void AliGEODB::Gckpar(Int_t, Int_t, Float_t*)
1684 printf( " Gckpar.\n" );
1687 /***********************************************************************/
1689 void AliGEODB::Gckmat(Int_t, char*)
1691 printf( " Gckmat.\n" );
1694 /***********************************************************************/
1696 //=======================DRAW functions
1698 void AliGEODB::InitHIGZ()
1700 printf( "InitHIGZ.\n" );
1703 /***********************************************************************/
1705 void AliGEODB::Gdopen(Int_t)
1707 printf( "Gdopen.\n" );
1710 /***********************************************************************/
1712 void AliGEODB::Gdclose()
1714 printf( "Gdclose.\n" );
1717 /***********************************************************************/
1719 void AliGEODB::Gdelete(Int_t)
1721 cout << " Gdelete" << endl;
1724 /***********************************************************************/
1726 void AliGEODB::Gdshow(Int_t)
1728 cout << " Gdshow" << endl;
1731 /***********************************************************************/
1733 void AliGEODB::Gdopt(const char *,const char *)
1735 cout << " Gdopt" << endl;
1738 /***********************************************************************/
1740 void AliGEODB::Gdraw(const char *,Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1742 cout << " Gdraw" << endl;
1745 /***********************************************************************/
1747 void AliGEODB::Gdrawc(const char *,Int_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1749 cout << " Gdrawc" << endl;
1752 /***********************************************************************/
1754 void AliGEODB::Gdrawx(const char *,Float_t, Float_t, Float_t, Float_t, Float_t,Float_t,Float_t,Float_t,Float_t)
1756 cout << " Gdrawx" << endl;
1759 /***********************************************************************/
1761 void AliGEODB::Gdhead(Int_t, const char *, Float_t)
1763 cout << " Gdhead" << endl;
1766 /***********************************************************************/
1768 void AliGEODB::Gdman(Float_t, Float_t, const char *)
1770 cout << " Gdman" << endl;
1773 /***********************************************************************/
1775 void AliGEODB::Gdspec(const char *)
1777 cout << " Gdspec" << endl;
1780 /***********************************************************************/
1782 void AliGEODB::DrawOneSpec(const char *)
1784 cout << " DrawOneSpec" << endl;
1787 /***********************************************************************/
1789 void AliGEODB::Gdtree(const char *,Int_t,Int_t)
1791 cout << " Gdtree" << endl;
1794 /***********************************************************************/
1796 void AliGEODB::GdtreeParent(const char *,Int_t,Int_t)
1798 cout << " GdtreeParent" << endl;
1801 /***********************************************************************/
1803 //=======================Set functions
1805 void AliGEODB::SetABAN(Int_t)
1807 cout << " SetABAN" << endl;
1810 /***********************************************************************/
1812 void AliGEODB::SetANNI(Int_t)
1814 cout << " SetANNI" << endl;
1817 /***********************************************************************/
1819 void AliGEODB::SetAUTO(Int_t)
1821 cout << " SetAUTO" << endl;
1824 /***********************************************************************/
1826 void AliGEODB::SetBOMB(Float_t)
1828 cout << " SetBOMB" << endl;
1831 /***********************************************************************/
1833 void AliGEODB::SetBREM(Int_t)
1835 cout << " SetBREM" << endl;
1838 /***********************************************************************/
1840 void AliGEODB::SetCKOV(Int_t)
1842 cout << " SetCKOV" << endl;
1845 /***********************************************************************/
1847 void AliGEODB::SetClipBox(const char *,Float_t,Float_t, Float_t,Float_t,Float_t,Float_t)
1849 cout << " SetClipBox" << endl;
1852 /***********************************************************************/
1854 void AliGEODB::SetCOMP(Int_t)
1856 cout << " SetCOMP" << endl;
1859 /***********************************************************************/
1861 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 )
1863 cout << " SetCUTS" << endl;
1866 /***********************************************************************/
1868 void AliGEODB::SetDCAY(Int_t)
1870 cout << " SetDCAY" << endl;
1873 /***********************************************************************/
1875 void AliGEODB::SetDEBU(Int_t, Int_t, Int_t)
1877 cout << " SetDEBU" << endl;
1880 /***********************************************************************/
1882 void AliGEODB::SetDRAY(Int_t)
1884 cout << " SetDRAY" << endl;
1887 /***********************************************************************/
1889 void AliGEODB::SetHADR(Int_t)
1891 cout << " SetHADR" << endl;
1894 /***********************************************************************/
1896 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 )
1898 cout << " SetKINE" << endl;
1901 /***********************************************************************/
1903 void AliGEODB::SetLOSS(Int_t)
1905 cout << " SetLOSS" << endl;
1908 /***********************************************************************/
1910 void AliGEODB::SetMULS(Int_t)
1912 cout << " SetMULS" << endl;
1915 /***********************************************************************/
1917 void AliGEODB::SetMUNU(Int_t)
1919 cout << " SetMUNU" << endl;
1922 /***********************************************************************/
1924 void AliGEODB::SetOPTI(Int_t)
1926 cout << " SetOPTI" << endl;
1929 /***********************************************************************/
1931 void AliGEODB::SetPAIR(Int_t)
1933 cout << " SetPAIR" << endl;
1936 /***********************************************************************/
1938 void AliGEODB::SetPFIS(Int_t)
1940 cout << " SetPFIS" << endl;
1943 /***********************************************************************/
1945 void AliGEODB::SetPHOT(Int_t)
1947 cout << " SetPHOT" << endl;
1950 /***********************************************************************/
1952 void AliGEODB::SetRAYL(Int_t)
1954 cout << " SetRAYL" << endl;
1957 /***********************************************************************/
1959 void AliGEODB::SetSWIT(Int_t , Int_t)
1961 cout << " SetSWIT" << endl;
1964 /***********************************************************************/
1966 void AliGEODB::SetTRIG(Int_t)
1968 cout << " SetTRIG" << endl;
1971 /***********************************************************************/
1973 void AliGEODB::Vname(const char *, char *)
1975 cout << " Vname" << endl;
1978 /***********************************************************************/
1980 void AliGEODB::InitLego()
1982 cout << " InitLego" << endl;
1985 /***********************************************************************/
1987 extern "C" void sxpart_(){}