Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fcs:eic:intro [2017/04/03 00:43]
hepsim17 [Using C++]
fcs:eic:intro [2017/04/04 15:36] (current)
hepsim17 [Using C++]
Line 198: Line 198:
  
 <code cpp> <code cpp>
- 
 string input="data.slcio"; string input="data.slcio";
 LCReader* lcReader = LCFactory::getInstance()->createLCReader() ; LCReader* lcReader = LCFactory::getInstance()->createLCReader() ;
Line 206: Line 205:
 while( (evt = lcReader->readNextEvent()) != 0 ) { while( (evt = lcReader->readNextEvent()) != 0 ) {
       if (nEvents==0) UTIL::LCTOOLS::dumpEvent( evt ) ;       if (nEvents==0) UTIL::LCTOOLS::dumpEvent( evt ) ;
-      +           cout << "  Run : " << evt->getRunNumber() << " Detector: "      << evt->getDetectorName() <<  endl ; 
 +            
 +           const LCParameters& params=evt->getParameters(); 
 +           // print stored EVGEN parameters
            StringVec floatKeys ;            StringVec floatKeys ;
            int nFloatParameters = params.getFloatKeys( floatKeys ).size() ;            int nFloatParameters = params.getFloatKeys( floatKeys ).size() ;
              
-           // print stored EVGEN parameters 
            for(int i=0; i< nFloatParameters ; i++ ){            for(int i=0; i< nFloatParameters ; i++ ){
               FloatVec floatVec ;               FloatVec floatVec ;
Line 221: Line 222:
                cout << endl ;                cout << endl ;
                                        
-          +   nEvents ++ ;
- nEvents ++ ;+
    }    }
- 
   lcReader->close() ;   lcReader->close() ;
 </code> </code>
  
-This code example prints stored parameters from the EVGEN level. +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):
 <hidden> <hidden>
-<code> +<code cpp
-parameter EVGEN:Code [int]: 10, + parameter EVGEN:Code [int]: 10, 
  parameter EVGEN:DIS:ISR [int]: 0,   parameter EVGEN:DIS:ISR [int]: 0, 
  parameter EVGEN:ID1 [int]: 11,   parameter EVGEN:ID1 [int]: 11, 
Line 262: Line 261:
 </code> </code>
 </hidden> </hidden>
 +
 +For EIC ep events, the relevant parameters for a given DIS event are:
 +
 +<code cpp>
 + parameter EVGEN:eCM [float]: 141 
 + parameter EVGEN:Process [string]: e-p
 + parameter EVGEN:ID1 [int]: 11
 + parameter EVGEN:ID2 [int]: 2212 
 + parameter EVGEN:ProcessID [int]: 10 
 + parameter EVGEN:DIS:Q2 [float]: 12.4407      // Truth-level Q^2
 + parameter EVGEN:DIS:W [float]: 69.6586       // Truth-level W
 + parameter EVGEN:DIS:XBJ [float]: 0.00255778  // Truth_level x_bjorken
 + parameter EVGEN:DIS:YBJ [float]: 0.243193    // Truth_level y_bjorken
 +</code>
 +
 +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://github.com/Argonne-National-Laboratory/ProMC/blob/master/examples/promc2lcio/promc2lcio.java|promc2lcio.java]]
 +
  --- //[[[email protected]|Sergei Chekanov]] 2016/09/19 07:06//  --- //[[[email protected]|Sergei Chekanov]] 2016/09/19 07:06//