Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /npsim/src/plugins/include/npdet/EICInteractionVertexSmear.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef DD4HEP_DDG4_EICInteractionVertexSmear_H
0002 #define DD4HEP_DDG4_EICInteractionVertexSmear_H
0003 
0004 /** \addtogroup GeneratorAction
0005  * @{
0006    \addtogroup VertexSmearing Vertex Smearing
0007  * \brief Smear the primary vertex (and all outgoing particles) of a single interaction.
0008  *
0009  * Here is an example of usage in python:
0010  *
0011  */
0012 
0013 // Framework include files
0014 #include "DDG4/Geant4GeneratorAction.h"
0015 
0016 // ROOT include files
0017 #include "Math/Vector4D.h"
0018 
0019 namespace npdet {
0020   namespace sim {
0021 
0022     using namespace dd4hep::sim;
0023 
0024     /** Smear the beam to account for the IP beam divergence.
0025      *
0026      * Action class to smear the primary vertex (and all outgoing particles) of a single interaction
0027      * The vertex smearing is steered by a 3D gaussian given by a constant offset and
0028      * the corresponding errors. The interaction to be modified is identified by the
0029      * interaction's unique mask.
0030      *
0031      *  \ingroup GeneratorAction VertexSmearing EIC
0032      *
0033      */
0034     class EICInteractionVertexSmear: public Geant4GeneratorAction {
0035     public:
0036       /// Interaction definition
0037       using Interaction = Geant4PrimaryInteraction;
0038 
0039     protected:
0040       /// Property: The constant smearing offset
0041       ROOT::Math::PxPyPzEVector m_offset = {0, 0, 0, 0};
0042       /// Property: sigma_x,y in units of angle.
0043       ROOT::Math::PxPyPzEVector m_sigma_Ion      = {0.000103, 0.000195, 0.0, 0.0};
0044       ROOT::Math::PxPyPzEVector m_sigma_Electron = {0.000215, 0.000156, 0.0, 0.0};
0045       /// Property: Unique identifier of the interaction created
0046       int m_mask;
0047 
0048       /// Action routine to smear one single interaction according to the properties
0049       void smear(Interaction* interaction)  const;
0050       
0051     public:
0052       /// Inhibit default constructor
0053       EICInteractionVertexSmear() = delete;
0054       /// Inhibit copy constructor
0055       EICInteractionVertexSmear(const EICInteractionVertexSmear& copy) = delete;
0056       /// Standard constructor
0057       EICInteractionVertexSmear(Geant4Context* context, const std::string& name);
0058       /// Default destructor
0059       virtual ~EICInteractionVertexSmear();
0060       /// Callback to generate primary particles
0061       virtual void operator()(G4Event* event);
0062     };
0063   }    // End namespace sim
0064 }      // End namespace dd4hep
0065 
0066 
0067 
0068 //@}
0069 #endif /* DD4HEP_DDG4_EICInteractionVertexSmear_H  */