Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hepsim:usage_full [2017/02/06 22:53] hepsim17 |
hepsim:usage_full [2020/05/22 02:50] (current) hepsim17 |
||
---|---|---|---|
Line 3: | Line 3: | ||
[[: | [[: | ||
- | ====== | + | ====== |
Currently, the Geant4-based detector simulation can be done using the SLIC software. You will need to convert ProMC files to LCIO files and | Currently, the Geant4-based detector simulation can be done using the SLIC software. You will need to convert ProMC files to LCIO files and | ||
Line 10: | Line 10: | ||
The files with full simulations are located under the " | The files with full simulations are located under the " | ||
- | Here how you can find all samples that have " | + | Here how you can find all samples that have " |
- | The description of the detector tags is given in [[community: | + | The description of the detector tags is given in [[: |
If you need to find all files | If you need to find all files | ||
for a give tag, say rfull005, use this command: | for a give tag, say rfull005, use this command: | ||
Line 26: | Line 26: | ||
- | The [[http:// | + | The [[https:// |
- | Each " | + | Each " |
The physics performance studies based on full simulation files from HepSim | The physics performance studies based on full simulation files from HepSim | ||
Line 43: | Line 43: | ||
<code bash> | <code bash> | ||
- | wget http:// | + | wget https:// |
tar -zvxf jas4pp.tgz | tar -zvxf jas4pp.tgz | ||
cd jas4pp | cd jas4pp | ||
Line 57: | Line 57: | ||
* Visualisation of reconstructed events using Wired4 display | * Visualisation of reconstructed events using Wired4 display | ||
- | You can find more details in [[asc: | + | You can find more details in [[hepsim: |
- | + | The standard set of containers is available from the LCIO files posted on HepSim. Read [[http:// | |
- | + | ||
- | The standard set of containers is available from the LCIO files posted on HepSim. Read | + | |
- | [[http:// | + | |
- | [[http:// | + | |
Look the Java API definition of the needed objects in [[http:// | Look the Java API definition of the needed objects in [[http:// | ||
Line 110: | Line 106: | ||
====== Using C++/ROOT with LCIO ====== | ====== Using C++/ROOT with LCIO ====== | ||
- | If you need to read LCIO files in C++ code with ROOT/ | + | If you need to read LCIO files in C++ code with ROOT/ |
<code bash> | <code bash> | ||
- | wget http://atlaswww.hep.anl.gov/hepsim/soft/ | + | git clone https://github.com/chekanov/HepSim |
- | cd lcio-cpp; make | + | cd HepSim/ |
</ | </ | ||
- | It will compile " | + | Look at README file to see how to install the " |
+ | |||
+ | Generally, you program to read SLCIO files can look as this: | ||
+ | |||
+ | <hidden Click here to show the code example> | ||
+ | <code cpp> | ||
+ | string input=" | ||
+ | LCReader* lcReader = LCFactory:: | ||
+ | lcReader-> | ||
+ | LCEvent* | ||
+ | int nEvents=0; | ||
+ | while( (evt = lcReader-> | ||
+ | if (nEvents==0) UTIL:: | ||
+ | cout << " | ||
+ | // print stored EVGEN parameters | ||
+ | const LCParameters& | ||
+ | | ||
+ | int nFloatParameters = params.getFloatKeys( floatKeys ).size() ; | ||
+ | | ||
+ | FloatVec floatVec ; | ||
+ | params.getFloatVals( | ||
+ | int nFloat | ||
+ | cout << " parameter " << floatKeys[i] << " [float]: " ; | ||
+ | for(int j=0; j< nFloat ; j++ ){ | ||
+ | cout << floatVec[j] << ", " ; | ||
+ | } | ||
+ | cout << endl ; | ||
+ | | ||
+ | |||
+ | // extract PFA objects | ||
+ | IMPL:: | ||
+ | int nPFO = col-> | ||
+ | for(int i=0 ; i<nPFO ; ++i){ | ||
+ | EVENT:: | ||
+ | double px = mcp-> | ||
+ | double py = mcp-> | ||
+ | double pz = mcp-> | ||
+ | | ||
+ | | ||
+ | // look at tracks | ||
+ | IMPL:: | ||
+ | int nTRK = col3-> | ||
+ | for(int i=0 ; i<nTRK ; ++i){ | ||
+ | EVENT:: | ||
+ | } | ||
+ | | ||
+ | |||
+ | | ||
+ | } | ||
+ | lcReader-> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | This code example shows how to print float parameters from the EVGEN level (copied from the input ProMC). | ||
+ | Here is the example of all parameters (float, integers, strings): | ||
+ | < | ||
+ | <code cpp> | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | Note that SLCIO files have two records representing truth level MC: MCParticle and MCInfo. MCInfo includes information on generated events. | ||
+ | See the example how this record was created in [[https:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | --- // | ||
| | ||
Line 180: | Line 271: | ||
gGeoManager-> | gGeoManager-> | ||
</ | </ | ||
- | This should popup an OpenGL display with the detector which you can | + | This should popup an OpenGL display with the detector which you can clip, pan, rotate etc. You will the image as shown here: |
- | clip, pan, rotate etc. You will the image as shown here: | + | |
- | + | ||
- | {{: | + | |
+ | {{: | ||
====== People ====== | ====== People ====== | ||