Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:23

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 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 /** \addtogroup Geant4GeneratorAction
0015  *
0016  @{
0017    \package Geant4InteractionMerger
0018  * \brief Geant4Action to merge several independent interaction to one
0019 @}
0020  */
0021 
0022 #ifndef DDG4_GEANT4INTERACTIONMERGER_H
0023 #define DDG4_GEANT4INTERACTIONMERGER_H
0024 
0025 // Framework include files
0026 #include <DDG4/Geant4GeneratorAction.h>
0027 
0028 /// Namespace for the AIDA detector description toolkit
0029 namespace dd4hep {
0030 
0031   /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
0032   namespace sim {
0033 
0034     // Forward declarations
0035     class Geant4PrimaryInteraction;
0036 
0037     /// Geant4Action to merge several independent interaction to one
0038     /** Merge all interactions created by each \tt{Geant4InputAction} into one single
0039      *  record. The input records are taken from the item \tt{Geant4PrimaryEvent}
0040      *  and are merged into the \tt{Geant4PrimaryInteraction} object attached to the
0041      *  \tt{Geant4Event} event context.
0042      *
0043      *  \author  M.Frank
0044      *  \version 1.0
0045      *  \ingroup DD4HEP_SIMULATION
0046      */
0047     class Geant4InteractionMerger : public Geant4GeneratorAction    {
0048       /// Append input interaction to global output
0049       void appendInteraction(Geant4PrimaryInteraction* output, Geant4PrimaryInteraction* input);
0050     public:
0051       /// Standard constructor
0052       Geant4InteractionMerger(Geant4Context* context, const std::string& nam);
0053       /// Default destructor
0054       virtual ~Geant4InteractionMerger();
0055       /// Event generation action callback
0056       virtual void operator()(G4Event* event);
0057     };
0058   }    // End namespace sim
0059 }      // End namespace dd4hep
0060 
0061 #endif // DDG4_GEANT4INTERACTIONMERGER_H