Belle II Software prerelease-11-00-00d
InitialParticleGeneration Class Reference

Generate Collision. More...

#include <InitialParticleGeneration.h>

Collaboration diagram for InitialParticleGeneration:

Public Member Functions

 InitialParticleGeneration (int allowedFlags=0)
 constructor
 
MCInitialParticles & generate ()
 Generate a new event.
 
ROOT::Math::XYZVector getVertexConditional ()
 Generate vertex position and possibly update the generator of Lorentz transformation.
 
ROOT::Math::XYZVector updateVertex (bool force=false)
 Update the vertex position:
 
const BeamParameters & getBeamParameters () const
 Return reference to nominal beam parameters.
 
void initialize ()
 function to be executed on initialize()
 
void setAllowedFlags (int allowedFlags)
 Set allowed flags.
 
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 describing spread.
 
double getNominalEcms ()
 Get the CMS energy of collisions.
 
double getNominalEcmsSpread ()
 Get spread of CMS collision energy calculated from beam parameters.
 
const ConditionalGaussGenerator & getLorentzGenerator ()
 Get the generator for the Lorentz transformation.
 

Private Member Functions

MCInitialParticles & generate (int allowedFlags)
 Generate a new event with a particular set of allowed flags.
 
TMatrixDSym adjustCovMatrix (TMatrixDSym cov) const
 adjust smearing covariance matrix based on the generation flags
 
ROOT::Math::XYZVector generateVertex (const ROOT::Math::XYZVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
 generate the vertex
 
ROOT::Math::PxPyPzEVector generateBeam (const ROOT::Math::PxPyPzEVector &initial, const TMatrixDSym &cov, MultivariateNormalGenerator &gen) const
 generate 4 vector for one beam
 

Private Attributes

DBObjPtr< BeamParameters > m_beamParams
 Datastore object containing the nominal beam parameters.
 
StoreObjPtr< MCInitialParticles > m_event
 Datastore object containing the generated event.
 
MultivariateNormalGenerator m_generateHER
 Generator for HER.
 
MultivariateNormalGenerator m_generateLER
 Generator for LER.
 
MultivariateNormalGenerator m_generateVertex
 Generator for Vertex.
 
ConditionalGaussGenerator m_generateLorentzTransformation
 Generator of the Lorentz transformation.
 
int m_allowedFlags
 Allowed generation flags.
 

Detailed Description

Generate Collision.

This class is meant to be a common interface to be used by physics generators for generating the initial beam collision.

A generator module should have this class as a member. In each event, a call to generate() will return the initial event information and also automatically put it in the datastore.

Definition at line 35 of file InitialParticleGeneration.h.

Constructor & Destructor Documentation

◆ InitialParticleGeneration()

InitialParticleGeneration ( int allowedFlags = 0)
inlineexplicit

constructor

Parameters
allowedFlagsallowed generation flags from MCInitialParticles. Default is to allow no smearing. Generation in CMS is always permitted

Definition at line 41 of file InitialParticleGeneration.h.

41: m_allowedFlags(allowedFlags | MCInitialParticles::c_generateCMS) {};

Member Function Documentation

◆ getBeamParameters()

const BeamParameters & getBeamParameters ( ) const
inline

Return reference to nominal beam parameters.

Definition at line 69 of file InitialParticleGeneration.h.

69{ return *m_beamParams; }

◆ getLorentzGenerator()

const ConditionalGaussGenerator & getLorentzGenerator ( )
inline

Get the generator for the Lorentz transformation.

Definition at line 91 of file InitialParticleGeneration.h.

91{ return m_generateLorentzTransformation; }

◆ getNominalEcms()

double getNominalEcms ( )
inline

Get the CMS energy of collisions.

Definition at line 85 of file InitialParticleGeneration.h.

85{ return m_beamParams->getMass(); }

◆ getNominalEcmsSpread()

double getNominalEcmsSpread ( )
inline

Get spread of CMS collision energy calculated from beam parameters.

Definition at line 88 of file InitialParticleGeneration.h.

88{ return m_generateLorentzTransformation.getX0spread(); }

◆ setAllowedFlags()

void setAllowedFlags ( int allowedFlags)
inline

Set allowed flags.

Definition at line 75 of file InitialParticleGeneration.h.

76 {
77 m_allowedFlags = allowedFlags | MCInitialParticles::c_generateCMS;
78 }

Member Data Documentation

◆ m_allowedFlags

int m_allowedFlags
private

Allowed generation flags.

Definition at line 134 of file InitialParticleGeneration.h.

◆ m_beamParams

DBObjPtr<BeamParameters> m_beamParams
private

Datastore object containing the nominal beam parameters.

Definition at line 120 of file InitialParticleGeneration.h.

◆ m_event

StoreObjPtr<MCInitialParticles> m_event
private

Datastore object containing the generated event.

Definition at line 122 of file InitialParticleGeneration.h.

◆ m_generateHER

MultivariateNormalGenerator m_generateHER
private

Generator for HER.

Definition at line 124 of file InitialParticleGeneration.h.

◆ m_generateLER

MultivariateNormalGenerator m_generateLER
private

Generator for LER.

Definition at line 126 of file InitialParticleGeneration.h.

◆ m_generateLorentzTransformation

ConditionalGaussGenerator m_generateLorentzTransformation
private

Generator of the Lorentz transformation.

Definition at line 131 of file InitialParticleGeneration.h.

◆ m_generateVertex

MultivariateNormalGenerator m_generateVertex
private

Generator for Vertex.

Definition at line 128 of file InitialParticleGeneration.h.


The documentation for this class was generated from the following files: