11 #include <framework/core/Module.h>
14 #include <TRotation.h>
18 #include <framework/datastore/StoreArray.h>
19 #include <mdst/dataobjects/MCParticle.h>
20 #include <top/dataobjects/TOPSimCalPulse.h>
72 virtual void event()
override;
78 virtual void endRun()
override;
141 bool isInsideSlit(
const TVector3& point,
const TVector3& direction)
const;
Source of optical photons for the simulation of the TOP laser system.
std::string m_angularDistribution
emission angular distribution.
double m_minAlpha
minimum emission angle
TRotation m_rotate
rotation to Belle II frame
TVector3 m_translate
translation to Belle II frame
TF1 * m_customDistribution
Custom angular distribution, that uses m_angularDistribution as formula.
double m_slitZ
slit distance from source
TRotation m_rotateBar
rotation of a bar
double m_cosMinAlpha
for conveniency we calculate the cos of m_minAlpha only once, and then re-use it in several members
StoreArray< TOPSimCalPulse > m_simCalPulses
simulated cal pulse collection
double m_slitDX
slit size in x
double m_wavelength
source wavelenght [nm]
double m_cosMaxAlpha
for conveniency we calculate the cos of m_minAlpha only once, and then re-use it in several members
double m_slitDY
slit size in y
double m_slitX0
slit x-offset in respect to source
double m_na
source numerical aperture.
double m_slitY0
slit y-offset in respect to source
double m_phi
first rotation angle (around z) [deg]
double m_x
source position in x
TVector3 getDirectionUniformRingAngle() const
Return photon direction according to a uniform distribution within m_minAlpha and m_maxAlpha.
double m_theta
second rotation angle (around x) [deg]
double m_startTime
start time
double m_maxAlpha
maximum emission angle
double m_energy
photon energy (from wavelength)
double m_diameter
source diameter
double m_psi
third rotation angle (around z) [deg]
double m_z
source position in z
double m_y
source position in y
double m_pulseWidth
pulse duration (Gaussian sigma)
double m_numPhotons
average number of photons in a pulse
StoreArray< MCParticle > m_MCParticles
MC particles collection.
virtual ~OpticalGunModule()
Destructor.
TVector3 getDirectionLambertian() const
Return photon direction according to a lambertian distribution with opening angle alpha.
virtual void initialize() override
Initialize the Module.
OpticalGunModule()
Constructor.
virtual void event() override
Event processor.
virtual void endRun() override
End-of-run action.
virtual void terminate() override
Termination action.
TVector3 getDirectionGaussian() const
Return photon direction according to a projected 2D gaussian distribution based on numerical aperture...
virtual void beginRun() override
Called when entering a new run.
TVector3 getDirectionUniform() const
Return photon direction according to a projected uniform distribution with opening angle alpha.
void printModuleParams() const
Prints module parameters.
TVector3 getDirectionCustom() const
Return photon direction according to a a custom distribution of theta.
bool isInsideSlit(const TVector3 &point, const TVector3 &direction) const
Checks if photon flies through the slit.
Abstract base class for different kinds of events.