Warning, /DD4hep/examples/DDCodex/README.txt is written in an unsupported language. File is not indexed.
0001 CODEX starting kit
0002 ==================
0003
0004
0005 Small geometry driver for CODEX-b sketch.
0006
0007
0008 First save a snapshot of the upgrade geometry in DD4hep
0009 -------------------------------------------------------
0010 You will need a proper checkout of the git repository of Ben provided for testing the
0011 upgrade with DD4hep.
0012
0013 Comamnds:
0014 $> `which python` `which gaudirun.py` GeoExtract.py
0015 root [0] gDD4hepUI->saveROOT("Upgrade.root")
0016 root [1] .q
0017
0018 Output:
0019 DetElement-Info INFO ++ -> +++++++++++++ Printout summary:
0020 DetElement-Info INFO ++ -> Number of conditions: 0 [ dto. empty:0]
0021 DetElement-Info INFO ++ -> Total Number of parameters: 0 [ 0.000 Parameters/Condition]
0022 DD4hepUI Use the ROOT interpreter variable gDD4hepUI to interact with the detector description.
0023 ------------------------------------------------------------
0024 | Welcome to ROOT 6.10/06 http://root.cern.ch |
0025 | (c) 1995-2017, The ROOT Team |
0026 | Built for linuxx8664gcc |
0027 | From tag v6-10-06, 19 September 2017 |
0028 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
0029 ------------------------------------------------------------
0030
0031 DD4hepRint INFO ++ Created ROOT interpreter instance for DD4hepUI.
0032 root [0] gDD4hepUI->saveROOT("VPGeo.root")
0033 Geometry2ROOT INFO +++ Dump geometry to root file:VPGeo.root
0034 DD4hepRootPersistency +++ No valid Volume manager. No nominals saved.
0035 DD4hepRootPersistency +++ Wrote 992746 Bytes of geometry data 'Geometry' to 'VPGeo.root' [ 0.772 seconds].
0036 DD4hepRootPersistency +++ Successfully saved geometry data to file.
0037 (long) 1
0038 root [1] .q
0039
0040
0041 Then to execute:
0042 ----------------------------------------------------------------------------
0043 $> geoPluginRun -ui -inter
0044 ...
0045 root [0] gDD4hepUI->importROOT("Upgrade.root")
0046 root [1] gDD4hepUI->fromXML("checkout/examples/DDCodex/compact/CODEX-b.xml")
0047 root [2] gDD4hepUI->draw()
0048
0049
0050 Output:
0051 ----------------------------------------------------------------------------
0052 17:25:30-frankm~/SW/DD4hep_head_dbg.root_v6.12.06.g4_10.04.p01_MT/build$ geoPluginRun -ui -inter
0053 PersistencyIO INFO +++ Set Streamer to dd4hep::OpaqueDataBlock
0054 PersistencyIO INFO +++ Patching TGeoVolume.fUserExtension to persistent
0055 PersistencyIO INFO +++ Patching TGeoNode.fUserExtension to persistent
0056 Info in <TGeoManager::TGeoManager>: Geometry world, Detector Geometry created
0057 geoPluginRun: No geometry input supplied. No geometry will be loaded.
0058 DD4hepUI Use the ROOT interpreter variable gDD4hepUI to interact with the detector description.
0059 ------------------------------------------------------------
0060 | Welcome to ROOT 6.12/06 http://root.cern.ch |
0061 | (c) 1995-2017, The ROOT Team |
0062 | Built for linuxx8664gcc |
0063 | From tag v6-12-06, 9 February 2018 |
0064 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
0065 ------------------------------------------------------------
0066
0067 root [0] gDD4hepUI->importROOT("Upgrade.root")
0068 DD4hepRootLoader INFO +++ Read geometry from root file:Upgrade.root
0069 Warning in <TGeoManager::Init>: Deleting previous geometry: world/Detector Geometry
0070 Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
0071 Info in <TGeoManager::SetTopVolume>: Top volume is world_volume. Master volume is world_volume
0072 Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
0073 Info in <TGeoManager::Voxelize>: Voxelizing...
0074 Error in <TGeoVoxelFinder::SortAll>: Volume lvAsicGroup16: Cannot make slices on any axis
0075 Error in <TGeoVoxelFinder::SortAll>: Volume lvAsicGroup4: Cannot make slices on any axis
0076 Error in <TGeoVoxelFinder::SortAll>: Volume lvAsicGroup8: Cannot make slices on any axis
0077 Info in <TGeoManager::CountLevels>: max level = 11, max placements = 171
0078 Info in <TGeoManager::CloseGeometry>: 18553873 nodes/ 2754 volume UID's in Detector Geometry
0079 Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
0080 DD4hepRootPersistency +++ Fixed 0 segmentation objects.
0081 DD4hepRootPersistency +++ Volume manager NOT restored. [Was it ever up when saved?]
0082 DD4hepRootPersistency +++ Successfully loaded detector description from file:Upgrade.root [ 7.322 seconds]
0083 (long) 1
0084 root [1] gDD4hepUI->fromXML("checkout/examples/DDCodex/compact/CODEX-b.xml")
0085 CODEX-b INFO COBEXb Envelope: dz=2000 r1=0 r2=400 beam-angle=1.0472 atan(cone)=0.0996687
0086 CODEX-b INFO COBEXb Shield: Pb-shield-1 [Lead] z= 700 dz= 150 r1=69.6526 r2=84.5782
0087 CODEX-b INFO COBEXb Shield: Shield-veto [Si] z= 850 dz= 10 r1=84.5782 r2=85.5732
0088 CODEX-b INFO COBEXb Shield: Pb-shield-2 [Lead] z= 860 dz= 50 r1=85.5732 r2=90.5484
0089 CODEX-b INFO COBEXb X_tot= 532
0090 CODEX-b INFO COBEXb Module: 0 [Si] x=-307.15 y=0 z= 1732 Dist:22 dx:25.4034 dz:44
0091 CODEX-b INFO COBEXb Module: 1 [Si] x=-281.747 y=0 z= 1776 Dist:22 dx:25.4034 dz:44
0092 CODEX-b INFO COBEXb Module: 2 [Si] x=-256.344 y=0 z= 1820 Dist:22 dx:25.4034 dz:44
0093 CODEX-b INFO COBEXb Module: 3 [Si] x=-230.94 y=0 z= 1864 Dist:32 dx:36.9504 dz:64
0094 CODEX-b INFO COBEXb Module: 4 [Si] x=-193.99 y=0 z= 1928 Dist:32 dx:36.9504 dz:64
0095 CODEX-b INFO COBEXb Module: 5 [Si] x=-157.039 y=0 z= 1992 Dist:32 dx:36.9504 dz:64
0096 CODEX-b INFO COBEXb Module: 6 [Si] x=-120.089 y=0 z= 2056 Dist:32 dx:36.9504 dz:64
0097 CODEX-b INFO COBEXb Module: 7 [Si] x=-83.1384 y=0 z= 2120 Dist:32 dx:36.9504 dz:64
0098 CODEX-b INFO COBEXb Module: 8 [Si] x=-46.188 y=0 z= 2184 Dist:32 dx:36.9504 dz:64
0099 CODEX-b INFO COBEXb Module: 9 [Si] x=-9.2376 y=0 z= 2248 Dist:32 dx:36.9504 dz:64
0100 CODEX-b INFO COBEXb Module: 10 [Si] x=27.7128 y=0 z= 2312 Dist:32 dx:36.9504 dz:64
0101 CODEX-b INFO COBEXb Module: 11 [Si] x=64.6632 y=0 z= 2376 Dist:42 dx:48.4974 dz:84
0102 CODEX-b INFO COBEXb Module: 12 [Si] x=113.161 y=0 z= 2460 Dist:42 dx:48.4974 dz:84
0103 CODEX-b INFO COBEXb Module: 13 [Si] x=161.658 y=0 z= 2544 Dist:42 dx:48.4974 dz:84
0104 CODEX-b INFO COBEXb Module: 14 [Si] x=210.155 y=0 z= 2628 Dist:42 dx:48.4974 dz:84
0105 CODEX-b INFO COBEXb Module: 15 [Si] x=258.653 y=0 z= 2712 Dist:42 dx:48.4974 dz:84
0106 Compact INFO ++ Converted subdetector:COBEXb of type DD4hep_CODEXb
0107 root [2] gDD4hepUI->draw()
0108 Info in <TGeoManager::SetVisLevel>: Automatic visible depth disabled
0109 Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
0110 root [3]
0111
0112
0113
0114 Running Standalone
0115 ==================
0116
0117 Display:
0118 --------
0119 $> geoDisplay -input file:checkout/examples/DDCodex/compact/CODEX-b-alone.xml
0120
0121 DDG4 simulation:
0122 ----------------
0123 $> python ../DD4hep/examples/DDCodex/python/CODEX-b-alone.py
0124
0125 Reading the output file:
0126 ------------------------
0127 $> root.exe
0128 ------------------------------------------------------------
0129 | Welcome to ROOT 6.12/06 http://root.cern.ch |
0130 | (c) 1995-2017, The ROOT Team |
0131 | Built for linuxx8664gcc |
0132 | From tag v6-12-06, 9 February 2018 |
0133 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
0134 ------------------------------------------------------------
0135
0136 root [0] gSystem->Load("libDDG4Plugins.so")
0137 (int) 0
0138 root [1] TFile*f=TFile::Open("CodexB_2018-07-18_20-34.root");
0139 root [2] TTree* t=(TTree*)f->Get("EVENT")
0140 (TTree *) 0x2f53670
0141 root [3] TBranch* br=t->GetBranch("MCParticles")
0142 (TBranch *) 0x444a1b0
0143 root [4] std::vector<dd4hep::sim::Geant4Particle*> particles;
0144 root [5] std::vector<dd4hep::sim::Geant4Particle*>* p_particles = &particles;
0145 root [6] br->SetAddress(&p_particles);
0146 root [7] br->GetEntry(1)
0147 (int) 1014
0148 root [8] particles.size()
0149 (unsigned long) 4
0150 root [9] particles[0]->psx
0151 (double) 866025.30
0152 root [10] particles[1]->psx
0153 (double) 127.60460
0154 root [11] particles[2]->psx
0155 (double) 419.25210
0156 root [12] particles[3]->psx
0157 (double) 359.89637
0158 root [13]
0159
0160
0161 Visualisation of the hits:
0162 --------------------------
0163 $> root.exe ../DD4hep/examples/DDEve/DDEve.C
0164
0165
0166 Setup:
0167
0168 ********************************************************************************
0169 * ---- LHCb Login v9r2p4 ---- *
0170 * Building with gcc62 on slc6 x86_64 system (x86_64-slc6-gcc62-opt) *
0171 ********************************************************************************
0172 --- User_release_area is set to /afs/cern.ch/user/j/jongho/cmtuser
0173 --- LHCBPROJECTPATH is set to:
0174 /cvmfs/lhcb.cern.ch/lib/lhcb
0175 /cvmfs/lhcb.cern.ch/lib/lcg/releases
0176 /cvmfs/lhcb.cern.ch/lib/lcg/app/releases
0177 /cvmfs/lhcb.cern.ch/lib/lcg/external
0178 -------------------------------------------------------------------------------------------------------------------------------------------------
0179
0180 Install command:
0181 $ git clone https://github.com/MarkusFrankATcernch/DD4hep.git
0182 $ source dd4hep-ci.d/init_x86_64.sh
0183
0184 ==================================================
0185 Add new environment command in init_x86_64.sh:
0186 export Geant4_DIR=${G4INSTALL}/lib/Geant4-10.4.0
0187 =================================================
0188
0189 $ mkdir build && cd build/
0190 $ cmake -DDD4HEP_USE_GEANT4=ON -DBoost_NO_BOOST_CMAKE=ON -DDD4HEP_USE_LCIO=ON -DBUILD_TESTING=ON -DGeant4_DIR=$G4INSTALL/lib/Geant4-10.4.0 -DROOT_DIR=$ROOTSYS ..
0191 $ make -j4
0192 $ make install
0193
0194 move to upper directory
0195 $ cd ../
0196 $ source bin/thisdd4hep.sh
0197
0198 then go to examples directory
0199 $ cd examples
0200 $ mkdir build
0201 $ cd build
0202 $ cmake ..
0203
0204 $ make -j5 install
0205
0206 $ source /afs/cern.ch/work/j/jongho/Project_DD4hep/Test/DD4hep/examples/bin/thisDDCodex.sh
0207 $ geoDisplay -input file:/afs/cern.ch/work/j/jongho/Project_DD4hep/Test/DD4hep/examples/DDCodex/compact/CODEX-b-alone.xml
0208 $ python /afs/cern.ch/work/j/jongho/Project_DD4hep/Test/DD4hep/examples/DDCodex/python/CODEX-b-alone.py
0209 $ root.exe $DD4hepINSTALL/examples/DDEve/DDEve.C
0210
0211
0212 ======================================================================================
0213
0214