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 Geant4InteractionVertexSmear
0018  * \brief Action class to smear the primary vertex (and all outgoing particles) of a single interaction
0019  *
0020  *
0021 @}
0022  */
0023 
0024 #ifndef DDG4_GEANT4INTERACTIONVERTEXSMEAR_H
0025 #define DDG4_GEANT4INTERACTIONVERTEXSMEAR_H
0026 
0027 // Framework include files
0028 #include <DDG4/Geant4GeneratorAction.h>
0029 
0030 // ROOT include files
0031 #include <Math/Vector4D.h>
0032 
0033 /// Namespace for the AIDA detector description toolkit
0034 namespace dd4hep {
0035 
0036   /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
0037   namespace sim {
0038 
0039     /// Forward declarations
0040     class Geant4PrimaryInteraction;
0041 
0042     /// Action class to smear the primary vertex (and all outgoing particles) of a single interaction
0043     /**
0044      * The vertex smearing is steered by a 3D gaussian given by a constant offset and
0045      * the corresponding errors. The interaction to be modified is identified by the
0046      * interaction's unique mask.
0047      *
0048      *  \author  M.Frank
0049      *  \version 1.0
0050      *  \ingroup DD4HEP_SIMULATION
0051      */
0052     class Geant4InteractionVertexSmear: public Geant4GeneratorAction {
0053     public:
0054       /// Interaction definition
0055       typedef Geant4PrimaryInteraction Interaction;
0056 
0057     protected:
0058       /// Property: The constant smearing offset
0059       ROOT::Math::PxPyPzEVector m_offset;
0060       /// Property: The gaussian sigmas to the offset
0061       ROOT::Math::PxPyPzEVector m_sigma;
0062       /// Property: Unique identifier of the interaction created
0063       int m_mask;
0064 
0065       /// Action routine to smear one single interaction according to the properties
0066       void smear(Interaction* interaction)  const;
0067       
0068     public:
0069       /// Inhibit default constructor
0070       Geant4InteractionVertexSmear() = delete;
0071       /// Inhibit copy constructor
0072       Geant4InteractionVertexSmear(const Geant4InteractionVertexSmear& copy) = delete;
0073       /// Standard constructor
0074       Geant4InteractionVertexSmear(Geant4Context* context, const std::string& name);
0075       /// Default destructor
0076       virtual ~Geant4InteractionVertexSmear();
0077       /// Callback to generate primary particles
0078       virtual void operator()(G4Event* event);
0079     };
0080   }    // End namespace sim
0081 }      // End namespace dd4hep
0082 #endif // DDG4_GEANT4INTERACTIONVERTEXSMEAR_H