10 #include <generators/modules/SmearPrimaryVertexModule.h>
13 #include <framework/dataobjects/MCInitialParticles.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/logging/Logger.h>
16 #include <mdst/dataobjects/MCParticle.h>
29 setDescription(
"Smears primary vertex and all subsequent vertices of all the MCParticles using the informations stored in BeamParameters.");
31 addParam(
"MCParticlesStoreArrayName", m_MCParticlesName,
"Name of the MCParticles StoreArray.", std::string(
""));
50 if (shift == TVector3{0, 0, 0})
return;
53 mcParticle.setProductionVertex(mcParticle.getProductionVertex() + shift);
55 if (mcParticle.getNDaughters() > 0)
56 mcParticle.setDecayVertex(mcParticle.getDecayVertex() + shift);
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
A Class to store the Monte Carlo particle information.
This module smears the primary vertex (the interaction point) according to the values stored in BeamP...
virtual void initialize() override
Initialize the module.
virtual void event() override
This method is called for each event.
InitialParticleGeneration m_Initial
Initial particle generation.
std::string m_MCParticlesName
Name of the MCParticles StoreArray.
virtual ~SmearPrimaryVertexModule()
Destructor.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
TVector3 updateVertex(bool force=false)
Update the vertex position:
void initialize()
function to be executed on initialize()
Abstract base class for different kinds of events.