9#include <top/reconstruction_cpp/DeltaRayPDF.h>
10#include <top/reconstruction_cpp/TOPRecoManager.h>
11#include <top/geometry/TOPGeometryPar.h>
12#include <framework/logging/Logger.h>
25 m_moduleID(moduleID), m_background(
TOPRecoManager::getBackgroundPDF(moduleID))
28 B2ERROR(
"TOP::DeltaRayPDF: background PDF not found");
34 B2ERROR(
"TOP::DeltaRayPDF: YScanner not found");
40 m_zD = yScanner->getPrism().zD;
41 m_zM = yScanner->getBars().back().zR;
42 double meanE = yScanner->getMeanEnergyBeta1();
43 double sigE = yScanner->getRMSEnergyBeta1();
52 for (
int i = 0; i < N; i++) {
53 double kz = (i + 0.5) * dkz;
60 double dx = 6.0 / (Np - 1);
61 for (
int i = 0; i < Np; i++) {
62 double x = i * dx - 3.0;
72 const auto& emi = track.getEmissionPoint().position;
79 m_TOF = track.getTOF(hypothesis);
82 B2ERROR(
"TOP::DeltaRayPDF::prepare: T0 direct is negative -> set to 0");
86 B2ERROR(
"TOP::DeltaRayPDF::prepare: T0 reflected is negative -> set to 0");
90 double beta = track.getBeta(hypothesis);
91 int PDGCode = std::abs(hypothesis.
getPDGCode());
92 if (PDGCode < 20) PDGCode = -PDGCode;
93 if (track.getCharge() < 0) PDGCode = -PDGCode;
94 double tlen = track.getLengthInQuartz();
116 unsigned k = pixelID - 1;
117 if (k < pixelPDF.size()) {
128 const double sigma0 = 0.15;
131 if (sigma < 0.001)
return timeDistr(t, t0);
142 if (tmax > t0) i1 = t0 / tmax * nt;
144 if (tmin > t0) i2 = t0 / tmin * nt;
158 const double par[] = {0.332741, -0.00331502, 2.0801e-05, -3.43689e-09, -6.35849e-10, 3.54556e-12};
172 const double averagePDE = 1.06404889;
173 const double scaleFactor = 0.79;
175 if (std::abs(PDGCode) == 11) {
176 return 5.30 * scaleFactor / averagePDE;
177 }
else if (PDGCode == -2212) {
178 const double par[] = {13.5859, -28.0625, 17.2684};
179 double f = par[0] + par[1] * beta + par[2] * beta * beta;
180 return f * scaleFactor / averagePDE;
182 const double par[] = { -8.15871, 10.0082, -1.25140, -120.225, 120.210};
183 double f = exp(par[0] + par[1] * beta + par[2] * beta * beta) + exp(par[3] + par[4] * beta);
184 return f * scaleFactor / averagePDE;
Provides a type-safe way to pass members of the chargedStableSet set.
int getPDGCode() const
PDG code.
static const double speedOfLight
[cm/ns]
const std::vector< double > & getPDF() const
Returns pixel part of PDF.
double getEfficiency() const
Returns average of pixel relative efficiencies.
double m_dispersion
dispersion coefficient
double m_dirT0
minimal propagation time of direct photons
double m_reflT0
minimal propagation time of reflected photons
double totalFraction(double tmin, double tmax) const
Total fraction of delta-ray photons within given propagation time interval.
double directFraction(double z) const
Fraction of direct photons from delta-rays, e.g direct/(direct+reflected)
double m_zD
detector (photo-cathode) position in z
double m_dirFrac
fraction of direct photons
void prepare(const TOPTrack &track, const Const::ChargedStable &hypothesis)
Prepare the object.
double m_yE
average photon emission position in y
double m_TOF
time-of-flight of particle
double m_groupIndex
group refractive index
const BackgroundPDF * m_background
background PDF
double photonYield(double beta, int PDGCode) const
Photon yield from delta-rays per track length in quartz for nominal photon detection efficiency.
std::vector< double > m_norms
relative angular distribution normalization constants (cumulative)
std::vector< GausXY > m_tableGaus
table of normal (Gaussian) distribution
double m_zM
spherical mirror position in z
double m_angularNorm
angular distribution normalization constant
double peakFraction(double tmin, double tmax, double t0) const
Fraction of delta-ray photons within given propagation time interval for single peak at t0.
DeltaRayPDF(int moduleID)
Class constructor.
double m_fraction
fraction of delta-ray photons within time window
std::vector< double > m_pixelAcceptances
pixel angular acceptances for direct peak (index = pixelID - 1)
double m_phaseIndex
phase refractive index
double smearedTimeDistr(double t, double t0) const
Smeared time distribution of photons from delta rays (normalized).
const PixelPositions * m_pixelPositions
pixel positions
double angularDistr(double kz) const
Angular distribution of photons from delta rays w/ total reflection requirement.
double m_zE
average photon emission position in z
double m_numPhotons
number of photons
double getPDFValue(int pixelID, double time) const
Returns PDF value at given time and pixel.
double timeDistr(double t, double t0) const
Time distribution of photons from delta rays (normalized).
double m_xE
average photon emission position in x
const std::vector< PixelData > & getPixels() const
Returns pixel data of entire module.
const PixelData & get(int pixelID) const
Returns pixel data for given pixelID.
double getGroupIndexDerivative(double energy) const
Returns the derivative (dn_g/dE) of group refractive index of quartz at given photon energy.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
double getPhaseIndex(double energy) const
Returns phase refractive index of quartz at given photon energy.
double getGroupIndex(double energy) const
Returns group refractive index of quartz at given photon energy.
Singleton class providing pre-constructed reconstruction objects.
static double getMaxTime()
Returns time window upper edge.
static const YScanner * getYScanner(int moduleID)
Returns y-scanner of a given module.
static double getMinTime()
Returns time window lower edge.
Reconstructed track at TOP.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.
Normal (Gaussian) distribution: an entry for the table.