{ gROOT -> Reset(); #include "Riostream.h" #include "stdio.h" ifstream compfile; //--- definiere Geometrie*********************************************************************** gStyle->SetCanvasPreferGL(true); gSystem->Load("libGeom"); TGeoManager *geom = new TGeoManager("simple1", "Simple geometry"); //--- definiere Materialien********************************************************************* TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); //--- definiere Medien************************************************************************** TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); //---erzeuge Gesamtvolumen********************************************************************** TGeoVolume *top = geom->MakeBox("TOP", Vacuum,2000.,2000.,1000.); geom->SetTopVolume(top); top->SetVisibility(kFALSE); TGeoVolume *tub[10]; for (Int_t tnr=0; tnr<10; tnr++) { tub[tnr] = geom->MakeBox("tub", Al, 2, 2, 200); top->AddNode(tub[tnr],tnr, new TGeoTranslation(6*tnr, 0, 0)); } //--- Öffnen des kompr. Datenfiles************************************************************** compfile.open("/***path***/ampli.txt"); Int_t ampl; Int_t eventnr; Int_t tubamp[10]; cout<<"Number of Events ?"<>eventnr; for(Int_t ii=0; ii>tubamp[j];} for(Int_t i=0; i<10; i++) { cout<<"tubamp "<30) { if (tubamp[i]>40) { tub[i]->SetTransparency(20); tub[i]->SetLineColor(2); } else { tub[i]->SetTransparency(20); tub[i]->SetLineColor(5); } } else { tub[i]->SetTransparency(70); tub[i]->SetLineColor(38); } } //--- Schließe die Geometrie******************************************************************** geom->CloseGeometry(); geom->SetVisLevel(3); if(ii==0) top.Draw("ogl"); else geom->Update("ogl"); } compfile.close(); }