Configuration files and macros for the geometry

All files show as an example the geometry for AUG04SIM DST production for high field + alignment

Detector setup file

Filename used in the next examples: detectorSetup.setup
[mdc]
SEC1 1 1 1 1
SEC2 1 1 1 1
SEC3 1 1 1 0
SEC4 1 1 1 1
SEC5 1 1 1 1
SEC6 1 1 1 0

HGEANT configuration file (initialization from Oracle)

Filename used in the next examples: geainiora.dat %begin c++% ! GEANT key words ! PMCF 1 AUTO 1 KINE 0 CKOV 1 FMAP 2 FPOL 0.7215 ! // scaling of full field MXST 25000 SECO 3 1 JVER 0 0 0 !//fixed vertex BEAM 1 1 1000 0 0 0 LOSS 1 DRAY 1 TRIG 114000 RUNG 2332 1 SPLIT 2 FILE 1 SWIT 0 0 TIME 0 1000000 1000000 END ! End of gffread // // **************************************************************** // // geometry for AUG04SIM DST production for high field + alignment // SimulRefRunDb: aug04sim_mediumfield_fulltarg_align_gen3 HistoryDateDb: now /misc/ilse/analdev/macros/tutorials/detectorSetup.setup // // **************************************************************** /misc/halo/field/fldrpz_unf.map // /data.local1/ilse/Rk2006/geant/pluto_CC_1AGeV_99.evt // kine.tup rich.tup mdc.tup tof.tup shower.tup tmp.root %end%

ROOT macro to generate geometry ASCII files

%begin c++% { // name of the configuration file TString configFile="geainiora.dat";

// create the geometry interface HGeomInterface* interface=new HGeomInterface;

// Open the connection to Oracle HGeomOraIo* oraInput=new HGeomOraIo; oraInput->open(); interface->setOracleInput(oraInput);

// Read the configuation file Bool_t rc=interface->readGeomConfig(configFile.Data());

// Define the ASCII output and the directory for the files HGeomAsciiIo* output=new HGeomAsciiIo; output->setDirectory("/misc/ilse/analdev/macros/tutorials/data"); interface->setOutput(output);

// Read and write the geometry Bool_t rc=interface->readAll(); if (rc) { interface->writeAll(); }

// Delete the interface (closes the connection to Oracle) delete interface; } %end%

HGEANT configuration file (initialization from ASCII files)

Filename used in the next examples: geainifiles.dat %begin c++% ! GEANT key words ! PMCF 1 AUTO 1 KINE 0 CKOV 1 FMAP 2 FPOL 0.7215 ! // scaling of full field MXST 25000 SECO 3 1 JVER 0 0 0 !//fixed vertex BEAM 1 1 1000 0 0 0 LOSS 1 DRAY 1 TRIG 114000 RUNG 2332 1 SPLIT 2 FILE 1 SWIT 0 0 TIME 0 1000000 1000000 END ! End of gffread // // **************************************************************** // // Reference run id of the corresponding simulation project in Oracle SimulRefRunId: 7006 // // geometry for AUG04SIM DST production for high field + alignment // /misc/ilse/analdev/macros/tutorials/data/media_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/cave_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/rich_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/target_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/sect_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/mdc_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/coils_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/tof_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/shower_190607151521.geo /misc/ilse/analdev/macros/tutorials/data/frames_190607151521.geo /misc/ilse/analdev/macros/tutorials/detectorSetup.setup // // parameters for hit definition // /misc/halo/simul/geodat/mdc030398.hit /misc/halo/simul/geodat/tof221100.hit /misc/halo/simul/geodat/shower060799.hit /misc/halo/simul/geodat/rich130698.hit // // **************************************************************** // /misc/halo/field/fldrpz_unf.map // /data.local1/ilse/Rk2006/geant/pluto_CC_1AGeV_99.evt // kine.tup rich.tup mdc.tup tof.tup shower.tup tmp.root %end%

ROOT macro to run the ROOT TGeoManager

%begin c++% { // Load the ROOT geometry library if not loaded by default if (gSystem->Load("libGeom")!=0) { Error("Unable to load libGeom.so\n"); return; }

// create the geometry interface HGeomInterface* interface=new HGeomInterface;

// Read the configuation file Bool_t rc=interface->readGeomConfig("geainifiles.dat"); if (rc) { printf("Read of GEANT config file failed!\n"); delete interface; return; }

// Create the TGeoManager and attach the builder class TGeoManager* geom = new TGeoManager("HadesGeom", "Hades geometry"); HGeomRootBuilder* builder=new HGeomRootBuilder("builder","geom builder"); builder->setGeoManager(geom); interface->setGeomBuilder(builder);

// Create the geometry Bool_t rc=interface->createGeometry(); if (rc) { cout<<"Creation of geometry failed!"<<endl; delete interface; delete geom; return; }

// Run the overlap checker builder->checkOverlaps();

// Create the ROOT browser TBrowser* browser=new TBrowser;

/* // Delete the objects before you quit ROOT delete interface; delete browser; delete geom; */ } %end%

-- IlseKoenig - 01 Jul 2007
Topic revision: r2 - 2008-07-16, IlseKoenig
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki Send feedback | Imprint | Privacy Policy (in German)