45 B2WARNING(
"BeamParameters changed within the same process, check if this is fine according to the primary generator you are using.");
52 ROOT::Math::PxPyPzEVector momentum = mcParticle.get4Vector();
53 mcParticle.set4Vector(
m_boost * momentum);
54 if (mcParticle.getProductionTime() != 0.) {
55 ROOT::Math::XYZVector v = mcParticle.getProductionVertex();
56 ROOT::Math::PxPyPzEVector productionVertex(v.X(), v.Y(), v.Z(),
Const::speedOfLight * mcParticle.getProductionTime());
57 productionVertex =
m_boost * productionVertex;
58 mcParticle.setProductionVertex(productionVertex.X(), productionVertex.Y(), productionVertex.Z());
61 if (mcParticle.getDecayTime() != 0.) {
62 ROOT::Math::XYZVector v = mcParticle.getDecayVertex();
63 ROOT::Math::PxPyPzEVector decayVertex(v.X(), v.Y(), v.Z(),
Const::speedOfLight * mcParticle.getDecayTime());
64 decayVertex =
m_boost * decayVertex;
65 mcParticle.setDecayVertex(decayVertex.X(), decayVertex.Y(), decayVertex.Z());
bool m_firstEvent
Flag for keeping track of the first call of the event() method.
DBObjPtr< BeamParameters > m_beamParameters
Beam parameters.
void initialize() override
Initialize.
std::string m_mcParticlesName
Name of the MC particles StoreArray.
InitialParticleGeneration m_initial
Initial particle generation.
StoreArray< MCParticle > m_mcParticles
MC particles.
ROOT::Math::LorentzRotation m_boost
Boost rotation.
This class contains the initial state for the given event.
const ROOT::Math::LorentzRotation & getCMSToLab() const
Return the LorentzRotation to convert from CMS to lab frame.
A Class to store the Monte Carlo particle information.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.