Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
fcs:eic:intro [2017/02/07 22:16] hepsim17 |
fcs:eic:intro [2017/04/03 00:54] hepsim17 [Using C++] |
||
---|---|---|---|
Line 65: | Line 65: | ||
fpad check_promc_single.py | fpad check_promc_single.py | ||
</ | </ | ||
- | It makes a few distributions. You can try to calculate Q2 and x_bj using position and energy of the truth-level electrons. Look at the [[community: | + | It makes a few distributions. You can try to calculate Q2 and x_bj using position and energy of the truth-level electrons. Look at the [[: |
You can download all files as: | You can download all files as: | ||
Line 93: | Line 93: | ||
You can run such scripts using " | You can run such scripts using " | ||
- | <note tip>Look at the tutorial [[community: | + | <note tip>Look at the tutorial [[: |
Here is an example of plotting the distribution of pseudorapidity for truth and reconstructed electrons: | Here is an example of plotting the distribution of pseudorapidity for truth and reconstructed electrons: | ||
Line 162: | Line 162: | ||
* fake rate (cannot be done with this sample!) | * fake rate (cannot be done with this sample!) | ||
* calculate Q2 and x_bj, check efficiency and resolutions for these variable | * calculate Q2 and x_bj, check efficiency and resolutions for these variable | ||
- | ====== | + | |
+ | ====== | ||
Line 192: | Line 193: | ||
+ | ====== Using C++ ====== | ||
+ | |||
+ | You can read SLCIO files using a C++ program. As usual, your program can look as this: | ||
+ | |||
+ | <code cpp> | ||
+ | string input=" | ||
+ | LCReader* lcReader = LCFactory:: | ||
+ | lcReader-> | ||
+ | LCEvent* | ||
+ | int nEvents=0; | ||
+ | while( (evt = lcReader-> | ||
+ | if (nEvents==0) UTIL:: | ||
+ | cout << " | ||
+ | // print stored EVGEN parameters | ||
+ | | ||
+ | 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 ; | ||
+ | | ||
+ | | ||
+ | } | ||
+ | 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> | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | For EIC ep events, the relevant parameters for a given DIS event are: | ||
+ | |||
+ | <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:// | ||
--- // | --- // | ||