Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:17:19

0001 //==========================================================================
0002 //  AIDA Detector description implementation
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 //
0011 //==========================================================================
0012 #ifndef DDG4_HEPMC_HEPMC3EVENTREADER_H
0013 #define DDG4_HEPMC_HEPMC3EVENTREADER_H
0014 
0015 // Framework include files
0016 #include <DDG4/Geant4InputAction.h>
0017 
0018 namespace HepMC3{ class GenEvent; }
0019 
0020 /// Namespace for the AIDA detector description toolkit
0021 namespace dd4hep  {
0022 
0023   /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
0024   namespace sim  {
0025 
0026     /// Base class to read hepmc3 files.
0027     /**
0028      *  \version 1.0
0029      *  \ingroup DD4HEP_SIMULATION
0030      * @property: Parameters.Flow1
0031      * @property: Parameters.Flow2
0032      */
0033     class HEPMC3EventReader : public Geant4EventReader  {
0034     public:
0035       /// Initializing constructor
0036       explicit HEPMC3EventReader(const std::string& fileName);
0037       /// Default destructor
0038       virtual ~HEPMC3EventReader() = default;
0039 
0040       /// Read an event and fill a vector of Particles and vertices
0041       virtual EventReaderStatus readParticles(int event_number, Vertices& vertices, Particles& particles);
0042       /// Read an event
0043       virtual EventReaderStatus readGenEvent(int event_number, HepMC3::GenEvent& genEvent) = 0;
0044 
0045     protected:
0046       /// name of the GenEvent Attribute storing the color flow1
0047       std::string m_flow1 = "flow1";
0048       /// name of the GenEvent Attribute storing the color flow2
0049       std::string m_flow2 = "flow2";
0050 
0051     };
0052 
0053   }     /* End namespace sim   */
0054 }       /* End namespace dd4hep */
0055 #endif // DDG4_HEPMC_HEPMC3EVENTREADER_H