The main aim of this preminary documentation is to show, how to run the new geometry interface. A more detailed documentation will follow soon.
HGEANT
To compile and run HGEANT only the HYDRA libraryies libHydra.so and libSimulation.so
are needed and additionally libOraSim.so, if you want to compile and run
with the Oracle interface (Flag WITHORACLE in hgeanthef.h). An appropriate rootlogon
should be added in the same directory as the hgeant executable (otherwise all
HYDRA libaries would be loaded).
Below are two examples who to define subsets:
Line 1 containes the detector name in brackets.
Line 1 - 6 specifiy the setup in each sector with 1 = "in sectup", 0 = "not in setup".
Geometry read from Oracle
// TOF with 22 modules without Tofino // (in HGEANT: TOF modules 1 - 22, Tofino 23 - 26) [tof] SEC1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 SEC2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 SEC3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 SEC4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 SEC5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 SEC6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 // // NOV02 MDC setup [mdc] SEC1 1 1 1 1 SEC2 1 1 0 0 SEC3 1 1 1 0 SEC4 1 1 1 1 SEC5 1 1 0 0 SEC6 1 1 1 0
You may specify the run id in the GEANT flags (keyword RUNG). But you risk to use a run id, which already exists in Oracle. At least for official simulations, one should leave it up to the build-in runid-generator (as used also by the daq), to create a unique run id.
! GEANT key words ! ! PMCF 1 AUTO 1 KINE 0 CKOV 1 FMAP 2 RNDM 123 456 FPOL 0.7215 ! // scaling of full field MXST 25000 SECO 3 1 JVER 2 2 0 ! // smeared vertex BEAM 1 2 2000 0 0 0 LOSS 1 DRAY 1 TRIG 20000 !RUNG 2332 1 SPLIT 2 FILE 1 SWIT 0 0 TIME 0 1000000 1000000 END ! End of gffread // // ****************************************************************** // // geometry for NOV02SIM DST production for high field + alignment // SimulRefRunDb: nov02sim_highfieldalign_gen1 //HistoryDateDb: now // // MDC setup for nov02 /misc/ilse/analdev/macros/Geom/detector.setup // /misc/halo/field/fldrpz_unf.map // /scratch.local/ilse/test/c2c.v1.3.f14.19.evt // kine.tup rich.tup mdc.tup tof.tup shower.tup /scratch.local/ilse/test/c2c.v1.3.f14.19.root
You may also mix input from Oracle (extension _gdb) and input from file (extension .geo) as in the old interface. In this following example the rich and target geometry would be read from local files and all the rest from Oracle.
.... END ! End of gffread // // ****************************************************************** // // ideal geometry since oct03 // SimulRefRunDb: sep03sim_highfield_3gev_gen1 HistoryDateDb: now // mediaAll_gdb cave_gdb sect_gdb coils_gdb mdc_gdb tof_gdb show_gdb frames_gdb /misc/ilse/simul/geodat/rich_oct03.geo /misc/ilse/simul/geodat/LH2_target.geo // // ****************************************************************** ....
{ gSystem->Load("libGeom"); gSystem->Load("libOraSim"); TString configFile="/misc/ilse/simul/geainiora.dat"; HGeomInterface* interface=new HGeomInterface; HGeomOraIo* oraInput=new HGeomOraIo; oraInput->open(); interface->setOracleInput(oraInput); TGeoManager* geom = new TGeoManager("HadesGeom", "HADES geometry"); HGeomRootBuilder* builder=new HGeomRootBuilder("builder","geom builder"); builder->setGeoManager(geom); interface->setGeomBuilder(builder); Bool_t rc=interface->readGeomConfig(configFile.Data()); if (rc) rc=interface->createGeometry(); if (!rc) printf("Creation of geometry failed!\n"); if (rc) builder->checkOverlaps(); if (rc) TBrowser* browser=new TBrowser; else { delete interface; delete geom; return; } /* delete interface; delete browser; delete geom; */ }
Creation of ASCII geo-files from Oracle
{ gSystem->Load("libGeom"); gSystem->Load("libOraSim"); TString configFile="/misc/ilse/simul/geainiora.dat"; HGeomInterface* interface=new HGeomInterface; HGeomOraIo* oraInput=new HGeomOraIo; oraInput->open(); interface->setOracleInput(oraInput); HGeomAsciiIo* output=new HGeomAsciiIo; output->setDirectory("/tmp/ilse/ora"); interface->setOutput(output); interface->readGeomConfig(configFile.Data()); Bool_t rc=interface->readAll(); if (rc) interface->writeAll(); delete interface; }
Overlap checking for alignment
Comparison of two versions