Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
fcs:eic:intro [2017/04/03 00:38] hepsim17 |
fcs:eic:intro [2017/04/03 00:53] hepsim17 [Using C++] |
||
---|---|---|---|
Line 198: | Line 198: | ||
<code cpp> | <code cpp> | ||
- | |||
string input=" | string input=" | ||
LCReader* lcReader = LCFactory:: | LCReader* lcReader = LCFactory:: | ||
lcReader-> | lcReader-> | ||
LCEvent* | LCEvent* | ||
- | + | int nEvents=0; | |
- | | + | while( (evt = lcReader-> |
- | + | ||
- | | + | |
if (nEvents==0) UTIL:: | 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. | ||
+ | |||
--- // | --- // | ||