11#include <framework/datastore/StoreObjPtr.h>
12#include <framework/database/DBObjPtr.h>
13#include <framework/utilities/MultivariateNormalGenerator.h>
14#include <framework/dbobjects/BeamParameters.h>
15#include <framework/dataobjects/MCInitialParticles.h>
17#include <framework/utilities/ConditionalGaussGenerator.h>
19#include <TMatrixDSym.h>
82 const TMatrixDSym& covHER,
const TMatrixDSym& covLER);
110 ROOT::Math::XYZVector
generateVertex(
const ROOT::Math::XYZVector& initial,
const TMatrixDSym& cov,
117 ROOT::Math::PxPyPzEVector
generateBeam(
const ROOT::Math::PxPyPzEVector& initial,
const TMatrixDSym& cov,
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
Class implementing n-dimensional random number generator from Gaussian distribution where the first c...
double getX0spread() const
get the spread of first component which can be used by external generator
Class for accessing objects in the database.
InitialParticleGeneration(int allowedFlags=0)
constructor
const BeamParameters & getBeamParameters() const
Return reference to nominal beam parameters.
DBObjPtr< BeamParameters > m_beamParams
Datastore object containing the nominal beam parameters.
double getNominalEcmsSpread()
Get spread of CMS collision energy calculated from beam parameters.
int m_allowedFlags
Allowed generation flags.
MultivariateNormalGenerator m_generateHER
Generator for HER.
StoreObjPtr< MCInitialParticles > m_event
Datastore object containing the generated event.
MultivariateNormalGenerator m_generateLER
Generator for LER.
MultivariateNormalGenerator m_generateVertex
Generator for Vertex.
ConditionalGaussGenerator m_generateLorentzTransformation
Generator of the Lorentz transformation.
double getNominalEcms()
Get the CMS energy of collisions.
void setAllowedFlags(int allowedFlags)
Set allowed flags.
const ConditionalGaussGenerator & getLorentzGenerator()
Get the generator for the Lorentz transformation.
This class contains the initial state for the given event.
@ c_generateCMS
generate initial event in CMS instead of lab
Class to generate normal distributed, correlated random numbers given the mean values and the covaria...
Type-safe access to single objects in the data store.
ROOT::Math::XYZVector getVertexConditional()
Generate vertex position and possibly update the generator of Lorentz transformation.
void initialize()
function to be executed on initialize()
ROOT::Math::XYZVector updateVertex(bool force=false)
Update the vertex position:
MCInitialParticles & generate()
Generate a new event.
ROOT::Math::XYZVector generateVertex(const ROOT::Math::XYZVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
generate the vertex
ConditionalGaussGenerator initConditionalGenerator(const ROOT::Math::PxPyPzEVector &pHER, const ROOT::Math::PxPyPzEVector &pLER, const TMatrixDSym &covHER, const TMatrixDSym &covLER)
Initialize the conditional generator using HER & LER 4-vectors and HER & LER covariance matrices desc...
TMatrixDSym adjustCovMatrix(TMatrixDSym cov) const
adjust smearing covariance matrix based on the generation flags
ROOT::Math::PxPyPzEVector generateBeam(const ROOT::Math::PxPyPzEVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
generate 4 vector for one beam
Abstract base class for different kinds of events.