6 #include "AthLinks/ElementLink.h" 
    8 #include "GaudiKernel/MsgStream.h" 
    9 #include "GaudiKernel/DataSvc.h" 
   10 #include "GaudiKernel/PhysicalConstants.h" 
   31   return StatusCode::SUCCESS;
 
   43     return StatusCode::FAILURE;
 
   48   ATH_MSG_INFO(
"Number of pile-up events in this Athena event: " << mcColl->
size()-1);
 
   51   for (
unsigned int cntr = 0; cntr < mcColl->
size(); ++cntr) {
 
   52     const HepMC::GenEvent* genEvt = (*mcColl)[cntr]; 
 
   61   return StatusCode::SUCCESS;
 
   68   cout << 
"--------------------------------------------------------------------------------\n";
 
   69   cout << 
"GenEvent: #" << 
"NNN" << 
"\n";
 
   70   cout << 
" Entries this event: " << 
event->vertices_size() << 
" vertices, " << 
event->particles_size() << 
" particles.\n";
 
   71   cout << 
"                                    GenParticle Legend\n";
 
   72   if (do4momPtEtaPhi) cout << 
"        Barcode   PDG ID      ( pt,      eta,      phi,     E ) Stat  DecayVtx\n";
 
   73   else                cout << 
"        Barcode   PDG ID      ( Px,       Py,       Pz,     E ) Stat  DecayVtx\n";    
 
   74   cout << 
"--------------------------------------------------------------------------------\n";
 
   78   for (HepMC::GenEvent::vertex_const_iterator iv = 
event->vertices_begin(); iv != 
event->vertices_end(); ++iv) {
 
   82   cout << 
"--------------------------------------------------------------------------------\n";
 
   89   std::ios::fmtflags 
f( cout.flags() ); 
 
   90   cout << 
"GenVertex (" << 
vertex << 
"):";
 
   92     if (
vertex->position().x() != 0.0 && 
vertex->position().y() != 0.0 && 
vertex->position().z() != 0.0) {
 
  101       cout.setf(std::ios::scientific, std::ios::floatfield);
 
  102       cout.setf(std::ios_base::showpos);
 
  103       cout << 
vertex->position().x() << 
",";
 
  106       cout << 
vertex->position().y() << 
",";
 
  109       cout << 
vertex->position().z() << 
",";
 
  112       cout << 
vertex->position().t();
 
  113       cout.setf(std::ios::fmtflags(0), std::ios::floatfield);
 
  114       cout.unsetf(std::ios_base::showpos);
 
  122       cout << 
" (X,cT): 0";
 
  129     if (
vertex->position().x() != 0.0 && 
vertex->position().y() != 0.0 && 
vertex->position().z() != 0.0) {
 
  137       cout.setf(std::ios::scientific, std::ios::floatfield);
 
  138       cout.setf(std::ios_base::showpos);
 
  139       cout << 
vertex->position().x();
 
  142       cout << 
vertex->position().y();
 
  145       cout << 
vertex->position().z();
 
  148       cout << 
vertex->position().t();
 
  149       cout.setf(std::ios::fmtflags(0), std::ios::floatfield);
 
  150       cout.unsetf(std::ios_base::showpos);
 
  164   for (
const auto&  iPIn: 
vertex->particles_in()) {       
 
  165     if ( iPIn == 
vertex->particles_in().front() ) {
 
  168       cout << 
vertex->particles_in().size();
 
  172   for (
const auto& iPOut: 
vertex->particles_out()) {
 
  173     if ( iPOut == 
vertex->particles_out().front()) {
 
  176       cout << 
vertex->particles_out().size();
 
  181   for (HepMC::GenVertex::particles_in_const_iterator iPIn = 
vertex->particles_in_const_begin();
 
  182        iPIn != 
vertex->particles_in_const_end(); ++iPIn) {       
 
  183     if ( iPIn == 
vertex->particles_in_const_begin() ) {
 
  186       cout << 
vertex->particles_in_size();
 
  190   for (HepMC::GenVertex::particles_out_const_iterator iPOut = 
vertex->particles_out_const_begin();
 
  191        iPOut != 
vertex->particles_out_const_end(); ++iPOut) {
 
  192     if ( iPOut == 
vertex->particles_out_const_begin() ) {
 
  195       cout << 
vertex->particles_out_size();
 
  208   std::ios::fmtflags 
f( cout.flags() ); 
 
  216   cout.setf(std::ios::scientific, std::ios::floatfield);
 
  217   cout.setf(std::ios_base::showpos);
 
  218   if (do4momPtEtaPhi) cout << 
particle->momentum().perp() << 
",";
 
  219   else                  cout << 
particle->momentum().px() << 
",";
 
  222   if (do4momPtEtaPhi) cout << 
particle->momentum().pseudoRapidity() << 
",";
 
  223   else                  cout << 
particle->momentum().py() << 
",";
 
  226   if (do4momPtEtaPhi) cout << 
particle->momentum().phi() << 
",";
 
  227   else                  cout << 
particle->momentum().pz() << 
",";
 
  230   cout << 
particle->momentum().e() << 
" ";
 
  231   cout.setf(std::ios::fmtflags(0), std::ios::floatfield);
 
  232   cout.unsetf(std::ios_base::showpos);