You are here:
Hades Wiki
>
Homepages Web
>
HadesRtdbGeometryMacrosIlseKoenig
(16 Jul 2008,
IlseKoenig
)
(raw view)
E
dit
A
ttach
<!-- By default, this topic can be changed/renamed by the original author, only. * Set ALLOWTOPICCHANGE = %MAINWEB%.IlseKoenig * Set ALLOWTOPICRENAME = %MAINWEB%.IlseKoenig To protect this topic from being read by other users, put a '* ' in front of the following line. Set ALLOWTOPICVIEW = %MAINWEB%.IlseKoenig --> %TOC% ---+ 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* <verbatim> [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 </verbatim> ---++ 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 [[http://root.cern.ch/root/html/TGeoManager.html][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% -- Main.IlseKoenig - 01 Jul 2007
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r2 - 16 Jul 2008,
IlseKoenig
Homepages
Log In
or
Register
Toolbox
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
BeginnersStartHere
TextFormattingRules
Macros
FormattedSearch
QuerySearch
DocumentGraphics
SkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
SiteTools
DefaultPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
DaqSlowControl
HODO
Homepages
InterWikis
Main
PionBeam
Sandbox
System
Български
_jméno_jazyka
Dansk
Deutsch
English
Español
Suomi
Français
Italiano
日本語
한글
Nederlands
Norsk
Polski
Português
Português brasileiro
Русский
Svenska
简体中文
正體中文
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Hades Wiki?
Send feedback
Imprint (in German)
Privacy Policy (in German)